Xiaomi Mijia Temperature and Humidity Sensor

Exploring the Xiaomi Mijia Temperature and Humidity Sensor: Integrating it with Home Assistant

Introduction: Hey there, fellow tech enthusiasts! Today, I explore the Xiaomi Mijia Temperature and Humidity Sensor. This little device caught my attention because it utilizes Bluetooth Low Energy instead of Zigbee. To experiment with its capabilities, I have an ESP32 board running ESPHome and the Bluetooth Proxy. Let’s see if we can make it communicate with Home Assistant.

Unboxing the Xiaomi Mijia Sensor: First things first, let’s open up the box and see what’s inside. The package contains an instruction manual and a sticky pad, most likely for mounting purposes. And here it is—the compact sensor itself. It boasts a sleek design, and as I remove the battery tab, the display immediately comes to life, showing the current temperature and humidity. While it can function as a standalone device, the real power lies in integrating it with Home Assistant. So, let’s get started on that!

Configuring the Bluetooth Proxy: Within Home Assistant’s integration page, I locate the Bluetooth proxy option and proceed to set it up. Once added, other devices start appearing on the page. I spot an LD2410 sensor, a Switchbot lock, and an iBeacon Tracker. However, our focus is on finding the Xiaomi temperature sensor, which appeared after about 45 seconds.

Encryption and Binding Key: Unexpectedly, it turns out that this little device is encrypted, posing a challenge for us, which thankfully someone else has already solved! The initial step is to change the bind key so that it can communicate with Home Assistant. To do this, we need to visit the following URL:

https://atc1441.github.io/TelinkFlasher.html

Once on the webpage, make sure your computer has Bluetooth enabled, as it needs to establish communication with the sensor. Click “Connect” -> “Do Activation” and then it should show you a new “Bind Key”. Keep in mind that performing this procedure means you won’t be able to use the sensor with the Xiaomi Mi Home app. However, if you’re using Home Assistant, then hopefully you’re not too worried about this.

Integration with Home Assistant: With the new bind key in hand, there are a couple of things to consider. Firstly, for Home Assistant to detect the sensor, you’ll need a Bluetooth dongle attached to your Home Assistant instance or a Bluetooth proxy using ESPHome. After waiting for about five to ten minutes, the sensor should appear as an integration and be detected by the Bluetooth Proxy. Add the integration and check if it has any entities. If it prompts you for the bind key during the integration process, great! If not, don’t worry—wait another five to ten minutes, and it should reappear with an option to “Reconfigure”. Clicking that will prompt you to enter the Bind Key. Finally, after another short wait, the sensor should display a couple of entities—one for temperature and one for humidity.

Utilizing the Xiaomi Sensor: Now that the Xiaomi Mijia Temperature and Humidity Sensor is ready to go, it’s time to unleash its potential by creating automations. Keep in mind that the sensor updates its readings every five minutes in Home Assistant, so if that frequency suits your needs, you’re good to go. Otherwise, you might want to explore other sensor options available or even consider building your own using ESP Home.

Conclusion: The Xiaomi Mijia Temperature and Humidity Sensor does what it says on the tin and is particularly useful if you want a display for showing the temperature. Putting it in a bathroom could be useful for extractor fan based automations.

If you enjoyed this content then please consider subscribing to my YouTube channel and liking the video.

Scroll to Top