Install this Shortcut on your iOS device: https://routinehub.co/shortcut/4310
There’s also a link in there for a second shortcut to generate and retrieve your Hue API Key.
Once you’ve got the shortcut running, it should show you all the Hue Labs scenes on your Hue Bridge. Pick one, and from the submenu, hit up the CURL ON and CURL OFF buttons, which will give you the curl scripts you need to call.
Knock up a pair of bash scripts with the contents of each curl call...
scene ON will be along lines of:
Code: Select all
#!/bin/bash
curl --header "Content-Type: application/json" --request PUT --data '{"status":1}' http://<bridge-ip-address>/api/<api-key>/sensors/<int>/state
and scene OFF will be along lines of:
Code: Select all
#!/bin/bash
curl --header "Content-Type: application/json" --request PUT --data '{"status":0}' http://<bridge-ip-address>/api/<api-key>/sensors/<int>/state
Save and chmod +x the pair of them, then use script:///home/pi/scene_on.sh for the On action of a Domoticz switch and script:///home/pi/scene_off.sh for the Off action.
homebridge should pick up the changes within 10 minutes of you adding the switch in Domoticz, and add the new switch to your HomeKit home’s default room automatically (if you’re running homebridge-edomoticz)
