Xiaomi Bluetooth Home Assistant Integration is now possible Natively! As you may know there is one Xiaomi Bluetooth temperature & humidity sensor that becomes very popular lately, because it is cheap, it is good looking and its battery last forever.
On top you can add this Xiaomi T&H sensor to your Home Assistant relatively easy. The whole process of adding the Xiaomi to Home Assistant becomes even easier as there is a new native method that I’m about to show you today.
Table of Contents
What is needed?
First, let’s see what is needed:
Of course you will need the Xiaomi Bluetooth Temperature & Humidity sensor itself.
The device is really small, it uses a Bluetooth for a wireless communication and it is battery powered. I have one here that is running for about a year now and the battery is still at 100% which is either amazing or there is something wrong with the battery reporting.
But even if it is the latter and the battery die right now, it is still impressive as one year of operation with one cheap CR2032 battery is a pretty good deal in my honest opinion.
One more important thing about the sensor before we move on is the fact, that the Bluetooth communication of the device is encrypted. If you want to use it outside the Xiaomi Home Mobile app you have to extract the encryption key of the device.
Don’t worry that is very easy and I will show you later how to do it from your browser.
From where to buy Xiaomi T&H?
If you want to buy the Xiaomi Bluetooth Temperature & Humidity sensor I can recommend to get it from AliExpress, where it costs around $5 US dollars including the shipping and a battery.
If you decide to buy Xiaomi TH sensor, from the links below, which are affiliate links and affiliate links means that I will get a small commission from your purchase with no additional cost for you.
It will be kind of Win-Win situation.
If you buy a bundle of 3, 4 or 5 devices at once you can lower the price to around $4 dollars per piece. Of course, the prices may vary depending of the season and the current promotions, so I can suggest to click the images above & below and check the current prices.
Home Assistant with Bluetooth support is also needed
The next thing that you will need is a running Home Assistant preferably on a device that have embedded Bluetooth. Perfect example for this is a Raspberry Pi 4.
If your Home Assistant device is not having a Bluetooth you will need a Bluetooth dongle. You can find some compatible dongles below (Affiliate links again).
- Compatible Bluetooth Dongle (Long Range) – https://amzn.to/3PdOZYw
- Compatible ASUS USB-BT500 Bluetooth Dongle – https://amzn.to/3SKbes7
Home Assistant Webinar
If you don’t have Home Assistant yet, now is the best time to invite on my free Home Assistant webinar where I will talk about 4 official ways to get Home Assistant + 1 not official, but super easy and fast way to start Home Assistant in under 5 minutes.
⬇️ Go to my other website and register right now as I said it is absolutely free ⬇️
Summary of what is needed for this Project?
As summary, you will need:
- One or more Xiaomi Bluetooth Temperature & Humidity sensors.
- Home Assistant installed on a device with a Bluetooth support.
- You have to download the free Xiaomi Home app (available in Apple App Store and Google Play) and to add the Xiaomi T&H Sensor inside before continue further.
Just for your information, adding the device inside Xiaomi Home app is a pretty standard procedure that do not need a lot of explanations.
How to Get Xiaomi Bind key?
If you already have everything that is described above, then it is time to get the Encryption key or also known as Bind key of the Xiaomi device, so we can have a native Xiaomi Bluetooth Home Assistant integration.
Thanks to Aaron (https://www.youtube.com/channel/UCY0kJ-Z-811fqTddJ72w-WA), who made a web page that can extract the Bind/Encryption key, this whole procedure is like a walk in a park. Everything is done wirelessly and all that is needed is the Xiaomi sensor and your phone or laptop browser.
Below are the steps to get the Bind Key:
- I used a Chrome browser on my laptop (Safari browser didn’t want to work for some reason).
- I opened the following URL – https://atc1441.github.io/TelinkFlasher.html
- Then I clicked on the Connect button, I removed the Xiaomi TH battery and I put it back to wake the device up.
- I searched for LYWSD03MMC in the dialog, I select it and I clicked on the Pair button
- Then I waited few seconds to see the Status Connected label and I pressed on the Do Activation button.
- Few seconds later I received my Xiaomi Bind key that I copied in a safe place, as I will have to use it later for the native Xiaomi Bluetooth Home Assistant integration.
Xiaomi Bluetooth Home Assistant Integration
Until very recently to add the Xiaomi Temperature & Humidity sensor in Home Assistant you have to install a custom integration called Passive BLE Monitor, which is still working fine and if you want to know more you can check my older article about the same Xiaomi sensor and Home Assistant and how to get everything working.
But that above is the old way of integrating Xiaomi T&H with Home Assistant! Now, I will show you the new one.
How to add Bluetooth Integration in Home Assistant?
Starting from Home Assistant 2022.8 there is a new Bluetooth integration which allows adding a lot Bluetooth devices natively including this Xiaomi Temperature & Humidity sensor.
To add the Home Assistant Bluetooth integration, either click on the My Home Assistant link below or find the Bluetooth in the Integrations section > Add Integration.
After adding the Bluetooth integration above, every Bluetooth device that is in range and that is recognized by Home Assistant should be auto-discovered and ready to be configured.
Adding the Xiaomi T&H in Home Assistant
Have in mind that in order to preserve battery power, the Xiaomi Temperature sensor is transmitting signals in intervals. That means the Xiaomi sensor is sleeping most of the time and it will not be auto-discovered by Home Assistant immediately.
So, you either have to wait a bit or you can try to wake the device by removing and inserting the battery to force this initial discovery.
After the Xiaomi TH is found by Home Assistant you will be able to see it in the list of integrations as LYWSD03MMC Xiaomi BLE integration.
Just click on the Configure button under the Xiaomi BLE integration and then on Submit button in the shown message.
Now, you are almost ready, but prepare to have a good break. You can go watch some YouTube or you can read a good book for half an hour or so.
In my case after around 30-45 minutes I saw a reconfiguration request from Home Assistant for the same LYWSD03MMC Xiaomi BLE device. That is because the Bluetooth communication is encrypted and it needs the Bind or Encryption key to be unlocked.
REQUEST FOR HELP – START!
I was unable to force this Xiaomi BLE T&H Sensor reconfiguration request in Home Assistant. If you know how this above can happen faster – please, don’t hold it for yourself and share that trick in the comments bellow!
REQUEST FOR HELP – END!
Anyways, I clicked on the Reconfigure button and I pasted my Xiaomi Bind key and I was ready.
Not long after, I was able to see the Xiaomi Temperature & Humidity readings inside Home Assistant. As well as the battery percentage which was still at 100% even after a lot of waking up the device and tests.
Of course, as everything else this Xiaomi sensor have some drawbacks, and the main of them are:
- Refresh rate of the readings in Home Assistant is not fast, it is around every 15 minutes or something.
- The Xiaomi T&H sensor have to be relatively close to your Home Assistant device. Around 5-10meters.
Despite the above drawbacks, I think that the Xiaomi LYWSD03MMC T&H BLE sensor is a great device and I can two hands recommend it as one of the cheapest and easiest way to get your Temperature & Humidity readings in Home Assistant.
And this is the affiliate link again, If you wan to buy the sensor – https://s.click.aliexpress.com/e/_DlsUEQv
Outro + Question for YOU!
Can you share in the comments section what do you like or what you don’t like about this Xiaomi sensor it will be very interesting to me and other who are reading this.
Don’t forget to subscribe for my Newsletter where you will receive similar articles on weekly basis.
Thank you for reading. I’m Kiril and I’m done writing. Bye!