I used the “command_line switch” and a py-script to control the lights. I works fine but there is a delay (about 3-4 seconds) when I switch from on to off an vice versa.
I just bought a ConBee (the USB-variant of the RaspBee) and found out that the deCONZ Rest-API is compatible with the Hue component of HA (there’s a warning that HA couldn’t import groups, so apparently not fully compatible).
To do this, run deCONZ --http-port=80 and point your Hue component to the deCONZ server, localhost in my case:
light:
platform: hue
host: 127.0.0.1
After restarting HA, follow the configuration instructions of the Hue component. When it asks you to push the link button on the Hue bridge, go to Settings in the deCONZ web interface and press “Unlock Gateway”. After this, pairing should succeed and you should see the lights appearing in HA.
Some notes:
I haven’t found a way to tell the hue component to connect to a different port, so the --http-port=80 seems necessary at the moment.
I use deCONZ 2.04.35 which seems to already come with the Rest-API plugin installed, so no need to build it yourself.
I ordered the RaspBee and promptly followed the instructions when installing but it wouldn’t allow my pi 3 to boot once I had placed it on the GPIO pins (correctly). I removed the Raspbee but still no boot. Seems odd. I had HA AIO running perfectly prior to this. Any suggestions? Thanks!
I’ve installed HA from the all-in-one installer on top of Raspbian-jessie-lite. I have a Conbee dongle inserted into the same RPi.
I have installed the deCONZ REST-API. Now what?
I’m totally lost.
How do i get to the deCONZ configuration?
What do I have to enter into the configuration.yaml file to get this dongle to work with HA?
Everything I’ve found expects the dongle to be installed on a stand-alone machine running a desktop environment to be able to use the deCONZ GUI.
I haven’t found anything like a “ConBee for dummies” to step me through the installation in HA. Is there anything like that available?
I try to run the command above (deCONZ --http-port=80) and i get “QXcbConnection: could not connect to display aborted”. I’m obviously not connected to any display as I’m running HA headless over SSH.
I see the example in post 3 above from ako but I’m not sure how that intersects with my installation.
Try running the command deCONZ --http-port=80 in a display environment. Raspbian Lite seems to come without any, so I recommend you set up a VNC server, connect to it from your PC with a VNC client and run the command from there.
See: https://www.raspberrypi.org/documentation/remote-access/vnc/ and here for general information on what VNC is.
According to this you also need to install the required X server packages as they don’t seem to be included in raspbian lite.
The rest then should be easy. As soon as you have deconz --http-port=80 running, direct your browser to the address of your raspberry pi and follow the instructions in here starting from page 3. If you have trouble adding your lights to the network, try resetting them (page 15).
When you’re finished setting up your lights you can add them to homeassistant by adding the following to your config (replacing the host IP accordingly
light:
platform: hue
host: 127.0.0.1
After a restart, when the hue wizard in HA prompts you to press a button on the hue bridge, go to the webinterface and under settings click ‘open network’. Now you should start seeing your lights pop up in HA.
I got this working perfectly on a different raspberry pi using the raspbee - my only correction would be that in order for HA to connect to the raspbee hue platform, click the ‘unlock gateway’ button which is also found in settings just above ‘open network’. Thanks for all the help!
I have this running on a different raspberry pi than HA but the lag for turning off/on lights is almost zero in my opinion.