ZHA vs Zigbee2MQTT - Pros 'n Cons for conversion

Converting similar tools

I recently converted from the native Z-Wave JS to Z-Wave JS UI. Both run on Z-Wave JS, so the conversion is just copying a few files and copy-pasting your keys.

Converting to Zigbee2MQTT

Converting between ZHA (built-in Zigbee Home Assistant) and Zigbee2MQTT is a lot more involved, and neither solution is going to 100% solve every issue.

From what I understand, Zigbee2MQTT → ZHA is simple. Just copy the network and import in ZHA.

On the other hand, going from ZHA → Zigbee2MQTT is the problem and why I created this thread.

A common situation

It’s more common that you’ll use the default ZHA integration in Home Assistant without a second thought because stuff just works, and then you’ll see all these guys with killer Zigbee setups and wonder “how can I have that too?”.

I’m in this situation myself. I have over 90 Zigbee devices, and more are coming. I also have hundreds of Wi-Fi devices too and as hard as it’s gonna be to recreate my Zigbee network, it’s just as hard to change the Wi-Fi password on tons of “smart” (inconvenient) devices.

Comparisons

ZHA

ZHA has a lot going for it

  1. Supports standards-compliant Zigbee devices outta the box. Don’t even need to wait for someone to create an integration in some cases.
  2. It comes with Home Assistant and is a 1st-class citizen in the ecosystem showing a fancy Zigbee logo for each device.

On the other hand…

  1. All the cool kids are on Zigbee2MQTT.
  2. Device support is supposedly worse than Zigbee2MQTT, but that hasn’t been an issue for me, and probably won’t be for folks buying newer Zigbee 3.0 devices.
  3. It’s cool that the network mesh view exists, but it’s sub-par compared to both Z-Wave JS UI and Zigbee2MQTT.
  4. Because the tooling is less troubleshooting-friendly, you also have a harder time finding and fixing issues.
    1. Troubleshooting tools are a must for any technology you own especially when you have hundreds of them scattered around your home.
    2. We’re all our own IT guys, so we need IT-guy-level tooling.

Zigbee2MQTT

Zigbee2MQTT has drawbacks

  1. It’s not easy to install.
  2. If you wanna convert from ZHA, it requires completely recreating your entire Zigbee network. This is where most people like me stop. Redoing 90+ devices and making sure all automations and dashboards still work? No way.
  3. Zigbee2MQTT isn’t a first-class citizen. All devices show up as MQTT rather than Zigbee with that nice red logo.
    1. It’s not even guaranteed all MQTT devices are Zigbee. I have one in particular (my bed) that also uses MQTT.
    2. Surprisingly, Z-Wave JS UI also uses MQTT, but it doesn’t have this issue because it doesn’t use the Home Assistant MQTT. This is why it can be treated like a first-class citizen and work with the existing Z-Wave stack.
  4. It’s very complicated to setup. You have to install this stuff, and it’s not straightforward. You have to want to tinker to use this tool, yet the tool is pretty important if you want to have an extensive Zigbee network :confused:.

Why use Zigbee2MQTT?

Then why would I wanna use Zigbee2MQTT?

  1. All the cool kids use it. I dunno how much I have to stress this. It means that if you want support or if you wanna watch a YouTube video on Zigbee, they’re probably running Zigbee2MQTT, so you should probably do that as well.
  2. Zigbee2MQTT supports just about every Zigbee device. This is where the “community” is in terms of device support. Great network view, great device view with pictures, great Z2M dashboard just for Zigbee devices, etc. It’s separate from Home Assistant, but that’s partly what makes it so powerful!
  3. You can have multiple controllers in your network as part of a single mesh. This is still confusing to me but unlike ZHA, you can have multiple Zigbee controllers around your house, even PoE ones, and those can all act like a single Zigbee network just like adding Wi-Fi access points!

Conclusion

It’s not exactly clear which way you should go especially if you already built out a Zigbee network with hundreds of devices. You could have both, but let’s be honest, we only really want to manage one solution.

If there was an easier way of converting from ZHA to Z2M, I’d say go for it. Probably worth the time investment. Since you have to redo the whole thing from scratch, you will run into issues for months after, and it will take time to figure out and fix everything.

1 Like

As with recent z2m versions.

Never been an issue for me.

Pretty sure HA speaks via websocket, not mqtt for zwjs.

More complicated, yes. Not sure I’d say “very.” Several good step by step tutorials out there.

No. Only one coordinator per zigbee net/z2m instance, but you can run multiple instances of z2m.

It is worth the trouble to get a second coordinator and compare z2m side by side with zha.

If you end up preferring z2m, migrate at your leisure, it doesn’t have to be an all or nothing monolithic chore.

If you prefer zha, either leave z2m up for test or reflash the coordinator as a router for your zha net.

1 Like

I say this as someone who hasn’t used Z2M, that said, my experience is that people switch to Z2M for one of four reasons.

  1. They want to use a Tuya device that doesn’t have a quirk built for ZHA. Z2M has a larger community of power users which results in faster support for Tuya devices.
  2. They want to decouple Zigbee from Home Assistant. This is in work with the ZHA websocket server, but not in place yet.
  3. They want to create automations outside of Home Assistant, usually with Node Red.
  4. They have mesh issues and instead of troubleshooting them, they move to Z2M and then end up resolving them as part of the move.

If 2 and 3 apply to your use case, then Z2M is probably the right way to go. If you are buying random Tuya devices that aren’t currently supported, add support to ZHA, most devices are pretty easy to add support for. Easier than moving to Z2M IMO.

If you have mesh issues, fix those.

1 Like

Is it possible to run both ZHA and Z2M with two separate sticks? Say ZBT-01 and Sonoff ZBDongle-E or Conbee II.

Sure, but you will be creating two meshes. You need to ask yourself what problem you are trying to solve with a setup like that.

1 Like

With two separate sticks yes.

Just remember that means you are creating two separate zigbee networks that DO NOT talk to each other except through HA and each requires it’s own zigbee channel - which may be a consideration in high interference RF conditions (lots of Bluetooth, Wi-Fi etc.)

1 Like

Best advice ever.

I thought that was my solution but it seemed to create another problem and the first one isn’t solved either.

@PrairieSnpr: Unsupported switch. Ordered a stick which should solve but I’m stuck. I made a thread cause I need help to find a solution.

Right, like I said, changing to Z2M in an attempt to find support for a what I’m guessing is a Tuya device, is a ton of work for no real benefit. Either purchase a device that is already supported or find the Tuya data points for you device, create a quirk for ZHA and be done with it. If you need help with the later and are willing to do the work, post a new thread with your device details.

1 Like

Aqara Double Rocker WRS-R02. More here: Error starting Z2M. I may tried the impossible. Advice needed

I got so fed up I reset the Conbee II and will pair everything again with ZHA.

OK, not Tuya, still that thread doesn’t help fix your real issue. If you want it to work with ZHA, you need to provide details. Where is the device signature for the old switch and the new switch? Which quirk was in use for the old switch? Very likely there is a slight change to the signature or model number and just updating the previous quirk would solve your issue.

If you just want to move to Z2M, by all means carry on and good luck.

1 Like

Think of it like a boss in Elden Ring. You might fail a hundred times, but you only need to get it right just once in order to progress

100% disagree. It is very easy to install one addon and have all the freedom. Buying the USB-Zigbee stick isn’t rocket science either.

Z2M also typically exposes more functionality than ZHA. And since it is on MQTT, you can use any other device you want and connect to that MQTT and read messages.

That’s the whole point of Z2M. It translates complicated Zigbee devices into MQTT-like integration extension supported by Home Assistant.