This question was for @auto.neub
In Deconz for example, i also see only a battery level entity and all the button presses on the hue dimmer switch fire events and there is no entity for the remote.
@auto.neub if you go to Developer Tool->Events ,enter “zha_event” in the “listen to events box”, press start listening and then press a button om the switch, do you see any event being fired?
Yeah, I realized that.
But My question was just a general one about events…in general…
How would one know (or find out) if “zha_event” is even a valid event to listen for?
Oh cool… I’ll have to check that out after I get my kiddos to bed…thanks I’ll let you know
It works! So cool.
So here are the events
zha_event
Event 5 fired 9:01 PM:
{
"event_type": "zha_event",
"data": {
"unique_id": "00:17:88:01:06:54:c5:93:1:0x0008",
"device_ieee": "00:17:88:01:06:54:c5:93",
"endpoint_id": 1,
"cluster_id": 8,
"command": "stop",
"args": []
},
"origin": "LOCAL",
"time_fired": "2019-12-16T04:01:21.253515+00:00",
"context": {
"id": "c1511d1bb34d49d0ad0f39da7bb8e326",
"parent_id": null,
"user_id": null
}
}
Event 4 fired 9:01 PM:
{
"event_type": "zha_event",
"data": {
"unique_id": "00:17:88:01:06:54:c5:93:1:0x0008",
"device_ieee": "00:17:88:01:06:54:c5:93",
"endpoint_id": 1,
"cluster_id": 8,
"command": "step",
"args": [
1,
56,
9
]
},
"origin": "LOCAL",
"time_fired": "2019-12-16T04:01:20.830000+00:00",
"context": {
"id": "3dd0e97611ee41b69ca16b97ff05bc67",
"parent_id": null,
"user_id": null
}
}
Event 3 fired 9:01 PM:
{
"event_type": "zha_event",
"data": {
"unique_id": "00:17:88:01:06:54:c5:93:1:0x0008",
"device_ieee": "00:17:88:01:06:54:c5:93",
"endpoint_id": 1,
"cluster_id": 8,
"command": "step",
"args": [
1,
56,
9
]
},
"origin": "LOCAL",
"time_fired": "2019-12-16T04:01:20.073509+00:00",
"context": {
"id": "18d1cba614d94cc7af636057670c584d",
"parent_id": null,
"user_id": null
}
}
Event 2 fired 9:01 PM:
{
"event_type": "zha_event",
"data": {
"unique_id": "00:17:88:01:06:54:c5:93:1:0x0008",
"device_ieee": "00:17:88:01:06:54:c5:93",
"endpoint_id": 1,
"cluster_id": 8,
"command": "step",
"args": [
1,
30,
9
]
},
"origin": "LOCAL",
"time_fired": "2019-12-16T04:01:19.216249+00:00",
"context": {
"id": "1522ca3024e441169ac73dc01be7487c",
"parent_id": null,
"user_id": null
}
}
Event 1 fired 9:01 PM:
{
"event_type": "zha_event",
"data": {
"unique_id": "00:17:88:01:06:54:c5:93:1:0x0006",
"device_ieee": "00:17:88:01:06:54:c5:93",
"endpoint_id": 1,
"cluster_id": 6,
"command": "on",
"args": []
},
"origin": "LOCAL",
"time_fired": "2019-12-16T04:01:11.519363+00:00",
"context": {
"id": "1f75e8c14a4343b9995f09e1cacdc931",
"parent_id": null,
"user_id": null
}
}
Event 0 fired 9:00 PM:
{
"event_type": "zha_event",
"data": {
"unique_id": "00:17:88:01:06:54:c5:93:1:0x0006",
"device_ieee": "00:17:88:01:06:54:c5:93",
"endpoint_id": 1,
"cluster_id": 6,
"command": "off_with_effect",
"args": [
0,
0
]
},
"origin": "LOCAL",
"time_fired": "2019-12-16T04:00:54.202654+00:00",
"context": {
"id": "209bdc8687134f78903d5895904ece64",
"parent_id": null,
"user_id": null
}
}
So listening to events like this is new to me. How do I put this into a trigger on yaml?
trigger:
platform: event
event_type: zha_event
event_data: ????
This is where i get lost… Do I need ALL the data? id, device, endpoint_id etc?
As far as I can see the device_ieee is a unique identifier for this remote. Try something like this:
trigger:
platform: event
event_type: zha_event
event_data:
device_ieee: "00:17:88:01:06:54:c5:93"
command: "on"
What button did you press to get Event 2 and Event 3
So when I held the button down, it fired the “step” events (2, 3, & 4) and then releasing fired the “stop” event (5)
When linked with the hue bridge and the regular hue app, the long press dims the light/room until you release the button
So you can use the command: “on”, command: “step” and command: “off_with_effect” to catch the button presses “click”, “hold” and “release”. Is there also an event for a double press? How did you fire the event 0?
Just for your information, it will probably hard/impossible to have the same smooth dimming experience as with Hue. With Deconz this is possible as it has an own service to send dimming service calls.
Event zero was the first press of the button after adding it to zha. Not sure how that works exactly but I didn’t have a ton of time to experiment with it last night. I also didn’t really know what I was looking at. Haha.
After work today I’ll experiment a bit more with that and the double presses and report back.
I would think a double press would fire an event because when linked with the hue bridge, when you press the button multiple times quickly, it cycles through scenes… That logic could just be in the hub itself though.
This is probably in the Hub, the Hue Dimmer Switches have the same behaviour in the Hue app but no event is fired when a button is pressed multiple times in a row.
Gotcha… Well for $20 this is a really nice little button and should be pretty easy to get it to toggle and dim a light with these events.
I’ll experiment with it a bit more and let you guys know.
I prefer the Hue Dimmer Switch due to being cheaper and having more buttons to assign actions to.
No double press event.
So the only events from what I an see are ‘On’ and ‘Off with effect’ (Single press alternating) and ‘Step’ (press and hold) and ‘Stop’ (release)
Thanks for your help @Burningstone
Hi,
I am new to home assistant, and pretty confused. I bought a conbee II and philips hue smart button. I Installed home assistant on my raspberry pi, installed the deconz addon.
I can open the gui of deconz connect to my conbee II and if I push buttons on the smart button, a new device appears in the which is running on battery, so I guess this is my philips smart button.
I can’t pair the button in the phoscon webinterface because its not showing up in the switches section under philips, and with “others” it does not work as well.
Can someone help me in what I am missing?
I already managed to configure the script which should be triggered when the button is pushed (opening a doorbird door), and can use it under the developer tools -> services.
Thanks
I use zha so I’m not sure how the deconz world works exactly but we are using the event listener rather than the switches section.
Developer tools > events
On that page look for something to do with deconz or phoscon or something. Using zha it’s called zha_event.
At the very bottom type in your event name (zha_event or whatever) into the event listener and then press tl your button a few times to see the different events that show up. Then use the Event Trigger using the info that was learned from the listener.
Hope this helps.
Thanks, for deconz it is deconz_event.
No problem. Sounds like you got it working.
Any update on this? The Smart Buttons seem to be supported now, but I can only see the battery levels and nothing else.
@dentist me too