Should I change from ZHA to Z2M

Hi,

I’m kinda new to the HA, and I’m building up my networks.
I have a couple of zigbee things, both zigbee and matter thread compatible, and matter-over-wifi stuff.
I decided to use my ZBT-2 coordinator with Zigbee, and by default I used ZHA, as it was installed already.

I’m trying to add IKEA BILRESA switches, also ones with wheel, oh boy.
I just figured out about blueprints and automations, and it looks like without Z2M I won’t be able to have much use of those switches.

As I’m around halfway building my network, it wouldn’t be such a pain in the arse to restart with Z2M.
I don’t have much things right now, as I was using Google Home and it’s crappy integrations before.
Some lights, plugs, switches and sensors.
For now, I’d like to do basic things, like switching lights, voice control, etc.

Would you guys recommend it? Is it really that much “better” (in terms of customization, etc.)
Any other ideas or recommendations?

Here’s the reality in a very condensed version:

ZHA is nice because it’s natively integrated with HA. As you’ve seen, you installed your ZBT-2 coordinator (I have one too) and boom, everything was working.

In terms of total number of devices supported, Z2M is the open source leader. Nothing comes close to the myriad of devices it recognizes and support.

I’ve been using Z2M on other automation platforms and that’s my choice in HA also. You’re just going to have wider device coverage.

Does it work the same way?
Like add new device, it will add it simply?
Or do I have to tinker something with every single device? (which would be supported otherwise by ZHA). Like a lamp.

Try it and decide for your self.
You can’t run at the same time zha and z2m over the same coordinator.
Z2m have wider range of devices that it support, but it is up to you and your own setup.
For z2m to work you will need to configure mosquitto broker.
I’m using z2m since I started with this rabbit hole and never was using zha in the first place.

Does the mosquitto broker something that’s really time consuming to set up, or something to pay for (like a subsription)?
Or just something else to install and thats it.

For you it is probably time consuming.
If it isn’t you wouldn’t ask this question. Anyway without it z2m will not work.

Cross question:

If I would keep my DIRIGERA in the current setup (which I want to scrap), and add all the IKEA switches and whatnot is not supported well with HA to make them work properly.
Can I integrate them somehow to the HA?

What I’m looking for, is the wheeled switch to be able to control 3 separate things as it was doing originally with IKEA hub.

Or should I just change to Z2M, get a blueprint and pray for it to work? :smiley:

Personally, my 2 cents would be: KISS - keep it simple… sir. Like it is mentioned, ZHA is nice because it’s very easy to use and just works. No need to SSH or open a terminal, no installing packages, no messing with configuration files. It just works from the UI.

So if the hardware you plan to use works with ZHA, I’d just stick with ZHA. Do however take into consideration whether you may want to expand in the future. Off course, if you do a project in the future that requires different hardware that does not play nice with ZHA, you can always switch in the future. And who knows? With some luck by then ZHA will have added support for the hardware you need. But on the other hand, you could also invest time up front to look into Z2M.

For somebody with some Linux experience, setting up mosquitto and z2m probably isn’t all that hard. If you know what docker is, you’ll probably be fine. If not, you can still set it up, but you might be spending some time on discord and needing a few hours to figure things out.

I did look into the DIRIGERA, but from a quick search it doesn’t seem that well supported, so probably not a good idea.

One more question: you mention blueprints and automations that you wouldn’t be able to use without Z2M? What are you referring to exactly? Because as far as I know, your devices should be showing as entities regardless of whether you go with ZHA or Z2M. The only think I can think of are blueprints or automations that depend on MQTT to work, but that should not be a large subset of automations.

EDIT: I actually just found a blog that discusses how to add the DIRIGERA using matter in home assistant (though it is in German). IKEA DIRIGERA via Matter in Home Assistant - Björns Techblog

1 Like

Stick with what’s working. Don’t make yourself crazy.
In 6 months or something ask the question to yourself again. You will be able to answer it.

1 Like

Z2M has a larger user base and therefore more device support. My experience after a few years of ZHA is that for many devices, the support eventually comes but if you buy something niche or just new it may not be there yet. Similar story for the nr of features supported for each device.

I don’t understand the remark about blueprints and automations. You don’t need Z2M for that, there are plenty of blueprints for ZHA or both. Probably more for Z2M only, the same thing as above holds for that. Automations (homebuilt ones not blueprints) really don’t care about which protocol you use.

1 Like

Sorry, the blueprint stuff might be misleading.

What I meant is, for example for the bilresa wheel switch, zha blueprint can make it work, but with very basic functionality. (Maybe it was updated but I couldn’t find)
On Z2M, the same blueprint supports a lot more functions.

I’m just getting into HA, and there are so many things to learn and experience with.
That I haven’t had the time reading about Z2M and mosquitto broker and all for hours, doesn’t mean I won’t be able to understand. Just trying to prioritize and ask for opinions.

For now, I would like to keep it a bit more simpler, but yet future proof. Right now I can easily restart all the device pairing, in months or years I probably won’t touch it.

I was kinda satisfied with all devices OEM apps and Google home integration, but it has some weird things, and being borderline autistic (aren’t we all) not perfect was not enough :D.

Anyway, thank you guys very much for the feedbacks.
If you have some basic stuff for me to read about Z2M, please link them.

Wish you a great day.

I have ZHA on my HA, but i did some Z2M testing on my test HA. I’d say waaay more work to “make it work”. As for all things in HA this one is also not exactly well documented, so you must try and dig on google for solutions…
ZHA is basically plug&play. Z2M is far more work. Ok, when you finish it works (at least for me it did) and in my case (Sonoff TRV valves) it has some more sensors shown, but i don’t use them anyway, so it’s not a deal breaker.

So, as others said: stick with ZHA if it works. Go to Z2M only if you must, not for your own pleasure (since that pleasure will quickly become P.I.T.A.)

I think you are exaggerating. To get Z2M up and running you basically install the MQTT app (mosquitto), install the Z2M app and configure both. Done in 5 minutes tops.

4 Likes

For most of the people it´s not probably necessary to use SSH nor do anything else outside of the GUI when using Z2M. I did the swap from ZHA to Z2M and it took like 10 minutes to get Z2M ready for pairing my devices and everything has been smooth sailing since then.

1 Like

When you use Z2M, is the pairing as simple as with ZHA? I mean look for device, it finds and it works normally (if it’s supported ofc).
Don’t need to set up every simple device for blueprints and all.

If that’s the case, it might worth to try.
But I would say ZHA is pretty comfortable, and I like it. I just hate that my fancy switch isn’t working properly haha.

Also, if Z2M has a lot more configurability, I might like the freedom to do so.

One advantage of Z2M is it doesn’t go down when HA updates/restarts as it’s independant.

2 Likes

Perhaps a bit, yes. But, since in ZHA all is done in seconds (click “add devices”, when device is found click “add” and you’re done) i guess 5 minutes is still “way more work”. :grin:

And, i did have some problems setting up Z2M … can’t remember details right now, but it wasn’t as smooth as ZHA and i’ve had to google it for solution.

that “can be” true: if mosquitto isn’t installed in HA (as is in my case) then yes, but even if it’s independent it doesn’t really help much…since HA is down no automation works anyway, right?

It is indeed as simple as that.
You can also change the device name in something meaningful and have it’s id updated in HA once paired. Blueprints might be used for additional functionality similar as with ZHA.
You can check the z2m website for compatible devices and also can use the Blackadder website https://zigbee.blakadder.com/ to see the devices for z2m/zha/conbee and compare which is of better use to you.

Another option: Run both ZHA and Z2M

Its USD $50 to buy a second ZBT2, but for that price you get:

  • Time - you can migrate devices when you want.
  • Piece of mind - you don’t have to worry about all your stuff being off line if the migration goes badly.
  • The best of both worlds - some stuff works better on ZHA and some works better on Z2M

Other than cost the only downside to running both is that each network has less devices / may not be as robust.

In my case my first coordinator was a Sonoff, so it was cheaper but I consider the ZBT-2 an upgrade so that was an extra benefit.

Hm… according to above list not a single shelly device is compatible… ? (i have 3 e-ink zigbee thermometers connected to HA via ZHA)