aREST Switch Support
The arest switch platform allows you to toggle pins of your devices (like Arduino boards with a ethernet/wifi connection, the ESP8266, and the Raspberry Pi) running the aREST RESTful framework.
To use your aREST enabled device in your installation, add the following to your configuration.yaml
file:
1 2 3 4 5 6 7 8 9 |
|
Configuration variables:
- resource (Required): IP address and schema of the device that is exposing an aREST API, e.g. http://192.168.1.10.
- pins (Required): An array with all used pins of your board.
- name (Required): The name of the pin you wish to toggle.
Accessing one of the endpoints (eg. http://192.168.1.10/analog/2/) will give you a JSON response. The interesting part is return_value
which represents the sensor’s data.
1
|
|