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

Format5 Support #13

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Format5 Support #13

wants to merge 2 commits into from

Conversation

pbfulmar
Copy link

Dear Mikko,

integrating Ruuvitags into my SignalK setup was my first deep dive into Javascript/SignalK. I finally succeeded thanks to your code :-) and had a lot of fun, too. :-)
The plugin now supports Ruuvitag data format v5 and works on Node 10.
It depends on updates you can find in pbfulmar/node-ruuvitag, there is a corresponding PR to pakastin/node-ruuvitag.

Here's a summary of the changes:
added all measurements of dataformat v5 to delta updates;
added handling of invalid/not available data for dataformat v5;
adjusted rounding to ruuvitags numerical precision;
added src identifier to delta update;
updated to current signalk plugin spec, works on node10, abandonware/noble
added description of the new supported data of Ruuvi dataformat v5
included remark about dataformat v5 in plugin name

Hope you find it useful.

Viele Grüße
Peter

added all measurements of dataformat v5 to delta updates;
added handling of invalid/not available data for dataformat v5;
adjusted rounding to ruuvitags numerical precision;
added src identifier to delta update;
updated to current signalk plugin spec, works on node10, abandonware/noble
added description of the new supported data of Ruuvi dataformat v5
included remark about dataformat v5 in plugin name
@vokkim
Copy link
Owner

vokkim commented Feb 25, 2021

Thanks for your PR!

What would you like to improve in the plugin, other than adding the debug messages?
I saw that you added the acceleration values there - are you aware that the acceleration values that RuuviTags emit are mostly garbage, since they represent some (randomish) acceleration measurements rather than calculating proper linear acceleration values over time?

@pbfulmar
Copy link
Author

Hi!
The most important change for me was to support Ruuvi's data format v5 spec. I'm recording a lot of SignalK data into Grafana, that's when I noticed glitches in humidity (measurements showing some 165% relative humidity) every 1..2 days.
The 'node-ruuvitag' module did not check for 'invalid data' as per Ruuvi v5 spec yet, so I modified 'node-ruuvitag' to return 'null' for invalid data instead of some definitely wrong numerical value. Hence the additional checks for values being not equal to null.

Not sure wether I understand correctly - which debug messages are you referring to?
Do you eventually mean the comments at the beginning of the "if (dataFormat == 5)" block? When checking with SignalK's data browser, several Ruuvi data are lacking a proper physical unit.
Do you know how to add that?

WRT the acceleration values: I did not have the opportunity to check other than mostly static scenarios yet, but I'm not surprised about your findings. My thinking was to add support for all the measurements that V5 offers while I was on it, maybe it's useful for someone or in the future.

Let me know in case you require some changes to the code :-)

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

Successfully merging this pull request may close these issues.

2 participants