Xiaomi's smart home ecosystem is one of the most popular in the world, thanks to its availability, wide range of devices and deep integration between them. But how exactly does this system work? Why does the Yeelight light respond to the motion of the Mi Motion Sensor sensor, and the Mi Robot Vacuum robot vacuum run on schedule from the Mi Home app? The answer lies in a combination of hardware protocols, cloud services and software algorithms that synchronize the work of dozens of devices in real time.
In this article, weβll look at Xiaomiβs smart home architecture, from the physical layer (which radio frequencies are used to communicate) to the logical layer (how automation and scenarios are built), which protocols are supported, how devices communicate with each other and through the cloud, and how to configure the system from scratch, from connecting the first sensor to creating complex chains of reaction, with a special focus on compatibility issues, constraints and ways to circumvent them.
If youβre just planning to build a Xiaomi-based smart home, this article will help you avoid the typical mistakes you make when choosing your devices. If youβre already using the ecosystem, youβll find answers to why some scenarios are unstable and how to fix them.
1. Smart home architecture Xiaomi: what is the system
The Xiaomi Smart Home ecosystem is built on a modular principle, where each device performs its role, but they are all united by a common management.
Endpoints are physical gadgets that perform specific tasks: sensors (movements, door openings, temperatures), actuators (sockets, lamps, locks), multimedia devices (columns, televisions) and household appliances (vacuum cleaners, air conditioners).
- π Zigby devices (operate with Zigbee protocol, require hub)
- πΆ Wi-Fi devices (connect directly to the router)
- π‘ Bluetooth devices (usually low power sensors)
- π Cloud devices (managed through Xiaomi servers, such as robot vacuum cleaners)
2. Hubs and bridges are intermediate devices that provide communication between different types of gadgets. For example, Xiaomi Mi Smart Home Hub (or Aqara Hub) converts Zigbee signals into commands for the cloud, and Mi Wi-Fi Router can act as a bridge for some Bluetooth sensors.
3. the Software Platform includes:
- π± Mi Home Mobile Application (Main Management Interface)
- π₯οΈ Mi Home Web (Simplified Version for PC)
- π€ Voice assistants (Alice, Google Assistant, Siri via HomeKit)
- π Xiaomi Cloud Servers (Save scripts, Logs, and Settings)
Itβs important to understand that not all Xiaomi devices are compatible, for example, the Aqara sensor may not work with the Mi Smart Home Hub of the first version, and the Yeelight lamp does not support local control without the Internet.
2. Communication protocols: how devices communicate
Xiaomi uses four basic protocols for communication between devices, and the choice of protocol depends on the stability of the operation, the reaction speed and even the consumption of the sensor battery.
π‘ Zigbee (IEEE 802.15.4)
The main protocol for most sensors and actuators (outlets, switches) runs at 2.4 GHz, supports a mesh topology, where each device can relay the signal.
- π Low power consumption (sensors last for years from batteries)
- π Long range (up to 100 m in ideal conditions)
- π‘οΈ Interference protection (using channels other than Wi-Fi)
Disadvantages: requires a hub (gateway), not all devices support local management without the cloud.
πΆ Wi-Fi (IEEE 802.11 b/g/n)
Used for heavy devices: Yeelight lamps, Mi Smart Plug sockets, Mi Home Security Camera.
- π High data transfer speed (suitable for video)
- π No additional hub (connects directly to the router)
Cons: high power consumption (not suitable for battery sensors), dependence on the stability of Wi-Fi.
π΅ Bluetooth Low Energy (BLE)
It is used in compact sensors (for example, Mi Flora for plants) and some wearable devices.
- π Very low energy consumption
- π± Works without a hub (connects directly to the smartphone)
Limitations: small range (up to 10 m), unstable operation with a large number of devices.
π₯οΈ Cloud protocol (MQTT over TCP/IP)
All devices, even those that communicate over Zigbee or Wi-Fi, end up sending data to Xiaomi servers, which allows you to control your home from anywhere in the world, but creates an Internet dependency. Local control (without the cloud) is supported only by some devices, such as Yeelight lamps through the Yeelight App.
Comparison of protocols:
| Protocol | Type of device | Radio of action | Energy consumption | Hub required | Local control |
|---|---|---|---|---|---|
| Zigbee | Sensors, sockets, switches. | 100m | Very low. | Yes. | Partially. |
| Wi-Fi | Lamps, cameras, sockets | 50m | High. | No. | Yes. |
| Bluetooth | Sensors, wearables | 10m | Low. | No. | No. |
| Cloud (MQTT) | All devices. | Unlimited. | Depends on the device. | No. | No. |
A critical feature: devices on different protocols cannot communicate directly, for example, the Zigbee motion sensor will not be able to turn on a Wi-Fi lamp without a cloud intermediary or local script in the hub.
3 How devices interact: scenarios and automation
The main benefit of the smart home is the automation of routine activities, and in the Xiaomi ecosystem, this is done through scripts (Automations) and quick commands (Quick Actions), and let's see how this works in practice.
π Types of scenarios:
- π Time β start on schedule (for example, turn on the lights at 18:00)
- π± In the event - a reaction to the action of another device (for example, turn on the fan at high temperature)
- π Geolocation β activation when entering / leaving the zone (for example, turn off everything when leaving the house)
- ποΈ Voice command β integration with Alice, Google Assistant or Siri
π οΈ How to Create a Script in Mi Home:
- Open the Mi Home app β Go to the Automation tab.
- Press Add Add Add. β Choose the type of script.
- Specify a condition (for example, "If the motion sensor is triggered").
- Add an action (e.g., "Switch on the lamp").
- Save the script and test it out.
βοΈ Script verification before preservation
β οΈ Attention:
The scripts created in Mi Home run through Xiaomiβs cloud, which means that when the Internet is shut down, automation will cease to function. Local scenarios (without the cloud) require an Aqara hub with Home Assistant firmware or alternative platforms like Home Assistant.
π An example of a complex scenario:
Letβs say you want to open the door (Mi) Door/Window Sensor: Lights on (Yeelight), and if it's dark outside (Mi Light Sensor), the camera (Mi Home Camera) will start:
- Create a script with the condition "The door is open."
- Add the action "Lunch the lamp".
- Add the attached condition "If illumination is < 50 lux" β "Record the video on camera".
Why isn't the script working?
Hubs and gateways: why they are needed and how to choose
A hub is a central device that links gadgets on different protocols and manages their operation. Without a hub, most Zigbee devices (sensors, switches) simply wonβt work.
π§ The main functions of the hub:
- π‘ Converts Zigbee signals into commands for the cloud or local area network.
- π Provides interaction between devices (e.g., sensor) β plug).
- π‘οΈ Encrypts traffic between devices and the cloud.
- π It serves as a repeater to increase the range of the network.
π¦ Xiaomi's Popular Hubs:
| Model | Protocol | Max. Devices. | Features |
|---|---|---|---|
| Xiaomi Mi Smart Home Hub | Zigbee 3.0 | 128 | Support for local scenarios, built-in speaker |
| Aqara Hub M2 | Zigbee 3.0 | 128 | Works with HomeKit, Ethernet support |
| Xiaomi Mi Wi-Fi Router 4A | Wi-Fi + Bluetooth | 64 | Can control Bluetooth sensors without a hub |
β οΈ Attention:
Xiaomi and Aqara hubs are not always compatible, for example, the Aqara Temperature Sensor sensor may not connect to the first version of the Mi Smart Home Hub.
π How to choose a hub?
1.If you only have Zigbee devices, take the Mi Smart Home Hub or Aqara Hub. M2.
2.If you want to integrate with HomeKit, choose Aqara Hub M2.
3. If you want to control Bluetooth without an additional hub, Mi Wi-Fi Router will do. 4A.
4.For advanced automation (no cloud) consider hubs with Home Assistant support (e.g. Sonoff Zigbee 3.0) USB Dongle).
5. Cloud vs. Local Management: Pros and Cons
All Xiaomi devices can be divided into two categories according to the way they are managed:
βοΈ Cloud management β Teams run through Xiaomi servers, which allows you to manage your home from anywhere in the world, but has drawbacks:
- β‘ Internet dependency (when disabled scenarios do not work).
- π Delays in execution of commands (up to) 1-2 seconds).
- π Data leakage risks (information stored on Xiaomi servers).
π Local control: devices communicate directly through a hub or local area network:
- β‘ Instantaneous activation (delay) < 0.5 sec).
- π Data does not leave your network.
- π It works without the internet.
Disadvantages: limited functionality (not all devices support local commands).
π What devices support local management?
| Type of device | Local control | Examples of models |
|---|---|---|
| Zigbee sensors | Partially (via hub) | Mi Door/Window Sensor, Aqara Motion Sensor |
| Wi-Fi sockets | Yes (via local area network) | Mi Smart Plug, Yeelight Smart Plug |
| Smart lamps | Yes. LAN) | Yeelight LED, Mi LED Desk Lamp |
| Robot vacuum cleaners | No (only cloud) | Mi Robot Vacuum, Viomi V3 |
π‘
If local management is critical to you, consider alternative platforms like Home Assistant or OpenHAB. These let you integrate and manage Xiaomi devices without the cloud.
Typical problems and their solutions
Even in a well-functioning smart home system, there are periodic failures, and let's look at the most common problems and ways to fix them.
π¨ The device does not connect to the hub
Possible causes and solutions:
- π Battery discharged - replace the power supply (for example, CR2032 sensory).
- πΆ Weak signal β move the hub closer to the device or add a repeater (e.g. Xiaomi Zigbee Repeater).
- π Regions Disparity β in Mi Home go to Profile β Settings β Region and select China (many devices only work with it).
- π Outdated firmware β update the hub and device through the app.
β³ Delays in the execution of commands
If the lamp is delayed in 1-2 The problem is probably cloud management:
- π Switch to local control (if the device supports).
- π‘ Check the Internet speed (Ping server delay should be) < 100 ms).
- π§ Set up static. IP router.
π The device is periodically shut down
A common problem with Wi-Fi devices (sockets, lamps)
- πΆ Unstable Wi-Fi β switch router to 2.4GHz channel (many devices donβt run on 5GHz).
- β‘ Network congestion β limit the number of connected devices to one access point.
- π Overheating β provide ventilation for outlets and hubs.
π‘
If the problem is not solved by standard methods, try resetting the device to factory settings (usually hold the reset button). 5-10 seconds and reconnect it.
7. Integration with other systems: HomeKit, Google Home, Alice
Xiaomiβs ecosystem doesnβt exist in a vacuum β it can be integrated with other smart home platforms, which extends the management capabilities, but requires additional customization.
π Integration with Apple HomeKit
Not all Xiaomi devices officially support HomeKit, but there are workarounds:
- π Use the Aqara Hub M2 β It has built-in support for HomeKit.
- π₯οΈ Configure the bridge over Home Assistant with the Xiaomi Mi Home plugin.
- π± HomeBridge (requires a computer or Raspberry Pi to be permanently turned on).
π€ Integration with Google Assistant
Officially supported through the Mi Home app:
- Open Mi Home β Profile β Settings β Voice assistants.
- Select Google Assistant and log in.
- In the Google Home app, add Mi Home.
Restriction: only cloud commands are running (local management is not available).
π£οΈ Integration with Alice (Yandex)
Xiaomi doesnβt officially support Alice, but there are two ways to do it:
- Through Yandex IoT (only some devices, such as Yeelight, are supported).
- Through Home Assistant + Yandex Smart Home (requires customization).