I’ve been hesitant about adding devices through the Z2M implementation of ZigBee. Currently everything is using ZHA. I read all these posts, “oh it’s so easy, oh, the setup is a breeze” etc.
So I buy a Gledopto LED controller and figure, why not try Z2M which is already installed integrated through a currently unused conbee stick.
I go to an authoritative site (below) to figure out the proper method, and I have to read through this. I just don’t get it. With ZHA, I pair it and forget it, I don’t need to know anything about payloads or endpoints.
Is z2m actually simple or is it simply more experienced users speaking in an echo chamber?
As a new HA user I looked at the options for adding Zigbee devices and chose Z2M over ZHA. This was because Z2M seemed to be compatible with more devices. This was around 12 months ago and I’ve been using it without much difficulty since.
The example device you have linked to has a lot of commands (payloads?) which can be sent via Z2M. However, if you are using the instance installed inside of HA then you do not need to worry about any of these. Just use HA automations to control the device as you currently do. The only time I use the Z2M interface is to add new devices and perform the odd firmware update for Philips Hue bulbs.
The only information I ever really need from the zigbee2mqtt.io site is:
Is the device I want to add supported in Z2M.
How do I put a device in pairing mode.
After that I just control the device through the HA integration page (there will be an entry call MQTT where all of the devices added to Z2M will be listed). You can add some of these entries to a dashboard or control the device through automations as you currently do now.
It took me a little time to get Z2M up and running with Homeassistant (I am using docker) and so some patience was needed.
Now that it is integrated, I honestly find pairing devices with Z2M really easy, but I have only ever paired Hue and Aqara devices.
One trick with the Aqara (which may or may not apply to your situation) is to pair them close to the co-ordinator and then put them in your desired location.
The only thing difficult about z2m is the initial install. Even that is not really difficult, its just that there about three pieces to install. Many of the HA step by step tutorials can have you up and running in minutes.
Don’t get scared by the detailed z2m documentation. Consider the docs as developer level for speaking low level mqtt. Realize z2m is used by many different platforms, not just HA.
HA’s MQTT integration hides all the low level stuff. You end up with devices and entities just like ZHA. You control everything with standard HA commands just like ZHA.
You have the option of using raw mqtt commands if desired, but I’ve never had the need.
If anything z2m is easier for day to day use, often more functionality is exposed as entities than ZHA.
Nice. I have only have Aqara contact sensors and they all needed to be paired that way. Having been paired, they work perfectly at the other side of the house, 2 floors up though. I do know that lots of others have this issue (it’s a solution often mentioned on forums).
I took all your advice and took the plunge. Removed my aqara z2h moisture detectors from HA, they had been dropping off occasionally. Added them one at a time through Z2M, it integrated with HA perfectly. Changed a few names, modified a binary sensor leak group, edited my leak and battery dashboards and done. Immersed each in water. Alarm and notification went off as per the automation.
So perfect so far, and not hard. You were all correct, Z2M is pretty cool. Lots of options.
I’m guessing it could be a problem if you had the options for zha set to add devices. I turned that off, and temporarily turned on the Z2M Permit Join. That’s essential, yes???
That is essential. Every time you want to add new devices to Z2M you will have to click ‘Permit Join’. Once the device is in pairing mode then Z2M will begin the process of ascertaining what the device is, and which functions it exposes.