#Why ZHA and Z2M ?

1 messages · Page 1 of 1 (latest)

soft totem
#

Can anybody help me understand why both ZHA and Z2M exist, and why they expose more or fewer entities from the same Device ?
Why isn't there "One integration to rule them all", or at least have both expose the same capabilities from devices?
I'm sure there's a valid reason, I just can't find an explanation. I'm curious.

Thanks

median shoal
#

ZHA, written in python, is integrated and develoded exclusively for HA. Z2M, written in javascript/typescript, can be used with HA but doesn't need to. I use it mostly with Node-Red, for example, Different developers.

soft totem
#

OK, that's a distinction I wasn't aware of. Some of the mists clear, thanks.
It seems to me ZHA isn't as well developed (feature complete) as Z2M, is that fair ? Is there a reason for that, and why does it exist and Z2M isn't the only more mature integration in HA ?
Again, curiosity, not criticism.

median shoal
#

I don't use ZHA so I can't fairly compare them. Basically Z2M can be used by more people and likely is.

soft totem
#

The main reason for asking is that I'm contemplating a purchase of the Ecowitt weather station with the Shelly wireless comms (ZigBee). It seems that only a few of it's Entities are exposed by ZHA, where as Z2M gets them all. So it's not the device that's "at fault" it's the integration.
I've been using ZHA for my ZigBee devices because, well I just am. I'm now thinking if that was the right choice. That then peaked my curiosity, and it seemed odd that the ZigBee integration provided by and developed by HA isn't as complete.

rancid wadi
#

I had some of my IKEA ZigBee devices not listing their entities properly through ZHA and they didn't work very well, so switched to Z2M and it works flawlessly.

soft totem
#

OK. Any downside ? All the devices are exposed in HA in the same way for use in automations etc ?

#

I guess I avoided Z2M because it included the term MQTT and I just thought, I'm not using MQTT, why do I need that ! It seems the name is just a bit missleading maybe.

#

I assume I can run them side by side ? I should just give it a go shouldn't I !

glossy star
#

They both work fine for the Zigbee stuff I happen to have.

In my case, I switched from ZHA to Z2M because I wanted to dive deeper into writing my own little MQTT things (e.g. my PC can do stuff like sleep and switch screen outputs), and I figured it was nice to have as many entities as possible in the MQTT universe. It integrates really nicely into HA, so I kept it around.

rancid wadi
soft totem
#

Can ZHA and Z2M use the same Antenna at the same time ? ZBT-2 here.

rancid wadi
#

Hardware is the same, it's just software.

#

The zigbee side is all the same, all that's differnet is how the zigbee network talks to the HA network

soft totem
#

OK, thanks.

#

Still feels odd that the default mechanism for ZigBee within HA is "lacking". But at least I understand the lay of the land now. Thanks all.

soft totem
#

Ah, then I'm not going to rebuild, or buy another one!

rapid flare
#

I find that ZHA is a lot easyer in HA than Z2M.. but I do see that there is things that Z2M can do that do not work on ZHA (yet the difference is getting smaller by the month)

soft totem
#

I hope you're right. As long as there is progress, even slow progress, I can be patient.

lilac vine
#

and of course you can help make that progress happen for ZHA by reporting devices with missing functionality over on https://github.com/zigpy/zha-device-handlers/issues (and even writing zha "quirks" to add device support, if you're up for doing some python coding)

soft totem
#

That's more attractive than migrating to a different integration.