Homebridge programmables switches that can be triggered by calling HTTP handler
- Install Homebridge using:
npm install -g homebridge
- Install this plugin using
npm install -g homebridge-http-programmableswitch
- Edit your configuration file like the example below and restart Homebridge.
{
"accessory": "HttpProgrammableSwitch",
"name": "My switches",
"port": 3001,
"switches": [
{"name": "Switch A", "path": "/swa"},
{"name": "An other switch", "path": "/anotherswitch", "maxValue": 0},
...
]
}
Web server port
Name of your accessory
Array of all your switches with the following properties :
name
: Name of your switchpath
: the switch path you want to usemaxValue
: can have 3 differents values:0
for only simple press,1
for simple press and double press,2
(default) for simple, double and long press.
Trigger an event by calling the url http://yourHomebridgeIp:port/switchPath[/X]
. X can have the following values:
0
or no value: Simple press1
: double press2
: double press
Exemple: http://192.168.0.100:3001/swa/1
to trigger a double click on the switch 'Switch A' in the example.
- Sometime, the configuration in Home app takes 1 or 2 minutes to appear.
- The name of your switch does not appear in Home app but appear in Eve app