Zigbee2mqtt inconsistent behavior and network performance

I am relatively new to HA and have been struggling to get consistent behaviour and performance from my zigbee devices managed by HA. I have HASSIO running on an Rpi 4 with up to date versions of the OS, HA and zigbee2mqtt at the time of writing and am using a CC2531 controller with an external antenna mounted via a USB extension cable to keep it away from the RPi and other devices which would cause interference. I dont have a huge house and all my zigbee devices are all on a single floor. Most of my zigbee devices are paired with HA, but I do have 4 Hue bulbs which are not (for no reason other than they work fine as they are and I dont want to move them onto HA until I get it stable). These are paired to the Hue hub and controlled via Smartthings. I also have 2 Xiaomi Honeywell smoke detectors which are paired with SmartThings directly (no Xiaomi hub). Of the devices that are paired with HA, there are 2 smart sockets (both routers), 2 motion detectors and 3 door/window sensors (all end points). My issue is I dont seem to be able to get consistent performance or decent range on my mesh network at all. Despite the fact that I never move them, all the devices seem to randomly experience big swings in LQI, often dropping off completely only to appear back hours or days later (and not just because they have no data to send in that period). Using the zigbee2mqttassistant I see devices go from being connected fine and sending data to showing as being unresponsive for 2 weeks (having only been connected an hour ago). I have one device thatā€™s only 2 feet from the controller which will routinely report an LQI as low as 70 when Iā€™ll see 255 from a device in the next room. Today all my devices are now showing ā€œNO COMPONENTS Maybe this device is not (yet) supported by Zigbee2Mqtt?ā€ even though Iā€™ve made no changes whatsoever. Iā€™ve checked and confirmed that my home wifi channel is not overlapping with the zigbee channel. Everything Iā€™ve read about the way I have this set up suggests I should get decent range and performance on the devices closest to my controller, and yet it seems really poor and unreliable. Am I missing something? Could my other zigbee devices paired with Hue/ST be disrupting the HA zigbee mesh for example? I really want to migrate everything over to HA but at the moment itā€™s just so flaky that Iā€™m loathed to mess around with other things that work fine as they are. Any help or advice would be greatly appreciated - I have attached a floorplan of my house with the layout of devices to give an idea of the distribution.

@Koenkk - any advice? (I have posted the same question on your discord server btw, but my account is suspended awaiting your review)

I have never seen an LQI of 255 :frowning: But although I do see the massive swings in LQI, everything works reliable.

Digging up an old topic, but did you somehow manage to improve your situation?

The best way to improve such situation is to flash the CC2531 as a router and use a CC26xx as coordinator instead.

The place I use (or itā€™s more of trying to use now) is not that large and Iā€™m having problems connecting IKEA bulbs which are maybe 5m away from the CC2531 stick (connected to RPi). There are couple of walls in between but still I feel that the distance should not be an issue (or can it really be?).

Now thinking about it, naybe the CC2531 stick Iā€™m trying to use can have some problems as well? I managed to pair one IKEA bulb but afterwards I wanted to change the Zigbee channel (to maybe improve reliabilty) and I just cannot pair that IKEA bulb again.

Try to pair your bulbs as close to your stick as possible. Once paired, you can move them to your final destination.

Thank you, I will have to try more. Although I have been trying quite a lot and I am surprised how unreliable the Zigbee/CC2531 setup seems to be for me.
Maybe I need to try a better stick (the CC26xx you suggested).

I experienced a significant improvement after switching to the source routing firmware for my CC2531. That and picking up some additional smart plugs to use as routers seems to have stabilised things for me. Also make sure you have your CC2531 connected via a USB extension cable away from the Pi, it does make a difference.

Thanks for the tips. I ordered USB extension cable to see if it helps. The setup has mainly light bulbs which should act as routers. The main problem is that I am setting up the system in one location and then it moves to another location and it is difficult to troubleshoot it remotely.
I should probably post this in a different topic. But the main problem is now with two Ikea bulbs. First both were working, then when I changed the Zigbee channel I ran into problems. First with one bulb and then with second.

Zigbee2MQTT:info  2020-09-20 18:14:13: MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"commit":"unknown","coordinator":{"meta":{"maintrel":3,"majorrel":2,"minorrel":6,"product":0,"revision":20190608,"transportrev":2},"type":"zStack12"},"log_level":"info","network":{"channel":24,"extendedPanID":"0xdddddddddddddddd","panID":6754},"permit_join":true,"version":"1.14.4"}'
Zigbee2MQTT:info  2020-09-20 18:14:29: Device '0xec1bbdfffe467a97' joined
Zigbee2MQTT:info  2020-09-20 18:14:29: Starting interview of '0xec1bbdfffe467a97'
Zigbee2MQTT:info  2020-09-20 18:14:29: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":{"friendly_name":"0xec1bbdfffe467a97"},"type":"device_connected"}'
Zigbee2MQTT:info  2020-09-20 18:14:29: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"interview_started","meta":{"friendly_name":"0xec1bbdfffe467a97"},"type":"pairing"}'
Zigbee2MQTT:error 2020-09-20 18:16:48: Failed to interview '0xec1bbdfffe467a97', device has not successfully been paired
Zigbee2MQTT:info  2020-09-20 18:16:48: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"interview_failed","meta":{"friendly_name":"0xec1bbdfffe467a97"},"type":"pairing"}'

CC2531/CC2530 coordinator only:

Stop Zigbee2MQTT, unplug the coordinator, wait 10 seconds, plug the coordinator, start Zigbee2MQTT and try to pair the device again.

Zigbee lights use the ZLL standard which is not 100% compatible with the ZHA standard used by other (non-lighting) zigbee devices. Some people have recommended not having lights and other devices on the same network for that reason. Iā€™ve asked the question a couple of times whether this is accurate or not, but never got any replies (ZHA and ZLL devices on the same network).

This is a mostly simplified answer.

Newer Zigbee3 lights all pretty much use the ZLL profile if the controller (your Zigbee stick, hub, whatever) makes the ZLL profile available. For instance, Ikea, Philips Hue, and Cree bulbs are 100% ZLL compliant devices that perform best with a ZLL controller (like the Hue hub). They will downgrade to use the ZHA profile if the controller doesnā€™t fully support or implement the ZLL profile. BUT, they arenā€™t always 100% compatible with all ZHA controllers and thatā€™s where problems tend to creep in on a ZHA mesh.

In a ZHA mesh network, messages get thrown all over the place between end devices, repeaters and the controller. Devices that were built to be 100% ZHA complaint all know the messaging structure and mostly adhere to it (there are some known manufactures (Aqura and Xiaomi come to mind) that donā€™t always play nicely). ZLL devices that downgrade to the ZHA profile donā€™t always know the exact message structure, so they just kind of fudge it the best they can.

The other problem with ZLL devices on a ZHA mesh is that in the actual Zigbee spec, some devices (mostly bulbs) should never be used as repeaters in a ZHA mesh. ZLL mesh devices donā€™t have this limitation and typically will repeat as much as they need to. This can cause problems due to the reason above; If a ZLL device on a ZHA mesh doesnā€™t fully know the message structure, it will pass on malformed messages to both neighbor devices and the controller itself thus causing dropped messages on your mesh.

This is usually why people (myself included) usually suggest to keep true ZLL devices on their own mesh and ZHA devices on their own mesh. It keeps the messages clean and each controller knows how to handle everything. With the advent of the CC2531 devices though, being able to mix ZLL and ZHA devices is getting much easier due to the power behind the controller (deCONZ, for instance, usually does a fantastic job of handling and segmenting ZLL messages from ZHA messages and controlling the routes).

1 Like