Skip to content

Commit 0dd2908

Browse files
Add description of the gear element
1 parent aaabdb5 commit 0dd2908

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,14 @@ The hardware interface is configured through the file /etc/house/relays.json. A
3636
{
3737
"name" : "relay1",
3838
"gpio" : 4,
39-
"on" : 0
39+
"on" : 0,
40+
"gear" : "valve"
4041
},
4142
{
4243
"name" : "relay2",
4344
"gpio" : 17,
44-
"on" : 0
45+
"on" : 0,
46+
"gear" : "valve"
4547
}
4648
]
4749
}
@@ -53,6 +55,8 @@ If on is 0, the output is configured as open-drain, the on command sets the outp
5355

5456
If on is 1, the output is configured as 3-state, the on command sets the output to 1, and the off command sets the output to 0.
5557

58+
The gear attribute is used by applications to filter which control points to show on their user interface. The typical values are valve (irrigation) and light.
59+
5660
## Web API
5761

5862
This program implements the House control web API.
@@ -71,7 +75,7 @@ The basic services included are:
7175
```
7276
GET /relays/status
7377
```
74-
Returns a status JSON object that lists each relay by name. Each relay is itself an object with a state element and an optional pulse element. The state is either on or 1 (active), or else off or 0 (inactive). The pulse element is present if there is a pulse timer active (see below for more information about pulses) and indicates the remaining number of seconds during which the current statei will be maintained.
78+
Returns a status JSON object that lists each relay by name. Each relay is itself an object with state, command and gear elements and an optional pulse element. The state and commandelements are either on or 1 (active), or else off or 0 (inactive). The pulse element is present if there is a pulse timer active (see below for more information about pulses) and indicates the remaining number of seconds during which the current state will be maintained.
7579
```
7680
GET /relays/set?point=NAME&state=off|0|on|1
7781
GET /relays/set?point=NAME&state=off|0|on|1&pulse=N

0 commit comments

Comments
 (0)