ZHA vs Zigbee2Mqtt - which is the most stable?

Hi there.

I have been having a few issues with my network whereby certain devices, using Zigbee2Mqtt, randomly stop working.

This does not happen too often but sometimes all I can do is restart the Zigbee2Mqtt add-on and then everything seems to be fine again.

Is there any point in trying ZHA as an alternative?

From what I have read, it seems that ZHA is less “power user” but at the moment, all I need is stability (as the family have started to pick up on it at the moment and have just asked for regular lights back).

I’m not a power user. ZHA has been working fine for me for over three years now. I never even think about it; no tinkering, no breaking changes, no additional add-ons to research with each update, one less handoff in the communication stack from the device to HA.

In short, I can’t directly answer your question because you asked for a comparison of the two options. I’ve never felt the need to put in the extra effort to learn, install and use MQTT, so I can’t compare it to ZHA. Of course YMMV.

2 Likes

So…Let’s add something just for the sake of not helping at all…

I’m not a power user. Zigbee2MQTT has been working fine for me for over three years now. I never even think about it; no tinkering, no breaking changes, no additional add-ons to research with each update, one less handoff in the communication stack from the device to HA.

In short, I can’t directly answer your question because you asked for a comparison of the two options. I’ve never felt the need to put in the extra effort to learn, install and use ZHA, so I can’t compare it.
Of course YMMV.

1 Like

I have both a ZHA and a ZigBee2mqtt network on my HA instance.

Almost every device (79) are on ZHA while maybe 7 are on ZigBee2mqtt.

I only added the ZigBee2mqtt network because I have some devices that I hoped would expose more entities through that route.

I’ve found ZHA to be very reliable. Or it was until I got to the ensuite bathroom. I just couldn’t get the ceiling lights to respond consistently. Family was not happy.

I moved the problem items to ZigBee2mqtt and they are now fine.

Go figure.

2 Likes

I’m sure there is a similar thread already

1 Like

Ive tried both, and settled on and still use zigbee2mqtt. Zigbee2mqtt has support for more devices, but ZHA has support for more adapters/coordinators. What coordinator/zigbee stick are you using?

Zigbee2mqtt has monthly releases, which continously adds support for the newest devices. I’ve found their releases are more stable then other programs (including home assistant), with few bugs or breaking changes. There is more config with needing mqtt, but I like that it uses mqtt. I have some node red automations that go direct to mqtt and completely bypass home assistant, that wouldn’t be possible with zha. I like zigbee2mqtt’s ui control panel and map.
Zha was just configured from the integrations page and doesnt have as many options to set. There are downsides to zigbee2mqtt of course. With zigbee2mqtt being a seperate project, and home assistant making endless changes to its yaml templating requirements, I’ve had issues with mqtt discovery and device control until Zigbee2mqtt “catches up” the yaml templates.

Zha is more tightly integrated to home assistant since it’s code is part of Home Assistant core. If you don’t need advanced configuration, mqtt, and all devicesyou use are supported by zha, zha is probably the way to go in that case .

This is a very good video comparing the two as well.

1 Like

I run both. I prefer z2m, and everything that matters is on z2m. They both have advantages and annoyances. Both have been stable for me with Sonoff Dongle-P (TI CC2652 based stick).

What coordinator are you using? Anything other than a cc2652 and ZHA probably has an advantage.

2 Likes

Thanks so much for the input, everyone.

To be honest, when I started with Home Assistant (a few years back), I thought it as so complicated that had to I blindly just followed YouTube videos. Never occurred to me, until recently, that ZHA existed as an alternative.

I am using one of these dongles:

zzh (CC2652R Stick) - Electrolama

which I am led to believe is pretty good.

What was interesting, from the video that Tim helpfully posted, is that whilst there are certainly differences between the two methods, stability does not seem to be one of them.

However, that video led me to another (by the same chap) that gave some tips for increasing the stability of your existing Zigbee setup.

First thing to try (and something that had never occurred to me) is to try and make sure that my Zigbee system operates on a single channel and then keep everything else off it, via my router.

I have loads of Wifi devices in my home (not to mention the neighbours) and it may well be some of those that are causing devices to drop out.

Thanks for this Tim - this has blown my mind a bit and shows my lack of understanding of how HA works.

As both Zigbee2Mqtt and Node Red are add-ons, how are these able to by-pass HA itself?

I’m using Home Assistant container, so I don’t have addons, and have node red and zigbee2mqtt running on their own in docker.

Because the add-ons run as separate processes listening on their own network ports, allowing separate communication to take place. In the case of z2m which is talking directly to your devices, it can receive messages directly from another process (node red) and send off to your light bulbs, etc.

I run both Z2M and ZHA on the same system.

In my case it seems ZHA is more stable and responsive. In some cases I have Zigbee devices suddenly not responding anymore in Z2M.

I am therefor thinking of moving everything over to ZHA. I only mis the “last_seen” attributes for the devices attached to ZHA. That has kept me from moving everything already.

1 Like

haha, hard to believe HA is not the centre of the world, isn’t it?

in such configuration mqtt exposes a way to control zigbee devices as well as collect information about their states. It’s possible thanx to z2m which translates zigbee communication into data in mqtt.

HA is just a client, the same way the NodeRed is. Both listens to the same mqtt topics, both sends data to the same topics to control zigbee devices. And there might be more such clients from simple utility applications like MQTT explorer up to another home automation system (test instance of HA, or other software)

For example NR commands a zigbee light to turn on setting dedicated topic in mqtt. Light (or z2m- depending on a strategy) confirms the light is turned on by setting another topic. this way all listeners get to know that the light has been turned on.

Of course in NR it’s possible to control devices through HA. It’s up to you. However using direct comm with mqtt might give some benefits (access to some unsupported by HA features, solving timing issues in automations etc)

speaking about other home automation systems, NoseRed may act as independent such a system alone. It offers a dashboard too.