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 ?
VonOx
Mai 7, 2021, 6:34
22
Je vais tester et voir si c’est fix
1 « J'aime »
VonOx
Mai 7, 2021, 8:18
23
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
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.
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
VonOx
Mai 7, 2021, 9:23
25
Je vais faire une issue sur la lib pour avoir un feedback
Faudrai aussi que d’autres utilisateurs tente de reproduire.
VonOx
Mai 11, 2021, 1:16
26
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.
1 « J'aime »
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
VonOx
Juin 21, 2021, 9:29
28
@pierre-gilles j’avais pas vu mais le mainteneur de la lib a enchaîner une 2ème réponse
opened 10:13AM - 07 May 21 UTC
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
1 « J'aime »
C’était sur tant mieux si on a des réponses du côté de la lib ! Tiens nous au courant ici
VonOx
Juillet 13, 2021, 10:08
30
Cache a refresh c’est confirmé
opened 10:13AM - 07 May 21 UTC
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
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 ?
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 :
GladysAssistant:master
← GladysAssistant:add-philips-hue-sync-with-bridge-button
opened 01:49PM - 29 Apr 24 UTC
### 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
1 « J'aime »