Koenkk / zigbee2mqtt

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

Reported state light after adjusting brightness doesn't match the real state. #19386

Closed schwalbe13 closed 2 months ago

schwalbe13 commented 11 months ago

What happened?

  1. I turned off Ikea light (friendly name "HF0L3") model LED2003G10 which is a member of the group called "house_F0_lights_dynamic".
debug 2023-10-22 22:44:23Received Zigbee message from 'HF0R1', type 'commandOff', cluster 'genOnOff', data '{}' from endpoint 1 with groupID 0
info 2023-10-22 22:44:23MQTT publish: topic 'zigbee2mqtt/HF0R1', payload '{"action":"off","battery":80,"linkquality":93,"update":{"installed_version":65572,"latest_version":581,"state":"idle"}}'
debug 2023-10-22 22:44:23Received MQTT message on 'zigbee2mqtt/HF0L3/set' with data '{"brightness":76,"transition":1}'
debug 2023-10-22 22:44:23Publishing 'set' 'brightness' to 'HF0L3'
debug 2023-10-22 22:44:23Publishing 'set' 'transition' to 'HF0L3'
info 2023-10-22 22:44:23MQTT publish: topic 'zigbee2mqtt/house_F0_lights', payload '{"brightness":76,"color":{"hue":30,"saturation":87,"x":0.4788,"y":0.4139},"color_mode":"color_temp","color_temp":420,"color_temp_startup":403,"power_on_behavior":"toggle","state":"ON"}'
info 2023-10-22 22:44:23MQTT publish: topic 'zigbee2mqtt/HF0L3', payload '{"brightness":76,"color_mode":"color_temp","color_temp":420,"color_temp_startup":420,"level_config":{"on_level":"previous"},"linkquality":54,"power_on_behavior":"toggle","state":"ON","update":{"installed_version":65554,"latest_version":65554,"state":"idle"}}'
info 2023-10-22 22:44:23MQTT publish: topic 'zigbee2mqtt/house_F0_lights_dynamic', payload '{"brightness":76,"color":{"hue":30,"saturation":87,"x":0.4788,"y":0.4139},"color_mode":"color_temp","color_temp":420,"state":"ON"}'
debug 2023-10-22 22:44:23Received MQTT message on 'zigbee2mqtt/HF0L3/set' with data '{"state":"OFF","transition":0}'
debug 2023-10-22 22:44:23Publishing 'set' 'transition' to 'HF0L3'
debug 2023-10-22 22:44:23Publishing 'set' 'state' to 'HF0L3'
info 2023-10-22 22:44:23MQTT publish: topic 'zigbee2mqtt/HF0L3', payload '{"brightness":76,"color_mode":"color_temp","color_temp":420,"color_temp_startup":420,"level_config":{"on_level":"previous"},"linkquality":54,"power_on_behavior":"toggle","state":"OFF","update":{"installed_version":65554,"latest_version":65554,"state":"idle"}}'
  1. Then I turned the brightness a little bit down of that group. Light HF0L3 reported state: ON, but the light actually is OFF. The reported ON state is something I didn't expect.
    debug 2023-10-22 22:45:32Received Zigbee message from 'HF0R1', type 'commandMove', cluster 'genLevelCtrl', data '{"movemode":1,"rate":83}' from endpoint 1 with groupID 0
    info 2023-10-22 22:45:32MQTT publish: topic 'zigbee2mqtt/HF0R1', payload '{"action":"brightness_move_down","action_rate":83,"battery":80,"linkquality":90,"update":{"installed_version":65572,"latest_version":581,"state":"idle"}}'
    debug 2023-10-22 22:45:32Received MQTT message on 'zigbee2mqtt/house_F0_lights_dynamic/set' with data '{"brightness_move":-75}'
    debug 2023-10-22 22:45:32Publishing 'set' 'brightness_move' to 'house_F0_lights_dynamic'
    debug 2023-10-22 22:45:32Received Zigbee message from 'HF0R1', type 'commandStopWithOnOff', cluster 'genLevelCtrl', data '{}' from endpoint 1 with groupID 0
    info 2023-10-22 22:45:32MQTT publish: topic 'zigbee2mqtt/HF0R1', payload '{"action":"brightness_stop","battery":80,"linkquality":90,"update":{"installed_version":65572,"latest_version":581,"state":"idle"}}'
    debug 2023-10-22 22:45:32Received MQTT message on 'zigbee2mqtt/house_F0_lights_dynamic/set' with data '{"brightness_move":0}'
    debug 2023-10-22 22:45:32Publishing 'set' 'brightness_move' to 'house_F0_lights_dynamic'
    debug 2023-10-22 22:45:33Received Zigbee message from 'HF0L1_2', type 'readResponse', cluster 'genOnOff', data '{"onOff":1}' from endpoint 1 with groupID 0
    info 2023-10-22 22:45:33MQTT publish: topic 'zigbee2mqtt/HF0L1_2', payload '{"brightness":254,"color":{"hue":29,"saturation":89,"x":0.488,"y":0.4148},"color_mode":"color_temp","color_temp":403,"color_temp_startup":420,"linkquality":93,"power_on_behavior":"on","state":"ON"}'
    debug 2023-10-22 22:45:33Received Zigbee message from 'HF0L1_2', type 'readResponse', cluster 'genLevelCtrl', data '{"currentLevel":195}' from endpoint 1 with groupID 0
    debug 2023-10-22 22:45:33No converter available for 'LED2106R3' with cluster 'genLevelCtrl' and type 'readResponse' and data '{"currentLevel":195}'
    info 2023-10-22 22:45:33MQTT publish: topic 'zigbee2mqtt/HF0L1_2', payload '{"brightness":195,"color":{"hue":29,"saturation":89,"x":0.488,"y":0.4148},"color_mode":"color_temp","color_temp":403,"color_temp_startup":420,"linkquality":93,"power_on_behavior":"on","state":"ON"}'
    info 2023-10-22 22:45:33MQTT publish: topic 'zigbee2mqtt/house_F0_lights_dynamic', payload '{"brightness":195,"color":{"hue":30,"saturation":87,"x":0.4788,"y":0.4139},"color_mode":"color_temp","color_temp":420,"state":"ON"}'
    info 2023-10-22 22:45:33MQTT publish: topic 'zigbee2mqtt/HF0L1_1', payload '{"brightness":195,"color":{"hue":29,"saturation":89,"x":0.488,"y":0.4148},"color_mode":"color_temp","color_temp":403,"color_temp_startup":420,"linkquality":51,"power_on_behavior":"on","state":"ON"}'
    info 2023-10-22 22:45:33MQTT publish: topic 'zigbee2mqtt/HF0L1_3', payload '{"brightness":195,"color":{"hue":29,"saturation":89,"x":0.488,"y":0.4148},"color_mode":"color_temp","color_temp":403,"color_temp_startup":420,"linkquality":96,"state":"ON"}'
    info 2023-10-22 22:45:33MQTT publish: topic 'zigbee2mqtt/HF0L1_4', payload '{"brightness":195,"color":{"hue":29,"saturation":89,"x":0.488,"y":0.4148},"color_mode":"color_temp","color_temp":403,"color_temp_startup":420,"linkquality":54,"power_on_behavior":"off","state":"ON"}'
    info 2023-10-22 22:45:33MQTT publish: topic 'zigbee2mqtt/HF0L1_5', payload '{"brightness":195,"color":{"hue":29,"saturation":89,"x":0.488,"y":0.4148},"color_mode":"color_temp","color_temp":403,"color_temp_startup":420,"linkquality":54,"state":"ON"}'
    info 2023-10-22 22:45:33MQTT publish: topic 'zigbee2mqtt/HF0L2_1', payload '{"brightness":195,"color":{"hue":29,"saturation":89,"x":0.488,"y":0.4148},"color_mode":"color_temp","color_temp":403,"color_temp_startup":420,"linkquality":96,"power_on_behavior":"off","state":"ON"}'
    info 2023-10-22 22:45:33MQTT publish: topic 'zigbee2mqtt/HF0L2_2', payload '{"brightness":195,"color":{"hue":29,"saturation":89,"x":0.488,"y":0.4148},"color_mode":"color_temp","color_temp":403,"color_temp_startup":420,"linkquality":48,"state":"ON"}'
    info 2023-10-22 22:45:33MQTT publish: topic 'zigbee2mqtt/HF0L2_5', payload '{"brightness":195,"color":{"hue":29,"saturation":89,"x":0.488,"y":0.4148},"color_mode":"color_temp","color_temp":403,"color_temp_startup":420,"linkquality":51,"state":"ON"}'
    info 2023-10-22 22:45:33MQTT publish: topic 'zigbee2mqtt/HF0L2_3', payload '{"brightness":195,"color":{"hue":29,"saturation":89,"x":0.488,"y":0.4148},"color_mode":"color_temp","color_temp":403,"color_temp_startup":420,"linkquality":42,"state":"ON"}'
    info 2023-10-22 22:45:33MQTT publish: topic 'zigbee2mqtt/HF0L2_4', payload '{"brightness":195,"color":{"hue":29,"saturation":89,"x":0.488,"y":0.4148},"color_mode":"color_temp","color_temp":403,"color_temp_startup":420,"linkquality":54,"state":"ON"}'
    info 2023-10-22 22:45:33MQTT publish: topic 'zigbee2mqtt/HF0L4', payload '{"brightness":195,"color_mode":"color_temp","color_temp":420,"color_temp_startup":420,"level_config":{"on_level":"previous"},"linkquality":48,"power_on_behavior":"toggle","state":"ON","update":{"installed_version":65554,"latest_version":65554,"state":"idle"}}'
    info 2023-10-22 22:45:33MQTT publish: topic 'zigbee2mqtt/HF0L5', payload '{"brightness":195,"color_mode":"color_temp","color_temp":420,"color_temp_startup":420,"level_config":{"on_level":"previous"},"linkquality":96,"power_on_behavior":"toggle","state":"ON","update":{"installed_version":65554,"latest_version":65554,"state":"idle"}}'
    info 2023-10-22 22:45:33MQTT publish: topic 'zigbee2mqtt/HF0L3', payload '{"brightness":195,"color_mode":"color_temp","color_temp":420,"color_temp_startup":420,"level_config":{"on_level":"previous"},"linkquality":54,"power_on_behavior":"toggle","state":"ON","update":{"installed_version":65554,"latest_version":65554,"state":"idle"}}'
    info 2023-10-22 22:45:33MQTT publish: topic 'zigbee2mqtt/house_F0_lights', payload '{"brightness":195,"color":{"hue":30,"saturation":87,"x":0.4788,"y":0.4139},"color_mode":"color_temp","color_temp":420,"color_temp_startup":403,"power_on_behavior":"toggle","state":"ON"}'
    info 2023-10-22 22:45:33MQTT publish: topic 'zigbee2mqtt/house_F0_lights_kitchen', payload '{"brightness":195,"color":{"hue":30,"saturation":87,"x":0.4788,"y":0.4139},"color_mode":"color_temp","color_temp":403,"color_temp_startup":352,"power_on_behavior":"toggle","state":"ON"}'
    info 2023-10-22 22:45:33MQTT publish: topic 'zigbee2mqtt/HF0L1', payload '{"brightness":195,"color":{"hue":30,"saturation":87,"x":0.4788,"y":0.4139},"color_mode":"color_temp","color_temp":403,"state":"ON"}'
    info 2023-10-22 22:45:33MQTT publish: topic 'zigbee2mqtt/HF0L2', payload '{"brightness":195,"color":{"hue":30,"saturation":87,"x":0.4788,"y":0.4139},"color_mode":"color_temp","color_temp":403,"state":"ON"}'

What did you expect to happen?

That the light reported "state":"OFF" after I turned the brightness down of its parent group and not ON as seen in the log dump.

How to reproduce it (minimal and precise)

See section What happened.

Zigbee2MQTT version

1.29.2

Adapter firmware version

20210708

Adapter

Sonoff Zigbee 3.0 USB Dongle Plus

Debug log

No response

LukeDefeo commented 9 months ago

+1 to this just came across this very unfortunate bug.

It looks like when you apply the brightness move commands to groups it assumes that all members of the group have that state and updates everything, even though these commands actually have no effect on the devices that are off (which is the idea so your dimmer doesn't turn on things that shouldn't be)

github-actions[bot] commented 3 months ago

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