I installed the ZHA integration and it immediately started finding all of my Zigbee devices. Four of those devices are Zigbee buttons. I know the button is seen because when I push the button, I see the button press in the logbook:
I copied all the event data that I found when I pressed the button and saw these items revealed using the Developer tools... Events... Listen to events...
I then subscribe to the zha_event
I hope that gets you in the right direction.
When I subscribe to “zha_event” then click on “listen”, I get thousands of lines of data with no way to capture it or to stop the scrolling. Have I missed something?
Interesting, this does not happen to me, I only get data when my devices send it with a button press. I am not sure if there is a way to filter this data. I also don’t know what devices would send data continuously. The only zha devices I have are lights, a router, and different buttons
I can only give you what I have experienced.
There are conversations that z2m supports more devices than zha. I don’t have many devices, and all apparently are supported by zha as I have not had issues pairing the devices I do have. zha is built into HA so I went with that as my decision.
I’ve been using Z2M for years, but the past week has been a frustrating exercise with getting the Add-On to start. Since ZHA found all of my Zigbee devices in just a few minutes, I decided to stop troubleshooting Z2M and adopt ZHA.
But unlike your Z2M example, ZHA does not make sensor entities. In order to use a button or switch in an automation, for example, I am forced to capture the ZHA event. (Thanks pcwii)
Thanks. I got some of my Zigbee buttons and switches working as automation triggers. But there’s a couple that I would like to work on: My Ikea Tradfri Zigbee remotes.
I have the toggle working on this remote, but I want to use some of the other buttons. When I capture the event for the “Bright” button, I get this:
I used the contents of the data: as in the toggle automations, but the trigger never fires.
Do you see the problem?
Is this method documented anywhere?
Check out the 2 blueprints for ZHA I linked, it should make this a lot easier; they support the 3 types of “press” too. Although you already did most of the work manually.
Interesting, I have not checked, but I assumed the device ID would not change when I pressed different buttons on my device. And therefore I couldn’t create unique automations based on different functions. I will have to test this. Thanks.
Actually I am pretty sure that in automations the triggers are OR’d and the conditions are AND’ed. Any individual trigger will start the automation. If an individual entity has multiple property items I would expect these to be only redundant and not affect the trigger. But again, I will test this. I expected that the property items for a particular switch entity would not change.
I don’t have any expertise with zigbee, so I’m brainstorming a little. But either it should register 5 button devices (in the same way that a device with 5 controllable light bulbs might register).
Failing that, maybe a helper could be used to expose the events as a button?
The current user experience is horrible - took me ages to figure out how to even see my device’s ID and I’d consider myself a reasonably technical user. Anything is better than this!