Xiaomi Smart Home from the Ground: A Complete Assembly Guide in 2021

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.

πŸ“Š What protocol do you plan to use for a smart home?
Only Wi-Fi.
ZigBee (via hub)
Bluetooth Mesh
I don't know what to choose.

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 modelProtocolMax. Number of devices.FeaturesPrice (2021)
Xiaomi Mi Smart Home Gateway 3ZigBee 1.232Built-in speaker, LED backlight, support for Mi Home~2 500 β‚½
Aqara Hub M2ZigBee 3.0128Backup power, HomeKit support, compatibility with Aqara sensors~4 000 β‚½
Xiaomi Mi Home Hub 2Wi-Fi / Bluetooth Mesh64Support 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:

  1. 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).
  2. Hub addition: Press + β†’ Add the device β†’ Gateway, plug the hub into the power and wait for the beep. Follow the instructions in the app.
  3. 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:

  1. Put the lamp in the socket.
  2. In Mi Home App, select + β†’ Lighting β†’ Yeelight.
  3. Connect to the temporary Wi-Fi lamp network (the name will be in yeelink-light-XXXX format).
  4. 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?
There is no direct delay feature in the Mi Home App, but it can be emulated: 1. Create two scenarios. 2. In the first scenario, when the sensor is triggered, turn on the lamp. 3. In the second scenario, through Automation. β†’ Timer set the lamp to turn off after the right time (e.g. 2 minutes) This is not ideal, but works in most cases.

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 deviceRecommended modelsWhy?Difficulty setting up
Robot vacuum cleanerXiaomi Mi Robot Vacuum-Mop 2 ProAutomatic cleaning, building a map of the roomMedium (calibration required)
Smart thermostatAqara Smart Radiator ThermostatBattery temperature control, saving on heatingHigh (requires installation)
Surveillance cameraXiaomi Mi Home Camera 360Β° 2KVideo monitoring, motion detection, two-way communicationLow (Plug & Play)
Smart lockXiaomi Smart Door LockRemote door opening, temporary keys for guestsHigh (lock replacement needed)
Water leak sensorAqara Water Leak SensorDetection of flooding, automatic water closureLow.

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:

  1. Install Home Assistant on a Raspberry Pi or virtual machine.
  2. Add Xiaomi Miio integration (for Wi-Fi devices) or ZigBee2MQTT (for ZigBee).
  3. 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).

FAQ: Frequent questions about Xiaomi’s smart home 2021

Can I use Xiaomi devices without a hub?
Yes, but only Wi-Fi devices (lamps, sockets, cameras) and ZigBee sensors (movement, door opening, temperature) require a hub to work, except for Bluetooth Mesh devices (such as Xiaomi Bluetooth Temperature and Humidity Sensor), but their functionality is limited.
Which Hub is Best for a Large House (10)+ room-room)?
For a large house recommended: Aqara Hub M2 β€” It supports up to 128 devices and has backup power: Multiple Xiaomi Gateway 3 (one per floor) for uniform coverage.Using signal repeaters (e.g., Xiaomi smart outlet on ZigBee). Also consider switching to Home Assistant with ZigBee Coordinator (e.g. Sonoff ZigBee 3.0) USB Dongle).
Can you connect Xiaomi smart home to Apple HomeKit?
Yes, but with reservations: Only Aqara devices with the Works with HomeKit logo (e.g., Aqara Hub) are officially supported. M2, Aqara Door/Window Xiaomi devices (without the Aqara logo) are not compatible with HomeKit directly.Solution: Use Home Assistant with the HomeKit Bridge plugin.
What if the sensor is dead and does not respond?
Procedure: Remove the battery from the sensor for 10 seconds, then insert it back. If the sensor doesn't appear in the app, remove it from the Mi Home App and add it again. For ZigBee sensors, check the distance to the hub (maximum 10-15 m without obstacles). If the battery is swollen, replace it (use only high-quality batteries, for example, Panasonic). CR2032).
How to reset the Xiaomi Gateway hub to factory settings?
Reset: Turn off the hub. Press the button on the hub and hold it, connect the power. Hold the button for 10-15 seconds until the yellow LED flashes. Release the button, the hub resets and is ready for the new setup. ⚠️ Warning: After resetting all connected devices will be unplugged from the hub, and they will have to be added again!