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

Negative values not decoded correctly from data format3 #20

Closed
ssamppa opened this issue Sep 5, 2017 · 3 comments
Closed

Negative values not decoded correctly from data format3 #20

ssamppa opened this issue Sep 5, 2017 · 3 comments
Assignees

Comments

@ssamppa
Copy link

ssamppa commented Sep 5, 2017

Negative values seems to be incorrectly decoded. Last night was the first night with subzero temperatures at our home, see the picture. Crossing zero leads ruuvitag_sensor 0.8.0 to report -128.
Ideally add a test case for these boundary values :)

img_3464

@ttu ttu self-assigned this Sep 5, 2017
@ttu
Copy link
Owner

ttu commented Sep 5, 2017

Thanks for the info!

Unfortunately haven't been using much RuuviTag's data format 3, as my own home automation project hasn't been active in a while, so I haven't validated all different data cases.

Found a fix for the integer part of the temperature and still need to fix fractional part when I get more info of what the firmware will actually send (not sure if there is an error in decoding).

https://github.com/ttu/ruuvitag-sensor/tree/fix-df3-temperature

@ssamppa
Copy link
Author

ssamppa commented Sep 6, 2017

Seems to be working fine now. Thanks for the quick fix!
img_3465

@ttu
Copy link
Owner

ttu commented Sep 6, 2017

Fixed in commit e6f2f40

@ttu ttu closed this as completed Sep 6, 2017
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