I experimented a bit with ZHA (native Zigbee integration) but soon realised I needed something better, and Z2M was that something.
It had all been working wonderfully, until I had a problem recently that meant I had to redo the entire Zigbee setup.
I run HAOS on a VM, with the Zigbee radio being passed through from the host. Recently I wanted to play with Thread so I added a radio and passed it through to the VM as well. All was fine, though I wasn't having a lot of time to experiment and the Thread dongle was connected in an awkward position so I decided to yank it out. At this point all hell broke lose. Z2M wouldn't start, throwing cryptic error messages. After a lot of trial and error, I removed both USB passthroughs, rebooted the VM, shut it down again, re-plugged the Zigbee dongle and re-added the passthrough. At this point the hardware side of things was fine but my Zigbee network was gone. To make it worse, a new one couldn't be initialised because it was trying to use the same ID as the previous one. I had to manually change the ID in the config YAML, restart everything, then re-pair all devices.
I really feel like this stuff should be more resilient to failures. Otherwise, it's pretty good!
> At this point the hardware side of things was fine but my Zigbee network was gone.
How come the hardware was ok but the network was gone? Did some Z2M config files go wrong because of two dongles? Did you try to restore VM from snapshots?
Losing the network and having to re-pair everything would be a nightmare for me given the number of Zigbee devices I run (~35) and that some of them are mounted in switch boxes in the walls.
Honestly, I don't think I can answer your question. I didn't change the config but I had to delete and re-pair all devices (or they had been gone from Z2M already at this point, I can't remember - it's mostly an academic distinction though).
I second Zigbee2mqtt. Koen's work is legedenary, I also been fascinated by Zigbee and been using ever since. No need to 3rd part oem vendor lock-in. 99% of the devices I purchased currently nearly 52 on my zigbee network, were paird hassle free.
I've actually done my migration the other way around. I started with zigbee2mqtt, saw that HA now offers ZHA and switched to that. It just works with all devices I own, so the end result is one less moving part I need to update so the choice was easy.
For me, a lot more entities from each device was correctly detected out-of-the-box. I think the wide compatibility is the biggest reason why you'd go with it.
But if you only have Phillips and Ikea devices for example, probably won't be much difference with Z2M.
The nice part about mqtt is other things can subscribe to the same stream. I've also seen people do some really interesting things with hosting a copy of HA in the cloud -- this is what they connect to while outside their network -- and using mqtt to push updates to a local HA.
Okay but if you have Home Assistant in the center of all things, why would other things need to subscribe to that same stream?
I use MQTT but for me it's only a tool for getting a certain device integrated in HA. I don't see why I would want more devices to communicate that way.
Plus, from my development background, I have grown to really dislike event buses. And mqtt sure feels like a weird big non-strict event bus with some persistence.
Because HA is a single point of failure. It's big, complex, and frequently updated (there were 3 minor version updates this month already.) Any one of those updates could bring some issues that require fixes/rollback, and even when it's smooth, it takes a minute or two on my 8th-gen, i5-based, NVMe-having home server, not some underpowered Pi or SBC.
Meanwhile, a standalone MQTT broker like Mosquitto is rock solid, had 2 minor updates this year, and could run on the most minimal of hardware/LXC.
Almost everything I use is ZigBee, but at first, I used the built-in Zigbee support for it, not realizing what I was missing out on.
After a move, I setup everything again, but this time via ZigBee2MQTT instead and the compatibility is miles ahead of the built-in integration.
Just a word of advice to others who are using the built-in integration atm, not realizing the big difference between the two :)