ATC_MiThermometer icon indicating copy to clipboard operation
ATC_MiThermometer copied to clipboard

measure and bake in offsets

Open ke-ss opened this issue 3 years ago • 4 comments

This is nice work, thank you :)

I have 4 new LYWSD03MMC sensors. Before flashing with custom rom, all placed side by side, and all displayed the same temp and %RH values.

I flashed mine in a very stable temp and humidity environment, so the values after flashing should have been the same as before. But they weren't, indicating factory calibration adjustment for each sensor within factory. Clearly this is done with a custom rom per device, or a tiny additional calibration file that the device references, which is flashed with the rom.

They were not far out but there was a small difference, and more variance between the sensors than before flashing.

Suggestion:

  1. The phone flashing web page does not appear to display updated temp and %RH after custom rom is flashed. If this could be fixed it would be nice.
  2. If device is kept in very stable temp and %RH environment, just before, and just after custom rom is flashed, then
  3. the record of the just before flash, temp and %RH, can be used to correct device after custom rom is flashed, perhaps with a small additional flashed calibration reference file.
  4. Would be nice if device could remember settings after re-cycling power. These could be stored in same tiny file as calibration data on device.

Nice code :) Thank you

ke-ss avatar Dec 23 '20 10:12 ke-ss

Hey. The offset is known, is always about 4-5% You can set a custom offset in the webflasher for each device. Which will last till battery is pulled out as you already know.

I have the persistence storage high in my todo list but beeing very ocupied by another project right now.

atc1441 avatar Dec 23 '20 11:12 atc1441

Hi, I did notice the % RH was 5% down with the last of the 4 I flashed with your rom. Since it is known each sensor needs +5 %RH for correct calibration, why not just bake it into your rom ? Feels like quite an easy fix.

Thanks again, great work :)

ke-ss avatar Dec 23 '20 17:12 ke-ss

The main reason why its not baked in is its not known what the real value is, i am using the one directly comming from the sensor and schouldnt that be the correct one ? Xiaomi build something into the firmware which does the offset but it is not clear why.

When someone has a validated device to test the real % we could follow that one

atc1441 avatar Dec 23 '20 17:12 atc1441

I just got a dehumidifier and decided to cross check measurements. It seems that the 5% isn't needed, at least at about 60% RH. My dehumidifier shows the exact same value as the stock configuration of this firmware, while any other device I have with +5% are, well, 5% up 🤔

giannoug avatar Dec 26 '20 15:12 giannoug