You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've set a listener on context.getAllLightsCollection() and whilst it's getting called correctly the arg0 & arg1 elements are returning bad labels ("Unknown"), if I use the arg1 (LFXLight) and choose getLabel() it will always return "Unknown" as will the collection in arg0 when the listener is called.
However when I iterate the LFXLightCollection in arg0 I will find that previous lights that did gave label "Unknown" are now correct, and if I force a short delay and call context.getAllLightsCollection() again then all labels are now correct.
I've also got a listener on change label but that never gets called.
Surely lightCollectionDidAddLight should only be called once the label is known OR called again when the label is known.
Any chance of a fix? or is this just me?
The text was updated successfully, but these errors were encountered:
Not just you, I get this occasionally too. Seems inconsistent but for me maybe it fails 1 time out of 10, so it isnt too bad, but still not a good user experience when it does happen.
One (very crude) workaround I guess is to maintain a internal hashmap of labels against IDs in your app, so when it does work it remembers them for when it doesn't.
I've put in a kludgey fix for the moment of starting a runnable and doing my light update 500mS after the add light occurs, the minimum to pick up the right label was 400mS after the DidAddLight callback.
Have sent a support ticket to LIFX but no response yet....
I've set a listener on context.getAllLightsCollection() and whilst it's getting called correctly the arg0 & arg1 elements are returning bad labels ("Unknown"), if I use the arg1 (LFXLight) and choose getLabel() it will always return "Unknown" as will the collection in arg0 when the listener is called.
However when I iterate the LFXLightCollection in arg0 I will find that previous lights that did gave label "Unknown" are now correct, and if I force a short delay and call context.getAllLightsCollection() again then all labels are now correct.
I've also got a listener on change label but that never gets called.
Surely lightCollectionDidAddLight should only be called once the label is known OR called again when the label is known.
Any chance of a fix? or is this just me?
The text was updated successfully, but these errors were encountered: