Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
12.17k stars 1.68k forks source link

Lidl FB20-002 the "on" button is only evaluated once #6509

Closed makoONE closed 4 months ago

makoONE commented 3 years ago

What happened

The status of the "on" button is only evaluated for a single actuation. Pressing the "on" button again will be ignored. The other buttons ("off", "brightness up", "brightness down)" generate an event each time they are pressed, as expected.

What did you expect to happen

I will get an event every time i press the button again.

How to reproduce it (minimal and precise)

Pressing the "on"-button several times and watch the mqtt messages for expected actions or by debugging in a simple Node-RED flow.

Debug info

Zigbee2MQTT version: 1.17.1 Adapter hardware: CC2531 Adapter firmware version: 20190608 (coordinator)

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

OMotornyi commented 3 years ago

Hello. Were you able to figure this one out?

SnakeZi commented 2 years ago

My observations actually explain why it is happening: https://github.com/Koenkk/zigbee2mqtt/issues/12772#issuecomment-1229219610

Remote has on-board memory of last button state. It sends payload 'on' only if previously was pressed button OFF. When you press ON more than once, it tries to cycle through 4 hardcoded scenes instead. Unfortunately, in such cases it sends raw data that isn't supported by Z2M yet.

OMotornyi commented 2 years ago

yeah... It's a shame though really, basically renders this remote less useful as we can't bind a completely independent actions on every button

chris400 commented 1 year ago

I'm so glad that I found that issue. I was starting to question myself bc I thought I made a mistake in my Home Assistant configuration.

So here is my though on this: The first "on" command looks like this Debug 2023-10-08 22:10:54Received Zigbee message from 'ZigBee Remote 003', type 'commandOn', cluster 'genOnOff', data '{}' from endpoint 1 with groupID 0 the next 4 times it looks like this Debug 2023-10-08 22:11:01Received Zigbee message from 'ZigBee Remote 003', type 'raw', cluster 'genOnOff', data '{"data":[1,79,253,0],"type":"Buffer"}' from endpoint 1 with groupID null Debug 2023-10-08 22:11:02Received Zigbee message from 'ZigBee Remote 003', type 'raw', cluster 'genOnOff', data '{"data":[1,79,253,0],"type":"Buffer"}' from endpoint 1 with groupID null Debug 2023-10-08 22:11:02Received Zigbee message from 'ZigBee Remote 003', type 'raw', cluster 'genOnOff', data '{"data":[1,79,253,0],"type":"Buffer"}' from endpoint 1 with groupID null Debug 2023-10-08 22:11:03Received Zigbee message from 'ZigBee Remote 003', type 'raw', cluster 'genOnOff', data '{"data":[1,79,253,0],"type":"Buffer"}' from endpoint 1 with groupID null Debug 2023-10-08 22:11:04Received Zigbee message from 'ZigBee Remote 003', type 'raw', cluster 'genOnOff', data '{"data":[1,79,253,0],"type":"Buffer"}' from endpoint 1 with groupID null Debug 2023-10-08 22:11:13Received Zigbee message from 'ZigBee Remote 003', type 'raw', cluster 'genOnOff', data '{"data":[1,80,253,1],"type":"Buffer"}' from endpoint 1 with groupID null Debug 2023-10-08 22:11:13Received Zigbee message from 'ZigBee Remote 003', type 'raw', cluster 'genOnOff', data '{"data":[1,80,253,1],"type":"Buffer"}' from endpoint 1 with groupID null Debug 2023-10-08 22:11:14Received Zigbee message from 'ZigBee Remote 003', type 'raw', cluster 'genOnOff', data '{"data":[1,80,253,1],"type":"Buffer"}' from endpoint 1 with groupID null Debug 2023-10-08 22:11:15Received Zigbee message from 'ZigBee Remote 003', type 'raw', cluster 'genOnOff', data '{"data":[1,80,253,1],"type":"Buffer"}' from endpoint 1 with groupID null Debug 2023-10-08 22:11:15Received Zigbee message from 'ZigBee Remote 003', type 'raw', cluster 'genOnOff', data '{"data":[1,80,253,1],"type":"Buffer"}' from endpoint 1 with groupID null Debug 2023-10-08 22:11:27Received Zigbee message from 'ZigBee Remote 003', type 'raw', cluster 'genOnOff', data '{"data":[1,81,253,2],"type":"Buffer"}' from endpoint 1 with groupID null Debug 2023-10-08 22:11:28Received Zigbee message from 'ZigBee Remote 003', type 'raw', cluster 'genOnOff', data '{"data":[1,81,253,2],"type":"Buffer"}' from endpoint 1 with groupID null Debug 2023-10-08 22:11:29Received Zigbee message from 'ZigBee Remote 003', type 'raw', cluster 'genOnOff', data '{"data":[1,81,253,2],"type":"Buffer"}' from endpoint 1 with groupID null Debug 2023-10-08 22:11:30Received Zigbee message from 'ZigBee Remote 003', type 'raw', cluster 'genOnOff', data '{"data":[1,81,253,2],"type":"Buffer"}' from endpoint 1 with groupID null Debug 2023-10-08 22:11:30Received Zigbee message from 'ZigBee Remote 003', type 'raw', cluster 'genOnOff', data '{"data":[1,81,253,2],"type":"Buffer"}' from endpoint 1 with groupID null Debug 2023-10-08 22:11:41Received Zigbee message from 'ZigBee Remote 003', type 'raw', cluster 'genOnOff', data '{"data":[1,82,253,3],"type":"Buffer"}' from endpoint 1 with groupID null Debug 2023-10-08 22:11:41Received Zigbee message from 'ZigBee Remote 003', type 'raw', cluster 'genOnOff', data '{"data":[1,82,253,3],"type":"Buffer"}' from endpoint 1 with groupID null Debug 2023-10-08 22:11:42Received Zigbee message from 'ZigBee Remote 003', type 'raw', cluster 'genOnOff', data '{"data":[1,82,253,3],"type":"Buffer"}' from endpoint 1 with groupID null Debug 2023-10-08 22:11:43Received Zigbee message from 'ZigBee Remote 003', type 'raw', cluster 'genOnOff', data '{"data":[1,82,253,3],"type":"Buffer"}' from endpoint 1 with groupID null Debug 2023-10-08 22:11:44Received Zigbee message from 'ZigBee Remote 003', type 'raw', cluster 'genOnOff', data '{"data":[1,82,253,3],"type":"Buffer"}' from endpoint 1 with groupID null

I would like to request, that zigbee2mqtt interprets these commands as "On" as well.

Kaskadeur111 commented 1 year ago

same here, find it less usefull, if that ON Button only works once

chris400 commented 11 months ago

@makoONE I just came back here. Would you mind re-opening this issue and removing stale label?

Bastelritius commented 10 months ago

Would be nice when this can be solved and the RC sending always the on command when pushing the on button

jnswb commented 9 months ago

I second this proposal.

chris400 commented 9 months ago

Bc @makoONE is not responding, would you @Koenkk mind re-opening this issue?

Virusmater commented 5 months ago

Same issue there, but I don't even see any RAW commands in logs. Is it because my remote was never connected to Tuya?

chris400 commented 5 months ago

Same issue there, but I don't even see any RAW commands in logs. Is it because my remote was never connected to Tuya?

I don't think so. I have never used anything else than Zigbee2MQTT with my device and I did see these commands. Did you set the right log level?

Virusmater commented 5 months ago

I don't think so, logs are on the debug level and I can see codes of other button presses in logs. Also my remote looks slightly different from the one on the z2m page: image

akula3 commented 4 months ago

Is here a solution or workaround?

Koenkk commented 4 months ago

Could you check if the issue is fixed with the following external converter:

Virusmater commented 4 months ago

Hello @Koenkk , it worked after the small change: type: 'raw' to type: 'commandTuyaAction' Full gist: https://gist.github.com/Virusmater/13a39d8d2fed6d2b110d1cf8968decb1

Logs before:

[2024-07-06 15:35:50] debug:    z2m: Received Zigbee message from 'Guest Blinds Remote', type 'commandTuyaAction', cluster 'genOnOff', data '{"data":{"data":[],"type":"Buffer"},"value":2}' from endpoint 1 with groupID 0
[2024-07-06 15:35:50] debug:    z2m: No converter available for 'FB20-002' with cluster 'genOnOff' and type 'commandTuyaAction' and data '{"data":{"data":[],"type":"Buffer"},"value":2}'
[2024-07-06 15:35:50] debug:    zh:zstack:unpi:parser: <-- [254,1,100,1,0,100]
[2024-07-06 15:35:50] debug:    zh:zstack:unpi:parser: --- parseNext [254,1,100,1,0,100]
[2024-07-06 15:35:50] debug:    zh:zstack:unpi:parser: --> parsed 1 - 3 - 4 - 1 - [0] - 100
[2024-07-06 15:35:50] debug:    zh:zstack:znp: SRSP: <-- AF - dataRequest - {"status":0}
[2024-07-06 15:35:50] debug:    zh:zstack:unpi:parser: --- parseNext []
[2024-07-06 15:35:50] debug:    zh:zstack:unpi:parser: <-- [254,3,68,128,0,1,33,231]
[2024-07-06 15:35:50] debug:    zh:zstack:unpi:parser: --- parseNext [254,3,68,128,0,1,33,231]
[2024-07-06 15:35:50] debug:    zh:zstack:unpi:parser: --> parsed 3 - 2 - 4 - 128 - [0,1,33] - 231
[2024-07-06 15:35:50] debug:    zh:zstack:znp: AREQ: <-- AF - dataConfirm - {"status":0,"endpoint":1,"transid":33}
[2024-07-06 15:35:50] debug:    zh:zstack:unpi:parser: --- parseNext []

Logs now:

[2024-07-06 15:44:17] debug:    z2m: Received Zigbee message from 'Guest Blinds Remote', type 'commandTuyaAction', cluster 'genOnOff', data '{"data":{"data":[],"type":"Buffer"},"value":0}' from endpoint 1 with groupID 0
[2024-07-06 15:44:17] info:     z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Guest Blinds Remote', payload '{"action":"on","linkquality":84}'
[2024-07-06 15:44:17] info:     z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Guest Blinds Remote', payload '{"action":"","linkquality":84}'
[2024-07-06 15:44:17] info:     z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Guest Blinds Remote/action', payload 'on'
[2024-07-06 15:44:17] debug:    zh:zstack:unpi:parser: <-- [254,1,100,1,0,100]
[2024-07-06 15:44:17] debug:    zh:zstack:unpi:parser: --- parseNext [254,1,100,1,0,100]
[2024-07-06 15:44:17] debug:    zh:zstack:unpi:parser: --> parsed 1 - 3 - 4 - 1 - [0] - 100
[2024-07-06 15:44:17] debug:    zh:zstack:znp: SRSP: <-- AF - dataRequest - {"status":0}
[2024-07-06 15:44:17] debug:    zh:zstack:unpi:parser: --- parseNext []
[2024-07-06 15:44:17] debug:    zh:zstack:unpi:parser: <-- [254,3,68,128,0,1,22,208]
[2024-07-06 15:44:17] debug:    zh:zstack:unpi:parser: --- parseNext [254,3,68,128,0,1,22,208]
[2024-07-06 15:44:17] debug:    zh:zstack:unpi:parser: --> parsed 3 - 2 - 4 - 128 - [0,1,22] - 208
[2024-07-06 15:44:17] debug:    zh:zstack:znp: AREQ: <-- AF - dataConfirm - {"status":0,"endpoint":1,"transid":22}
[2024-07-06 15:44:17] debug:    zh:zstack:unpi:parser: --- parseNext []

Thank you!

akula3 commented 4 months ago

Hi @Koenkk , the proposal from @Virusmater works!

Koenkk commented 4 months ago

Great, integrated the fix. You can remove the ext converter after updating to the next release.

Changes will be available in the dev branch in a few hours from now.

stefan131 commented 4 months ago

I was about to jump into this issue, all of my ceiling lights came with this remote and they were useless before Thanks for the great work! Looking forward to the next release :)

stefan131 commented 3 months ago

After some testing I found out the first 'on' button press is not registered anymore after this update. @Koenkk could the issue be opened again?

Virusmater commented 3 months ago

Do you have the steps to reproduce? I have some issues when the first button press doesn't get registered, but I think it is not related to the update, I had it before. The remote drops out from the Zigbee network and on the first step, it just reconnects to it.

Cannot debug it, because it happens only after I haven't used the remote for a week

stefan131 commented 3 months ago

Do you have the steps to reproduce? I have some issues when the first button press doesn't get registered, but I think it is not related to the update, I had it before. The remote drops out from the Zigbee network and on the first step, it just reconnects to it.

Cannot debug it, because it happens only after I haven't used the remote for a week

My experience is that Zigbee remotes start blinking when they are reconnecting. For me it just shows the normal green light, and the second press immediately works. I'll try to debug it some more when I get home.

Reproducing is easy: don't touch your remote for about 30 minutes and push the on button. I'll do some more testing tonight, for example if pressing off and then on gives the same result. I vaguely remember that it did