Open Zephael86 opened 2 months ago
This thermometer used all versions.
Works in НA and simultaneously in Mi-Home via Xiaomi Gateway 3.
Any idea where to start looking for errors?
Xiaomi BLE integration into Home Assistant successfully shows all values:
It is also worth checking that the “Measurement interval” value is set to at least 3 (relevant for the Xiaomi-Mi-Home format, set in TelinkMiFlasher.html ).
This means that the errors are not in the thermometer or in Home Assistant, but in your gateway or BLE receiver.
I could play with the thermostats at the weekend. Advertising and a mobile phone also showed 100% battery for me. Therefore I suspect that something went wrong during upgrades.
I did not change neither my ESP32 gateway nor any Home Assistant config.
I flashed back first ATC_v42.bin
then ATC_v37d.bin
.
First was not a success, but after the second flash I started to receive battery percentage data other than 100%.
I believe that with Xiaomi BLE integration it works. I already have my separate ESP32 Gateway deployed and cannot switch to a dongle, because my HA server runs in the basement.
From my point of view the issue is fixed with a workaround. In case you want, I can verify a thing or two for you, in case somebody else is still using ESP32 gateways.
https://github.com/pvvx/ATC_MiThermometer/issues/507#issuecomment-2067538991
Switch the BLE advertising format to "BTHome v2" or check the battery voltage in TelinkMiFlasher.html.
0..100% = 2.2 .. 2.95 V
Since firmware 4.3 and up I always have 100% battery in Home Assistant.
Story time: I have multiple Xiaomi Mijia at home. Hardware revision B1.4. Data is collected with the help of a gateway ESP32, programmed via ESPHome.
I am using them since 2021, nearly the beginning of the first pvvx fork. Firmware update on the thermometers happens, whenever I replace the battery. (Therefore I still have 3.7, 4.2, 4.3 and 4.6 at the moment.) Then I open the Telink Flasher, connect to the device and upload the latest available firmware. For a year now I do not even note down the firmware version, because the flasher is so convenient.
I did not realized this problem only after 6/10 devices always reports 100% battery. Temperature and Humidity seems to work fine.
Example ESPHome config:
Advertising Type on device: MIJIA (MIHOME)
I would also appreciate if you could compile an ATC_42.bin, so I can retest if the now 4.3 and up devices start to send battery info. I tried to setup a build environment, but was not successful so far.