Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set number format for floating-point metrics #53

Open
proffalken opened this issue Apr 24, 2024 · 1 comment
Open

Set number format for floating-point metrics #53

proffalken opened this issue Apr 24, 2024 · 1 comment

Comments

@proffalken
Copy link

I'm using OpenSenseMap with the ESP32 Pax Counter with an SDS011 air quality sensor attached.

I'm decoding the values within OpenSenseMap's TTN plugin, however they need to be transformed from their INT values to a FLOAT.

As an example, if the PM10 is 1.9ug/m³, then it is packed and sent as 1900, which is then displayed as 1900ug/m³ in the OpenSenseMap interface.

I've modified the code on the ESP to divide the value by 1000 before sending, but that means I lose some of the precision.

Is there a way within the javascript decoder to improve the way these data are formatted?

@mpfeil
Copy link
Member

mpfeil commented Apr 30, 2024

Hi @proffalken
thanks for your question. I am still on parental leave and will be back at work with some hours in may. I have to check the decoder because I don't know it by heart. I will get back to you in the next days.

Also regarding your other open issues 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants