ZHA fails, Zigbee2mqtt works

FYI, my ZBminil2 Sonoff switch has constantly needed re-pairing, and greyed out functionality, for a year now. I finally had it and switched to zigbee2mqtt. Flawless operation ever since. For anyone with problems with ZHA, it’s actually an easy conversion to zigbee2mqtt. I always hoped the simple ZHA would be my zigbee answer, but it’s lacking.
Just FYI for those spending hours trying to get ZHA devices working.

This is not a ZHA issue, it’s an issue with the switch. Z2M have provided a custom handler.

I don’t understand. You mean there is a bug in the sonoff zigbee implementation, and z2m worked around the bug?

I read this kind of like saying “one tire on my car keeps losing air, so I put that tire on a new car.”

1 Like

CaptTom Your analogy literally makes no sense. :roll_eyes: @jackjourneyman comments were :100: correct.

@starmanj Here is a good read…

Yes, let’s all change because of one device. Generalization at it’s best.

2 Likes

FYI, those type of problem symtoms normally have nothing to do with the Zigbee gateway application or its device handlers but are instead usually due to with your physical environment and setup, so highly recommend that you read and try following all the relevant best practice tips in this guide too (regardless if using ZHA or Zigbee2MQTT) → Zigbee network optimization: a how-to guide for avoiding radio frequency interference + adding Zigbee Router devices (repeaters/extenders) to get a stable Zigbee network mesh with best possible range and coverage by fully utilizing Zigbee mesh networking

Another tip that is also covered under troubleshooting is to upgrade Zigbee Coordinator firmware.

Anyway, the way to do proper troubleshooting is not to change Zigbee gateway application, and suggesting that others should just move to a different Zigbee gateway application if they experince any problem symtoms does not help the community or the long term development of those Zigbee gateway application. Better to try to work with other users/testers and the developers too find the root cause and fix the problems if they truley are related bugs in the Zigbee gateway application, (chances are that they might only need to tweak a timeout or something if the problem is not simply due to poor reception).

PS: Off-topic but for reference, but adding or modifying Zigbee device handlers (i.e. quirks for ZHA and zigbee-herdsman converters for Zigbee2MQTT) are only helpful if you are missing attributes (entities) that you expect should be there. That is explained here → Zigbee Guide: How-to add/setup local custom ZHA Device Handlers (also known as ”quirks”) in the ZHA integration

I apologize if my analogy didn’t work for you. Yes, @jackjourneyman was 100% correct, which was the point I was trying to make.

I can’t imagine adding new components to the stack for all Zigbee devices just because of one sensor. I like to minimize the number of things I have to learn, maintain, keep updated and monitor for breaking changes. I say this having just come through a Core update which is sending me off in about three different directions, chasing minor problems which need my attention.

I definitely agree with that statement!

Unfortunately, the coordinators on the market have a lot of quirks depending on radio type, hardware interface etc… Not to mention constant firmware updates to keep up with a market flooded with new devices. Maintaining the ZigBee gateways has to be a chore.

I’ve found ZHA plenty functional for basic switches. I’ve heard Z2M is more functional for some devices

I agree and have learned a lot from your posts. I still do firmly believe the level of device support based on the ZigBee gateway application is a real thing.

Sonoff even highlights this

:white_check_mark: Advantages of Zigbee2MQTT

  • Widest device compatibility – Supports over 3,000+ Zigbee devices from various brands.

:x: Limitations of ZHA

  • Less device compatibility – Supports many Zigbee devices, but not as extensive as Zigbee2MQTT.

This device has a lot of history. One example…

DThat’s my point. My controller is updated, I followed all the guides on eliminating interference, etc. I am not a newbie. Zha simply was in error with this device. Even included a false battery. The Sonoff is not some isolated device, it’s rather popular. Z2m is known for having broader device compatibility. I simply gave up on zha correctly.

I started with Zigbee2MQTT around version 1.0 because I had read about it on tweakers.net. I did not know even about HA at that time, I had just some Tasmota devices and Zigbee2MQTT, and some rules in Tasmota. At that time, the CC2531 was the only supported adapter, and there was no docker, no HA add-on, no frontend. When I found out about HA some 7 years ago, I sticked with Zigbee2MQTT, because ZHA did not support the CC2531 at that time.
Both have grown since that time, and I have played with ZHA a few time since with a spare adapter. But I’m still not convinced ZHA is easier then Zigbee2MQTT

Fair enough. If you’ve already invested in MQTT and Z2M, then by all means you might as well keep using it.

What I hate to see is new users being told ZHA is no good, and that they have to incur the learning curve, maintenance overhead, and possibly even hardware upgrades required to run Z2M, just to use Zigbee in HA.

My Zigbee requirements are admittedly modest, but in over five years I’ve yet to find a need for a device which doesn’t work with ZHA. If your needs are different, then yes, you will come to a different conclusion. There is not one right answer for everyone.