From 2af515296be4271b8a16561020e3a37993e22ed4 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 11 Sep 2015 23:42:14 +0200 Subject: [PATCH] Add arest switch page --- source/components/switch.arest.markdown | 40 +++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 source/components/switch.arest.markdown diff --git a/source/components/switch.arest.markdown b/source/components/switch.arest.markdown new file mode 100644 index 00000000000..bb80a3877fc --- /dev/null +++ b/source/components/switch.arest.markdown @@ -0,0 +1,40 @@ +--- +layout: page +title: "aREST switch support" +description: "Instructions how to integrate aREST switches within Home Assistant." +date: 2015-09-11 23:15 +sidebar: false +comments: false +sharing: true +footer: true +--- + + +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](http://arest.io/) RESTful framework. + +To use your aREST enabled device in your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +switch: + platform: arest + resource: http://IP_ADDRESS + pins: + 11: + name: Fan Office + 12: + name: Light Desk +``` + +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 variable you wish to monitor. + +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. + +```json +{"return_value": 34, "id": "sensor02", "name": "livingroom", "connected": true} +``` +