Building a smart home based on the Xiaomi ecosystem in 2021 is not only a trend, but also a real opportunity to automate household processes, save on utility bills and improve home security. However, beginners are often frightened by the abundance of devices, communication protocols and the not always obvious logic of their interaction. This article will help you understand where to start assembling a Xiaomi smart home, which devices to choose first, how to connect and configure them correctly, and how to avoid typical integration errors.
In 2021, the Mi Home ecosystem (later renamed the Mi Home App with Home Assistant support) offered a wide range of devices, from budget sensors to premium robot vacuum cleaners. But the key point is that not all gadgets from that period are compatible with each other out of the box. For example, devices based on ZigBee 3.0 (like Xiaomi Aqara) require a separate hub, and to work with Wi-Fi devices, we will discuss how to build a system with these nuances, so that it is stable, scalable and does not require constant improvements.
It's important to understand that a smart home is not a collection of disparate gadgets, but a system with clear logic. If you buy a motion sensor but don't write a script for it (for example, turning on the light when you detect movement), it will not be useful. So in this article, we focus on the practical side: which devices to buy first, how to connect them together, and how to set up automation so that it works without failure.
1.The main components of the Xiaomi smart home in 2021: what to buy
In 2021, Xiaomiβs ecosystem offered devices on three major communication protocols: Wi-Fi, ZigBee, and Bluetooth Mesh. The choice of protocol determines which hub you will need (or not need at all).
- π‘ Xiaomi Mi Smart Home Gateway 3 (for ZigBee devices) or Aqara Hub M2 (A more advanced version with ZigBee 3.0 support and backup power. Without the hub, most sensors and switches simply won't work.
- π‘ Smart lamps or lights: Xiaomi Yeelight LED (Wi-Fi) or Aqara Smart Bulb (ZigBee) Start with 2-3 lamps in commonly used rooms (e.g. hallway and bedroom).
- πͺ Opening sensor of doors / windows: Xiaomi Door/Window Sensor 2 (ZigBee) or Aqara Door and Window Sensor, which will help track airing or unauthorized access.
- π€ Motion Sensor: Xiaomi Motion Sensor 2 (ZigBee) for lighting automation or Aqara FP1 (HomeKit support if you need Apple integration).
- π Smart socket: Xiaomi Smart Plug (Wi-Fi) for remote control of household appliances (for example, a kettle or heater).
If you have a budget, start with a hub and 2-3 sensors. for example, a combination of Xiaomi Gateway 3. + motion-sensor + The door-opener will automate the hallway lighting and control the front door, and later the system can be expanded by adding thermostats, cameras, or robot vacuum cleaners.
β οΈ Note: Xiaomi and Aqara devices on ZigBee are protocol-incompatible! If you choose the Xiaomi Gateway hub, Aqara sensors won't connect to it (and vice versa.
2.Hub pick: Xiaomi Gateway vs Aqara Hub vs Mi Home Hub 2
The hub is the brain of your smart home system. In 2021, Xiaomi had three main hub options, each suitable for different tasks:
| Hub model | Protocol | Max. Number of devices. | Features | Price (2021) |
|---|---|---|---|---|
| Xiaomi Mi Smart Home Gateway 3 | ZigBee 1.2 | 32 | Built-in speaker, LED backlight, support for Mi Home | ~2 500 β½ |
| Aqara Hub M2 | ZigBee 3.0 | 128 | Backup power, HomeKit support, compatibility with Aqara sensors | ~4 000 β½ |
| Xiaomi Mi Home Hub 2 | Wi-Fi / Bluetooth Mesh | 64 | Support for Matter (Perspectively) without ZigBee | ~3 500 β½ |
Which hub should I choose?
- If you plan to use only Wi-Fi devices (lamps, sockets, cameras), then you donβt need a hub at all.
- Xiaomi Gateway 3 is suitable for sensors (ZigBee), but note that it only supports Xiaomi devices (not Aqara).
- Aqara Hub M2 β The best choice if you want to scale the system.It supports ZigBee 3.0, has a backup battery and is compatible with HomeKit.
- The Mi Home Hub 2 is an experimental option for those looking to try Matter, but in 2021, its support was limited.
Important: One hub can manage a limited number of devices (see table).+ sensors, you will need multiple hubs or switch to professional systems (for example, Home Assistant with ZigBee coordinator).
π‘
If you choose between the Xiaomi Gateway and the Aqara Hub, look out for sensors: Aqara has better protection against false positives (e.g., Aqara motion sensor). FP1 ignores pets).
3. Step-by-step instruction: how to connect and configure devices
After buying the hub and devices, they need to be connected to the system. Consider the process with the example of Xiaomi Mi Smart Home Gateway 3 and the door opening sensor:
- Install the app: Download the Mi Home App (for Android or iOS) and sign up. Select China Mainland region (in 2021, this gave access to all features, including voice assistant Xiao). AI).
- Hub addition: Press + β Add the device β Gateway, plug the hub into the power and wait for the beep. Follow the instructions in the app.
- Sensor connection: Open the sensor cover and remove the plastic pad (activates the battery). + β Add the device β Door/Window Sensor. Bring the sensor to the hub (at a distance to the 1 (m) and press the button on the sensor before the audible signal.
Set up automation
Profile β Automation β Create
For Wi-Fi devices (such as the Yeelight smart bulb), the process is simpler:
- Put the lamp in the socket.
- In Mi Home App, select + β Lighting β Yeelight.
- Connect to the temporary Wi-Fi lamp network (the name will be in yeelink-light-XXXX format).
- Go back to the app and select your home Wi-Fi network.
Make sure the hub is plugged into the outlet and flashes blue|Check that the smartphone is connected to the 2.4 GHz network|Remove protective films from sensor batteries|Be within 1 meter radius of the hub when adding the device-->
β οΈ Note: In 2021, many users faced a problem when Xiaomi devices were not connected to the hub due to an incorrectly selected region in the app. If you donβt add a sensor, try changing your region to China Mainland (even if youβre not in China) or use alternative software like Home Assistant.
4. Automation scenarios: examples for beginners
Without scripts, a smart home is just a set of sensors and lights. Consider 5 simple yet useful automations that you can set up in the Mi Home App:
- π "Moderate Awakening: Condition: Time 07:00 Action: Turn on the Yeelight lamp at 30% brightness, gradually increasing to 100% in 10 minutes.
- πͺ "Security: front door open": Condition: sensor Door/Window Sensor activates (door open) Action: send a push notification to your phone and turn on the Xiaomi Mi Home Camera.
- π‘ "Motion lighting": Condition: Motion Sensor detects motion. Action: turn on the lamp for 2 minutes (if the light level is below 50 lux).
- βοΈ "Timer ventilation": Condition: sensor Door/Window Sensor is more open than open. 15 Action: Send a notification "Close the window - draft!" and turn on the heater if the temperature is lower 18Β°C.
- π "Power savings": Condition: Xiaomi Smart Plug smart outlet consumes more than 1,000 watts in an hour.Action: send a "High consumption! may have forgotten to turn off the heater".
To create a script in Mi Home App go to Automation β Create β Select a condition (e.g., "Motion Sensor Acted") and an action (e.g., "Lun the lamp"). You can combine several conditions (e.g., "Motion Sensor Acted"). + post-sunset").
How do you make a delayed script?
The Mi Home Appβs 2021 limitation is no support for complex logic (e.g., both and/or for multiple conditions).If you want advanced scenarios, consider Home Assistant or Node-RED.
5. Common Mistakes and How to Avoid Them
When building a Xiaomi-based smart home in 2021, users often faced typical problems, including the most common ones and ways to solve them:
- π "Devices disconnect from hub": Reason: ZigBee weak signal (maximum distance between hub and sensor - 10-15 m without obstacles).Solution: Use signal repeaters (such as Xiaomi smart sockets on ZigBee) or install an additional hub.
- πΆ "Sensors are not added to the app": Reason 1: Wrong region in the Mi Home App (e.g. Russia instead of China Mainland).Cause 2: Sensor battery is discharged (check the voltage with the multimeter - must be at least 2.8 V). Change region or replace battery (most sensors use battery) CR2032).
- β±οΈ "Delays in scripting": Reason: Hub overloaded (over 30 devices) or Internet problems (for cloud scripting).Solution: Break devices into multiple hubs or use local scripting (for example, through Home Assistant).
- π "Smart home stopped working after upgrade": Reason: Xiaomi in 2021 often released unstable firmware for hubs.Solution: Reverse to the previous version of the software via Mi Home App β Hub settings β Update β Recoil.
β οΈ Note: In 2021, Xiaomi began blocking devices purchased from unofficial stores (e.g., AliExpress without certification for China).If your sensor suddenly stopped working, check its serial number in the app - it may have been blacklisted. Buy devices only from official sellers or use alternative firmware (for example, buy them from other vendors, ZigBee2MQTT).
Another common problem is that devices are conflicting across protocols, for example, if you have both Wi-Fi lamps and ZigBee sensors, the scripts between them will only work through the Mi Home cloud, which increases latency. Solution: Try to use devices on the same protocol (like just ZigBee).
System Expansion: Which Devices to Add Later
Once you build the basic kit, you can expand the smart home by adding more sophisticated devices, and this is what happened in 2021:
| Type of device | Recommended models | Why? | Difficulty setting up |
|---|---|---|---|
| Robot vacuum cleaner | Xiaomi Mi Robot Vacuum-Mop 2 Pro | Automatic cleaning, building a map of the room | Medium (calibration required) |
| Smart thermostat | Aqara Smart Radiator Thermostat | Battery temperature control, saving on heating | High (requires installation) |
| Surveillance camera | Xiaomi Mi Home Camera 360Β° 2K | Video monitoring, motion detection, two-way communication | Low (Plug & Play) |
| Smart lock | Xiaomi Smart Door Lock | Remote door opening, temporary keys for guests | High (lock replacement needed) |
| Water leak sensor | Aqara Water Leak Sensor | Detection of flooding, automatic water closure | Low. |
When adding new devices, consider:
- π Compatibility: Make sure the new device is supported by your hub.For example, Xiaomi Smart Door Lock requires Xiaomi Gateway 3 or Aqara Hub.
- π‘ Network coverage: If you add sensors to remote rooms, check the signal strength of ZigBee (you can use the ZigBee Mapper app).
- π° Budget: Some devices (such as smart locks) require professional installation, which increases the cost.
One of the most useful extensions is the integration with voice assistants, and in 2021 Xiaomi supported:
- Alice (Yandex) β through the skill Mi Home.
- Google Assistant β via Mi Home App (you need to link accounts).
- Siri (Apple HomeKit) β Aqara devices with HomeKit support.
π‘
Before buying a new device, check its support in your region! for example, the Xiaomi Smart Door Lock was not officially sold in Russia in 2021 and it required changing the region in the app to China Mainland to work.
7. Mi Home: Home Assistant and other platforms
The Mi Home App is convenient for beginners, but has limitations:
- All scenarios work through the cloud (delays of up to 2-5 seconds).
- No support for complex logic (e.g. IF the motion sensor and temperature is below 20)Β°C...).
- A limited number of devices per hub.
If you want a more flexible system, consider alternatives:
- π Home Assistant: Local (without cloud) Support for ZigBee, Wi-Fi, Bluetooth and other protocols. Complex scripts in the language YAML. Cons: Requires customization skills (requires a Raspberry Pi or server).
- π ZigBee2MQTT: Allows you to connect Xiaomi ZigBee devices to Home Assistant or other systems. Solves the problem of locking devices (see section 5).
- π Node-RED: Visual Editor for Complex Automation Integration with Home Assistant, Mi Home and Other Services.
Example of setting up Home Assistant to work with Xiaomi:
- Install Home Assistant on a Raspberry Pi or virtual machine.
- Add Xiaomi Miio integration (for Wi-Fi devices) or ZigBee2MQTT (for ZigBee).
- Configure automation in configuration.yaml: automation: - alias: "Enable light when moving" trigger: platform: state entity_id: binary_sensor.motion_sensor_158d0001234567 to: "on" action: service: light.turn_on entity_id: light.yeelight_12345678
Switching to Home Assistant is justified if:
- You have over 50 devices.
- You need scenarios with delays, conditions, and cycles.
- You want to integrate devices from different brands (e.g. Xiaomi) + Philips Hue).