deconz-community / node-red-contrib-deconz

Node-Red Nodes for deCONZ connectivity.
GNU General Public License v3.0
84 stars 16 forks source link

Strange Buttonevents without switch even touched #204

Closed Alex-joomla closed 2 years ago

Alex-joomla commented 2 years ago

Current Behavior

Got the deconz-node up and running in my HASSIO / Nodered, all with the newest firmware. Got my Node configured like this to get buttonevents of it:

Bildschirmfoto 2022-03-10 um 12 56 18 Bildschirmfoto 2022-03-10 um 12 56 32

And even with the switch lies untouched on the table i get constant buttonevents and subsequently blinking lights all day:

This is the log with the Deconz node:

2022/03/10 13:21:41 DEBUG [msg] {"payload":{"buttonevent":1002,"lastupdated":"2022-03-10T12:21:41.192"},"topic":"","payload_format":"__complete__","payload_raw":{"e":"changed","id":"8","r":"sensors","state":{"buttonevent":1002,"lastupdated":"2022-03-10T12:21:41.192"},"t":"event","uniqueid":"90:fd:9f:ff:fe:de:23:78-01-1000"},"payload_type":"state","meta":{"config":{"alert":"none","battery":60,"group":"33054","on":true,"reachable":true},"ep":1,"etag":"d5acc4ef4bf86267e556f32d232fe35b","lastannounced":"2022-03-10T12:13:47Z","lastseen":"2022-03-10T12:18Z","manufacturername":"IKEA of Sweden","mode":3,"modelid":"TRADFRI remote control","name":"TRÅDFRI Fernbedienung (Bett)","state":{"buttonevent":1002,"lastupdated":"2022-03-10T12:21:41.192"},"swversion":"1.2.214","type":"ZHASwitch","uniqueid":"90:fd:9f:ff:fe:de:23:78-01-1000","device_type":"sensors","device_id":8,"device_path":"sensors/uniqueid/90:fd:9f:ff:fe:de:23:78-01-1000"},"meta_changed":["state.lastupdated"],"_msgid":"d6a112cf50082b75"} 2022/03/10 13:21:59 DEBUG [msg] {"payload":{"buttonevent":1002,"lastupdated":"2022-03-10T12:21:59.270"},"topic":"","payload_format":"__complete__","payload_raw":{"e":"changed","id":"8","r":"sensors","state":{"buttonevent":1002,"lastupdated":"2022-03-10T12:21:59.270"},"t":"event","uniqueid":"90:fd:9f:ff:fe:de:23:78-01-1000"},"payload_type":"state","meta":{"config":{"alert":"none","battery":60,"group":"33054","on":true,"reachable":true},"ep":1,"etag":"5816507e4114c3e585c83d670a46ed81","lastannounced":"2022-03-10T12:13:47Z","lastseen":"2022-03-10T12:21Z","manufacturername":"IKEA of Sweden","mode":3,"modelid":"TRADFRI remote control","name":"TRÅDFRI Fernbedienung (Bett)","state":{"buttonevent":1002,"lastupdated":"2022-03-10T12:21:59.270"},"swversion":"1.2.214","type":"ZHASwitch","uniqueid":"90:fd:9f:ff:fe:de:23:78-01-1000","device_type":"sensors","device_id":8,"device_path":"sensors/uniqueid/90:fd:9f:ff:fe:de:23:78-01-1000"},"meta_changed":["state.lastupdated"],"_msgid":"c9d10b4bc2e779ea"} 2022/03/10 13:26:04 DEBUG [msg] {"payload":{"buttonevent":1002,"lastupdated":"2022-03-10T12:21:59.270"},"topic":"","payload_format":"__complete__","payload_raw":{"config":{"alert":"none","battery":60,"group":"33054","on":true,"reachable":true},"ep":1,"etag":"593e8c5fd0b9321cac6398f15cc09e49","lastannounced":"2022-03-10T12:13:47Z","lastseen":"2022-03-10T12:21Z","manufacturername":"IKEA of Sweden","mode":3,"modelid":"TRADFRI remote control","name":"TRÅDFRI Fernbedienung (Bett)","state":{"buttonevent":1002,"lastupdated":"2022-03-10T12:21:59.270"},"swversion":"1.2.214","type":"ZHASwitch","uniqueid":"90:fd:9f:ff:fe:de:23:78-01-1000","device_type":"sensors","device_id":8,"device_path":"sensors/uniqueid/90:fd:9f:ff:fe:de:23:78-01-1000"},"payload_type":"state","meta":{"config":{"alert":"none","battery":60,"group":"33054","on":true,"reachable":true},"ep":1,"etag":"593e8c5fd0b9321cac6398f15cc09e49","lastannounced":"2022-03-10T12:13:47Z","lastseen":"2022-03-10T12:21Z","manufacturername":"IKEA of Sweden","mode":3,"modelid":"TRADFRI remote control","name":"TRÅDFRI Fernbedienung (Bett)","state":{"buttonevent":1002,"lastupdated":"2022-03-10T12:21:59.270"},"swversion":"1.2.214","type":"ZHASwitch","uniqueid":"90:fd:9f:ff:fe:de:23:78-01-1000","device_type":"sensors","device_id":8,"device_path":"sensors/uniqueid/90:fd:9f:ff:fe:de:23:78-01-1000"},"meta_changed":[],"_msgid":"693c3ba658f2422a"}

This is the same log with conventional event listener and filter (only the actual events are reported: ` 2022/03/10 13:21:59 DEBUG [msg] {"payload":{"event_type":"deconz_event","event":{"id":"tradfri_fernbedienung_bett","unique_id":"90:fd:9f:ff:fe:de:23:78","event":1002,"device_id":"881641c9a4f54b078322b6020db80454"},"origin":"LOCAL","time_fired":"2022-03-10T12:21:59.273189+00:00","context":{"id":"86fe8636e38d7051a99bb23f642d4fe9","parent_id":null,"user_id":null}},"topic":"deconz_event","_msgid":"d62ea457acc5c50c"}

`

Any hints?

Expected Behavior

No response

Steps To Reproduce

No response

Example flow

No response

Environment

Zehir commented 2 years ago

For the switchs you should uncheck the start output

Shamane2000 commented 2 years ago

I have exactly the same setting and also this behavior. (even without "start output") Is it possible, that here is some issue with the "sleep State" of the zigbee devices? Is this maybe recognized as "change" ?

Here is the "ghost Message" without trigger anything: {"config":{"alert":"none","battery":60,"group":"5","on":true,"reachable":true},"ep":1,"etag":"478e507ea37a003f321a8a6dfdb3047e","lastannounced":"2022-05-19T18:49:47Z","lastseen":"2022-06-16T06:25Z","manufacturername":"IKEA of Sweden","mode":1,"modelid":"TRADFRI SHORTCUT Button","name":"ArZi-ShortcutSchalter-Ilka","state":{"buttonevent":1002,"lastupdated":"2022-06-16T06:25:13.510"},"swversion":"2.3.015","type":"ZHASwitch","uniqueid":"84:fd:27:ff:fe:44:40:f4-01-1000","device_type":"sensors","device_id":6,"device_path":"sensors/uniqueid/84:fd:27:ff:fe:44:40:f4-01-1000"}

It seems the same as the "normal" trigger, but in "logbook" of hassio is also a difference: image

my configuration: image

Zehir commented 2 years ago

That because you set the type to attribute, it's mean that you will get a message on each change of attribute, state or config. For example if the device announce himself you will get a event. If you change the device name same. For this you need to set the Type to state and if you need to access the attributes later in the flow you need to use msg.meta value.