Xiaomi Smart Home: How to Build, Configure and Manage a System from the Ground

Xiaomi’s smart home ecosystem is one of the most affordable and functional in the market in 2026, automating lighting, climate, security, and even appliances by controlling everything from a smartphone or voice. But many users face challenges when connecting devices, setting up automation, or choosing a central hub. In this article, we’ll take a step-by-step instruction to build a system from scratch, compare key devices, and uncover nuances that aren’t covered in official manuals.

Xiaomi

Mi Home

Aqara

Aqara

Zigbee 3.0

Wi-Fi

Mi Home

hub

If you're just starting out with a smart home, it's important to understand that the Xiaomi Mi Home Security Gateway 3 hub is not compatible with Aqara devices, and vice versa, they're two separate ecosystems under the same brand, and a mistake in choosing a hub will cause some of the sensors to simply not connect, and then we'll discuss how to avoid such problems and build a system that will work steadily.

How to choose a hub for a smart home Xiaomi: comparison models 2026

Choosing a central hub is the most critical step in building a smart home, which will determine which devices you can connect, how stable they will work, and what automation scenarios will become available. In 2026, Xiaomi offers four main hub models, each focused on different tasks.

The base model, the Xiaomi Mi Home Security Gateway 3, is suitable for beginners, supports up to 32 Zigbee devices, has a built-in alarm speaker and an LED indicator, but it has two serious drawbacks: no backup power (when the power is cut, the system stops working) and limited compatibility with third-party devices.

For those planning to expand the system, it is better to consider the Aqara Hub. M2. This hub supports up to 128 devices, has an 8-hour backup battery and built-in IR-transmitter for the control of household appliances (air conditioners, TVs). M2 Compatible with Apple HomeKit, which is important for iPhone users.

If you want maximum reliability and advanced features, look for the Aqara Hub E1 – it runs on the Zigbee 3.0 protocol and supports local control (without the cloud), which speeds up the response of sensors. And for voice control enthusiasts, the Xiaomi Mi Smart Speaker Pro is suitable – it is both a hub and a smart speaker with support for Alice, Google Assistant and Siri.

Hub modelProtocolMax. Devices.Standby powerCompatibility with HomeKitPrice (2026)
Mi Home Security Gateway 3Zigbee32No.No.~2 500 β‚½
Aqara Hub M2Zigbee1288 hoursYes.~5 000 β‚½
Aqara Hub E1Zigbee 3.0128No.Yes.~4 200 β‚½
Mi Smart Speaker ProWi-Fi / BluetoothLimited by the cloudNo.Partially.~7 000 β‚½

⚠️ Note: Xiaomi and Aqara hubs are not interchangeable. If you bought Aqara sensors, they can not be connected to Mi Home Security Gateway 3, and vice versa.

πŸ“Š What Xiaomi Smart Home Hub Are You Using?
Mi Home Security Gateway 3
Aqara Hub M2
Aqara Hub E1
Mi Smart Speaker Pro
Other/no

Step-by-step setup of Xiaomi smart home: from connecting the hub to the first devices

Once you select a hub, you can start setting up the system, and there are three steps: connecting the hub to the network, linking to your Mi Home account, and adding the first devices, and let's take a closer look at each step.

First, plug the hub into the outlet and wait for the indicator to light up (Mi Home Security Gateway 3 is a blue LED, Aqara Hub M2 is white). Then download the Mi Home app (for Xiaomi devices) or Aqara Home (for Aqara hubs) and sign up. It is important to choose the right region when registering - this depends on the stability of work. Russia is the optimal server (Moskva), but some users say the best response speed to Singapore.

Next, in the app, click Add Device and select your hub from the list. Follow the on-screen instructions: usually you need to scan. QR-code on the back of the hub and wait until it connects to Wi-Fi. If the hub doesn't find the network, check that your router is running at 2.4 GHz - 5 GHz is not supported by most Xiaomi devices.

Once the hub is successfully connected, you can add the first devices, starting with simple sensors, like:

    To add a device, click Add Device in the app, select a category (like "Sensors") and follow the instructions. Most sensors connect automatically after you press a button on the case. If the device is not located, try:

    1. Restart the hub (turn off power for 10 seconds).
    2. Make sure the device is within 10 meters of the hub.
    3. Check that the hub has free slots for new devices (the limit is 32 devices in the Mi Home).

    Hub is on and connected to the Internet

    The device is discharged (if on batteries)

    Distance to the hub is not more than 10 meters

    The correct region (Russia/Moskva) is selected in the application

    -->

    πŸ’‘

    If the sensor doesn't connect, try resetting it to factory settings. To do this, hold the button on the case for 5-10 seconds until the indicator starts flashing quickly.

    Script Automation: How to Make Devices Work Together

    The main advantage of a smart home is the ability to create automatic scripts that run on triggers, for example, when a door opens the lights, and when a motion is detected, the camera begins recording, in the Xiaomi ecosystem, this is implemented through the Automation feature in the Mi Home or Aqara Home app.

    To create a script, go to Automation β†’ Create and select the type of trigger. The following options are available:

    • ⏰ Time: Start at a certain time (for example, turn off the lights at 23:00).
    • πŸ”„ On the device - a reaction to a change in the state of the sensor (for example, turn on the heater if the temperature is below 20).Β°C).
    • πŸ“± Geolocation – start when approaching or removing the smartphone from the house.
    • 🎀 Voice Assistant – integration with Alice, Google Assistant or Siri.

    Let’s take a look at the Smart Alarm Script:

    1. Trigger: Time β†’ 7:00.
    2. Condition: Motion sensor in the bedroom β†’ Motion detected (so that the lights do not turn on if you are not at home).
    3. Action: Turn on Xiaomi Mi LED Smart Bulb at 50% brightness. Turn on Xiaomi Mi Smart Plug (for kettle). Say a voice message through the hub: "It's time to get up!"

    It is important to consider that some scenarios require cloud processing, which can cause delays of up to 2-5 seconds. For critical tasks (for example, alarms), it is better to use local automations that work even without the Internet. 🏠.

    ⚠️ Warning: Too many simultaneous scenarios (more than 10) can lead to hub hangings. If you notice lags, disable unnecessary automations or break them into groups by time of day.

    How do you check if the script works locally?
    Open the Aqara Home app, go to Automation β†’ Scenario settings. If you have "Local execution" on the bottom, the script works without the cloud. Mi Home doesn't have that feature, all scripts run through Xiaomi servers.

    Compatibility with other brands: can non-Xiaomi devices be connected?

    One of the main problems in the Xiaomi ecosystem is limited compatibility with other brands, but there are several ways to integrate Philips Hue, IKEA Tradfri or Samsung SmartThings.

    The most reliable method is to use the Home Assistant platform, which is open source software that is installed on a mini PC (such as the Raspberry Pi) and allows you to combine devices from different manufacturers in one system.

    1. Install Home Assistant on the device (instructions on the official website).
    2. Add Xiaomi Mi Home integration via the access token (received in the Mi Home app via Profile β†’ Settings β†’ Link to other platforms).
    3. Configure bridges for other brands (e.g. Zigbee2MQTT for IKEA devices).
    What if the hub stopped responding?
    1. Turn off the hub from power for 30 seconds. 2. If it didn't work, reset it to factory settings (hold the reset button for 10 seconds). 3. Reconnect the hub in the app by selecting the region Russia (Moskva) or Singapore. 4. If the problem recurs, check the power supply - often unstable voltage puts the hubs out of action.

    Voice control: Alice, Google Assistant and Siri

    Voice control is one of the most convenient ways to interact with the system. Xiaomi supports all popular voice assistants, but there are nuances in the setup.

    To connect to Alice (Yandex):

    1. Make sure your hub supports integration (the list of compatible devices on the Yandex IoT site).
    2. In the Mi Home app, go to Profile β†’ Settings β†’ Yandex Smart Home and log in.
    3. In the Yandex app, say: "Alice, find new devices."

    For Google Assistant:

    1. Open the Google Home app and click Add β†’ Set up your device.
    2. Select Xiaomi Mi Home and sign in.
    3. Once you sync the devices, they'll appear in the list, and now you can say, "Okay, Google, turn on the lights in the living room."

    For Siri (Aqara hubs only):

    1. Make sure the hub supports HomeKit (e.g., Aqara Hub M2).
    2. Scan it. QR-code from the hub in the Apple Home app.
    3. You can now manage devices through Siri or the Home app.

    ⚠️ Note: When using voice assistants, data about your devices is transmitted to the servers of Yandex, Google or Apple. If this is critical for privacy, prefer local management through Home Assistant.

    πŸ“Š What voice assistant do you control a smart home?
    Alice (Yandex)
    Google Assistant
    Siri
    I don't use voice control.

    FAQ: Answers to Frequent Questions

    Can you use a Xiaomi smart home without the internet?
    Aqara hubs (such as the Aqara Hub M2) support local scenarios that work without the Internet. However, for initial setup and updates, a network connection is still required. Mi Home devices (such as light bulbs or sockets) without the Internet are managed only over the local network, but cloud functions (notifications, geolocation) will be disabled.
    How to reset the Xiaomi hub to factory settings?
    Press and hold the reset button on the back of the hub for 10-15 seconds until the indicator blinks quickly. After that, the hub will return to the factory settings, and it can be reconnected. Attention: all connected devices and scripts will be deleted!
    Why are Xiaomi sensors running out quickly?
    Most often, this is due to two reasons: Low battery quality β€” use Duracell or Energizer alkaline batteries. Frequent state surveys β€” if the sensor sends data every minute, it will run out in 2-3 months. In scenario settings, increase the survey interval to 5-10 minutes.
    Can you connect Xiaomi cameras to your smart home?
    Xiaomi cameras (such as the Mi Home Security Camera 360Β°) connect to the Mi Home app, but don't integrate directly into automation scenarios. However, they can be used as triggers via Home Assistant or IFTTT. For example, when motion is detected, the camera can send a notification and turn on the lights.
    How to transfer Xiaomi smart home to a new phone?
    Sign in to Mi Home or Aqara Home on a new phone with the same account. All devices and scripts sync automatically. If you want to transfer your system to another account, use the Transfer Control function in the hub settings (only available for devices connected to the same hub).