Zigbee (and Home Assistant) is driving me nuts!

Tags: #<Tag:0x00007f3265302cc8> #<Tag:0x00007f3265302c00> #<Tag:0x00007f3265302ae8> #<Tag:0x00007f32653029f8> #<Tag:0x00007f3265302868>

Zigbee and Home Assistant are driving me crazy. I am deeply frustrated and must share my pain - please do not take it personally. In fact, the current situation is due to lack of planning and therefore self-inflicted.

The project was to light a larger property outside. Due to the circumstances, lamps, outdoor sockets and actuators have to be used. And due to the size of the property, a lot of them.

So now I have

  • the Dresden Elektronik Raspbee II card for the Raspberry,
  • Light bulbs from OSRAM/Ledvance (“Smart + Classic”),
  • light bulbs from Innr (RB 265),
  • Outdoor sockets from OSRAM (“Smart+ Plug01”),
  • indoor sockets from OSRAM/Ledvance (“Smart+ Plug Z3”)
  • a Ubisys S1-R actuator for the DIN-rail

The OSRAM bulbs and the outdoor socket worked with the native ZHA integration. The Innr bulbs did not. OSRAM bulbs, Innr bulbs as well as the outdoor socket worked with deCONZ, but deCONZ “crashed” in the middle of the night (no device available anymore). With Zigbee2MQTT, the Innr bulbs, 3 of the 4 OSRAM indoor outlets, and the OSRAM bulbs are working. But not the outdoor socket from OSRAM.

And while the “Long Range Repeater” from cod.m at ZHA and deCONZ were recognized as one entity each, Zigbee2MQTT made about 14 entities out of it, various switches etc.

The actuator from Ubisys I could not try yet, the distance to the nearest router is too large. I had to place the other devices much closer to each other than planned. The range outdoors has not exceeded 12-15m.

This is such a bummer, standards my ass. Do I really need to buy hardware that matches my combination of coordinator hardware and middleware?

This is annoying I totally agree. Bit some libraries and components won’t support all devices on the market (yet) and might be added in the future. I personally quit hue as my bulbs always turned unavailable… switched to ZHA with tasmota and sonoff ZigBee bridge. So far it’s stable. My Xiaomi gateway also runs good with the devices but I needed to extend this ZigBee network and Xiaomi is limited to 30 devices or so … so tasmota and sonoff take the rest . I also run deconz with some other devices …all side by side work well as I’m using different channel each. Maybe with testing each device with each hardware just make a split to the corresponding devices and u r good to go.i now it’s frustrating but we are playing open source and sometimes things go terrible wrong and we better don’t talk about WAF in such situations. But as for all ZigBee networks always consider having enough line powered devices in between to act as a bridge which will 1 extend the range and secondly make your network more stable. I also extended my network as range was too far and by adding just another ZigBee router device like a relay for an outlet my network became stable and reachable. I’m not that fan of repeaters and would keep the network easy .

I’m not sure that your concern that the Sonoff Zigbee Wifi bridge flashed with Tasmota firmware managed by ZHA in Home Assistant being limited to 30 devices is correct. There really is no such thing as a ‘repeater’ in Zigbee. There are three kinds of devices as far as I know; coordinator, routers and end devices. You have one coordinator and basically unlimited numbers of routers and end devices. The coordinator and each router is limited to the number of other devices that can directly connect to them. I believe there is a upper limit in the Zigbee specification, but based on the hardware in the coordinator or router a lower upper limit may be hit.

see this link:

An example using the default CC2531 coordinator firmware + two CC2531 routers; Your device limit will be:

Coordinator: 15 devices - 2 routers = 13
Router one: + 21 devices
Router two: + 21 devices
Total device limit = 55 devices

It is a bit ‘cryptic’ as to the way to ‘add a device VIA’ one of your routers rather than ‘add it directly to the coordinator’.

I am still learning, but it is not clear to me that if you add a device like a light bulb (which may or may NOT be a router) directly to the coordinator, then add a router, say a outdoor socket, to the coordinator. Now, move the outdoor socket router to a location say 30 meters from the coordinator. And now, take that light bulb and power it up say 30 meters beyond the outdoor socket. Since, the light bulb was ‘added directly to the coordinator’ and not to the router, it is not clear to me that the bulb will try and connect to the outdoor socket first, rather than trying to grab a signal directly from the coordinator.

Based on a number of peoples experiences with poor performance of their zigbee networks, is does seem likely if the network is not laid out properly and if some of the devices claiming to do routing fail at doing this correctly, you end up in the frustration zone you are in.

Good hunting. There are a lot of successful zigbee network out there.

The option of „pair via device“ - I saw it at the ZHA integration, but the is no such thing with zigbee2mqtt.

My experience is that pairing a device (on mains) with the coordinator first, moving it to it‘s final position afterwards is no good (or it takes ages for the device to reconnect)

At the same time, installing a device next to an existing router, but out of reach of the coordinator did not work well either.

Well, bummer! You might query the folks via bug request on github zigbee2mqtt and see what they say. I would do a search of their github bug reports first. But they seem pretty responsive and helpful.

I am trying the ZHA stuff currently, but I do not know enough to ‘rank’ any of the solutions out there.
I am trying to peer inside the ZHA network and see if I can learn how it ‘view’ and operates the network. Here are the basic scripts i have come up with so far. Still not sure what I am seeing or if I am smart enough to understand what it is doing, but interesting. For example the CREE and OSRAM light bulbs seem to behave very differently in terms of ‘visibility’ on the ZHA network:


It’s not. I currently have 201 devices connected to my ZB Bridge which was flashed with Tasmota. I also have over 60 routing devices (Iris/Centralite plugs). The bridge way outperforms the GoControl HUSBZB-1 I was using before. The key to achieving that device count is to have a decent amount of routing devices.

Impressive! Thanks for sharing a success story, I think all of the folks trying to get a successful zigbee network up and running, regardless of the coordinator hardware or management software stack appreciate that success is possible.

What is the most ‘left field’ or difficult device you have encountered on your zigbee network? And how did you solve?

The Ikea Zigbee repeater is nothing more than a router with no secondary function :slight_smile:

There are no hubs, gateways, bridges etc in Zigbee defined, yet Philips calls it’s coordinator the Hue Hub, and Ikea calls it a Gateway, and Sonoff a Bridge.

The naming makes it more accessible for consumers to figure out what is does.

I know this (now). My main problem is to find the ideal spot for the coordinator (RPi w/ Raspbee II board). The area is quite large (> 10.000m²) and for historical preservation (“Denkmalschutz”) visible changes to the infrastructure are not permitted. At the same time, there’s exactly on internet access point (16MBit/s ADSL) and the WLAN attached to it does not reach far enough.

To give you an idea, see image below:

  • red disc is WLAN around the only internet access point
  • black dots are lights, that are connected to a fuse in the cellar of the upper right building. There is power, there is warmth, but no internet. Even cellular does not get into it.
  • green dots is a series of outdoor sockets with garden lamps plugged in. They are too connected to a fuse below the upper right building. Unfortunally the green square (garden house) is also connected to it, so I cannot control power via a fuse box switch.
  • blue dots are lamps mounted to the walls of the lower building. They are connected to a fuse inside that bulding, among with some indoor wall sockets.

Initial plan was to use smart bulbs for the green and blue lamps and an Ubisys S-R1 switch for DIN rail to control the black ones. Failed, because I could not bring any internet into the cellar, while at the same time the coordinator in that cellar could not connect one of the green or blue bulbs. Even tried a long range router in the garden house, did not work.

Second attempt was to use a LTE router (FRITZ!Box 6820 LTE) in the garden house and connect the coordinator to it. Failed, because the lower building (a windmill, about 20m high, iron wings and copper covered dome) shields the mobile net from the garden house. Also, the coordinator in the garden house could not contact the DIN switch in the cellar of the upper right building.

Currently all I could achieve is control the green lights while placing the RPi and the LTE router in the outermost left room of the lower building. The “blue” lights currently do have built-in motion sensor each, they need to be replaced first.

Left the property yesterday evening with lights turning on at sunset. Lost control today at 01:00h as the LTE router connection dropped and VPN died.

Next attempt will include returning the DIN rail switch (saves 120 EUR) and replace the bulbs of all the “black” lamps with IKEA Tradfi E27 (8 EUR each), so another 170 EUR on the bill. Everything is above ground level than and the distances between devices connected to mains should work.

If I could finally bring stable internet to the RPi, that would save me another 120 EUR by returning the Fritz!Box. Found some old Powerline adapters, heading to the property to look how far it can get …

Stay tuned.

It is unfortunate that the terminology is so loose. If I right about what I am learning about the Aqara Lumi temperature/weather sensors (and others?), then I kind of disagree with your sentence here

‘The naming makes it more accessible for consumers to figure out what is does.’

As I understand and am trying to verify, the Aqara temperature sensors will only connect to the coordinator. It is said you can add any number of routers and the Aqara devices will still only connect to the coordinator. If this plays out this way, then not properly educating folks is a disservice. Consumers are being dragged into the ‘mesh’ world as more devices get added in every far corner of the home. Gateway and bridge are somewhat in proper network nomenclature, even repeaters, hubs I am not sure about. Mixing or confusing terms makes the stew even more complicated.

Wow, interesting and a neat place it!

‘iron wings and copper covered dome’, now there is something your average network tech probably will not run across too often :grinning:

The powerline stuff, might be a solution, I have used it in some places with some 2.4 ghz blocking walls. It’s was useable and pretty reliable. I think like the old X-10 powerline stuff, you have to make sure the signals cross different powerline phases. I’m not sure I fully understand how some UK power works.

Not to add another complication, and it is still pretty nascent stuff, but LoRaWan looks like an interesting set of tools for larger spaces with difficult frequency spectrum, as it runs sub-gighertz. You might have a look at the products using this tech, I think the Thing Network company has some resources is in UK i believe:

Also, and unfortunately not yet fleshed out fully, is Amazon’s Sidewalk network, it runs sub-gighertz as well, on the ZWave (kind of) networks. Which, ZWave is another option in the sub-gighertz range, they have a new long distance technology that is pretty far along.

Good hunting, looking forward to hearing of your success! Happy New Year!

Just returned, fetching all the parts that I am going to return. Also did some tests and finally, I think I might have found a suitable way. Does not require Powerline, LTE or extending WLAN range.


I put the RPi (coordinator) next to the internet router at basemend and connected it via LAN (top purple circle). That setup was barely working with the first / left (black) bulb. LQI when test-move the bulb to the left, so that is was not hidden by the corner of the other building was 75. Moving the bulb to it’s final position around the corner rendered it “invisible” to the coordinator.

Then I put the “long range router” upstairs and in a position, which brought the bulb at the intended position into sight. LQI went up to 95, bulb was controllable flawlessly.

So I do assume, that the first bulb (maybe even the second) is reachable via the long range router. From there, it’s about 0,5m and 10m open field between routing devices (bulbs) - that should work.

Anyhow, I took the risk and ordered 20 Tradfri bulbs.

Interesting and hopeful! My error, I though you were in UK, but I think I correctly see Germany now…

What is plan for pairing? Without the (hopefully it works this way :wink: ) ‘pair via’ option in zigbee2mqtt…

Don‘t know - whatever works. Idea is to plug the bulbs in one-by-one, starting at the coordinator then moving out.

Frustrating! There have to be best practices written somewhere. There are multi-thousand node zigbee lighting installations out in the professional world. I can’t believe they used the old ‘how many network engineers does it take to screw in a zigbee lightbulb’ :wink: method!

Hoping you get a grand driveway light show up and running and the local pilots do not mistake it for the runway :wink:

Actually found out, that there is an option to permit join via specific device:

To allow joining via a specific device set the friendly_name in the device property. E.g. {“value”: true, “device”: “my_bulb”}.

Requires sending a MQTT message, so not yet as comfortable as with ZHA.

1 Like

Outstanding! thanks for the info.

I think your statement is incorrect, i have aqara temp sensors connected to routers (osram bulb in the image below) not directly connected to the coordinator

The issue with aqara/lumi devices is that they do not follow the zigbee standard correctly


That’s good to know, thanks!

How did you add the Aqara sensor to your ZHA network? using the ‘ADD DEVICES VIA THIS DEVICE’ ? Thx