Xiaomi wireless smart electronic digital clock hydrometer thermometer

Autodiscovery should work now.

1 Like


So that was 16 days from 12% to ā€œ0%ā€. Thatā€™s about 4 months per battery.

Thanks for the info, nevertheless the battery discharge rate is not linear, especialy when you are close to the end of the battery.

As complementary data, here is the discharge rate when battery is above 90%
image
3-4% in one month with interval every 55s

Of course youā€™re right, like I said earlier battery voltage isnt very precise at these levels

Can you change the display to show Fahrenheit?

@1technophile hi, can you point me at a commit or a part of the source code where support for these lives (in omg)?

Iā€™d really like to see it in esphome, perhaps I could port it over


EDIT: Actually, it seems like itā€™s already there in the beta version of esphome. Which is simply installable on hassos from the same repo as regular version.

Thereā€™s also been some refactoring of xiomi sensors, and there appears to be no battery monitoring for the clock/temperature/hydrometer:

Docs:

very interestingā€¦

It is here OpenMQTTGateway/main/ZgatewayBT.ino at d07065e8137cc72b04abcafd2fa3479a79bc8465 Ā· 1technophile/OpenMQTTGateway Ā· GitHub

Great work guys! Iā€™m really hoping to have it working with my esphome-based ESP32 BLE tracker! Iā€™d also like to have it supported by HA. Do you know if anybody is working on it? Iā€™ve got some round XIaomi temp sensors read by HA, but also 1 by esphome tracker (depending on the floor).

@1technophile - this is a pretty good discharge rate Iā€™d say. How does your integration work? Does it force the clock to send an update or it listens to some broadcast messages from it?? (e.g. like esphome does with the round MiJia thermometer/hygromether)
Iā€™m asking as I used this HA custom component from h4 (GitHub - h4/LYWSD02-home-assistant: Home-Assistant sensor for LYWSD02 Thermometer), but it drains the battery really heavily. 10% less in only 3 hours. I think it explicitly connects to the clock and reads the data every 30 seconds. But the Xiaomi Home app is even worse - it drained 8% in less than an hour!
Thus Iā€™m asking how you read the data as if you do listen to broadcasts then perhaps maybe thereā€™s a way to change the HA component to behave he same way instead of polling the data from the clock.

I really want to integrate this directly with HA as my esphome BLE tracker is located in totally another place and I donā€™t want to deploy another one just for this one clock to read.

OpenMQTTGateway listen every 55s for broadcasted data, there is no connection done to the BLE devices.

Behind that we use the servicedata broadcasted by the devices instead of making a BLE connection. Not all parameters can be retrieved like that (for instance mi flora doesnā€™t broadcast its battery value by servicedata) but the most interesting ones are there.

To add a little bit of history this functionnality is made possible by the great work of @nkolban & @chegewara on ESP32. You can check to see how the service data are extracted.

How many meters do you have between your ESP and the clock for my info?

1 Like

It listen to broadcasts - perfect! That;s trhe best solution I think. Itā€™s the same approach as the ESPhome guys took for MiFlora and Xiaomi LCD thermometer & hygrometer. For the battery life itā€™s the best approach one can take.

Anyway - it turned out that ESPhome giys implemented support for this device as well in their newest version 1.14. I updated my tracker with their newest software and what really surprised me was that there are 2 think walls and a distance of ca 10 meters between my ESP32 tracker and this clock and the tracker receives all the parameters by BLE. Really beautiful. I donā€™t have to deploy another ESP32 to track the clock/themperature. Great news :slight_smile: I wish the HA team could build integration with this clock in the same way - I mean without making a connection to it.

1 Like

@bachoo786 could you get this working? I am also interested in this one with the clock.