How Xiaomi Smart Home Works: Devices, Protocols and Step-by-Step Customization

What is Xiaomi Smart Home and Why You Need It

Xiaomi’s smart home ecosystem is a set of devices that automate everyday processes, from lighting control to security control. Unlike competitors like Apple’s HomeKit or Google Home, Xiaomi’s solutions stand out for their affordable price and wide range of sensors. But how do these devices interact? And why do some users have trouble setting up?

The main principle of the system is centralized management through the Mi Home app (or Aqara Home for Aqara devices). All sensors and actuators (lamps, sockets, cameras) connect to the hub, a central module that processes commands and synchronizes data with the cloud. Without the hub, most Xiaomi devices will not be able to work in automatic scenarios, even if they support Wi-Fi.

It's important to understand that Xiaomi's smart home is not just a collection of gadgets, but an ecosystem with closed protocols and compatibility restrictions. MiJia sensors, for example, are not always friends with Aqara hubs, and some devices require a mandatory connection to a Chinese server to work properly.

System architecture: how devices communicate

Xiaomi’s smart home is based on three key components:

  • πŸ“‘ Hub (gateway) - a central device that connects sensors and actuators. Popular models: Xiaomi Mi Smart Home Gateway 3, Aqara Hub M2.
  • πŸ”Œ Zigbee devices – motion sensors, door openings, temperature, etc. Operate at 2.4 GHz and connect only to the hub.
  • 🌐 Xiaomi cloud, which is a server that sends commands from your phone and synchronizes scripts. Without the Internet, some of the functions will not be available.

The main communication protocol is Zigbee 3.0 (for sensors) and Wi-Fi (for lamps, sockets, cameras). Zigbee is more energy efficient and stable than Wi-Fi, but has a limit on the number of connected devices: one Gateway 3 hub supports up to 128 devices, but in practice, if you exceed 50-60 devices, lags begin.

Fun fact: Xiaomi uses a proprietary protocol over Zigbee, so other brands’ sensors (like Philips Hue) won’t work with Xiaomi’s hub without additional crutches like Home Assistant, which are both plus (stability) and minus (limited compatibility).

πŸ“Š What Smart Home Hub Are You Using?
Xiaomi Gateway 3
Aqara Hub M2
Another Xiaomi/Aqara hub
I don't use the hub.
Another brand

Hubs Comparison: Xiaomi vs Aqara

Xiaomi’s hubs and its sub-brand Aqara are similar in appearance, but have critical differences.

ParameterXiaomi Mi Smart Home Gateway 3Aqara Hub M2
Support for ZigbeeYes (up to 128 devices)Yes (up to 128 devices, but more stable)
Built-in speakerNo.Yes (85dB siren)
Support for MatterNo.Partially (through updates)
Working without the InternetLimited (basic scenarios only)Yes (full local automation)
Price (2026)~2 500 β‚½~4 000 β‚½

If you want maximum autonomy, go with the Aqara Hub M2, which supports local scenarios without the cloud, for example, when the motion sensor is triggered, the lamp will light up even if the Internet is off, while Gateway 3 will just freeze.

But Aqara has a drawback: some Xiaomi devices (such as Mi Temperature & Humidity Sensor 2) may not display properly in the Aqara Home app.

πŸ’‘

If you plan to use more than 30 devices, buy two hubs and spread them around different rooms, which will reduce the latency of the Zigbee network.

Step-by-step setting up Xiaomi smart home

In order for the system to work, you need:

  1. Install a hub and connect it to the network via Mi Home or Aqara Home.
  2. Add devices to the app (via scanning) QR-code-in).
  3. Set up automation (scenarios) in the Automation β†’ Create section.

Let’s look at the Xiaomi Mi Smart Home Gateway 3.

  1. Connect the hub to the outlet and wait for the blue flashing of the indicator.
  2. In the Mi Home app, click + β†’ Add the device β†’ Gateway.
  3. Choose China mainland (important! some devices won't be added when choosing Russia).
  4. Scan it. QR-hub-code.
  5. Connect the hub to Wi-Fi (2.4GHz only!).

Selected the "China mainland" region in Mi Home|

Connected the hub to the outlet next to the router |

Shut down the VPN on your phone |

Make sure the router supports 2.4 GHz|-->

Once you add a hub, you can connect sensors, for example, for the Mi Door/Window Sensor:

  1. Remove the protective film from the sensor battery.
  2. In the application, click + β†’ Add the device β†’ Opening Sensor.
  3. Hold the phone to the sensor and wait for the beep.
What to do if the device is not added?
1. Reboot the hub (pull out the plug on the fork) 10 seconds). 2. Check that the Mi Home has selected the region "China mainland". 3. Make sure the sensor is not farther away. 1 meter from the hub when added. 4. Try resetting the device (usually by pressing the button on the device). 5-10 seconds). 5. If nothing helps, check if the device is fake (the original ones are fake). QR-serial-numbered).

Automation Scenarios: Examples and Limitations

The main advantage of a smart home is automatic scripting.

  • πŸ’‘ Lighting: Turn on the Yeelight lamp when the motion sensor is triggered.
  • πŸšͺ Security: Send a notification to your phone if the door opening sensor is triggered in your absence.
  • 🌑️ Climate: Turn on the heater if the temperature has dropped below 20Β°C.

But there are nuances:

⚠️ Note: Mi Home scripts only work if the phone and hub are connected to the Internet. Local automation requires Aqara Hub or third-party software like Home Assistant.

Example of setting the scenario "Light on while moving":

  1. Open Mi Home β†’ Automation β†’ Create β†’ If
  2. Select the Motion Sensor β†’ Motion detected.
  3. Click Add Action β†’ Smart Lamp β†’ Enable.
  4. Save the script.

Xiaomi's limitations:

  • ⏱️ No way to set a light-off delay (e.g., β€œturn off 5 minutes after movementΒ»).
  • πŸ”„ No cycles or conditional operators (such as if the temperature is >25Β°C And humidity. <40%Β»).
  • πŸ“΅ Some devices (such as Mi Robot Vacuum) do not support automation via Mi Home.

πŸ’‘

For complex scenarios (with delays, conditions, cycles) use Home Assistant or Node-RED. Mi Home is only suitable for basic automation.

Problems and solutions: why Xiaomi smart home is glitzy

Frequent complaints from users:

  1. Devices are disconnected from the hub – usually due to interference at 2.4 GHz. Solution: transfer the router to channel 1, 6 or 11 manually.
  2. Delays in operation – if there are more than 40 devices on the network, split them into two hubs.
  3. Notifications are not working – check if Android has blocked background activity of the Mi Home app.

Another common problem is that devices don't update, such as the Mi Temperature Sensor, which can hang on the firmware for years in 2018, because Xiaomi often suspends support for older devices.

  • πŸ”„ Check the updates in Mi Home β†’ Device profile β†’ Three points. β†’ Firmware update.
  • 🌍 Change the region in Mi Home to China mainland – sometimes updates appear only there.
  • πŸ› οΈ Use alternative firmware (for example, Xiaomi Gateway has custom firmware with Matter support).

⚠️ Note: If you use Xiaomi Home Assistant (not to be confused with Home Assistant), then after changing the region to Mi Home, all devices will have to be added again!

Mi Home: Home Assistant and other systems

The Mi Home app is convenient for beginners, but power users often migrate to Home Assistant, an open platform for smart homes.

  • πŸ”§ Full control of devices (including on-premises scenarios without the cloud).
  • πŸ”„ Integration with other brands (Philips Hue, Sonoff, Shelly).
  • πŸ“Š Advanced analytics (temperature charts, logs of operation).

How to connect Xiaomi to Home Assistant:

  1. Install Home Assistant on a Raspberry Pi or other server.
  2. Add Xiaomi Miio integration through Settings β†’ Devices and Services β†’ Add integration.
  3. Enter the device token (it can be obtained through the Mi Home Token Extractor app).

Cons of Home Assistant:

  • πŸ’» Technical skills required to set up.
  • πŸ•’ You need to constantly maintain the system in an up-to-date state (updates, backups).

Other alternatives:

  • 🍎 Apple HomeKit – if you have an iPhone, but compatibility with Xiaomi is limited (needs a hub Aqara Hub) M2 home-kit).
  • πŸ€– Google Home – only supports individual Xiaomi devices (e.g. Yeelight lamps).

FAQ: Answers to Frequent Questions

Can you use a Xiaomi smart home without the internet?
Partially. Aqara hubs support local scenarios, but Xiaomi Gateway 3 requires the Internet for most automation. Without a network, you can only manually turn devices on/off through an app on the local network.
Why are Xiaomi sensors showing incorrect data?
The reasons may be different: πŸ“Ά Interference from other devices on 2.4 GHz (Wi-Fi, microwaves). πŸ”‹ A discharged battery in the sensor (even if the indicator shows charge). πŸ“‘ Too long distance to the hub (maximum) 10-15 Solution: reset the hub, replace the battery in the sensor and check its location.
How to transfer a smart home to another phone?
Mi Home doesn’t have an export/import settings function. To transfer: On your old phone, open Profile β†’ Settings β†’ Account and Security β†’ Sign out. On your new phone, log in to the same Xiaomi account, all devices and scripts will be automatically loaded. If you need to transfer control to another person, use Shared Access in your device profile.
Which Xiaomi devices are better not to buy?
Some gadgets have a bad reputation: 🚫 Xiaomi Mi Smart Clock – often hits the alarm clock. 🚫 Mi Air Purifier 2 (old version) - weak engine and noisy. 🚫 Mi Bedside Lamp 2 – overheats when working for a long time. 4PDA ordredit.
Can I connect a Xiaomi camera to a smart home?
Yes, but with reservations: πŸ“Ή Mi Home Security Cameras can be added to Mi Home, but they are not involved in automation scenarios. πŸ” For facial recognition and integration with other devices, you need Home Assistant or Synology Surveillance Station. Note: Xiaomi cameras often send video to servers in China, even if you choose the region β€œRussiaΒ».