Xiaomi Smart Home: How the System, Devices and Setup Works

Xiaomi Smart Home is one of the most popular automation platforms in the world, connecting hundreds of devices, from light bulbs and sockets to robot vacuum cleaners and security sensors. But how does this system work? Why do some devices control through Mi Home and others require Mi Home Automation or Aqara? And most importantly, how do all these gadgets interact to create a truly smart home?

In this article, weโ€™ll look at how Xiaomiโ€™s ecosystem works, from communication protocols (Zigbee, Wi-Fi, Bluetooth Mesh) to the logic of automation scenarios, which devices are hubs, how they handle commands, and why the system sometimes works with delays, and why some Xiaomi devices are not compatible with each other, even if they are in the same ecosystem.

If you are just planning to build a smart home or have already faced problems in its operation, here you will find answers to key questions: from the choice of equipment to the intricacies of settings.

Xiaomi Smart Home Architecture: How Devices Talk to Each Other

At the heart of the Xiaomi Smart Home ecosystem is a modular architecture where each device performs its role, but a central hub is required to function properly. Without it, most sensors and actuators will not be able to communicate with each other or with the Xiaomi cloud.

The main communication protocols that Xiaomi uses are:

  • ๐Ÿ“ก Wi-Fi for devices that require high data rates (cameras, robot vacuum cleaners, some outlets) work directly with the router and the cloud.
  • ๐Ÿ”— Zigbee is a low-energy protocol for sensors (movement, door opening), lamps and switches. Requires a hub (for example, Xiaomi Mi Smart Home Gateway or Aqara Hub).
  • ๐Ÿ”„ Bluetooth Mesh โ€“ used in Mijia devices (e.g. temperature sensors) LYWSD03MMC). Creates a self-organizing network without a hub, but with a limited range.
  • ๐Ÿ“ถ RF 433 MHz is an outdated protocol for some older devices (such as Mi Remote Control switches.

Itโ€™s important to understand that not all Xiaomi devices are compatible, such as Aqara sensors (a subsidiary of Xiaomi) only work with their Aqara Hub, not the standard Mi Gateway, due to differences in firmware and protocols.

๐Ÿ“Š What protocol do you use in your smart home?
Wi-Fi
Zigbee
Bluetooth Mesh
I don't know/I don't use/

2. Central hub (gateway): why it is needed and how it works

The hub (or gateway) is the brain of Xiaomiโ€™s smart home, and it performs three key functions:

  1. Communication between devices via Zigbee (if the hub supports this protocol).
  2. Local scripting (without the Xiaomi cloud).
  3. Integration with the cloud for remote management via Mi Home.

The most popular hubs in the ecosystem:

Hub modelSupported protocolsFeaturesPrice (roughly)
Xiaomi Mi Smart Home Gateway 3Zigbee 3.0, Wi-Fi, BluetoothBuilt-in speaker, LED backlight, support for up to 128 devices~3 500 โ‚ฝ
Aqara Hub M2Zigbee 3.0, Wi-Fi, EthernetWorks with Aqara sensors, HomeKit support, backup power~5 000 โ‚ฝ
Xiaomi Mi Home Security Gateway 2Zigbee, Wi-FiBuilt-in siren, support for security sensors~4 200 โ‚ฝ

โš ๏ธ Note: If you use the Xiaomi Mi Gateway 1 hub (the first version), it runs on outdated firmware and does not support many new devices.

The hub connects to your router via Wi-Fi or Ethernet (depending on the model) and syncs with the Xiaomi cloud. Local scenarios (for example, โ€œif the motion sensor is triggered, turn on the lightsโ€) are performed even without the Internet, but for remote control via the Mi Home application, a connection to Xiaomi servers is mandatory.

Make sure the hub supports your devices (Zigbee/Aqara)

Check compatibility with your router (2.4 GHz or 5 GHz)

Pay attention to the availability of backup power (for security systems)

View reviews about firmware stability-->

3. Xiaomi Cloud vs Local Management: Where Data is Stored

One of the most common questions is, "Does Xiaomi's smart home work without the Internet?" Part of the answer is, let's look at how functions are distributed between the cloud and the LAN.

Local management (without the Internet):

  • โšก Quick scenarios between devices of the same hub (for example, a door opening sensor) โ†’ lamp-lighting).
  • ๐Ÿ”„ Scheduled work (if time is synchronized with the hub).
  • ๐Ÿ›ก๏ธ Emergency notifications (e.g. siren when smoke sensor is triggered).

Cloud management (Internet required):

  • ๐ŸŒ Remote access via the Mi Home app.
  • ๐Ÿค– Voice control (via Alice, Google Assistant or Siri).
  • ๐Ÿ“Š Event history and statistics (e.g. temperature graphs from sensors).
  • ๐Ÿ”„ Difficult scenarios with conditions (e.g., "if I left home and the temperature is below 18)ยฐC, turn on the heater").

โš ๏ธ Note: If the internet goes down, you wonโ€™t be able to control devices through the app, but local automations (like turning on the lights on as you move) will work if they are configured via a hub rather than through the cloud.

All sensor data (temperature, humidity, events) is sent by default to the Xiaomi cloud. If you are concerned about privacy, you can turn off sending some data in the application settings, but this will limit the functionality (for example, remote history viewing).

How do you check if the script works locally?
To see if automation is done without the cloud, turn off the Internet on the router and check the script. If it worked, it means it is local. If it does not, it requires the cloud. Also, Mi Home sometimes shows a note "Local execution" when creating a script (but not for all devices).

4. Mi Home app: how to set up devices and scripts

Xiaomiโ€™s smart home is managed through the official Mi Home app (available for Android and iOS). Letโ€™s figure out how to add devices and configure automation.

Step 1: Adding a device

  1. Open Mi Home and press + โ†’ Add the device.
  2. Select a category (e.g., โ€œLightingโ€ or โ€œSecurityโ€).
  3. Follow the instructions on the screen (usually you need to press a button on the device or scan it). QR-code).
  4. Connect your device to a hub (if itโ€™s Zigbee) or Wi-Fi (if itโ€™s running directly).

Step 2: Creating a script

Go to the Profile section โ†’ Automation โ†’ Add and select the type of script:

  • ๐Ÿ•’ Scheduled โ€“ performing activities at a given time (for example, turning off the lights at 23:00).
  • ๐Ÿ”„ Conditionally โ€“ reaction to events (for example, if the motion sensor is triggered, turn on the lamp).
  • ๐Ÿ“ฑ Geolocation โ€“ Automation on your arrival/departure (requires switched on) GPS smartphone).

โš ๏ธ Note: When creating geolocation scenarios (If I come home), the Mi Home app will constantly monitor your location, which increases your smartphone battery consumption. To reduce the load, set up a geolocation zone with a radius of at least 500 meters.

For advanced users, customization is available through Mi Home Automation (a separate application for complex scenarios), but it requires knowledge of the logic of the conditions and is not supported by all devices.

๐Ÿ’ก

If the device isnโ€™t added to the Mi Home, try resetting it to factory settings (usually hold the button on the device). 5-10 seconds until the indicator flashes).

5.Problems and Solutions: Why Xiaomiโ€™s Smart Home Is Unstable

Even in a perfectly configured system, there can be failures, and let's look at the typical problems and how to fix them.

Problem 1: Devices are disconnected from the hub

A common cause is Zigbee channel congestion.One Xiaomi Gateway hub 3 theoretically supports the 128 In practice, however, the device is more connected. 30-40 The sensors start delays and communication breaks:

  • ๐Ÿ”Œ Divide the devices into several hubs (for example, one for the first floor, the other for the second floor).
  • ๐Ÿ“ถ Check the signal level of Zigbee in the hub settings (should be no lower than this). -80 dBm).
  • ๐Ÿ”„ Update the Hub and Devices Firmware (at Mi Home, go to Device Profile) โ†’ Update of the PO).

Problem 2: Delays in execution of commands

If the light is turned on with a delay in 1-2 After the sensor is activated, the reason may be:

  • ๐ŸŒ Cloud Processing โ€“ Check if the script is set up as local.
  • ๐Ÿ“ก Bad Wi-Fi signal โ€“ the hub should be in the zone of confident reception of the router.
  • ๐Ÿ”‹ Low battery charge in sensors (replace the batteries).

Problem 3: Devices do not respond to commands

First, check:

  1. Is the hub connected to the Internet (if the cloud is required)
  2. Does the router block Xiaomi traffic (open ports) TCP 80, 443, 8883 and UDP 123).
  3. Have you ever had a time on the slate (if you have, reset it).

๐Ÿ’ก

If the problem only occurs with one device, try removing it from the Mi Home and adding it again, which helps 70% of the time.

6.Integration with other systems: Google Home, Home Assistant, Alice

Xiaomiโ€™s smart home can be integrated with other advanced management platforms.

1.Voice assistants

  • ๐Ÿ—ฃ๏ธ Alice (Yandex) โ€“ supports most Xiaomi devices through the smart home skill. To connect, tell Alice: Find my devices in the smart home".
  • ๐Ÿค– Google Assistant โ€“ works through Mi Home (in the application settings, enable Voice Management) โ†’ Google).
  • ๐ŸŽ Siri (HomeKit) โ€“ only devices with the logo โ€œWorks with Apple HomeKitโ€ (e.g. Aqara Hub) M2).

2. Home Assistant (for advanced users)

If you want full local automation without the cloud, you can connect Xiaomi devices to Home Assistant via:

  • Xiaomi Miio โ€“ integration for Wi-Fi devices (requires access token).
  • Zigbee2MQTT โ€” to work with Zigbee devices via a hub (you need an adapter, for example, CC2531).

โš ๏ธ Note: When using Home Assistant with Xiaomi devices via the cloud (Miio), all data still passes through Xiaomi servers. Zigbee2MQTT or alternative hubs.

3. IFTTT (Create cross-platform scenarios)

Service IFTTT It allows you to connect Xiaomi to other services (for example, if the motion sensor is triggered). โ†’ Send a notification to Telegram:

  1. Connect your Mi Home account to IFTTT.
  2. Create an applet with a trigger (e.g., Xiaomi motion detected).
  3. Select an action (e.g., Send Telegram message).

7.Security of Xiaomi Smart Home: How to Protect Your System from Hacking

Any IoT system is vulnerable to hacker attacks. Consider the basic security measures for Xiaomi smart home.

1. Protection of Mi Account

  • ๐Ÿ” Use a complex password (at least 12 characters with numbers and special signs).
  • ๐Ÿ“ฑ Enable two-factor authentication in your account settings.
  • ๐Ÿšซ Do not use the same password for Mi Account and other services.

2. Router setup

  • ๐Ÿ”’ Create a separate network for IoT devices (guest Wi-Fi with limited access to the local network).
  • ๐Ÿ”„ Update the router to the latest version.
  • ๐Ÿ›ก๏ธ Disable UPnP (Simplifies Device Attacks).

3. Local measures

  • ๐Ÿ”Œ Regularly update the firmware of hubs and devices.
  • ๐Ÿ“ต Disable unnecessary cloud features (such as sensor history if you donโ€™t need it).
  • ๐Ÿ” Check the list of connected devices in Mi Home (under Security).

โš ๏ธ Note: If you use Xiaomi cameras (such as Mi Home Security Camera), never install them in rooms where valuable data (documents, passwords) is stored.

๐Ÿ’ก

The most vulnerable part of the system is not your devices, but your Mi Account, and if it is hacked, an attacker will gain access to the entire smart home.

FAQ: Frequent questions about the work of Xiaomi smart home

Can I use Xiaomi devices without a hub?
Yes, but with limitations. Wi-Fi devices (like Yeelight light bulbs or Mi Smart Plug sockets) run directly through the router and do not require a hub. However, Zigbee devices (sensors, switches) have a hub. Nor can you create local automation scenarios without a hub, all commands will pass through the cloud with a delay.
Why arenโ€™t some Aqara devices displayed in Mi Home?
Aqara devices require their own hub (Aqara Hub). Even if they use the same Zigbee protocol as Xiaomi devices, their firmware is not compatible with the standard Mi Gateway. To make them appear in the Mi Home, connect them via Aqara Hub, and then link Aqara and Mi Home accounts in the settings.
How to reset the Xiaomi hub to factory settings?
To reset the Xiaomi Mi Smart Home Gateway: Turn off the power hub. Press the button on the case and, without letting go, plug the power. Hold the button 10-15 So let go of the button, the hub will reset and be ready to reset. โš ๏ธ After resetting all connected devices and scripts will have to be configured again.
Can you connect Xiaomi smart home to an intercom or alarm?
Yes, but it will require additional modules: For intercom: use Xiaomi Mi Smart Home Door & Window Sensor + Relay (for example, Shelly 1) for control of the electrical lock. For alarm: connect motion sensors and magnetic sensors to the hub, and the siren through the Mi Smart Plug or a specialized device (for example, Aqara Alarm). There are no ready-made solutions out of the box - you will need to configure through Home Assistant or IFTTT.
How much electricity does Xiaomiโ€™s smart home consume?
Consumption depends on the number of devices, but on average: Hub (Mi Gateway) 3): ~2-3 We're on standby (Zigbee/Bluetooth): ~0.01-0.05 They are powered by batteries that serve 1-2 Smart lamps of the year: ~5-10 W (on) / ~0.5 Watts (standby) sockets and relays: ~1-2 Watts in standby. 20-30 The devices will be an additional expense ~10-20 kW/month.