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

Handling of NaN in measurement values #190

Open
thjean opened this issue Jun 29, 2019 · 0 comments
Open

Handling of NaN in measurement values #190

thjean opened this issue Jun 29, 2019 · 0 comments
Milestone

Comments

@thjean
Copy link

thjean commented Jun 29, 2019

Expected Behavior

When posting a bunch of data in a row and one of these measurement values is NaN, the API should discard this value but should accept the other (valid) measurement values.

Current Behavior

The entire posting is rejected with "HTTP/1.1 422 Unprocessable Entity", including the valid measurement data send. This holds true for any of the data formats (JSON-Array, CSV, Raw).

(My firmware sets the value to NaN if a read error occurs on I2C readings. While this sometimes happens when reading the BME280 data for humidity or pressure, I never observed this with the other I2C sensors)

Possible Solution

Process the valid data and discard just the NaN value.

Steps to Reproduce (for bugs)

Post several values with one of them being set to NaN. Set a value to "nan" for JSON array or csv format or set the value to NaN according to IEEE754 for raw format

@mpfeil mpfeil added this to the v12.0.0 milestone Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants