Connecting Xiaomi thermometer to a smart home: full instruction with expert tips

Why integrate Xiaomi thermometer into a smart home?

Xiaomi thermometers are not just gadgets for measuring temperature and humidity; they become full-fledged elements of the smart home ecosystem, allowing you to automate climate control, receive notifications of critical changes in the microclimate and even save on heating. For example, by linking the sensor with a smart heater or air conditioner, you can set up automatic turn on when the temperature drops below a predetermined threshold.

But many users face difficulties in connecting, from not having a device on the Mi Home app to having trouble syncing data. In this article, we’ll look at everything from choosing a compatible model to configuring complex automation scenarios, and how to get around regional restrictions and get a thermometer to work with Google Home or Apple HomeKit despite official restrictions.

What Xiaomi thermometers support integration with a smart home

Not all Xiaomi temperature sensors are equally useful for smart homes.

  • πŸ”Ή Xiaomi Mijia Bluetooth Temperature and Humidity Sensor 2 (LYWSD03MMC) β€” The most popular Bluetooth 5.0 model, lasts up to 2 years on a battery CR2032. Supports firmware for integration with Home Assistant.
  • πŸ”Ή Xiaomi Aqara Temperature and Humidity Sensor (WSDCGQ11LM) β€” It's based on the Zigbee protocol, requires the Aqara Hub. Compatible with Apple's HomeKit through workarounds.
  • πŸ”Ή Xiaomi ClearGrass Temperature and Humidity Sensor (CGDK2) β€” Bluetooth, but without official Mi Home support in some regions.
  • πŸ”Ή Xiaomi Mi Temperature and Humidity Monitor 2 (LYWSD02) β€” It's an outdated model, but it's still available, and it only supports the Mi Home.

The key difference is the communication protocol:

- Bluetooth models (e.g., Bluetooth models, LYWSD03MMC) Connect directly to your smartphone, but remote access requires a gateway (e.g., Xiaomi Gateway).

- Zigbee models (e.g. Aqara) WSDCGQ11LM) They require a separate hub, but they are more stable in large automation systems.

πŸ“Š What Smart Home Protocol Are You Using?
Wi-Fi
Bluetooth
Zigbee
Z-Wave
The other one/don't know/

Important: Some models (e.g, LYWSD03MMC) In standard firmware, you don't transfer data to the Mi Home cloud outside of China. This will require custom firmware (for more on this, see the Home Assistant section).

Preparation for connection: what will be needed

Before you start setting up, check for everything you need:

Install the Mi Home app (version no lower than 6.0.100)

Prepare a Xiaomi account (preferably with a phone number tied)

Check the battery charge in the thermometer (should be) β‰₯ 80%)

Make sure your smartphone supports Bluetooth 4.2+ (Bluetooth-model)

Download the Home Assistant (Aqara Home) if you are planning to use a non-Mi Home-->

Pay special attention to the region of the Mi Home account. By default, the application determines the region by SIM-card IP-If your account is linked to the Mainland China region, some devices (e.g, LYWSD03MMC) The solution is to change the region to "Russia" or "Europe" in the profile settings.

⚠️ Note: If you have already added other Xiaomi devices to your account with China, changing the region may cause them to be disabled.

For Zigbee models (e.g. Aqara) WSDCGQ11LM) need to:

Aqara Hub (or Xiaomi Gateway 3)

Aqara Home (alternative to Mi Home for Aqara devices)

Stable power hub (some automation scenarios do not work when the hub is disconnected from the outlet).

Step-by-step: Connection via Mi Home

Consider the process on the example of the most common model – Xiaomi Mijia Bluetooth Temperature and Humidity Sensor 2 (LYWSD03MMC).

  1. Open the Mi Home app and go to the Devices tab β†’ Add the device (+).
  2. Select the Sensors category β†’ Temperature and humidity. If the model is not listed, search by name (LYWSD03MMC).
  3. Click Add and follow the instructions on the screen. Make sure that the Bluetooth on the smartphone is on.
  4. Remove the battery from the thermometer for 5 seconds, then insert it back in. The sensor should flash with a blue LED - this is a signal of readiness for pairing.
  5. Wait until the process is complete (it can take up to 2 minutes) and after the successful connection, the sensor will appear in the list of devices.

If the thermometer is not determined:

Check that the distance between the sensor and the smartphone does not exceed 5 meters (no obstacles).

- Make sure there are no active smartphones VPN Firewalls that block Bluetooth connections.

- Try using another smartphone (especially if yours is running on iOS – some versions of iOS have Bluetooth issues) LE).

What if the Mi Home can’t see the sensor?
1. Reboot your smartphone and sensor (remove the battery for 10 seconds). 2. Remove the Mi Home app cache in your phone settings. 3. Try connecting via the Mi Fit app (sometimes helps with Bluetooth devices). 4. If nothing helps, check if the device is fake (the original sensors have a fake device). QR-code on the back that is scanned in Mi Home).

Once connected, it is recommended that:

Rename the sensor (e.g., "Bedroom Temperature")

- Set up notifications about going beyond the specified values (in the device menu),

Add the sensor widget to the Mi Home home screen for quick access.

Home Assistant integration: for advanced users

If you are using Home Assistant (HA), And if you connect a Xiaomi thermometer, you'll have a lot more automation:

  • πŸ“Š Calculate the changes in temperature and humidity for any period.
  • πŸ€– Configure complex scenarios with triggers over multiple sensors.
  • 🌐 Access data from anywhere in the world without being tied to Mi Home.

Integration will require:

  1. Install Home Assistant (on Raspberry Pi, NAS PC).
  2. Add Xiaomi integration BLE (for Bluetooth models) or Zigbee2MQTT (Zigbee-model).
  3. For LYWSD03MMC You may need a custom firmware (for example, ATC1441 or PVVX), Because the standard firmware does not transmit data to HA.

Example configuration for configuration.yaml (for Bluetooth model with custom firmware):

sensor:


- platform: mitemp_bt




mac: 'XX:XX:XX:XX:XX:XX' # MAC- address of your sensor




name: "Bedroom Thermometer"




force_update: true




median: 3




offset_temperature: -1.2 # Adjustment of readings (if sensor overstates)

⚠️ Attention: Firmware custom software on the sensor LYWSD03MMC Use only proven tools like Telink Flasher and follow the instructions of experienced users from forums (for example, Home Assistant Community).

For Zigbee models (e.g. Aqara) WSDCGQ11LM) simpler:

1. Connect the Aqara Hub to the Home Assistant via integration Zigbee2MQTT.

2. the sensor will automatically be identified in the Zigbee network and will appear in the list of devices HA.

πŸ’‘

If you've stopped detecting the sensor in Mi Home after you've firmware, but it works in Home Assistant, it's OK. You can get the original firmware back, but it's more complicated than installing custom.

Sync with Google Home and Apple HomeKit

Xiaomi thermometers do not support Google Home or Apple HomeKit, but there are workarounds:

PlatformMethod of integrationTools requiredLimitations
Google HomeThrough Mi Home. β†’ Google AssistantMi Home account, Google Home appBasic data (temperature/humidity) only, no history
Google HomeThrough Home Assistant β†’ Google AssistantHome Assistant, Google Assistant pluginFull functionality, but requires customization HA
Apple HomeKitThrough Home Assistant β†’ HomeKitHome Assistant, HomeKit pluginAll data is supported, but you need constant work. HA
Apple HomeKitAqara Hub (Zigbee models only)Aqara Hub, Aqara Home appIt only works with Aqara sensors (e.g., Aqara sensors, WSDCGQ11LM)

To sync with Google Home via Mi Home:

1. Open Mi Home, go to the device settings.

2.Tap Smart Home β†’ Google Assistant.

3. Log in to your Google account and select your sync devices.

4.Open Google Home, the sensor will appear in the list of devices (can take up to 10 minutes).

For Apple HomeKit, the only reliable way is to use Home Assistant with the HomeKit plugin:

1. In configuration.yaml add:

homekit:


- name: HomeKit Bridge




port: 51827




filter:




include_entities:




- sensor.temperature_spalnya




- sensor.humidity_spalnya

2. Open the Home app on iPhone, click Add Accessory and scan QR-code that generates the Home Assistant.

Automation Setup: Examples of Useful Scenarios

Now that the sensor is connected, you can set up the automation. Here are some practical examples.

  • πŸ”₯ Smart heater: If the temperature is below 20Β°C, switches on the Xiaomi Smartmi Heater. If above 23Β°C-- off.
  • πŸ’§ Humidity control: At humidity below 40%, the Xiaomi Mi Air Humidifier humidifier is turned on.
  • 🚨 Notification to the phone if the temperature in the nursery rises above 25Β°C (risk of overheating).
  • 🌿 Plant care: If the soil moisture (Xiaomi Flower Care sensor) is below 30% and the air humidity is above 60%, the fan is turned on.

In Mi Home, the scenarios are set up as follows:

1. Go to Profile. β†’ Automation β†’ Create a script.

2. Select condition: Temperature [sensor name] < 20Β°C.

3.Add Action: Device Control β†’ Heater β†’ Turn on.

4. Save the script.

In Home Assistant, the same scenario will look like this (automations.yaml file):

- alias: "Bedroom heating"


trigger:




platform: numeric_state




entity_id: sensor.temperature_spalnya




below: 20




action:




service: switch.turn_on




entity_id: switch.smartmi_heater

πŸ’‘

For stable operation of scenarios with thermometers Xiaomi is recommended to update the firmware of sensors and hubs at least 1 time in 6 months.Outdated versions of the software can lead to delays in data transmission.

If the scenario doesn't work:

Check that all devices in the same Mi Home region are available.

Make sure the hub (if used) has a stable power supply and internet connection.

For Bluetooth models, check the distance to the gateway (maximum 10 meters indoors).

Solving common problems

Even after a successful connection, users face typical problems, and here's how to solve them:

Problem.Possible causeDecision
Sensor doesn't update dataWeak signal. Bluetooth/ZigbeeMove the sensor closer to the hub or smartphone. for Zigbee, add a repeater (like the Aqara Wall Switch)
Temperature readings are inaccuratePoor sensor calibrationManually adjust the values in the device settings or in the Home Assistant (parameter) offset_temperature)
Sensor shuts off from Mi HomeFailure to sync with the cloudRemove and add the device again, and if the problem persists, change your account region to "Europe".
Google Home integration does not workThe device is not added to Google AssistantCheck the sync in Mi Home β†’ Profile β†’ Smart home. β†’ Google Assistant

If thermometer LYWSD03MMC Data transfers are stopped after Mi Home update:

1. Remove the device from the application.

2. Reset the sensor (hold the reset button for 10 seconds until it blinks 3 times).

3. Add again by selecting the "China" region (even if your account is in another region).

⚠️ If the sensor gives an error "Device not supported" after reset, it means that it is not supported. MAC-The solution is to contact support with proof of purchase or use the device only locally through Home Assistant.

For Zigbee models like Aqara, the typical problem is the loss of communication with the hub.

1. Reboot the hub (turn off power for 30 seconds).

2. Press the reset button on the sensor (usually hold 5 seconds).

3. wait for automatic reconnection (can take up to 5 minutes).

FAQ: Answers to Frequent Questions

Can I connect a Xiaomi thermometer without a gateway?
Yes, but with limitations. Bluetooth models (e.g, LYWSD03MMC) They can work directly with a smartphone, but remote access and automation will still require a gateway (such as Xiaomi Gateway) or Home Assistant. Zigbee models (such as Aqara) will not work without a hub.
How to reset the Xiaomi thermometer to factory settings?
For most models: 1. Remove the battery for 10 seconds. 2. Put the battery back in and hold the reset button (if any) immediately for 5-10 seconds until the indicator flashes. LYWSD03MMC: Press and hold the button on the back for 10 seconds (until the blue flashes 3 times).
Why does the sensor show the temperature with a delay?
The delay is due to the peculiarities of the protocol: - Bluetooth models update data every 10 minutes (in standard firmware, PVVX) Zigbee models update data every 5 to 30 seconds, but depend on the stability of the Zigbee network. Solution: use Zigbee models for critical scenarios or run a Bluetooth sensor with custom software.
Can I use a Xiaomi thermometer on the street?
No, most models are not designed for outdoor conditions (IP-rating IP44 Or lower, and can fail when water hits or extreme temperature changes. For the street, it is better to use specialized sensors (for example, the Aqara Outdoor Sensor, but it requires a separate hub).
How to export data from the thermometer to Excel?
There are several ways: 1. Mi Home: data cannot be exported, but you can manually copy the readings from the history. 2. Through Home Assistant: use the Recorder plugin to write data to the database, then export through the database. SQL InfluxDB. 3. Through the Xiaomi cloud: use the unofficial API (Python-miio for automatic data collection.