ConBee ZigBee Stick and HA, will this work together?

Getting deconz up and running in kvm is just a matter of installing Debian in kvm, but also assigning the conbee to be attached to the vm. I run unraid so it’s very point-and-clicky, but the config that needs to be added is:

    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x0403'/>
        <product id='0x6015'/>
        <address bus='1' device='11'/>
      </source>
      <alias name='hostdev0'/>
      <address type='usb' bus='0' port='1'/>
    </hostdev>

Once Debian is up and running, just install the deconz deb package from Dresden Elektronik’s website (dpkg -i deconz-2.04.99-qt5.deb). See my Dockerfile below for the packages you need to install beforehand. Hopefully, it should be working in Docker pretty soon anyway.

I’m not keen on reinstalling deconz now, but if I do, I’ll be sure to write a proper guide for this.

FROM ubuntu:xenial

ENV DECONZ_VERSION 2.04.99
ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update && \
    apt-get install -y --no-install-recommends \
    ca-certificates \
    curl \
    libqt5core5a \
    libqt5network5 \
    libqt5widgets5 \
    libqt5gui5 \
    libqt5serialport5 \
    libqt5websockets5 \
    libqt5sql5 \
    sqlite3 && \
    apt-get clean

RUN curl -O https://www.dresden-elektronik.de/deconz/ubuntu/beta/deconz-${DECONZ_VERSION}-qt5.deb && \
    dpkg -i deconz-${DECONZ_VERSION}-qt5.deb && \
    rm deconz-${DECONZ_VERSION}-qt5.deb

RUN chown root:root /usr/bin/deCONZ*

VOLUME ["/root/.local/share/dresden-elektronik/deCONZ"]

CMD /usr/bin/deCONZ --auto-connect=1 -platform minimal --http-port=8080 --dbg-error=1
1 Like

The Trådfri lights have been rock-solid using the Trådfri gateway, especially after the last few updates. Using conbee however is a different story. Guessing it’s this issue, so I’m using the Tradfri gateway for the light until they release an update to address this.

Because I don’t fully understand, but I have your flow working in my setup, what’s the use case?

I have added a MI Temperature & Humidity Sensor to Deconz and named it in the web interface (pwa) and it is show in HASS as name and name_2.

So I used the friendly_name in customise to distinguish between them (and hide the humidity, as the temp was all I wanted). All was good, until I restarted HASS and suddenly the 2 sensors had swapped around, and now th temp was hidden and the humidity was being shown.

Is there any configuration I need to do to give them different names in deConz so they will constantly be the same in HASS?

Ben

I thought that I had fixed it, but apparently the fix wasn’t enough. I don’t have this kind of devices myself. There is new functionality arriving in hass (hopefully this week), that will solve it.

What you can do to remedy this is by renaming the sensors individually over deconz API. The issue lies with the sensors having the same name forcing hass to add a suffix

Hi @Robban, I found the post above and have been playing with trying to update via the API.

I have been able to read the sensors with my web browser using the API key from deconz.conf.

e.g.

http://10.0.0.100/api/XXXXXXX/sensors/3

returns

{"config":{"on":true,"reachable":true},"ep":1,"etag":"f9d14c549c3d9a1a73a88f4fdf205859","manufacturername":"LUMI","modelid":"lumi.sensor_ht","name":"Conservatory Temperature","state":{"humidity":5164,"lastupdated":"2018-01-29T20:43:49"},"type":"ZHAHumidity","uniqueid":"00:15:8d:00:02:10:0c:0b-01-0405"}

So with the deconz.configure service I’m sending

{"field":"/sensors/3", "data":{"name":"new_name"}}

and its giving me this error message (and not changing the name) in the log.

Error getting deCONZ data from http://10.0.0.100:80/api/XXXXXX/sensors/3.
21:44 components/deconz/__init__.py (ERROR)

Any thoughts on what I should do?

Ben

You are the first trying the service. Alas there is a small bug in the service being the wrong type failing the call. I have a fix in a PR that will also allow you to use the entity I’d to do the service call. It’s in review right now

1 Like

Ah ok,

Not to worry then, I’ll look for the next upgrade. Good job on all this :slight_smile: by the way!

Thanks Ben

2 Likes

Thanks! :slight_smile:

Posted a PR that solves the service issue. https://github.com/home-assistant/home-assistant/pull/12067

@Robban, so far my things works pretty good. I have one suggestion which i never got to make in my module. A service that can be called in automations so that it refreshes the items from deConz. In my case some lights get’s Powered off so if i restart HASS in a point where the light are not on then they won’t be shown in HASS until it get’s restarted. I think it would be nice to have a service that i can call from automation on a interval that refreshes the entites from deConz.

2 Likes

Can you check if your devices generate a web socket event like ‘added’ or similar? Then it would behave the same as adding new devices which I’ve planned to support

So I’m not sure if this is the best place to ask this, but I’m interested in replacing my Xiaomi Gateway with a Conbee Stick, but I would like to know how the latency of when a sensor is triggered to it updating in HASS is using deCONZ and Conbee.

In particular I have a number of Aqara Human Body Sensors that are on busy doorways and the current method of using the Xiaomi Gateway has about a 2 minute reset time once the motion sensor is triggered. This makes it basically unusable to detect people coming through the doorway if they are within 2 minutes of each other. Is the Conbee and deConz better?

That is probably a configuration issue with your motion detector, normally you can change how long it should keep high.

I know people change that value for hue and trådfri motion sensors

According to another thread, there is no way to change it, the best you can do is to manually change the code to get HA to poll the gateway every 5 secs instead of every 30 secs (default). The problem is that the motion sensor only updates the gateway every minute or so and there is no guarantee that HA and the gateway are polling are in sync, so HA could miss the update.

That’s why I want to know if this Conbee + deCONZ setup is a better alternative

Sorry I can’t answer that since I don’t have one of those sensors. I like deconz but I don’t know if it will magically fix the behavior or not. Maybe you can create an issue in their GitHub and ask this question, they should be able to answer on the implementation of deconz.

I have a working Docker container for Conbee, which has replaced my virtual machine. I’m sure it can be useful for someone. :slight_smile:

See https://hub.docker.com/r/joch/deconz/ for instructions.

Does it also work to upgrade the firmware?

Not sure, since I’m on the latest version right now, but I’ll check once an update is out.

Nice job! I’ll give it a try right now.

Update: Migrated my config from my ubuntu server by copying all the files in /home/pi/.local/share/dresden-elektronik/deCONZ/ to a folder on my docker host. Created the container with the command found on dockerhub.

After it was started I needed to get a new API KEY, the discovery function wouldn’t work so i used Postman in google chrome to create an API call.

There is documentation to be found here: https://dresden-elektronik.github.io/deconz-rest-doc/configuration/#aquireapikey

Just copy the example request data and replace the username with something you want as API KEY, can be a regular password, then hit post and it will be configured.

Works really good!