Skip to content
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

Conbee II + ZHA, IKEA bulbs reported as on despite being off when using ZHA groups #120

Open
comatose-tortoise opened this issue Jul 5, 2020 · 10 comments

Comments

@comatose-tortoise
Copy link

System is:
Intel-NUC / Home Assistant OS / HassOS 4.10 / Home Assistant (0.112.2)
Conbee II firmware: deCONZ_ConBeeII_0x26580700.bin.GCF (but this problem was present also with deCONZ_ConBeeII_0x264a0700.bin.GCF)
Extension USB cable to the Conbee II
Conbee II operating on a channel far from nearby WiFi networks
Zigbee devices are a number of different IKEA Tradfri lights and IKEA Tradfri power plugs

Problem:
The IKEA bulbs (of several different types, GU10, E27, E14, etc) get the wrong status indication in the HA GUI. If I turn the bulbs off using ZHA groups, a number of them will become reported as on in the GUI, despite being off.

If I look in the GUI to see the history of the individual lights, it looks as if they were never turned off, but instead they turn off (status-wise, in the GUI) after some time, probably when their status is checked by HA.

In the logfile attached, all lights were turned off at 10:57:36, and did indeed turn off at this timepoint. Their status didn't turn off at this time though, looking in the GUI. Focusing on one room for simplicity, I can see that "light.hornlampa_2_vardagsrum" reported as off 11:04:48, "light.hornlampa_1_vardagsrum" 11:07:48, "ight.sideboardlampa_vardagsrum" 11:10:40, "light.hornlampa_3_vardagsrum" 11:17:41. This goes on for all the Tradfri lights. Sometimes it takes a really long time until they all turn off, like hours.

This causes problems with automations, among other things.

I'm speculating if this could be related to using zha_groups for the lights. I just turned off two rooms of Tradfri lights using the "group switch button" in the GUI (i.e., turning them all off without the use of a zha_group). And all these lights reported as off immediately.

Logfile: https://pastebin.com/vcReQHS5

@comatose-tortoise comatose-tortoise changed the title Conbee II + ZHA, IKEA bulbs reported as off despite being on when using ZHA groups Conbee II + ZHA, IKEA bulbs reported as on despite being off when using ZHA groups Jul 5, 2020
@dmulcahey
Copy link
Contributor

This is because groups rely on attribute reports (state changes in HA) to update the state of the group. These bulbs don't report state per the spec. We need to solution this on the HA side (at least that's where I think it needs to be done).

@Adminiuga
Copy link
Collaborator

Should we debounce group entity service requests (turn off, turn on) and then schedule update of all member entities ?

@dmulcahey
Copy link
Contributor

Not sure there is a need to debounce but the schedule idea is a good one. I still only want to do this based on a whitelist though. So that we aren’t doing it for devices that accurately report.

@Adminiuga
Copy link
Collaborator

And it's strange it takes to update as long as an hour. Attribute reporting on on change is supposed to be happening on 15 min interval. So even if there was no attr report on group command, I still expecting to see an attr report in 15 min window time.

@Adminiuga
Copy link
Collaborator

Debounce scheduling of the update based on group entry service calls, so we don't schedule too many updates if user flicks the group on)off in rapid succession in short period of time

@Adminiuga
Copy link
Collaborator

E.g turned group on and then turned group off after one second, should schedule only one round of member entity status updates

@comatose-tortoise
Copy link
Author

This problem appears to be solved (I'm currently using 114.4)!

@willtho89
Copy link

problem still active for me. According to basnijholt/adaptive-lighting#10 the issue seems to be ongoing for several users.

Just for reference, some related issues i found:
home-assistant/core#39236
#140

I guess my issue is the same as #140, but i haven't had time to debug this. I can however reproduce the behavior in HA GUI.

@willtho89
Copy link

I did some more testing with just individual lights and HA groups (instead of ZHA groups).

The devices themselves turn on/off reliably most of the time. In a few cases, some devices don't report their state directly after a state change. Unfortunately this makes automations quite cumbersome :-(

Is this a problem with conbee II or rather a bug in zigpy itself?

@ivanfrolovmd
Copy link

I have different lights (Schneider Electric Switches) and RaspBee II as coordinator and I have the same problem - some lights randomly stay on or off in HA after issuing the toggle command for the group (although the whole group toggles successfully).

I've tried the same setup with zzh as coordinator and zigpy-znp module and I didn't have this problem. Statuses are reflected almost immediately and consistently on group toggles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants