ZHA vs Zigbee2MQTT - Pros 'n Cons for conversion

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

1 Like

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.

Whole bunch of inaccuracies on my part

Good to know!

Whoops, you’re right. I remember reading Z-Wave JS used MQTT, but not the Home Assistant one, but I remember seeing the WebSocket stuff! That person probably didn’t understand how it worked, or it changed in the last 4-5 years since Z-Wave JS became part of Home Assistant.

I did more research on Z2M. It seems like it’s gotten easier. You only need 2 add-ons, and you’re good right?

I forgot something

One thing I forgot to note is that Z2M has better support for Philips Hue. Not only that, they have firmware updates. ZHA doesn’t have Philips Hue firmware without having to update the Home Assistant YAML configs, and even then, it’s not natively supported; it’s some random dude making it possible.

Does that even matter in the comparison I wrote above? It matters to me, but I dunno how much it matters to other folks. If I remember correctly, ZHA overall has less support for Hue devices, but all of mine have worked so far.

Testing out Z2M

One thing I forgot about is the possibility of having multiple Zigbee networks.

If I remember correctly, ZHA only supports 1 Zigbee network. So if I wanted to have another, I’d have to use Z2M anyway, so it make more sense to have everything on Z2M, so I don’t end up with 2 implementations of Zigbee.

Seems dumb to have multiple controllers though because a more congested mesh is better, but it all comes down to the link speed of any device to the controller. It’s specifically an issue with firmware updates which can take hours. The more controllers you have, the faster you can update devices, but you have to split them up evenly to get the biggest benefit.

The bigger question is how to manage a 2-controller Zigbee network. Seems like it would work better if you had hundreds of Zigbee devices rather than ~100 like me.

Dual Zigbee Network Questions

I have 3 SkyConnects, so I could totally try what you’re saying, but I don’t wanna spend time messing with Zigbee devices if I don’t have to. I was expecting one of those two extra sticks to be used for Thread, but I never used or bought any Thread devices. I have a 3rd stick for who knows what. It’s an extra for this very purpose, switching the Zigbee network or moving it to another location if I so choose.

Any good resources on how to design a dual-controller Zigbee network if I wanted to try? I’ve had zero issues linking up all my devices even when I only had a few routers. Now that I have a bunch more, it’s less likely my Zigbee network will suffer unless I’m doing firmware updates. Those take up so much bandwidth and literally hours to finish!

Meshing issues

I don’t have meshing issues, but I’m curious how someone would go about fixing that with ZHA and why Z2M fixes it. Isn’t it just device placement? Or is Z2M better at letting you troubleshoot and figure stuff out?

Reason to go to Z2M from ZHA

What a fantastic post! I had no clue really why people used Z2M. I have no Tuya devices and don’t plan on buying any fly-by-night Chinese products either, so it sounds like I’d be fine with ZHA for that reason.

I’m interested in Home Assistant adding WebSocket support to ZHA. Wouldn’t that mean the Z2M interface could be put on top of ZHA?

Z2M > ZHA entities?

I’ve heard this from many YouTubers, but how? Which functionality is better with Z2M over ZHA? Why aren’t those things supported with ZHA? Or are they now?

To me, this is a big gray-area question that isn’t concrete enough for me to switch over to Z2M.

Reasons to switch to Z2M are simple: some (a lot of) device(s) don’t work in ZHA, but they work in Z2M – you either trash the devices or make the switch.

Most likely Tuya – they’re called garbage, but they are cheap.

Plus, in my case, I used to have “strange” issues with ZHA – like devices “disconnecting” all at once multiple times a day – nobody was able to help me with debugging what’s going on, but everybody loved to put the blame on me anyway ;-p I was fighting ZHA for a few months every day – since switching to Z2M, no issues, instantly, for the last… almost 2 years. “It just works” ™.

You have control over more device features typically. More entities are exposed. It is often more “advanced developer” mode in number of features.

Also, to comment Hue. Z2M (don’t know for ZHA to be clear) supports grouping of the Hue lamps, meaning you create a group (let’s say living room) and you put all your living room lamps inside and then you control the group to turn on/off these lights. Instead of sending one command per light, Z2M is able to send single command to all at a time (to a group).

Z2M is also capable to update Hue lamps, Hue sensors, Hue switches. It also updates my TRVs.

Please note that you don’t need to be convinced to switch. If ZHA works well for you, stick to it.

Concretely for Hue, I moved away from the official app, simply because their bridge supports max 1 command per second, so I wasn’t able to implement a Hue Tap to be controlled by HA, because if user rotated the wheel, it took ages to change the light state.

Avoid if at all possible.

Zigbee devices are more susceptible to RF interference and they live in an already congested RF range.

Every zigbee network needs its own coordinator and channel… and you should already be working through making it a non overlapping channel with ambient wifi. So you’d have to do that twice and the very existence of the second or third network both makes the other network relatively weaker than if those devices are in the first mesh (more nodes == better on most cases) and actively could interfere with it in extreme cases. So instead of making it better it could even make it worse.

So why do people do it? They don’t understand how it works and do it anyway. :sunglasses:

1 Like

A couple points here. Z2M isn’t fixing any mesh issues, they are both perfectly capable options. What happens is that when people move to Z2M, in the process of moving, they change other things that solve their original problem. Hedda has an extensive guide on how to solve mesh issues, most people would be better served following it. It’s especially frustrating when a new user clearly has mesh issues and they are advised to move to Z2M, which only results in further frustration.

As far as Z2M having more advanced functionality, that’s not really true in most situations. It is true that Z2M exposes more entities, but that doesn’t equate to more functionality. Admittedly, until recently, adding an entity when building out a ZHA quirk would often require an additional PR to the core Home Assistant repo which acted as a barrier. But even so, it’s really a difference in philosophies. The average user will look at a device in Z2M and see a ton of entities and think that it’s exposing more functionality, where that functionality is available, you just need to access it via a cluster command under manage zigbee devices.

With the new V2 quirks, we can expose entities from the quirk directly, but even so, you likely won’t see the same number of entities going forward. That’s just the design that ZHA and HA follow, where extra entities, even if they are disabled by default are frowned upon.

2 Likes

I’m interested in Home Assistant adding WebSocket support to ZHA. Wouldn’t that mean the Z2M interface could be put on top of ZHA?

No, this just makes it so you can run ZHA decoupled from HA. This allows ZHA to run on another device or just allows you to restart HA without restarting ZHA. If you restart ZHA 30 odd times when you are developing something, it’s almost guaranteed that some battery device will miss a check in and drop off the network.

1 Like

More entities with Z2M?

Which ones? What’s specifically different with examples?

This is what I’m saying. I hear that more entities are exposed, but I don’t know what they are or if I care.

This is what I was looking for. I found that command menu, and I used it last night with my Inovelli ceiling fan canopy module. Something was messed up where I couldn’t see all the advanced functions listed on the website (which show up for their wall switch):

Then I found out their website has all the advanced parameters listed and the values I could use:

The question is why I had to do this in the first place. Inovelli’s website states ZHA supports their Advanced Features, but for some reason, they’re not showing up. Would Z2M show these features or is it something broken in the Inovelli ZHA controls where these many advanced parameters are missing?

Groups/binding/light-link

Yep, ZHA supports groups/binding/light-link (I assume these are all the same thing). I don’t use them because they’re completely separate from Home Assistant groups, and I don’t like having the same thing defined in multiple places.

I’d love to use these groups, but I wish Home Assistant natively supported them. I’ve never had issues sending commands to lights with zero binding groups, so no big deal. I say “never had issues”, but I might be used to jank and not noticing it’s janky.

Firmware updates

No clue what TRV is, but Philips Hue can update with ZHA as well!

Not sure of a better way to do this, but you can add this config to your configuration.yaml (and restart HA) to get Philips Hue firmware updates:

zha:
  zigpy_config:
    ota:
      z2m_remote_index: https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/index.json

Firmware updates also exist for other manufacturers out-of-the-box.

Hue official app vs Home Assistant

I never used the Hue app myself. I’ve only ever paired my devices to Home Assistant. My first Zigbee was the ZBT-1 (SkyConnect) which I used on some IKEA devices. Then I bought some Hue motion sensors and lights, and it all just worked. Other than re-pairing, which sounds like it’d be a pain in the butt, it was straightforward.

2+ Zigbee Controllers

Great tip! I don’t want more than one Zigbee network :stuck_out_tongue:. But what about firmware updates? With lots of devices, they take forever because they often have to go through multiple hops, and the transfer speeds are super slow!

I’m not sure how large these firmwares are, but I can only do a few a night for the 30 that needed updating. There’s no rolling auto-update with Home Assistant where it can pipeline updating only 2 at a time.

ZHA drop-offs

That explains a lot of why maybe Z2M has this happen less, because it’s disconnected from Home Assistant unless you restart the whole Raspberry Pi or Docker container.

1 Like

You are way past the point of overthinking this.

I have ever once cared how.many lamps firmware updates I ‘can do in a night’ they get done when they get done.

If I were still working in system management caring for 65000 workstations that need updates sure. But no the lights get the firmware when I get to them IF I’m solving a particular problem. You don’t redesign your zigbee network for that.

1 Like

IF I’m solving a particular problem

Exactly! I’ve never understood the fascination with updating firmware. That’s one of the draws to the Zigbee network for me, it’s isolated by design, so unless a firmware update fixes a problem or brings new functionality, that I need, there is zero reason to apply it. You are just risking a change they breaks functionality or evem a bad update bricking your device.

1 Like

@Sawtaytoes To see what Z2M exposes, you can go to Z2M page and see exposures for specific device. For instance for your apparent device: Inovelli VZM36 control via MQTT | Zigbee2MQTT

And don’t forget that you can use Z2M to communicate with other MQTT devices too.

I don’t think I need to convince you between ZHA and Z2M. I close the discussion at this point.