#Why ZHA and Z2M ?
1 messages · Page 1 of 1 (latest)
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.
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.
I don't use ZHA so I can't fairly compare them. Basically Z2M can be used by more people and likely is.
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.
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.
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 !
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.
Z2M uses MQTT, because that's a common way for IoT devices to talk to each other, so you would be using MQTT for that, it's not difficult to set up though.
Can ZHA and Z2M use the same Antenna at the same time ? ZBT-2 here.
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
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.
Ah, then I'm not going to rebuild, or buy another one!
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)
I hope you're right. As long as there is progress, even slow progress, I can be patient.
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)
That's more attractive than migrating to a different integration.