I recently bought a couple of Xiaomi Human Presence Sensors (model XMOSB01XS) and decided to test how they work with Home Assistant. Here’s a step-by-step guide to get them up and running.
Read more: Xiaomi Human Presence BLE SensorInstallation Steps
1. Xiaomi Home Account First, you need a Xiaomi Home account. This is required only for the initial setup.
2. Home Assistant with Bluetooth Ensure you have a Home Assistant installation with Bluetooth capability. Using a Bluetooth proxy is an excellent way to extend Bluetooth coverage throughout your home.
With these prerequisites in place, setting up the device is straightforward.
Step-by-Step Guide
Step 1: Xiaomi Home Account Setup
- Log in or create an account on the Xiaomi Home app on your phone.
- Change your location to Mainland China in the app settings for the device to work.
Step 2: Add the Sensor to Xiaomi Home
- Add the new Xiaomi Human Presence BLE sensor to your account.
- Hold the button on the device for 5-7 seconds to put it in pairing mode, and it will be discovered by the app.
Step 3: Integrate with Home Assistant
- Return to Home Assistant. The device should be discovered automatically.
- If not, go to Settings -> Devices & Services -> Add Integration. Search for “Xiaomi BLE” and add the integration.
Entering the BLE Encryption Key
Here’s where it gets a bit tricky. You need to enter a BLE encryption key.
Manual Key Retrieval I couldn’t get the “Mi account” method to work due to 2FA settings on my account. Instead, I used a manual method:
- Visit Xiaomi Cloud Tokens Extractor and follow the instructions to retrieve the key.
- The key is the string labeled “BLE KEY”. Enter this into Home Assistant.
Final Steps
Once the key is entered, it’s just a matter of time before all sensors appear in Home Assistant.
One thing is sure, this detector is lightning fast! It detects motion almost instantly. And since it is not just a PIR detector, but also a mmWave radar detector, it does detect that a person is in the room sitting still as well.