I received your DB @Psoy , I confirm that the bug is the same as the one encountered by @lmilcent , namely that there are sensor values that are recorded as « NaN » in the DB by the Zigbee2mqtt integration (and recently)
@AlexTrovato The fix we made apparently wasn’t enough, the issue still persists!
I will make a correction and it will be included in the next version of Gladys
Psoy
March 22, 2022, 5:01pm
82
Thank you once again for your help
Have a good evening
I found a way to further solidify this part!
I made a PR here:
master ← prevent-service-from-inserting-nan-numbers
ouvert 05:11PM - 22 Mar 22 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:
- [ ] If your changes affects code, did your write the tests?
- [ ] Are tests passing? (`npm test` on both front/server)
- [ ] Is the linter passing? (`npm run eslint` on both front/server)
- [ ] Did you run prettier? (`npm run prettier` on both front/server)
- [ ] If you are adding a new features/services, did you run integration comparator? (`npm run compare-translations` on front)
- [ ] 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](https://community.gladysassistant.com/) for testing before merging.
- [ ] If your changes modify the API (REST or Node.js), did you modify the API documentation? (Documentation is based on comments in code)
- [ ] 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).
- [ ] 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
Please provide a description of the change here. It's always best with screenshots, so don't hesitate to add some!
It’s crazy!
I hope the « isFloat » validation doesn’t reject integers
Are we sure that @Psoy is on a « recent » version?
Psoy
March 22, 2022, 8:17pm
85
Good evening,
Yes, 4.8.1, since the day before yesterday evening.
This sensor was well historized under the Mqtt integration and now I have moved it to zigbee2Mqtt for 4 days and no more history.
No! I checked the validation library code they use, and in the tests, integers are accepted
The bug is indeed present, currently if you sent text it would pass!
For information @Psoy , I merged my fix (Make device state validation more robust (#1480) · GladysAssistant/Gladys@dc5a183 · GitHub ) which will be included in the next release of Gladys.
I think I will make a release early next week with this bug fix (not today, it’s forbidden to deploy on Friday :D)
Psoy
March 25, 2022, 2:16pm
88
Thanks Pierre-Gilles, I’m not in a hurry, no problem
I know that on Friday, we tidy up the tools
@Psoy As expected, new version of Gladys is out today with the fix!
I hope this will solve the issue for you
Salut à tous !
C’est lundi, pas de temps à perdre, c’est l’heure d’une nouvelle version de Gladys avec un ensemble de correctifs
Les correctifs
Les capteurs de Co2 affichent désormais une couleur en fonction de la concentration en Co2 dans l’air, selon les recommandations :
[Indice-PPM-1-1024x538]
Correction d’un bug où l’intégration Zigbee2mqtt créait des valeurs de capteurs au format “texte” dans la base de donnée (au lieu de flottants), ce qui créait des bugs sur l’agrégatio…
Psoy
March 28, 2022, 12:23pm
90
I just checked, but 4.8.2 hasn’t reached me yet . I’ll confirm that for you as soon as possible
Thanks again
Psoy
March 29, 2022, 10:19am
91
It’s done, 4.8.2 has been released and the problem is resolved
Thanks again