Issue with Hue and Bloom light

Hello everyone!

I was browsing through the GitHub issues, have all these issues been fixed? Can I close this issue → [philips-hue] Newly bridge paired lamp cannot be used in Gladys · Issue #1006 · GladysAssistant/Gladys · GitHub?

I will test and see if it’s fixed

It’s not fixed.

Just to remind the flow

  • Bridge configured in Gladys
  • Pairing a new lamp on the bridge
  • Adding the lamp in Gladys
    =› Impossible to control the lamp
2021-05-07T10:12:53+0200 <debug> scene.executeSingleAction.js:15 (SceneManager.executeSingleAction) Executing action of type device.set-value
2021-05-07T10:12:53+0200 <debug> light.setValue.js:17 (PhilipsHueLightHandler.setValue) Changing state of light philips-hue-light:001788286ece:10 with value = 0
2021-05-07T10:12:53+0200 <warn> scene.executeActions.js:37 (executeAction) ApiError: Light with id:10 was not found on this bridge
    at /home/vonox/repos/Gladys/server/services/philips-hue/node_modules/node-hue-api/lib/api/Lights.js:121:17
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async PhilipsHueLightHandler.setValue (/home/vonox/repos/Gladys/server/services/philips-hue/lib/light/light.setValue.js:38:3)

A restart of the Gladys server and the lamp is usable.

It smells like a bug in the Philips Hue node library, right?

I don’t have any more ideas on this, I checked the GitHub issues of the library but nothing on this subject.

I’m going to create an issue on the library to get feedback

Other users will also need to try to reproduce it.

I received initial feedback from the library maintainer

This might be due to the light state not being present in the bridge cache… I cannot remember if this is still used in that version (as I have been migrating the code base to TypeScript).

If a restart is clearing this out, that would be where I think the problem may be. I would need to set up a test scenario for that as I do not have an easy way to write an automation test for this.

Ok! Well, we need to see if it’s fixed in the new version, and as soon as it comes out of beta, we’ll need to update :slight_smile:

@pierre-gilles I hadn’t seen it, but the library maintainer chained a 2nd response

There’s a cache lingering :grimacing:

That’s great :grinning_face_with_smiling_eyes: It’s good if we get answers from the library side! Keep us updated here :slight_smile:

Cache refresh is confirmed

Great! So what’s the procedure on the Philips Hue Gladys side? Do you need to refresh the cache after adding a bulb?

Do you have time to make a PR for us? :slight_smile:

I encountered this bug yesterday, and I made a PR to fix the issue :slight_smile:

I added a button in the interface that allows re-synchronizing Gladys with the Philips Hue bridge:

Better late than never :smiley: