Scrin / RuuviCollector

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

Feature request/idea: temperatureOffset.MAC=nn #56

Closed anssiok closed 2 years ago

anssiok commented 3 years ago

Hi!

It would be nice to be able to fix temperature readings of a tag by some offset based on a reference temperature. I know that's not fully accurate either because the offset may vary by temperature, but this would be a start, doesn't it?

I can implement it if no one else wants to. :-)

How about a new configuration property: temperatureOffset.MAC=nn ? I think it's better use MACs here rather than names because names can be changed by tag use but this property is strictly tag hardware -specific.

Cheers, Anssi Kanninen

Scrin commented 3 years ago

I have been against this feature for some time for the reasons mentioned here but since this still comes up so often I guess it could be implemented then if you want to do it.

It should not be called "calibration" or anything that implies that, as it would be wrong (for the reasons mentioned in the linked comment), though just calling it "offset" should be good enough, as it's merely an arbitrary offset that's being applied.

The offset should be available for all of the sensor measurements (temperature, humidity, pressure, acceleration), not just temperature, and the offsets should be applied before the calculated values (ie. absoluteHumidity) are calculated, so that the offsets are "properly" applied for those too.

Configuration should be in format: offset.<mac>.<fieldName>=<offset> for example:

offset.AABBCCDDEEFF.temperature=5
offset.FF01D4A69EBB.accelerationZ=-0.1
DG12 commented 3 years ago

Have you seen my tunables (which includes offset ) ? Can you comment.

Ruuvi Tunable Parameters

anssiok commented 3 years ago

Have you seen my tunables (which includes offset ) ? Can you comment.

Ruuvi Tunable Parameters

That is interesting. How do you reset the UICR? Also, the initial value for temperature adjustment seems to be 7,8 °C. Why so? I tested with nrfutil, see my email.

DG12 commented 3 years ago

With nRFutil "It is erased with the -eraseuicr option. The options --sectoranduicrerase, --chiperase --eraseall, --recover and --eraseuicr options also erase the UICR.

Also with j-link simply use w4 to write the desired values or use w4 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF

Initial values for temperature is totally arbitrary,

anssiok commented 3 years ago

Sorry I have to give this up due to my schedule. Thanks,