atc1441 / ATC_MiThermometer

Custom firmware for the Xiaomi Thermometer LYWSD03MMC and Telink Flasher via USB to Serial converter
2.82k stars 472 forks source link

Diffferences between on-screen values and values transmited #23

Closed wiewiur closed 4 years ago

wiewiur commented 4 years ago

Hi First of all, thank you for you work. I would never thought someone would hack a 3$ thermometer :)

I have your firmware on 3 devices, I'm using atc_mithermometer in esphome to read values. I watch the device screen, and values from esp output logs and I can see some situations when for example:

Temp on screen is 23.5, temp I get form logs is 23.5 -->> Temp on screen increases to 23.6 and after few seconds / half a minute in logs I see message from sensor with old value 23.5

What could be the reason for this?

Thank you

atc1441 commented 4 years ago

Hey. Thank you.

The reason for that is that the Advertisted values are only updated every minute on stock.

You can read it here. https://github.com/atc1441/ATC_MiThermometer/blob/master/ATC_Thermometer/app.c#L82

So this is a normal behaivior. You can change the advertising interval via the web flasher to a lower value then it will change every time