michielpost / Q42.HueApi

C# helper library to talk to the Philips Hue bridge
MIT License
411 stars 114 forks source link

Disconnected light info delay #228

Closed Exergist closed 3 years ago

Exergist commented 3 years ago

Hello!

I have 6 registered Hue lights. I've found that if I disconnect (unplug) one of them it takes a little bit of time before I can query the light states and discern that indeed one light is disconnected (unreachable). Until this time the light state returns as "reachable," even though physically this is not true.

I'm not sure if this is an inherent limitation of the Bridge processing or if there is a way to force the Bridge to refresh its light info before pulling the light data a la:

this._lights = new HashSet<Light>(this.Client.GetLightsAsync().Result);

I also noticed that after the Bridge catches up and starts outputting the correct "reachable" state AND I shortly thereafter plug the light back in (reconnect it physically), the system returns the proper "reachable" state much faster.

Basically the system seems slow to recognize a registered light being disconnected, but it is quick to recognize that a registered light was connected.

Any thoughts? Thanks!

michielpost commented 3 years ago

I don't think there is a way to force the bridge to refresh the light info. The Q42.HueApi just passes the data it gets from the bridge. The bridge is the source of truth.

Exergist commented 3 years ago

Ok good to know. Thank you!