deConz / RaspBee integration

I am looking into replacing my IKEA trådfri gateway and Hue Gateway with the RaspBee because it seems much cooler especially that it supports IKEA remotes and i can use them for whatever i want and also because it supports Websockets so i don’t have to bother with polling the Philips Gateway when there is motion on my hue motion sensor BUT i am in doubt whether the websockets will work in HASS hue component which i understand should support the RaspBee gateway, any ideas ?

@ako @Lapatoc @petepriority @thundergreen what’s your take on this ?



I didn’t know about the websockets capability until now. That sounds really cool!
As I see it, it seems that HA does not have any easy way to handle this. However, I don’t think it would be hard to implement. If I have some time I might play around with it this week.

@petepriority yes that’s a major deal getting rid of the polling and eventually the other gateways. I think the range on this gateway is much better (at least i’ve heard). I’ve ordered an RaspBee so i am looking forward to move over to it this week.

+1 interested in your results. Even more if you can test with some xiaomi devices. (I’m looking for a way to replace xiaomi gateways)

Very interested as well…

The only thing that doesn’t sound too good is what I found on Amazon. One customer said this in his review:

I don't like it because the software that controls this is a GUI software where this chip is for a raspberry pi. A linux software that serves a light should be running as a background and not a GUI software which you have to load up before it works. I bought this chip just to use it to update my FLS-pp lights. I have no intention to use it as replacement of a hue hub.

I could also imagine to replace my xaomi and hue hub with such solution. In this case it would be great if the emulate hue software could emulate all functions to run apps like hue disco…

I just mashed together a simple websocket client in python. It works!
Here’s the output after using my Hue dim remote

# on
# off
# brighter
# dimmer

Here’s the script. Nothing fancy:

import websocket

def on_message(ws, message):

def on_error(ws, error):

def on_close(ws):
    print("### closed ###")

def on_open(ws):
    print("### opened ###")

if __name__ == "__main__":
    ws = websocket.WebSocketApp(
        on_message = on_message,
        on_error = on_error,
        on_close = on_close
    ws.on_open = on_open

That’s true, unfortunately. I run mine in a vncserver session which works fine.

cool, do you have any xaomi component to test?

Sorry, I only have Philips devices.

I finally got myself some Tradfri devices, including a motion sensor. I’ve written a fairly basic websocket component and a binary_sensor platform for deconz. You can find it here:
If you want to test it, get the homeassistant/components/ and the homeassistant/components/binary_sensor/ and put them into the custom_components/ and custom_components/binary_sensor/ folders in your configuration directory, respectively. You will also have to change the line

import homeassistant.components.deconz as deconz


import custom_components.deconz as deconz

in the file.

In your configuration, load the deconz websocket component:

  host: ""
  port: "443"

the configuration values shown are the defaults. Modify according to your setup.

Find the id of your motion sensor (see and add a binary sensor:

  - platform: deconz_motion
      <id>: <sensor name>

This should get you going. You will need a current beta of deconz, which you can find here:
The code is not very clean, and this might not be the best way to have done it. Also, the websocket component will stop working if it loses connection. I might add this when I find the time. Any suggestions are welcome!


I also made one, you can find it here :


@DanielGalle & @petepriority you do NOT need a GUI just run deConz like this:


I also created a docker image which I use on my pi. It works perfectly without any display adapter or vnc session.

Have a look here:

1 Like

The betas support headless mode via the parameter -platform minimal. They also come with a systemd service file. You can find the betas here: