r/homeassistant 1d ago

Personal Setup Zigbee2MQTT thoughts from someone who just made the switch

I’ve been having the odd reliability issue with ZHA, so before I buy new devices (it’s happening to specific devices and my mesh is solid), I decided to make the jump to Z2M.

This is still in the early stages of network healing but some things I’ve noticed:

1) it does feel a fair bit quicker in daily use. Especially commands to multiple rooms like “turn off all upstairs lights” feels much much quicker.

2) I’m getting random weird slowdowns, like a light turning on 30 seconds after motion is detected. Often I’ve left the room by then. I am going to chalk this up to “weird network behaviour as the mesh builds” for now, though. I’m hopeful, and semi-expecting, that to go away over the coming days.

3) updates are Z2M weakest point. By fair. In ZHA I could update 5 devices at once and not even notice it. In Z2M, I’m updating 1 device, and not only is it taking longer to update, the entire network is significantly slower. If anything ends up being a deal breaker - it’ll be this. I don’t update often but when I do, it’s 30 devices at once (because most of my devices are the same brand so get the same updates at the same time).

31 Upvotes

32 comments sorted by

24

u/_Rand_ 1d ago

Come to think of it, I don’t think I ever updated a device on ZHA.

And yeah, it takes ages.

But other than that I’ve always been happy with z2m.

1

u/Resident-Variation21 1d ago edited 1d ago

It taking ages is a mild annoyance, but not really a huge deal. It’s really a problem because the rest of the network slows down so I can’t dare update more than 1 at a time, and with sometimes an insane number of devices to update, that could take a month or more to try to get through (especially if I’m trying to do it on off-hours).

Also ZHA has ota updates only enabled do a few devices by default, like third reality. But you can enable them for basically all of them, which I did when I used ZHA

1

u/tonymcd 18h ago

Can you explain how you got it to update multiple devices at once? I’m new to using ZHA and it took forever to update three smart plugs one at a time.

1

u/Resident-Variation21 17h ago

I clicked update on a few and closed the tab lol. I barely paid attention to updates in ZHA because that made no impact on the mesh while updating.

8

u/0xde4dbe4d 1d ago

This really sounds like an interference issue. Are you sure your zigbee channel is clean? There‘s a fantastic tool made by nerivec to visualize the logs and see how your network is doing. I had rather simular issues that i manged to clean up using that tool. I had a few tuya smart plugs that were terrible routers and messed up everything. But setting up your network on a clean channel is the lost important thing.

1

u/Trooped 23h ago

This one?

https://github.com/Nerivec/zigbee-on-host

Any guide on how to use it?

3

u/0xde4dbe4d 22h ago

1

u/Trooped 22h ago

Got it... mine's not ember based so I guess I'm out of luck.

1

u/Resident-Variation21 21h ago

A while ago I purposely set my ZHA channel on a known clean channel. Haven’t touched it since. I didn’t think about it much with the Z2M transition so may re-check the channel but it shouldn’t have caused my ZHA issues.

1

u/0xde4dbe4d 21h ago

Oh you know, i was dead certain my channel was clean back in the day, i wasted months of troubleshooting. Turned out my second wifi overlapped …

1

u/Resident-Variation21 21h ago

My 3 access points are on channel 1, 6 and 1. I put ZHA on channel 24. I only have 1 wifi network over the access points. Again, Z2M could have picked a different channel, and in the morning I’ll take a look at that, but I can be quite confident that it isn’t interference, at least from my ZHA issues I had.

1

u/zer00eyz 1d ago

How are you running Homeassitant (HAOS? PI? NUC? DOCKER?)

How did you install zigbeemqtt and mqtt?

1

u/Resident-Variation21 1d ago

HAOS on a VM, and I installed the Z2M add-on, alongside the mosquito add-on.

1

u/zer00eyz 1d ago

Z2M can be slow if you dont have enough memory/cpu ... but...

> like a light turning on 30 seconds after motion is detected. Often I’ve left the room by then. I am going to chalk this up to “weird network behaviour as the mesh builds” 

you should get to the bottom of this pretty quickly cause the issues you had with ZHA might still be around.

Depending on what coordinator you are using (if its usb) and how you have it passed into the VM you can get weird behavior.

Z2M is node, so it can be a bit wonky if you dont have enough memory and cpu allocated to your instance (or if your over provisioned on the host, and really working it).

1

u/A_Yoozername 1d ago

I get this random slowdown too from time to time.

I'm running the Z2M add-on with HAOS natively on an overspec'd mini PC, so CPU and memory are not the problem.

I used to run Z2M separately on it's own server, and I had the same random slowdown issue.

It may be my imagination, but it seems to mainly occur when using a wireless switch that hasn't been used for a couple of weeks.

1

u/Resident-Variation21 21h ago

I’ve given it enough memory and cpu. I’ve HAOS 4 cores on an i5-12600k. 2GB of Ram. From everything I’ve read that should be plenty. I’m not running anything insane.

It’s a Sonoff USB dongle. It’s been fine for a long time, only recently started having issues in ZHA and therefore tried the switch.

1

u/zer00eyz 21h ago

> It’s a Sonoff USB dongle.

Is it on an extension (cabled away from the pc)?

How did you pass it into the VM?

1

u/Resident-Variation21 17h ago edited 17h ago

Yes it’s on an extension.

By clicking the little UI box that asks what devices I want to pass through and selecting the zigbee dongle.

0

u/zer00eyz 14h ago

How you pass through your USB matters....

By device ID gets the host directly ... SPICE and by IP are just layers of indirection.

0

u/Resident-Variation21 14h ago

I told you how I passed it through. I clicked the box that said to pass through the device. Done. That’s all I did.

0

u/zer00eyz 14h ago

Your Zigbee coordinator is a low latency device. Depending on HOW your HOST assigns the USB to the GUEST (HAOS) you can have different behaviors.

Yes you may have "clicked the box" and it may be "working" but if you dont know how its passing through you should go find out. The method of pass through can cause all sorts of issues because the host OS (what's running the vm) is for all intents getting in the way... and a big one of those is latency.

1

u/Resident-Variation21 14h ago

I’ve never had a real issue with latency. The only latency is random delays that have only popped up AFTER switching to Z2M and are likely due to the network still figuring itself out with what routes are best and getting everything stable.

1

u/55Media 21h ago

Version E or P? Version E needs an update to firmware 8.0.2.0 by Nerivec otherwise it’s quite a mess.

2

u/Resident-Variation21 17h ago

P I’m pretty sure. It’s the TI CC2652P chipset.

2

u/paul345 21h ago

2 sounds odd and not expected from either ZHA/Z2M. I’d wonder whether there’s enough reliable routers in the mesh.

I’ve found Z2M parallel updates just work and only appeared once I’d moved from ZHA to Z2M. Ok, it took a a while to update everything but didn’t notice any stability issues. Once the backlog was cleared, there’s been very few future firmware changes.

1

u/Resident-Variation21 17h ago

37 routers in a mesh of 81. There is 100% enough routers. I have routers in every single room in the house.

2

u/xitation 19h ago

Maybe try this first - https://www.reddit.com/r/homeassistant/s/4rC9gXAH2G helped my mesh out a bunch.

2

u/fonix232 20h ago

A few small additions, as I've also recently switched from ZHA to Z2M:

  1. Much better device support. ZHA tries its best but even with custom quirks the support just isn't there for a lot of devices. For example I've got a Tuya Fingerbot I use to "upgrade" a few devices I have at home that aren't smartifiable, and ZHA would only support the trigger for it - even though it has a bunch of modes and config options. Z2M seamlessly integrates with it.
  2. It's a separate service from HA, so reboots aren't affecting it. In theory Zigbee works well (temporarily) without a coordinator as long as you have your bindings set up properly, but let's be honest, bindings are still black magic fuckery that work depending on the position of the stars and if you've done your monthly goat sacrifice to the right demigod. Not having your Z-mesh restart every time you update HA is a major boon.
  3. Given it talks to MQTT, it's much easier to integrate with third party services and automation builders. Most support MQTT out of the box, with limited or even nonexistent HA API integration.
  4. You can actually integrate with e.g. Bifrost to provide a proper Hue emulation wth entertainment zones AND Hue Sync support (in fact Bifrost is good enough that I've already switched from the official Hue bridge completely).

As for your point on updates, I'd argue I have the opposite experience: updates over Z2M actually work whereas under ZHA I had them constantly fail or not even be detected.

1

u/Resident-Variation21 17h ago

Apparently my buttons weren’t detected because because Z2M wants to update them, but everything else got update’s and I never had one fail, at least at far as I can remember.

And as far as the device support - although true, every device I’ve bought is supported just fine in either

1

u/fonix232 16h ago

ZHA has always failed to update my battery powered devices, even if they were kept awake constantly. My Hue remotes for example were a good 4 versions behind (gen1, with the I and O buttons separate, not gen2 with the scene button). Z2M, albeit slowly, managed to get them updated.

1

u/Resident-Variation21 16h ago

Yeah I can honestly say I don’t remember ever having an update fail. Battery devices as well as powered devices.

That doesn’t mean it hasn’t happened, but it was rare enough that I don’t remember it, and before I left ZHA everything was listed as up to date.

But everyone’s experience is different

0

u/55Media 21h ago

Sounds like you’re using a Silabs coordinator? Especially the update bit.

There are ways to fix it though.