Xiaomi Mijia Bluetooth Thermometer en Hygrometer – Setup
Purpose is to log the temperature and moisture of multiple rooms in our home to get insights into the performance and behaviour of systems and the residents. How quickly can a room get up to temperature, how humid are rooms, what conditions do residents find comfortable, etc.
This article will include how to flash the Xiaomi Mijia’s – model LYWSD03MMC – with custom firmware, how to forward the bluetooth messages to mqtt, and how a Node-red workflow processes the data to a database.
Flash custom firmware
Aaron Christophel created custom firmware, posted a video, put his code on github atc1441/ATC_MiThermometer and supplied a webbased firmware flasher based on Web Bluetooth, which not all browsers support. So download the latest release of the custom firmware to a computer/device with Bluetooth and open the flasher in a supported browser. I used a recent laptop and Chrome. Choose “Connect”, select the device, choose “Do Activation”, select the firmware file, and hit Start flashing. That’s all.
Forward bluetooth messages
OpenMQTTGateway installed on an ESP32 forwards bluetooth broadcasts to MQTT. It supports devices like the XIAOMI Mi Jia 2 with custom firmware and can be flashed on a ESP32 board.
Node-Red processing
Will be added