ATC_MiThermometer
ATC_MiThermometer copied to clipboard
measure and bake in offsets
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:
- 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.
- If device is kept in very stable temp and %RH environment, just before, and just after custom rom is flashed, then
- 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.
- 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
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.
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 :)
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
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 🤔