How to connect the Xiaomi Mi 2 temperature and humidity sensor to the gateway

Smart home integration starts small, and climate sensors are the perfect start. Xiaomi Mi Temperature and Humidity Sensor 2 (often labeled LYWSD03MMC) is one of the most popular devices in the Mi Home ecosystem due to its compactness and accuracy. However, in order for the gadget to start transmitting data to the Internet and responding to environmental changes, it needs to be properly β€œfriended” with the control center – the gateway.

The connection process is often difficult for beginners because of the Bluetooth Low Energy protocol. Unlike Wi-Fi routers, you don’t need to enter long passwords, but it’s critical to follow the sequence of actions and distance between devices. Properly configured will allow you not only to see the current temperature, but also to run automatic scenarios, such as turning on the humidifier when the humidity drops below 40%.

In this article, we will take a detailed look at the whole way from unpacking to graphing on a smartphone screen, and we will touch on the nuances of choosing a gateway, since not all models support direct connection without intermediaries, and consider how to solve common connection errors. Ready to work will take only a few minutes if you know where to click.

Preparation of equipment and selection of a lock

Before you start pairing, you need to make sure that you have compatible hardware. The Xiaomi Mi 2 sensor is Bluetooth 5.0, which means it needs an intermediary to transmit data to the Internet. It doesn't have a direct connection to the Wi-Fi router. The main control element is a gateway that can be built into other devices or exist as a separate module.

The most common gateway options are Xiaomi Smart Speaker smart speakers, gateway-enabled Yeelight bulbs, and Xiaomi Gateway dedicated hubs (the Bluetooth-enabled version). If you have a Mi TV with Bluetooth remote, it can also act as a temporary gateway for initial setup, but you need a stationary hub to work constantly.

  • πŸ“± Smartphone with Mi Home app installed and Bluetooth enabled.
  • πŸ”Œ A working gateway (Hub) connected to a 2.2 GHz Wi-Fi network.
  • πŸ”‹ Xiaomi Mi 2 sensor with battery-on-battery insulator (or new battery) CR2032).

⚠️ Warning: Make sure your gateway supports Bluetooth Mesh or regular Bluetooth.Older versions of Zigbee gateways without a Bluetooth module won't be able to see this sensor.

It is also important to check the Mi Home version, and to work properly with new devices, it is recommended to use the international version or the Chinese version, depending on the region chosen when registering an account, the account region and the gateway region must match, otherwise the devices will not see each other online.

πŸ“Š What gateway do you plan to use?
Separate Xiaomi Gateway
Xiaomi's smart speaker
Yeelight lamp
I don't have a lock yet.

Sensor reset and pairing mode

The first physical action after removing the device from the package is to activate the search mode. There's a small button on the back of the Xiaomi Mi 2 sensor, which is responsible for turning on, off and resetting the settings, and if the sensor is new and the insulator on the battery is not yet removed, it needs to be removed.

It takes a short press to get you to pairing mode. Don't hold the button for long so you don't reset the device to factory settings, although it's not critical for a new gadget. The indicator of a successful transition to search mode is the flashing Mi logo on the e-ink display. If the screen doesn't catch fire, check the polarity of the battery installation.

What to do if the screen does not flash?
If you press a button, the screen doesn't respond, it's possible that the battery is dead or not installed correctly. CR2032. Also make sure you press the button, not just touch the body. 5 seconds for a full reset, then repeat a short press."> After activating the search mode, you have a limited time – usually around 2-3 So if you take a long time to add the device to the app, the sensor goes into sleep mode to save energy, and you have to do it again, and the screen in this mode consumes minimal energy, but the constant blinking accelerates the discharge. The process of adding a device to the Xiaomi ecosystem is standardized, but requires care at every stage. Open the Mi Home app and make sure the right region is selected in the top right corner Β«+Β» In the upper right corner of the main screen to find new devices, the app will automatically start scanning the surrounding space, and if the sensor is in pairing mode and next to the phone, it should appear in the Finded Devices list. If the automatic search did not give results, you can use manual search by category or exact model name. β˜‘οΈ Checklist Connection Turn Bluetooth on your phone Bring the phone to the sensor (up to) 10 (cm) Press Β«+Β» in the Mi Home app Select the device found Assign a room: 0 / 5 The sequence of actions is as follows: Bring the smartphone as close to the sensor as possible (literally at a distance). 5-10 Click on the icon of the device found in the list. Confirm the pairing by pressing Connect or Connect. Select the gateway to which the sensor will be attached (if there are several of them). Assign the device to a specific room for easy control. The connection process may require confirmation of Bluetooth access rights and geolocation. Allow all system requests, otherwise a stable operation of the smart home is impossible. Once the sensor is successfully added, the logo will stop flashing, and the current temperature and humidity readings will appear. The main value of the smart sensor is not in displaying numbers, but in the ability to automate the climate in the house. The Mi Home app turns the sensor into a single set of the device. For example, you can set the condition: "If the humidity drops below 35%, turn on a smart socket with a humidifier." Or vice versa: "If the temperature is above 26.Β°C, send a notification to the phone and turn on the air conditioner. The logic can be anything limited only by the user's imagination and the set of available equipment.Β°C Enable heater Humidity Rises above 70% Send push notification Temperature above 28Β°C Include air conditioning Humidity Below 40% Include humidifier ⚠️ Warning: When creating heater scenarios, always use double confirmation or timers to avoid overheating the room in the event of a sensor failure. To set up, go to the device profile, select Smart or Automation, and create a new scenario. And you can combine the conditions in terms of time, the state of the other sensors, and the user's actions, and you can create a truly comfortable environment without constant manual intervention. Despite the simplicity of the technology, users often have difficulty in starting up the first time, and the most common problem is that the phone does not see the sensor. This is almost always due to the fact that Bluetooth on a smartphone is unstable or the application does not have the necessary permissions in the system. Android/iOS. Another common error is β€œDevice is busy” or β€œCan’t connect to the server.” This may indicate overload of the gateway channel or problems with the Internet connection of the hub itself. Diagnostic methods: πŸ”„ Reboot the gateway, disconnecting it from power for 10 seconds. πŸ“‘ Go with your phone close to the gateway during setup. πŸ”‹ Replace the battery in the sensor with a known good one. πŸ“± Clear the Mi Home app cache in your phone's settings. If nothing helps, try removing the device from the list (if there is one) and reset with a button on the back. Sometimes it helps to temporarily switch the region in the application to β€œChina” for initial binding, after which you can return to your region (although this does not work with all models of gateways (LYWSD03MMC) It has an electronic ink (E-Ink) display that only consumes energy when it updates data, and it delivers record-breaking autonomy of up to one year of battery life. CR2032. The screen updates once a minute, which is the optimal balance between the relevance of the information and the battery life.Β°C to within 0.1Β°C, and humidity is between 0 and 99 percent, and it's a high-precision sensor from the Swiss company Sensirion, which is considered one of the best in its class, but it's worth remembering that self-heating electronics can make a small error in temperature measurements. πŸ’‘For maximum accuracy of temperature measurements, place the sensor at a distance of at least 1 meter from heating appliances and sources of direct sunlight. IP00), Therefore, it can not be used in the bathroom or on the street without additional sealing. 43Γ—43Γ—13 mm allow you to quietly place the gadget on a shelf, table or fix it on the wall using double-sided tape. Frequently Asked Questions (FAQ) Can you connect the sensor directly to the phone without a gateway? Technically, the phone can see the sensor over Bluetooth, but full operation in the smart home system (remote access, scenarios, history) requires a gateway. Without a gateway, you will only see data when you are near the sensor. What is the radius of the sensor? In open space, the radius of Bluetooth 5.0 is up to 10 meters. In an apartment with concrete walls, the sensor can not heat from the external source and the sensor is effective from the 5-7. Give it 15-20 minutes to acclimatize after installation and make sure it's not in direct sunlight or above the battery.Is this sensor compatible with Home Assistant?Yes, the LYWSD03MMC model is well supported in Home Assistant, but that often requires flashing the sensor through the web interface (requiring a temporary PC connection) to open up data without Xiaomi's cloud.