You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/_components/sensor.arest.markdown
+11-7Lines changed: 11 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@ footer: true
10
10
logo: arest.png
11
11
ha_category: Sensor
12
12
ha_iot_class: "Local Polling"
13
+
ha_release: pre 0.7
13
14
---
14
15
15
16
@@ -19,8 +20,9 @@ To use your aREST enabled device in your installation, add the following to your
19
20
20
21
```yaml
21
22
# Example configuration.yaml entry
23
+
sensor:
22
24
- platform: arest
23
-
resource: http://10.100.0.117
25
+
resource: http://IP_ADDRESS
24
26
monitored_variables:
25
27
temperature:
26
28
name: temperature
@@ -34,13 +36,15 @@ Configuration variables:
34
36
- **resource** (*Required*): IP address and schema of the device that is exposing an aREST API, e.g. http://192.168.1.10.
35
37
- **name** (*Optional*): Let you overwrite the the name of the device. By default *name* from the device is used.
36
38
- **monitored_variables** array (*Optional*): List of exposed variables.
37
-
- **name** (*Required*): The name of the variable you wish to monitor.
38
-
- **unit_of_measurement** (*Optional*): Defines the units of measurement of the sensor, if any.
39
-
- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload.
39
+
- **[variable]** (*Required*): Name of the variable to monitor.
40
+
- **name** (*Optional*): The name to use for the frontend.
41
+
- **unit_of_measurement** (*Optional*): Defines the units of measurement of the sensor, if any.
42
+
- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload.
40
43
- **pins** array (*Optional*): List of pins to monitor. Analog pins need a leading **A** for the pin number.
41
-
- **name** (*Optional*): The name of the variable you wish to monitor.
42
-
- **unit_of_measurement** (*Optional*): Defines the unit of measurement of the sensor, if any.
43
-
- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload.
44
+
- **[pin]** (*Required*): Pin number to use.
45
+
- **name** (*Required*): The name of the variable you wish to monitor.
46
+
- **unit_of_measurement** (*Optional*): Defines the unit of measurement of the sensor, if any.
47
+
- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload.
44
48
45
49
The variables in the `monitored_variables` array must be available in the response of the device. As a starting point you could use the one of the example sketches (eg. [Ethernet](https://raw.githubusercontent.com/marcoschwartz/aREST/master/examples/Ethernet/Ethernet.ino) for an Arduino with Ethernet shield). In those sketches are two variables (`temperature` and `humidity`) available which will act as endpoints.
Copy file name to clipboardExpand all lines: source/_components/switch.arest.markdown
+2-6Lines changed: 2 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -25,8 +25,6 @@ switch:
25
25
pins:
26
26
11:
27
27
name: Fan
28
-
12:
29
-
name: Light Desk
30
28
```
31
29
32
30
If you want to use custom functions, then add the following to your `configuration.yaml` file:
@@ -39,21 +37,19 @@ switch:
39
37
name: Office
40
38
functions:
41
39
function1:
42
-
name:
43
-
function2:
44
40
name: Light Desk
45
41
```
46
42
47
43
Configuration variables:
48
44
49
45
- **resource** (*Required*): IP address and schema of the device that is exposing an aREST API, eg. http://192.168.1.10 (no-trailing slash)
50
46
- **name** (*Optional*): Let you overwrite the the name of the device. By default *name* from the device is used.
51
-
- **pins** array (*Required*): An array with all used pins.
47
+
- **pins** array (*Optional*): An array with all used pins.
52
48
- **name** (*Required*): The name of the pin to use in the frontend.
53
49
54
50
or
55
51
56
-
- **functions** array (*Required*): An array with all used functions.
52
+
- **functions** array (*Optional*): An array with all used functions.
57
53
- **name** (*Required*): The name to use in the frontend.
58
54
59
55
You can still switch your pins with a web browser or a command line tool. Use the URL http://192.168.1.10/digital/8/1 to set pin 8 to high/on, the JSON response will give you the feedback.
0 commit comments