Xiaomi Mijia Sensor
A cheap £3 purchase from Ali Express. I’d forgotten about buying this as it took a few months to come!
This sensor measure temperature and humidity, and gives a small smiley face depending on the status of the measurements. The sensor can be accessed via an app, which shows an accumulated history of readings.
![](https://mlblmfunbrbo.i.optimole.com/w:498/h:1080/q:mauto/f:best/https://i0.wp.com/stu73.net/wp-content/uploads/2020/09/IMG_0571.png?resize=910%2C1970&ssl=1)
One thing I did get this sensor for was to experiment and see if I could get the sensor readings out myself. The sensor values can be accessed via low-powered Bluetooth (BLE).
I found a python script on GitHub which did just that. Installed on a Pi Zero and set at 30 minute intervals via a cron job, I can read the temperature, humidity, battery voltage and battery level from the Xiaomi and write to a file (format below).
sensorname,temperature,humidity,voltage,batteryLevel,timestamp xiaomi 19.0 70 2.891 79 1599210044
![](https://mlblmfunbrbo.i.optimole.com/w:810/h:1080/q:mauto/f:best/https://i0.wp.com/stu73.net/wp-content/uploads/2020/09/IMG_0511.jpeg?resize=910%2C1213&ssl=1)
![](https://mlblmfunbrbo.i.optimole.com/w:810/h:1080/q:eco/f:best/https://i0.wp.com/stu73.net/wp-content/uploads/2020/09/IMG_0513.jpeg?resize=910%2C1213&ssl=1)
Good little sensor! I wonder if the battery life is quite limited, as it’ already down at 79% after 5 days, so maybe I’ll change the cron job to every hour.
![](https://mlblmfunbrbo.i.optimole.com/w:910/h:909/q:eco/f:best/https://i0.wp.com/stu73.net/wp-content/uploads/2020/09/E7F2E4CF-F957-4620-8962-3A47BEE20C77.jpeg?resize=910%2C909&ssl=1)
LYWSD03MMC Xiaomi Mijia Python Script: