Saturday, April 15, 2017

Motion Lights using Philips Hue with Z-Wave Sensors

To work around the limitations of Fibaro HCL that does not allow you to use LUA scripts, Domotics fill that gap and allows you to use more than just Z-wave devices.

The major problem with using Hue with the HCL, is that the Hue API requires action via a HTTP PUT to change the state of the lights. The HCL only allows HTTP GET using the string method for Virtual Devices.

Domoticz allows you to add Hue directly as "Hardware" and automatically adds all the  bulbs and scenes as "Devices". To trigger the API to Domoticz, we use HTTP GET (yes, that is a Yay!!!).

Create a 2 button virtual device with the following string using the IP address and port of the Domoticz server

On button:

GET /json.htm?type=command&param=switchlight&idx=&switchcmd=On&level=0&passcode= HTTP/1.10x0D0x0A0x0D0x0A

Off  button:

GET /json.htm?type=command&param=switchlight&idx=&switchcmd=Off&level=0&passcode= HTTP/1.10x0D0x0A0x0D0x0A

When we create the new scene with the motion sensor being "breached", we can then select the On to link to the new Virtual Device.

Now for the vanity part where we can use Domotics FibaroLink to update the status of the virtual device label in Fibaro. This is best described in this link :


No comments:

dead pi

Well, I guess it has to happen at some point. the home automation raspberry pi has died. Much to do with the stupid Strontium mini SD card. ...