RaspBee ZigBee

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.

Example configuration.yaml entry

switch:

  • platform: command_line
    switches:
    autoremote:
    command_on: ‘python3 /home/homeassistant/.homeassistant/son.py’
    command_off: ‘python3 /home/homeassistant/.homeassistant/soff.py’

onoff.py

import requests
import json
payload = “{“on”: false}”
payload = “{“on”: true}”
url = “http://192.168.0.6:8011/api/F659352645/lights/1/state
headers = {“Content-Type”: “application/json”}
r = requests.put(url, data=payload, headers=headers)

That’s cool. What bulbs are using? What OS are you using on your PI? Does Rest API require X-server or is it required for Zigbee network setup?

Sorry, to many questions on my side. I’m looking to buy this module too but can find any detail information on usage.

I will be pleased to answer your questions and give further information.

Switch/ bulbs:

OS: https://www.raspberrypi.org/downloads/raspbian/ -> latest version

Setup RaspBee (in German):

Alex

1 Like

Thanks. You can try restfull switch component.

I’ve found mentions about deconz in hue component. Could you try it and share results?

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.
1 Like

Great news!

Can this be used as a gateway for other Zigbee devices other than the Hue?

According to this, yes. I haven’t tried it with anything other than Hue bulbs, though.

hi, i’m using osram lightify devices and it works fine

This are great news guy as hue hub seems losing my lights and Dimmers all the time I just ordered this dongle and I’m glad to hear it works

I think I’ll setup a dedicated pi for this … by suggestions?

Just Tonne clear… this Stick will hopefully completely replace my current hue hub right?

Have you tried RGB lights or just white ones?

Could you share your codes?

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!

Ok, so, VERY new to this…

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.

How do I add the lights to the network?

How do i specify the port to use?

I’m sorry for the noob questions.

Any help at all would be much appreciated.

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.

Thanks Pete.

I’ve used VNC (tightVNC) in a couple of environments. Windows & on a retropie set up i made a few years ago.

the desktop stuff is what i was missing.

then i just need to figure out the rest of the stuff after that!

:slight_smile:

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.

1 Like

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.