1.0.0 • Published 7 years ago
@eldilor/homebridge-http-light v1.0.0
homebridge-light-http
Installation
- Install homebridge, running
npm install -g homebrige - Install homebridge-light-http, running
npm install -g homebridge-light-http - Update your
config.jsonfile in~/.homebridge/config.json
Configuration
You can specify following fields:
- name - it will be displayed in Home App on your iOS device
- pin - integer that will be used to set and get state
- url - url for requests
- debug - used for logging output to console
Sample
API
Your API need to handle following 2 endpoints:
/with GET method for getting current state. Pin will be passed in URL aspin. The API must return1when the light is on, and0when it's off./with POST method for setting state. In body there will be passed 2 variables:pinandaction. The action will be eitherTURN_ONorTURN_OFF
You can find API example here
1.0.0
7 years ago