# Problème avec Hue et lumière bloom

**URL:** <https://community.gladysassistant.com/t/probleme-avec-hue-et-lumiere-bloom/5799>\
**Category:** Présentations\
**Created:** [Novembre 27, 2020, 2:04 UTC](https://community.gladysassistant.com/t/probleme-avec-hue-et-lumiere-bloom/5799 "2020-11-27T14:04:16Z")\
**Posts on this page:** 12\
**Page:** 2

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Mai 7, 2021, 4:13 UTC](https://community.gladysassistant.com/t/probleme-avec-hue-et-lumiere-bloom/5799/21 "2021-05-07T04:13:14Z")

</div>

Hello à tous!

Je faisais une passe dans les issues Github, est-ce que toutes ces issues ont bien été corrigée? Je peux fermer cette issue =\> [[philips-hue] Newly bridge paired lamp cannot be used in Gladys · Issue #1006 · GladysAssistant/Gladys · GitHub](https://github.com/GladysAssistant/Gladys/issues/1006) ?

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [Mai 7, 2021, 6:34 UTC](https://community.gladysassistant.com/t/probleme-avec-hue-et-lumiere-bloom/5799/22 "2021-05-07T06:34:40Z")

</div>

Je vais tester et voir si c’est fix

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [Mai 7, 2021, 8:18 UTC](https://community.gladysassistant.com/t/probleme-avec-hue-et-lumiere-bloom/5799/23 "2021-05-07T08:18:50Z")

</div>

C’est pas fixé.

Juste pour rappeler le flow

- Bridge configuré dans Gladys
- Appairage d’une nouvelle lampe sur le bridge
- Ajout de la lampe dans Gladys  
=\> Impossible de controler la lampe

```auto
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)

```

Un restart du server Gladys et la lampe est exploitable.

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Mai 7, 2021, 8:43 UTC](https://community.gladysassistant.com/t/probleme-avec-hue-et-lumiere-bloom/5799/24 "2021-05-07T08:43:56Z")

</div>

Ok! ça sent le bug dans la lib Philips Hue node non?

J’ai pas plus d’idée là dessus, j’ai regardé les issues github de la lib mais rien à ce sujet

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [Mai 7, 2021, 9:23 UTC](https://community.gladysassistant.com/t/probleme-avec-hue-et-lumiere-bloom/5799/25 "2021-05-07T09:23:21Z")

</div>

Je vais faire une issue sur la lib pour avoir un feedback

Faudrai aussi que d’autres utilisateurs tente de reproduire.

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [Mai 11, 2021, 1:16 UTC](https://community.gladysassistant.com/t/probleme-avec-hue-et-lumiere-bloom/5799/26 "2021-05-11T13:16:43Z")

</div>

J’ai eu un premier feedback du mainteneur de la lib

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.

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Mai 11, 2021, 11:55 UTC](https://community.gladysassistant.com/t/probleme-avec-hue-et-lumiere-bloom/5799/27 "2021-05-11T23:55:06Z")

</div>

Ok! Bon il faut voir si c’est résolu par la nouvelle version, et dès qu’elle sortira de bêta il faudra mettre à jour 🙂

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [Juin 21, 2021, 9:29 UTC](https://community.gladysassistant.com/t/probleme-avec-hue-et-lumiere-bloom/5799/28 "2021-06-21T21:29:50Z")

</div>

@pierre-gilles j’avais pas vu mais le mainteneur de la lib a enchaîner une 2ème réponse

> <https://github.com/peter-murray/node-hue-api/issues/197#issuecomment-838737675>
>
> Hi
> 
> I'm contributor to open-source project \[GladysAssistant\](https://gladysass…istant.com/)
> We use this lib in our Philips Hue services ( in version 4.0.9 ). Thank you BTW !
> 
> We have some weird behavior, newly bridge paired light can't be controlled without a restart.
> 
> See gladys log
> \`\`\`
> 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)
> \`\`\`
> 
> Like I said, restarting the app and the problem is gone.
> 
> For reference: https://github.com/GladysAssistant/Gladys/blob/master/server/services/philips-hue/lib/light/light.setValue.js
> 
> I've no clue about that, what do you think ?
> Thank you

Il y’a un cache qui traîne 😬

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Juin 22, 2021, 12:51 UTC](https://community.gladysassistant.com/t/probleme-avec-hue-et-lumiere-bloom/5799/29 "2021-06-22T00:51:19Z")

</div>

C’était sur 😄 tant mieux si on a des réponses du côté de la lib ! Tiens nous au courant ici 🙂

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [Juillet 13, 2021, 10:08 UTC](https://community.gladysassistant.com/t/probleme-avec-hue-et-lumiere-bloom/5799/30 "2021-07-13T10:08:22Z")

</div>

Cache a refresh c’est confirmé

> <https://github.com/peter-murray/node-hue-api/issues/197#issuecomment-870591129>
>
> Hi
> 
> I'm contributor to open-source project \[GladysAssistant\](https://gladysass…istant.com/)
> We use this lib in our Philips Hue services ( in version 4.0.9 ). Thank you BTW !
> 
> We have some weird behavior, newly bridge paired light can't be controlled without a restart.
> 
> See gladys log
> \`\`\`
> 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)
> \`\`\`
> 
> Like I said, restarting the app and the problem is gone.
> 
> For reference: https://github.com/GladysAssistant/Gladys/blob/master/server/services/philips-hue/lib/light/light.setValue.js
> 
> I've no clue about that, what do you think ?
> Thank you

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Juillet 14, 2021, 2:04 UTC](https://community.gladysassistant.com/t/probleme-avec-hue-et-lumiere-bloom/5799/31 "2021-07-14T02:04:27Z")

</div>

Nice! Du coup c’est quoi la marche à suivre côté Philips Hue Gladys? Il faut lancer un refresh du cache après avoir ajouté une ampoule ?

Tu as le temps pour nous faire une PR ? 🙂

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Avril 29, 2024, 2:34 UTC](https://community.gladysassistant.com/t/probleme-avec-hue-et-lumiere-bloom/5799/32 "2024-04-29T14:34:43Z")

</div>

J’ai rencontré ce bug hier, et j’ai fais une PR pour corriger le souci 🙂

J’ai ajouté un bouton dans l’interface qui permet de re-synchroniser Gladys avec le pont Philips Hue :

 ![Screenshot 2024-04-29 at 15.48.31](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/2/5/25b512d5b77251dba3d2a8a065fe7e1ceb2c9774.png)

> <https://github.com/GladysAssistant/Gladys/pull/2063>
>
> \### Pull Request check-list
> 
> To ensure your Pull Request can be accepted as fa…st as possible, make sure to review and check all of these items:
> 
> \- \[x\] If your changes affects code, did your write the tests?
> \- \[x\] Are tests passing? (\`npm test\` on both front/server)
> \- \[x\] Is the linter passing? (\`npm run eslint\` on both front/server)
> \- \[x\] Did you run prettier? (\`npm run prettier\` on both front/server)
> \- \[x\] If you are adding a new features/services, did you run integration comparator? (\`npm run compare-translations\` on front)
> \- \[x\] Did you test this pull request in real life? With real devices? If this development is a big feature or a new service, we recommend that you provide a Docker image to the community (\[french forum\](https://community.gladysassistant.com/)/\[english forum\](https://en-community.gladysassistant.com/)) for testing before merging.
> \- \[x\] If your changes modify the API (REST or Node.js), did you modify the API documentation? (Documentation is based on comments in code)
> \- \[x\] If you are adding a new features/services which needs explanation, did you modify the user documentation? See \[the GitHub repo\](https://github.com/GladysAssistant/v4-website) and the \[website\](https://gladysassistant.com).
> \- \[x\] Did you add fake requests data for the demo mode (\`front/src/config/demo.js\`) so that the demo website is working without a backend? (if needed) See \[https://demo.gladysassistant.com\](https://demo.gladysassistant.com).
> 
> NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.
> 
> \### Description of change
> 
> Fix #2062
> 
> !\[Screenshot 2024-04-29 at 15 48 31\](https://github.com/GladysAssistant/Gladys/assets/7365207/20506277-d658-446d-9201-9d1f1e452c05)
> !\[Screenshot 2024-04-29 at 15 48 46\](https://github.com/GladysAssistant/Gladys/assets/7365207/3c9aca14-3cc4-4971-aee7-918e3fafc621)

Mieux vaut tard que jamais 😃

[Page précédente](https://community.gladysassistant.com/t/probleme-avec-hue-et-lumiere-bloom/5799.md?page=1)
