Why you need a Xiaomi humidity sensor and how it works
Xiaomi's humidity and temperature sensor is a compact device that monitors the indoor climate in real time, and it doesn't just show the numbers on your smartphone screen, it helps prevent mold, dry air, or overheating, for example, if the humidity in the nursery drops below 40 percent, you'll be notified and you can turn on the humidifier automatically, without you.
Xiaomi has several models of such sensors: the classic MiJia Bluetooth Temperature and Humidity Sensor 2 (LYWSD03MMC), the version with a ClearGrass CGDK2 display (operates on the Zigbee protocol), as well as hybrid versions for Aqara systems. All of them differ in communication protocol, measurement accuracy and compatibility with ecosystems. The main advantage is autonomy: one power cell (CR2032 battery) lasts for 1-2 years.
But how do you connect this sensor? There's a lot of problems with the app not seeing the device, the data is updated once an hour, there's a synchronization error, and in this article, we'll look at all the ways you connect, from the standard one through Mi Home to integration with Home Assistant and Apple HomeKit, and how to avoid common bugs.
What models of Xiaomi humidity sensors exist and how they differ
Before you connect, it's important to determine which model you're holding, which is what the application is, the communication protocol, and even the automation capabilities are, and here are the basic options:
- π± MiJia LYWSD03MMC β The most popular sensor with Bluetooth 5.0. Works only with Mi Home, updates data every 10 minutes (in the background - once an hour). Supports firmware for integration with Home Assistant.
- πΆ ClearGrass CGDK2 β Zigbee sensor with screen, compatible with the hubs Xiaomi Gateway, Aqara and Home Assistant. Updates data every 5-30 seconds (depending on the hub).
- π Aqara Temperature & Humidity Sensor β also Zigbee, but with improved accuracy (Β±0.3Β°C. Works with the Aqara ecosystem and supports Apple HomeKit across the Aqara Hub Bridge.
- π MiJia LYWSDCGQ β It's an outdated Bluetooth 4.0 model, updates data every 60 minutes, doesn't support community firmware.
How do you know your model? Look at the box or sticker on the back of the sensor. It's got the name (like LYWSD03MMC) and the firmware version. If there's no sticker, try turning on the sensor and see if the LED flashes: LYWSD03MMC has blue, ClearGrass has green.
β οΈ Note: Bluetooth sensors (for example, LYWSD03MMC) require a smartphone or tablet to be constantly present nearby, otherwise the data will not be updated.Zigbee versions work through the hub and are independent of the phone.
Preparing for the connection: what to do before the start
Before you start connecting, check out a few key points, which will save you time and save you from errors:
- Battery charge. Make sure that the sensor has a new CR2032 battery installed. If the sensor has already been used, replace it, a discharged battery can cause synchronization failures.
- Distance: Bluetooth sensors (LYWSD03MMC) have a maximum distance of 10 meters without obstacles. Zigbee versions require a hub within a 20-30-meter radius.
- Install the latest version of Mi Home (from APKPure for Android if Google Play doesn't update). Zigbee sensors may need Aqara Home.
- When registering for an account, select Mainland China, which will allow access to all the sensor functions, and later you can change the region to Russian.
If you connect the sensor to your Home Assistant or other smart home system, check:
- π Zigbee Hub (e.g. Xiaomi Gateway 3 or Sonoff Zigbee 3.0) for Zigbee sensors.
- π± Support for custom firmware (for LYWSD03MMC will require firmware ATC1441 or PVVX).
βοΈ Checklist before connection
Connecting the humidity sensor Xiaomi through Mi Home: step-by-step instructions
The easiest way is to connect via the official Mi Home app, which is suitable for all Bluetooth sensors (LYWSD03MMC) and parts of Zigbee devices (if you have a Xiaomi Gateway).
- Turn on the sensor. Remove the plastic pad between the battery and the contacts (if you have one), the LED should blink once, which means the device is active.
- Open Mi Home. Press + β Add device β Temperature and Humidity Sensor.
- Select a model. If your sensor doesn't appear on the list, try "Other Device" β "Bluetooth".
- Hold the smartphone to the sensor. The distance should not be more than 1 meter. Press "Connect" and wait for synchronization (it will take up to 30 seconds).
- Set up a room. Select a room (e.g., "Bedroom") and confirm the addition.
If the sensor is not connected:
- π Reboot Bluetooth on your smartphone (turn off/on in settings).
- π± Try another phone (sometimes changing the device to a new one helps). Android/iOS).
- π Replace the battery, even if it seems to work.
Once connected successfully, the sensor will appear in the Mi Home main menu, where you can:
- π View the graphs of temperature and humidity for the day / week / month.
- βοΈ Adjust notifications (for example, if the humidity goes beyond 40-60%).
- π Update the firmware (if a new version is available).
β οΈ Warning: If the data is updated less than once every 10 minutes after the connection, check the power saving settings on your smartphone. Add Mi Home to the background exceptions (on Android: Settings) β Battery β Optimizing the battery β All applications β Mi Home β No restrictions).
π‘
If the sensor is displayed in Mi Home but doesn't show up-to-date data, try removing it from the app and reconnecting it, often solving the problem of "hang" readings.
How to connect Xiaomi humidity sensor to Apple HomeKit and Google Home
Xiaomi's sensors don't officially support Apple's HomeKit or Google Home, but there are workarounds, and you'll need middleware, a bridge between ecosystems.
Integration with Apple HomeKit
There are two ways to connect to HomeKit:
- Install Home Assistant on a Raspberry Pi or other device. Add Mi Home or Xiaomi integration BLE (Set up the HomeKit Controller bridge in Home Assistant. Scan. QR-code in the Apple Home app.
Aqara Hub (for Zigbee sensors)
- Buy the Aqara Hub M2 (HomeKit supports) hub.
- Connect the sensor to the hub via Aqara Home.
- In the Apple Home app, click "Add Accessory" and scan the code from the hub.
Note that this connection may update data less frequently than in the native app, for example, Google Home will have an update interval of 15-30 minutes.
| Connection method | Supported sensors | Frequency of update | Difficulty setting up |
|---|---|---|---|
| Mi Home (Bluetooth) | LYWSD03MMC, LYWSDCGQ | Every 10 minutes. | β (simple) |
| Mi Home + Google Assistant | All Bluetooth sensors | Every 15 to 30 minutes. | ββ (middle-of-the-road) |
| Home Assistant + HomeKit | All models. | Every 5 to 60 seconds. | ββββ (difficult) |
| Aqara Hub + HomeKit | ClearGrass, Aqara | Every 1-5 minutes | ββ (middle-of-the-road) |
Xiaomi Humidity Sensor Firmware for Extended Functions
The standard firmware of Bluetooth sensors (LYWSD03MMC) has limitations: data is updated every 10 minutes, there is no measurement history in the device itself, and when removed from the Mi Home, all settings are reset, the solution is custom firmware from enthusiasts, for example, ATC1441 or PVVX.
What the firmware does:
- π Update data every 5-10 seconds (instead of 10 minutes).
- π Local History Storage (up to 2,000 records).
- π Support for the protocol MQTT Integration with Home Assistant, Node-RED and other systems.
- π§ Possibility of sensor calibration (if the readings are inaccurate).