REST API to control GPIO chips
- Free software: MIT license
- TODO
Returns json data about a the number of relays.
URL
/relays/count
Method:
GET
Success Response:
- Code: 200 Content: { count : 42 }
Returns json data about a relay.
URL
/relays/:id
Method:
GET
Success Response:
- Code: 200 Content: { "relay_id" : 0, "status": "1"}
- Code: 200 Content: { "relay_id" : 0, "status": "0"}
Returns raw text containing the on/off state.
URL
/relays/:id/state
Method:
GET
Success Response:
- Code: 200 Content: 1
- Code: 200 Content: 0
Change the state of a relay, either on or off.
URL
/relays/:id/state
Method:
PUT
Success Response:
- Code: 200 Content: {"status": "ok"}