-
-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zigbee2mqtt lights in group turn on immediately after turning off #52301
Comments
mqtt documentation |
Hey there @emontnemery, mind taking a look at this issue as its been labeled with an integration ( |
There are two ways in which this can happen which are not bugs, but which may still be surprising:
Please give some more details on the problem, you mention that:
How did you turn the lights off, from Home Assistant or in some other way? Please also enable Home Assistant debug logging with the settings below, then share a log once the issue reproduces. Please make sure to note the exact point in time where the lights were unexpectedly turned off. Log settings: logger:
default: info
logs:
homeassistant.components.automation: debug
homeassistant.core: debug
homeassistant.components.mqtt: debug |
So for me if I change the entity name a fault would appear that the entity is not found. |
Hey @frenck, @emontnemery I have finally caught this effect once again. I had asked google home to turn off the light. I did, but then the lights have turned on immediately. Here's my log: https://pastebin.com/WMdvTx9b |
I do think it is an upstream bug. Let me try to explain. You call to turn the lights of @ Google, the assistant call comes in. Looks good: 'on': False, so lights off.
That triggers a service call in Home Assistant. service=turn_off, so far, so good.
Home Assistant sends a payload to MQTT (Z2M). The payload is
Next a message comes in from MQTT, that says:
This is confirmed by the next action HA takes, where the new light state, turns down the brightness to 0, but the light remains on (as per previous instruction received from MQTT).
So, in this case, Home Assistant definitely received an "ON" state after sending an "OFF" state request. Extra curious/weird in this case, is that the brightness in the received message did change to 0. Hold on, it becomes messier, next to all lights in the group seems to go to 0 brightness, and the state is still "ON". My guess: there is transitioning involved? Anyways, it continues: So bringing it down to just MQTT messages, cleaned up for readability:
We definitely are receiving a mixed bag of statuses on this group. The last message (almost 7 seconds after you have turned the light off), is received over MQTT, with the "ON" state, triggering Home Assistant to reflect that. Triggering a whole chain of events again to turn everything on as received in that message. Edit: Left a message upstream as well. Interesting case! |
@frenck Thanks for explaining that piece by piece to me! |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
The issue is still present. It even happened to me an hour ago. |
@emontnemery I've already made an analysis of this issue (Koenkk/zigbee2mqtt#7816 (comment)) and don't think it should be fixed from z2m. |
I’m using deconz and have same issue. when I turn off light using light.turn_off with a transition, it turns the light on again after transition period. It’s been doing that for a while now. Used to work correctly edit: I also have an automation that sets the brightness to certain value when the light is turned on. If I disable this, it the turn_off with transition works correctly again. |
The issue was resolved for me by upgrading to a better hardware. I've been using CC2531 which is no longer recommended by zigbee2mqtt developers. I migrated to SMARTLIGHT CC2652P Zigbee USB Adapter SLZB-02 and it works perfectly stable. |
The problem
I have 4 Aqara Bulbs joined in a group called
main_light
. Sometimes, when I turn off lights they turn off, but immediately turn on after.I didn't find a reliable way to reproduce this problem. It just happens from time to time, usually, after lights weren't turned on for a long time. Other bulbs that aren't joined into groups work fine.
I opened an issue in Koenkk/zigbee2mqtt#7816 repo, but the maintainer said it doesn't look like a z2m bug. Seems like HA (or MQTT integration), for some reason, turns the light group back on.
What is version of Home Assistant Core has the issue?
2021.6.6
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
MQTT
Link to integration documentation on our website
https://www.home-assistant.io/integrations/mqtt/
Example YAML snippet
Anything in the logs that might be useful for us?
Zigbee2MQTT logs reproducing this issue:
Additional information
Here is a video of how this happens: https://user-images.githubusercontent.com/3459374/122544137-2b1b8500-d035-11eb-8dbf-1a1cf9bb2c4c.MOV
My setup is described here: https://denysdovhan.com/smart-home/hardware/#zigbee-network
docker-compose is here: https://github.com/denysdovhan/smart-home/blob/master/docker-compose.yaml
The text was updated successfully, but these errors were encountered: