Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge πŸŒ‰, get rid of your proprietary Zigbee bridges πŸ”¨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
11.78k stars 1.64k forks source link

IKEA TRADFRI lights turning on when sending `{"state": "OFF"}` #19797

Open pbek opened 10 months ago

pbek commented 10 months ago

What happened?

Thanks a lot for this wonderful bridge!

I just found out that my IKEA TRADFRI lights are turning on when I send a {"state": "OFF"}. And they're still sending a state OFF when I do so.

I tried these two:

What did you expect to happen?

I expect that the lights stay off when I send {"state": "OFF"}.

How to reproduce it (minimal and precise)

Zigbee2MQTT version

1.33.2 commit: 9996c93 (docker)

Adapter firmware version

20221226

Adapter

SONOFF Zigbee 3.0 USB Dongle

Debug log

info 2023-11-21 08:49:13MQTT publish: topic 'zigbee2mqtt/ikea-tradfri-light/05/dressing-room', payload '{"brightness":55,"color_mode":"color_temp","color_options":{"execute_if_off":false},"color_temp":403,"level_config":{"on_level":"previous"},"linkquality":72,"power_on_behavior":"off","state":"OFF","update":{"installed_version":50331664,"latest_version":50331664,"state":"idle"}}'
info 2023-11-21 08:49:14MQTT publish: topic 'zigbee2mqtt/ikea-tradfri-light/05/dressing-room', payload '{"brightness":55,"color_mode":"color_temp","color_options":{"execute_if_off":false},"color_temp":403,"level_config":{"on_level":"previous"},"linkquality":72,"power_on_behavior":"off","state":"OFF","update":{"installed_version":50331664,"latest_version":50331664,"state":"idle"}}'
info 2023-11-21 08:49:16MQTT publish: topic 'zigbee2mqtt/ikea-tradfri-light/05/dressing-room', payload '{"brightness":55,"color_mode":"color_temp","color_options":{"execute_if_off":false},"color_temp":403,"level_config":{"on_level":"previous"},"linkquality":72,"power_on_behavior":"off","state":"OFF","update":{"installed_version":50331664,"latest_version":50331664,"state":"idle"}}'
pbek commented 10 months ago

After finding a bulb where I couldn't reproduce this issue, I removed the two devices where I had the issue from zigbee2mqtt and joined them again. Afterward, I didn't have the issue anymore!

Should I close this issue, or is this something that still needs to be addressed?

happosade commented 7 months ago

I'm having the same issue. I have LED2201G8 with firmware 3.0.10

I could try to get more logs if that's helpful, but if not, I'll try to remove and add bulbs again to see if that fixes the issue. I don't remember having the issue with previous firmware and I did upgrade the firmware with z2m, if that helps at all to figure out what might cause this bug.

E: I was able to find a difference with home assistant. If I just

service: light.turn_off
metadata: {}
data: {}
target:
  area_id: room

it works as expected, but having

service: light.turn_off
metadata: {}
data:
  transition: 5
target:
  area_id: room

makes the lights to be left on. Z2M still says that the bulbs are off

whcrg commented 5 months ago

I seem to have same problem with IKEA LED2201G8. Not turning fully off, transition involved. Everything updated to newest stable (home assistant, z2m) and bulbs reset and rejoined etc.

Need to try what happens without transition.

pbek commented 5 months ago

Maybe just remove the device and reconnect it, like I did.

whcrg commented 5 months ago

As clearly stated above, reset and rejoin not helping.

When transition is 2 seconds or less the bulbs seem to go off normally, with 3 seconds there is random behavior between going off or remaining on, with 4 seconds or more bulbs consistently remain on low brightness.

Exactly same behavior for both of this model bulbs I have. Firmware 3.0.10 and did same on previous out-of-the-box, whatever number it was.

Somewhere is a bug (firmware or z2m? Workaround possible if in firmware?)

pbek commented 5 months ago

As clearly stated above, reset and rejoin not helping.

Ah, sorry. I wasn't sure what you meant by "reset", because I only have a "reconfigure" button, and that didn't help. I removed the device completely and started the pairing process again by turning on/off the bulb 5 times. Furthermore, I then had to set the old name manually again too...