Scrin / RuuviCollector

Utility to collect measurements from RuuviTags and store them in InfluxDB
MIT License
125 stars 62 forks source link

Feature: INVALID values should be stored as null #41

Open DG12 opened 5 years ago

DG12 commented 5 years ago

Newest version of ruuvitag_fw (as of Fix #157, 9/3/19, 2.5.5) will be reporting several INVALID values (Actually they indicate UNAVAILABLE sensors).

In addition the humidity will now include an invalid constant (120) when the compensated (i.e. reading adjusted by the correction table equations results in an error (see https://github.com/ruuvi/ruuvitag_fw/blob/master/drivers/bme280/bme280.c compensate_H_int32 ( where 503316480 is actually 120<<10<<12 i.e. 120% ))

Can these values be (optionally?) treated as null?

Scrin commented 5 years ago

A configuration option to filter out measurements based on values would be a possibility indeed, but not a high priority as it's not defined in the specification for RAWv1 or the url formats. RAWv2 format handling in RuuviCollector already accounts for the invalid values defined by the data format, and treats such values as null

DG12 commented 5 years ago

Storing of invalid values is an unwanted feature. :-)

select humidity from ruuvi_measurements where mac='E9383FDD20BC' and time > '2019-09-30 19:28:00' limit 200 tz('America/New_York') name: ruuvi_measurements time humidity


2019-09-30T19:28:07.959775022-04:00 120 2019-09-30T19:28:40.048214284-04:00 120 2019-09-30T19:29:10.884664773-04:00 120 2019-09-30T19:29:41.781598186-04:00 120 2019-09-30T19:30:12.66791813-04:00 119.625 2019-09-30T19:30:43.457738351-04:00 118.505 2019-09-30T19:31:19.289325335-04:00 117.63 ... 2019-09-30T19:42:42.730102067-04:00 107.5075 2019-09-30T19:43:16.045690093-04:00 107.135

For live data see http://dalogger.dyndns.org:8888/sources/1/dashboards/6?lower=2019-09-29T15%3A04%3A00.000Z&upper=2019-10-01T15%3A04%3A00.000Z

For image snapshot see http://MyBeacons.info/ruuviHumidityinvalid.png