Zigbee woes

Are there any authorative documents on zigbee integration in Home Assistant?

  1. What zibee radio hardware works and with what component(s)
  2. Why two components, Zigbee or Zigbee Home Automation, what are they for? Seems both Xbee but not ConBee?

Currently I feel zigbee is a grey, misty area with loads of opinions, hacks and flashing, nothing I feel warm and fuzzy about. There are some posts in the forums around this but no good summaries or conclutions.

The deConz component requires yet another app running as another point of failure, I’m not really comfortable with that.

Currently it seems to me I have to run another controller like Smartthings for Zigbee and hook up Home Assistant through mqtt but I’d really like to avoid anything cloudy.

So, anyone have any pointers to something authorative, preferably about direct interface with ConBee as I was stupid enough to get that stick based on a ‘it works with home assistant’ without checking the details.

I want to run some zigbee based lights (Hue, Ikea) and some Elko dimmers for now.

Partly answering your question. Zigbee Home Automation (HA) and Zigbee Light Link (ZLL) are two of the many profiles of the Zigbee 2.0 standard. The different profiles did not work well together (if at all). They (the Zigbee alliance) recognized that this is not good and changed this in Zigbee 3.0. In Zigbee 3.0 all profiles are (can be?) merged into one system. So with Zigbee 3.0 it should be much easier to have your lamps and home automation work together.

Philips HUE was using Zigbee 2.0 Light Link (ZLL) and earlier this year moved to Zigbee 3.0. The older lamps with ZLL are backwards compatible so they do not need to be updated. Also Zigbee 3.0 lamps should be working with a Zigbee 2 (ZLL) bridge (forward and backwards compatible)

Osram Lightify came in Europe with ZLL and Osram Sylvania in the USA came with Home Automation (ZHA). It looks like that Osram is also going to Zigbee 3.0 and in that case it might get easier.

My own experience is only with Philips HUE and conBee bridges. I have Philips and Osram lamps connected to me HUE bridge and I have Ikea float lamps + sensors + remote (switches) and Dresden elektronics dimmers connected to a conBee. The Philips HUE bridge is now upgrade to Zigbee 3.0 and all works fine for me with homeassistant. My plan is to move all lamps to the conBee and switch off the Philips HUE.

You say: “The deConz component requires yet another app running as another point of failure, I’m not really comfortable with that.” Well a Philips HUE bridge is in fact a complete linux computer. Any bridge you add is an extra point of failure…

So why do you think conBee is not working with homeassistant? As far as I can tell conBee supports more components than any other Zigbee bridge.
I do not know about Osram Sylvania ZHA devices as we do not have those were I live.

1 Like

I’m not gonna say too much about the zigbee components of hass. Right now there is some development effort in the zha component but seems to be slowing down again and not supporting a lot of devices yet.

With Conbee and deconz there is a company (Dresden elektronik) behind the zigbee implementation. Which is actively developed and supports most of zigbee devices out there. Sure the device support isn’t perfect yet but they’ve been quite responsive with support on both requests for new devices as well as with bug fixes.

The community have brought out a great docker container for deconz and a pretty decent integration with HASS. And you don’t depend on an extra device with its own power source and some good diagnostics tools to debug your zigbee mesh.

/R

@Robban
Some questions about deconz,
Do the conbee and raspbee act as gateways to the deconz software and can multiple ones be added to extend the range of the zigbee network
Does deconz need to be running on each device that hosts the conbee or raspbee or do they act as routers to the deconz server if run in a docker

With the raspbee modules, i have a number of raspberry pi around the house running other software, could i add the module and create another gateway (and extend zigbee network) whilst still running the other software

If this is a stable platform and integration is good, i can see this as alternative to people who like me need multiple xiaomi gateways and also completely run locally

There is a 1-1 match between deconz and the hardware. You could theoretically have the hardware on a raspberry pi somewhere and use a usb<->tcp connection to the machine running deconz.

Regarding extending range, Zigbee is a meshed network of devices and all devices powered from the mainline will be repeaters in this network. So to extend your Zigbee network all you need is an additional light or wall plug.

If what you want are multiple smaller networks with sensors you could have one conbee+deconz per machine. But right now the deconz component in hass only supports one instance of deconz, though I’m looking into supporting multiple further down the line.

Thx for extensive reply @phsdv, seems to me my way forward for testing should be the docker deconz, prolly production should be Smartthings.

I agree with the ‘company behind’ argument (@Robban) but the same argument applies to use a production level system like Smartthings instead of Home Assistant.

I quite like tinkering with hass but integration woes makes for low wife acceptance factor and there is quite some devices on zigbee and they should have been somewhat more plug & play to set up.

So, off to test some deconz dockers to see how it behaves.

-f

This is the docker to go with for deconz: https://github.com/marthoc/docker-deconz

I found it and got it up & running, the docker started on first try but the integration to home assistant was a happening, configuration of the api_key failed repeatedly until I managed to pull it out of docker console log and manual insert into configuration.

Now, first Ikea Motion Sensor is paired and recognized as a binary sensor in home assistant but seems always to be off, continuation follows…

Yes, I managed to create a bug in the api key generation functionality, next release will fix that. Great you got past that though!

Upgraded to 0.68.0b0 (built my own docker image) and connected the IKEA Dimmer to deconz, no lights conneced to it.
Restarted HA and see the dimmer being found in the log file:

2018-04-23 11:24:30 DEBUG (MainThread) [pydeconz.utils] HTTP request response: {'config': {'UTC': '2018-04-23T09:24:30', 'apiversion': '1.0.9', 'backup': {'errorcode': 0, 'status': 'idle'}, 'bridgeid': '00212EFFFF010C52', 'datastoreversion': '60', 'devicename': 'ConBee', 'dhcp': True, 'factorynew': False, 'fwversion': '0x00000000', 'gateway': '192.133.64.1', 'internetservices': {'remoteaccess': 'disconnected'}, 'ipaddress': '192.133.64.10', 'linkbutton': False, 'localtime': '2018-04-23T09:24:30', 'mac': 'bc:ae:c5:b6:80:49', 'modelid': 'deCONZ', 'name': 'admin', 'netmask': '255.255.255.0', 'networkopenduration': 60, 'panid': 54715, 'portalconnection': 'disconnected', 'portalservices': False, 'portalstate': {'communication': 'disconnected', 'incoming': False, 'outgoing': False, 'signedon': False}, 'proxyaddress': 'none', 'proxyport': 0, 'replacesbridgeid': None, 'rfconnected': True, 'starterkitid': '', 'swupdate': {'checkforupdate': False, 'devicetypes': {'bridge': False, 'lights': [], 'sensors': []}, 'notify': False, 'text': '', 'updatestate': 0, 'url': ''}, 'swupdate2': {'autoinstall': {'on': False, 'updatetime': ''}, 'bridge': {'lastinstall': '', 'state': 'noupdates'}, 'checkforupdate': False, 'install': False, 'lastchange': '', 'lastinstall': '', 'state': 'noupdates'}, 'swversion': '2.5.20', 'timeformat': '12h', 'timezone': 'Etc/GMT-2', 'uuid': 'e864fd47-abc9-43bf-b679-54a1e339abe8', 'websocketnotifyall': True, 'websocketport': 8443, 'whitelist': {'46C7F2D2D1': {'create date': '2018-04-18T18:38:02', 'last use date': '2018-04-18T18:38:02', 'name': 'pydeconz'}, '6FA4916185': {'create date': '2018-04-18T18:34:33', 'last use date': '2018-04-18T18:34:33', 'name': 'pydeconz'}, '93F490E59A': {'create date': '2018-04-18T19:02:08', 'last use date': '2018-04-18T19:04:10', 'name': 'pydeconz'}, 'B0D17D212E': {'create date': '2018-04-18T18:53:49', 'last use date': '2018-04-18T18:53:49', 'name': 'pydeconz'}, 'C2CC5CD853': {'create date': '2018-04-23T08:26:39', 'last use date': '2018-04-23T08:26:39', 'name': 'pydeconz'}, 'DB60BF6725': {'create date': '2018-04-18T18:20:11', 'last use date': '2018-04-23T09:07:44', 'name': 'Phoscon#B1173x750'}, 'E0455D408F': {'create date': '2018-04-18T19:06:08', 'last use date': '2018-04-23T09:24:30', 'name': 'pydeconz'}}, 'zigbeechannel': 15}, 'groups': {'19969': {'action': {'bri': 128, 'colormode': 'hs', 'ct': 0, 'effect': 'colorloop', 'hue': 0, 'on': False, 'sat': 128, 'xy': [0, 0]}, 'class': 'Other', 'devicemembership': ['3'], 'etag': '1d4f5c552c73e2df1bd0a970605502e0', 'hidden': False, 'id': '19969', 'lights': [], 'lightsequence': [], 'multideviceids': [], 'name': 'TRADFRI wireless dimmer 4', 'scenes': [], 'state': {'all_on': False, 'any_on': False}, 'type': 'LightGroup'}}, 'lights': {}, 'resourcelinks': {}, 'rules': {}, 'schedules': {}, 'sensors': {'1': {'config': {'configured': False, 'on': True, 'sunriseoffset': 30, 'sunsetoffset': -30}, 'etag': None, 'manufacturername': 'Philips', 'modelid': 'PHDL00', 'name': 'Daylight', 'state': {'daylight': None, 'lastupdated': 'none', 'status': None}, 'swversion': '1.0', 'type': 'Daylight', 'uniqueid': '00:21:2e:ff:ff:01:0c:52-01'}, '3': {'config': {'battery': None, 'group': '19969', 'on': True, 'reachable': True}, 'ep': 1, 'etag': 'd87b5229267fd9ad8eef7980bbbe85c9', 'manufacturername': 'IKEA of Sweden', 'mode': 4, 'modelid': 'TRADFRI wireless dimmer', 'name': 'TRÅDFRI wireless dimmer', 'state': {'buttonevent': None, 'lastupdated': 'none'}, 'swversion': '1.2.248', 'type': 'ZHASwitch', 'uniqueid': '00:0b:57:ff:fe:8a:4c:6d-01-1000'}}}
2018-04-23 11:24:30 DEBUG (MainThread) [pydeconz.deconzdevice] TRADFRI wireless dimmer 4 created as {'_any_on': False, '_bri': 128, '_class': 'Other', '_colormode': 'hs', '_ct': 0, '_devicemembership': ['3'], '_effect': 'colorloop', '_hidden': False, '_hue': 0, '_id': '19969', '_lights': [], '_lightsequence': [], '_multideviceids': [], '_on': False, '_reachable': True, '_sat': 128, '_scenes': {}, '_x': 0, '_y': 0, '_async_set_state_callback': <bound method DeconzSession.async_put_state of <pydeconz.DeconzSession object at 0x7f36d036b208>>, '_deconz_id': '/groups/19969', '_etag': '1d4f5c552c73e2df1bd0a970605502e0', '_manufacturername': None, '_modelid': None, '_name': 'TRADFRI wireless dimmer 4', '_swversion': None, '_type': 'LightGroup', '_uniqueid': None, '_async_callback': []}
2018-04-23 11:24:30 DEBUG (MainThread) [pydeconz.deconzdevice] TRÅDFRI wireless dimmer created as {'_buttonevent': None, '_battery': None, '_ep': 1, '_on': True, '_reachable': True, '_sensor_class': None, '_sensor_icon': None, '_sensor_unit': None, '_deconz_id': '/sensors/3', '_etag': 'd87b5229267fd9ad8eef7980bbbe85c9', '_manufacturername': 'IKEA of Sweden', '_modelid': 'TRADFRI wireless dimmer', '_name': 'TRÅDFRI wireless dimmer', '_swversion': '1.2.248', '_type': 'ZHASwitch', '_uniqueid': '00:0b:57:ff:fe:8a:4c:6d-01-1000', '_async_callback': []}

But, I can’t see any traces of it in the UI. As far as I understand it should be visible with a batter level indicator and dimmer usage should trigger events if type ‘deconz_event’, so I set up an automation to notify me if these occur (and tested to make sure it works).

But, not a single event except the ones I send manually from UI to test…

Any ideas?

-f

It can take some time for the battery to be reported (up to 1 hour) and the component doesn’t support dynamic creation of entities (yet)

Why it doesn’t show up I can’t say, it should work :slight_smile:, enable debug per component documentation and you can see if you get the signals

Turned on full debug and waded through the lines:

First, I get three devices detected in pydeconz.deconzdevice:

  1. ‘TRADFRI wireless dimmer 4’ of type lightgroup
  2. ‘Daylight’ of type daylight
  3. ‘TRADFRI wireless dimmer’ of type ZHASwitch

Of these only the daylight sensor.daylight is visible anywhere else in the logs or UI, btw the Daylight sensor has status ‘Not reachable’ in the Phoscon App but I see a log entry for an event change on the sensor.daylight further down.

As far as I can see the dimmer is not visible anywhere outside of pydeconz.

-f

2018-04-24 08:17:21 DEBUG (MainThread) [pydeconz.utils] Sending {} to http://127.0.0.1:8080/api/XXXXXXXXXX
2018-04-24 08:17:21 DEBUG (MainThread) [pydeconz.utils] HTTP request response: {'config': {'UTC': '2018-04-24T06:17:21', 'apiversion': '1.0.9', 'backup': {'errorcode': 0, 'status': 'idle'}, 'bridgeid': '00212EFFFF010C52', 'datastoreversion': '60', 'devicename': 'ConBee', 'dhcp': True, 'factorynew': False, 'fwversion': '0x00000000', 'gateway': '192.133.64.1', 'internetservices': {'remoteaccess': 'disconnected'}, 'ipaddress': '192.133.64.10', 'linkbutton': False, 'localtime': '2018-04-24T06:17:21', 'mac': 'bc:ae:c5:b6:80:49', 'modelid': 'deCONZ', 'name': 'admin', 'netmask': '255.255.255.0', 'networkopenduration': 60, 'panid': 54715, 'portalconnection': 'disconnected', 'portalservices': False, 'portalstate': {'communication': 'disconnected', 'incoming': False, 'outgoing': False, 'signedon': False}, 'proxyaddress': 'none', 'proxyport': 0, 'replacesbridgeid': None, 'rfconnected': True, 'starterkitid': '', 'swupdate': {'checkforupdate': False, 'devicetypes': {'bridge': False, 'lights': [], 'sensors': []}, 'notify': False, 'text': '', 'updatestate': 0, 'url': ''}, 'swupdate2': {'autoinstall': {'on': False, 'updatetime': ''}, 'bridge': {'lastinstall': '', 'state': 'noupdates'}, 'checkforupdate': False, 'install': False, 'lastchange': '', 'lastinstall': '', 'state': 'noupdates'}, 'swversion': '2.5.20', 'timeformat': '12h', 'timezone': 'Etc/GMT-2', 'uuid': 'e864fd47-abc9-43bf-b679-54a1e339abe8', 'websocketnotifyall': True, 'websocketport': 8443, 'whitelist': {'XXXXXXXXX': {'create date': '2018-04-18T19:06:08', 'last use date': '2018-04-24T06:17:21', 'name': 'pydeconz'}, 'XXXXXXXXX': {'create date': '2018-04-23T12:11:10', 'last use date': '2018-04-24T06:17:19', 'name': 'Phoscon#B1224x751'}}, 'zigbeechannel': 15}, 'groups': {'19969': {'action': {'bri': 128, 'colormode': 'hs', 'ct': 0, 'effect': 'none', 'hue': 0, 'on': True, 'sat': 128, 'xy': [0, 0]}, 'class': 'Other', 'devicemembership': ['3'], 'etag': 'c40b4b8eb89088f61832b0ecefa3f0b8', 'hidden': False, 'id': '19969', 'lights': [], 'lightsequence': [], 'multideviceids': [], 'name': 'TRADFRI wireless dimmer 4', 'scenes': [], 'state': {'all_on': False, 'any_on': False}, 'type': 'LightGroup'}}, 'lights': {}, 'resourcelinks': {}, 'rules': {}, 'schedules': {}, 'sensors': {'1': {'config': {'configured': False, 'on': True, 'sunriseoffset': 30, 'sunsetoffset': -30}, 'etag': None, 'manufacturername': 'Philips', 'modelid': 'PHDL00', 'name': 'Daylight', 'state': {'daylight': None, 'lastupdated': 'none', 'status': None}, 'swversion': '1.0', 'type': 'Daylight', 'uniqueid': '00:21:2e:ff:ff:01:0c:52-01'}, '3': {'config': {'battery': None, 'group': '19969', 'on': True, 'reachable': True}, 'ep': 1, 'etag': '2be79d676aef21536eb18f759ca06712', 'manufacturername': 'IKEA of Sweden', 'mode': 4, 'modelid': 'TRADFRI wireless dimmer', 'name': 'TRADFRI wireless dimmer', 'state': {'buttonevent': None, 'lastupdated': 'none'}, 'swversion': '1.2.248', 'type': 'ZHASwitch', 'uniqueid': '00:0b:57:ff:fe:8a:4c:6d-01-1000'}}}


2018-04-24 08:17:21 DEBUG (MainThread) [pydeconz.config] Deconz config loaded {'_apiversion': '1.0.9', '_bridgeid': '00212EFFFF010C52', '_linkbutton': False, '_modelid': 'deCONZ', '_name': 'admin', '_networkopenduration': 60, '_panid': 54715, '_swversion': '2.5.20', '_uuid': 'e864fd47-abc9-43bf-b679-54a1e339abe8', '_websocketport': 8443, '_zigbeechannel': 15}

2018-04-24 08:17:21 DEBUG (MainThread) [pydeconz.deconzdevice] TRADFRI wireless dimmer 4 created as {'_any_on': False, '_bri': 128, '_class': 'Other', '_colormode': 'hs', '_ct': 0, '_devicemembership': ['3'], '_effect': 'none', '_hidden': False, '_hue': 0, '_id': '19969', '_lights': [], '_lightsequence': [], '_multideviceids': [], '_on': True, '_reachable': True, '_sat': 128, '_scenes': {}, '_x': 0, '_y': 0, '_async_set_state_callback': <bound method DeconzSession.async_put_state of <pydeconz.DeconzSession object at 0x7f3c7124fba8>>, '_deconz_id': '/groups/19969', '_etag': 'c40b4b8eb89088f61832b0ecefa3f0b8', '_manufacturername': None, '_modelid': None, '_name': 'TRADFRI wireless dimmer 4', '_swversion': None, '_type': 'LightGroup', '_uniqueid': None, '_async_callback': []}

2018-04-24 08:17:21 DEBUG (MainThread) [pydeconz.deconzdevice] Daylight created as {'_daylight': None, '_status': None, '_battery': None, '_ep': None, '_on': True, '_reachable': None, '_sensor_class': None, '_sensor_icon': None, '_sensor_unit': None, '_deconz_id': '/sensors/1', '_etag': None, '_manufacturername': 'Philips', '_modelid': 'PHDL00', '_name': 'Daylight', '_swversion': '1.0', '_type': 'Daylight', '_uniqueid': '00:21:2e:ff:ff:01:0c:52-01', '_async_callback': []}

2018-04-24 08:17:21 DEBUG (MainThread) [pydeconz.deconzdevice] TRADFRI wireless dimmer created as {'_buttonevent': None, '_battery': None, '_ep': 1, '_on': True, '_reachable': True, '_sensor_class': None, '_sensor_icon': None, '_sensor_unit': None, '_deconz_id': '/sensors/3', '_etag': '2be79d676aef21536eb18f759ca06712', '_manufacturername': 'IKEA of Sweden', '_modelid': 'TRADFRI wireless dimmer', '_name': 'TRADFRI wireless dimmer', '_swversion': '1.2.248', '_type': 'ZHASwitch', '_uniqueid': '00:0b:57:ff:fe:8a:4c:6d-01-1000', '_async_callback': []}

So there are no signals in the log when you turn the dimmer in any direction?

Have you been able to get it paired with a lamp in its’ group in phoscon?

No signals in log when I turn dimmer.

I currently do not have any lights on deconz, I’ll hook one up to test it out.

-f

1 Like

In case you are looking for a local solution please take a look at zigbee2mqtt. Also supports home assistant MQTT discovery which makes integrating with home assistant piece of :cake:!

That’s a very cool project. The Smartthings MQTT bridge was a mess, (fault was all Samsung on that one). I lucked up and found the HUSBZB-1 Zigbee/Zwave stick was back in stock in several places and I even ended up with 2 of them.

I was thinking the other day how cool it would be to have a device on the network that did Zigbee and Zwave with a simple UI and pub/subbed to MQTT. This is pretty close.

1 Like

Yes, its best to verify that the remote works at all :slight_smile:

What zigbee dongle device would you recommend for use with this project

CC2531, see https://github.com/Koenkk/zigbee2mqtt/wiki/Getting-started

1 Like

It looks like a nice project, I like the idea of using mqtt as api, particularly since it opens up for distributed hardware. My biggest fear is the day my new home is built and I have to run around with my linux server in my arms to join all the electrical dimmers/switches/sensors built into the walls by the electrician - currently debugging deConz have stalled as I do not have any lamp outlets I can move into basement next to my server to register the Ikea bulb to deConz.

But, some of my earlier arguments are still valid:

  1. Hardware/software support, even though the procedure is well documented, buying and flashing the usb device is kinda intimidating. Have you considered taking orders for ‘pre-flashed’ devices?

  2. I would like for Zigbee support in Home Assistant to get where Z-Wave is going, ie to be able to do network programming, like for the Z-Wave group associations, in the common UI. Having users relate to multiple packages to add and program devices and trying to keep them in sync is not optimal. This is somewhat addressed in the mqtt solution with the mqtt discovery but also in deCons where you ‘just have to restart home assistant’ to include new devices.

Even as a seasoned software engineer/architect I find the deconz/home-assistant debugging to be intimidating, there are so much I would prefer to spend my time on rather than debug something that should work. The deConz package (in docker) offers little configuration or technical details of the underlying devices and the new version even more so.

So, for now, my conclusion holds; that zigbee with home assistant still is a project under rapid change and not quite there for stable production.

But, I’m nibbling away on what I have in hope of getting it to work as I kinda prefer the open source/home served solution in Home Assistant way over anything else, and the it security guy in me is not comfortable sharing anything of my home automation on any clouds.

-f

1 Like