Koenkk / zigbee2mqtt

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

livolo 2 gang switch turn off issue #9239

Closed matrosovas closed 2 years ago

matrosovas commented 2 years ago

Bug report

What happened

livolo switch with 2 gangs only turns off one gang when Homebridge Zigbee2MQTT sends "{"state_right":"OFF","state_left":"OFF"}"

What did you expect to happen

both gangs turn off

How to reproduce it (minimal and precise)

turning both gangs on and in home app hitting lighst off sends above payload

Debug info

Zigbee2MQTT version: 1.21.2 Adapter hardware: CC2652RB Adapter firmware version: not sure, flashed with https://slae.sh/projects/cc2652/

github-actions[bot] commented 2 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

matrosovas commented 2 years ago

Commenting to get some attention 🙂

itavero commented 2 years ago

Just wondering, does a similar problem occur when changing the state to On?

And, just to confirm, you are talking about the Livolo TI0001-switch-2gang?

I had a quick look at the zigbee-herdsman-converters repository and noticed that this particular device uses custom converters.

I have a dual gang dimmer from Lonsoho with which I've never experienced this behavior. But that uses a "standard" converter.

My best bet is that the way the converter is setup the request for one gang is overwriting the one for the other. But, to be honest, I'm not that familiar with that part of the code base.

Perhaps someone that worked on #5516 or Koenkk/zigbee-herdsman-converters#2191 can help you resolve this issue. Maybe @Piscator74 or @whitepail?

matrosovas commented 2 years ago

@itavero Thanks for your input! it's actually this switch 2gang and same happens for On as well. hopefully one of those guys can help out :)

onixx commented 2 years ago

The same issue occurs with the GE plug in smart dimmer model 45852GE. Brightness and State on is published together and in this case only brightness is taken by device. State is ignored which results in the device not turning on. Republishing state on manually does turn on the device

Piscator74 commented 2 years ago

I just checked it with MQTT Explorer (to avoid potential problems caused by Homebridge or other domotics system). And indeed I can confirm that when turning both state_left and state_right to ON or OFF at the same time, you see this behavior. I never set both channels at exactly the same time, so I never had this issue.

I think there can be 2 possible causes. You have to debug livolo_socket_switch_on_off in toZigbee.js

  1. The current implementation just sends the first command and ignores the second/subsequent command(s) in the same request.
  2. The vendor implementation ignores the 2nd command when multiple commands are sent too quickly in succession.

It is open source, so feel free to give it a shot :-)

github-actions[bot] commented 2 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

sanychonline commented 6 months ago

I do observe the same issue. I assume the switch itself can't perform parallel toggle actions. May we have a parameter to have delay 1 sec for a second gang before toggle?

Piscator74 commented 5 months ago

That is sort of hard to implement / make a workaround for. Basically, you would need to cache requests and send them later again. And the actual problem is the bad implementation on the device (that is closed source). I think you would even need to have a delay for 2 seconds.