Xiaomi Smart Home Connectivity: A Complete Guide from Hub to Automation

Xiaomi’s smart home is not just a collection of gadgets, it’s a complete ecosystem that can transform your apartment into a smart space. From automatic lighting control to security and climate control, Mi Home devices offer flexible solutions for all tasks. However, many users face difficulties already at the connection stage: the hub does not detect sensors, lamps flash in their rhythm, and scripts refuse to work. This article will help avoid typical errors and configure the system from scratch.

We will not only discuss the basic steps (how to connect the Xiaomi Mi Home Hub or Aqara Hub hub), but also the nuances of integration with Google Assistant, Apple HomeKit (through workarounds), as well as alternative platforms like Home Assistant. We will focus on interoperability issues across generations, such as why 2020 MiJia sensors may not work with the Aqara hub. M2 2023. If you're planning to scale, here's a guide to choosing the hardware for future upgrades.

1.Hub Choice: Mi Home vs Aqara - which is best for your tasks?

The centerpiece of any Xiaomi Smart Home ecosystem is the hub that connects all devices to each other and to the cloud, with two main lines of action in 2026:

  • πŸ”Ή Mi Home Hub (e.g. Xiaomi Mi Smart Home Gateway) 3) β€” Classic solution with Zigbee support 3.0, built-in speaker and RGB-It's good for basic scenarios and for people who only use devices. Xiaomi/Mijia.
  • πŸ”Ή Aqara Hub (models) M2, E1, M3) β€” More advanced hubs with improved connectivity stability, Matter support (in newer versions) and advanced automation options, optimal for complex systems with devices of different brands (including: IKEA Or Philip Hue via Zigbee).

The key differences are shown in the table:

ParameterXiaomi Mi Home Hub 3Aqara Hub M2Aqara Hub E1
ProtocolZigbee 3.0Zigbee 3.0 + Matter (partially)Zigbee 3.0 + Ethernet
Max. Devices.128128128
Local control❌ (cloud)βœ… (partly)βœ… (extended)
Support for HomeKitβŒβœ… (via Aqara Home)βœ…
Price (2026)~2 500 β‚½~4 000 β‚½~3 500 β‚½

If your goal is simple automation of lighting and motion sensors, Mi Home Hub 3 is enough, IKEA Tradfri or Sonoff is better to choose Aqara Hub M2 β€” It supports local scripts and is less cloud-dependent.

⚠️ Note: Xiaomi and Aqara hubs are not protocol-compatible. Devices connected to the Mi Home Hub won't be visible in the Aqara Home app, and vice versa. Choose the ecosystem in advance!

πŸ“Š What hub do you use?
Xiaomi Mi Home Hub
Aqara Hub (any model)
Other brand (specify in the comments)
Not yet.

2.Preparation for connection: what to do before installing the hub

Before unpacking the hub, follow a few critical steps:

  1. Check the region of your Mi Account. Xiaomi hubs are linked to servers in a specific region (China, Europe, Russia). If your account is registered with mi.com (China) and the hub is purchased for the European market, devices may not connect. FAQ.
  2. Update your smartphone firmware. The Mi Home app requires an up-to-date version of Android (at least 8.0) or iOS (at least 13.0). Older devices may not have critical features (such as Matter support).
  3. The hub should connect to the router via cable (recommended) or 2.4GHz Wi-Fi. 5GHz networks are not supported by most hub models!

Also consider the number of devices:

  • πŸ“Ά One hub. Xiaomi/Aqara can handle 128 In practice, but in practice, when the 50-60 sensors/lamps start delays in operation.
  • πŸ”Œ If you plan to connect cameras (for example, Xiaomi Mi Home Camera 360)Β°), They occupy a separate β€œslot” in the cloud and are not counted in the hub limit.
  • πŸ”„ For large systems (for example, a 100-hour smart home)+ m2) it is better to use several hubs divided by zones (floors).

Make sure the router supports 2.4 GHz |

Check the region of the Mi Home account|

Update the Mi app Home/Aqara last-minute|

Prepare an Ethernet cable (recommended)|

Shut down. VPN/smartphone proxy-->

3. Step-by-step instructions: how to connect the Xiaomi hub to the Mi Home

Consider the process with the Xiaomi Mi Smart Home Gateway 3. The steps are similar for the Aqara Hub, but instead of the Mi Home, the Aqara Home app is used.

Step 1: Connecting the hub to power and network

  1. Connect the hub to the outlet with an adapter (included). The indicator on the front panel should flash yellow.
  2. Connect the hub to the router with an Ethernet cable (recommended) or via Wi-Fi (2.4GHz only). For Wi-Fi, press the reset button on the hub (hold 5 seconds) until the indicator starts flashing blue.

Step 2: Adding a Hub to the Mi Home app

  1. Open the Mi Home app, go to Profile β†’ Settings β†’ Add the device.
  2. Select the Gateway category, then the model of your hub.
  3. Follow the instructions on the screen: the application will offer to connect to the temporary Wi-Fi network hub (the name will be type). Xiaomi_XXXX).
  4. Once connected, return to the main Wi-Fi network and wait for the setup to be completed (the hub indicator will turn blue).

Step 3: Update the Hub's firmware

After connecting, check for updates:

  1. Go to the Devices. β†’ Choose a hub. β†’ Settings (βš™οΈ) β†’ Firmware update.
  2. If a new version is available, confirm installation. Do not turn off the hub during the process (take over). 5-10 minute).
What to do if the hub is not connected?
If the hub indicator flashes red or does not respond to the setting: 1. Check that the router does not lock the device (turn off the firewall or add the hub as exceptions). 2. Try resetting the hub: hold the reset button for 10 seconds until the indicator goes out and flashes yellow. 3. If you are using Wi-Fi, make sure the network is not hidden (SSID It is visible and does not require authorization via a web page (as in hotels). 4. Chinese hubs may require a change of account region (see also the following page: WEB. FAQ).

Step 4: Configure zones and rooms

To simplify management:

  1. In the Mi Home app, go to Profile β†’ Home settings β†’ Room management.
  2. Create zones (e.g., Living room, Bedroom, Kitchen) and distribute the devices to them.
  3. For each hub, specify its physical location (this will help in the future when setting up automations).

πŸ’‘

After connecting the hub, be sure to update its firmware - this will eliminate most bugs with the connection of sensors and lamps.

4. Connecting devices: sensors, lamps, sockets

When the hub is set up, you can add other devices, and the process depends on the type of gadget:

Sensors (movements, openings, temperatures)

Most sensors Xiaomi/Aqara They are connected via Zigbee protocol and do not require Wi-Fi:

  1. Make sure the sensor is in pairing mode (usually you need to press and hold the button on the device). 3-5 seconds until the indicator starts flashing).
  2. In the Mi Home app, go to Add Device β†’ Select a category (e.g., β€œSensors") β†’ Motion sensor.
  3. Bring the sensor to the hub at a distance of no more than 1 meter and wait for detection.

Typical problems and solutions:

  • πŸ”΄ Sensor not detectable: check battery power (insert new one) CR2032), reboot the hub.
  • πŸ”΄ Constant false positives: adjust the sensitivity in the sensor settings or change its location (for example, the motion sensor should not "see" the air conditioner).

Smart lamps and lamps

Xiaomi Yeelight or Mi lamps LED Bulb connect via Wi-Fi or Zigbee (depending on model:

  1. Put the lamp in the cartridge and turn on the power.
  2. Turn on and off the lamp 5 times in a row (with an interval of 1 second) - it will go into pairing mode (will blink).
  3. In the app, select Add Device β†’ Lighting β†’ Smart lamp and follow the instructions.

For Wi-Fi lamps (e.g. Yeelight Color):

  1. Connect to the lamp's temporary network (type name) Yeelight_XXXX).
  2. In the Mi Home or Yeelight app, select your home Wi-Fi network and enter your password.

⚠️ Note: Wi-Fi-connected Yeelight lamps won’t work when the internet is turned off (unlike Zigbee lamps, which are controlled locally via the hub).

Smart sockets and switches

Xiaomi Mi Smart Plug outlets connect via Wi-Fi:

  1. Put the socket in the filter and turn on the power. The indicator should flash orange.
  2. In the Mi Home app, select Add Device β†’ Rosettes.
  3. Connect to the temporary socket network (type name) MiPlug_XXXX) And go back to the main network.

For Aqara switches (e.g. Aqara Wall Switch):

  1. Turn off the power on the shield before installation!
  2. Connect the switch to the wiring according to the scheme (usually L - phase, N - zero).
  3. Turn on the power and hold the switch button for 5 seconds to go into pairing mode.

πŸ’‘

If the sensor or lamp doesn’t connect, try resetting them to factory settings: for most Xiaomi devices, you need to hold the button. 10-15 seconds before flashing the indicator.

5. Set up automations and scenarios

The main advantage of a smart home is the ability to create automatic scripts.

  • πŸŒ… "Morning: at 7:00 the lights turn on, curtains open, coffee maker starts.
  • πŸšͺ "No one's home: when all residents leave, sockets are turned off, the security mode is turned on.
  • 🌑️ "Climate control: temperatures below 20Β°C is turned on the heater, above 25Β°C - air conditioning.

How to create a script in Mi Home:

  1. Go to Automation. β†’ Create β†’ New automation.
  2. Select the trigger (activation condition): time, motion sensor, temperature change, etc.
  3. Add an action: turn on the lamp, send a notification, run another script.
  4. Save and test the script.

Examples of useful automation:

Trigger.Action.Example of devices
Traffic sensor in the corridorTurn on the light for 2 minutes.Xiaomi Mi Motion Sensor + Yeelight Bulb
Temperature. < 18Β°CTurn on the heater + noticeAqara Temperature Sensor + Mi Smart Plug
Opening of the front door (sensor)Camera footage. + warningXiaomi Door/Window Sensor + Mi Home Camera
Geolocation: Everyone left homeDisconnect all outlets, activate security.Smartphone + Mi Smart Plug + Aqara Hub

For complex scenarios (such as those with delays or conditions), use Home Assistant or Node-RED. These platforms allow you to create multi-criteria automations that are not available in the standard Mi Home app.

How to export scripts from Mi Home?
Unfortunately, in 2026, Mi Home doesn't support export/import scripts, so you'll have to recreate scripts to move automation to another account or hub, and the alternative is to use Home Assistant, which allows you to save configurations to files. YAML.

6.Integration with Google Assistant, Apple HomeKit and other systems

By default, Xiaomi devices are managed via Mi Home, but they can be integrated with other platforms:

Google Assistant / Google Home

To connect:

  1. Open the Google Home app and go to Add β†’ The device β†’ Set up the device.
  2. Select Xiaomi Mi Home and log in to your account.
  3. Allow access to devices and assign them to rooms in Google Home.

Limitations:

  • 🚫 Not all devices are supported (for example, some Aqara sensors may not be displayed).
  • 🚫 Delay in execution of commands is higher than when managing through Mi Home.

Apple HomeKit

Xiaomi doesn’t officially support HomeKit, but there are workarounds:

  1. Aqara Home: Aqara hubs (e.g, M2) You can connect to Apple Home via the Aqara Home app (in the hub settings there is an option "Add to HomeKit").
  2. Home Assistant: Configure the bridge between Mi Home and HomeKit with the Home Assistant plugin + HomeKit Bridge.

Alternative platforms:

  • 🌐 Home Assistant: Full Device Control, Local Scenarios, Integration with 1000+ Requires a separate server (can be deployed to Raspberry Pi).
  • 🌐 OpenHAB: Open platform for automation, supports Xiaomi through binding mihome.
  • 🌐 Yandex Alice: Through the Smart Home skill in the Yandex app (Major Xiaomi devices are supported).

⚠️ Note: When integrated with HomeKit via Aqara Home, some features may not work properly. For example, Apple Home’s Aqara temperature sensors often show values with a delay of up to 5 minutes.

7.Typical errors and their solutions

Even when you set it up properly, users are facing problems.

Problem.Possible causeDecision
Hub does not connect to Wi-FiIncorrect account region, hidden network, router blockingChange region to Russia or Europe, disable cover-up SSID, add the hub to the firewall exceptions
Sensors shut down in a few days.Zigbee weak signal, battery dischargeCheck the signal level in Mi Home β†’ hub β†’ Network status, replace the battery
The lamps flash or do not respondHub overload, conflict IP-addressReset the hub, assign static lamps IP router
Scenarios are delayedCloud Dependence, Slow InternetUse local automation (for example, through Home Assistant)
Cameras don't record videoNot enough space in the cloud, a mistake SD-mapCheck your cloud subscription or format SD-map FAT32

Problems with geolocation:

If location-based automation (e.g., β€œturn off lights when leaving”) is not stable:

  • πŸ“ Make sure that the smartphone settings include high accuracy mode for Mi Home.
  • πŸ“ Set up the radius of the geofence in the application (by default 100 m, you can increase to 500 m).
  • πŸ“ For iPhone, check what is in Settings β†’ Confidentiality β†’ Geolocation Services for Mi Home Always selected.

Conflicts between devices:

If sensors or lamps of different brands interfere with each other’s work:

  • πŸ”„ Separate devices into different hubs (e.g. Xiaomi and Aqara into separate gateways).
  • πŸ”„ Update the firmware on all devices to the latest version.
  • πŸ”„ In the hub settings, turn off Power Saving Mode (may cause delays).

8 Advanced Features: Home Assistant, Matter and Local Management

For users who do not have enough functionality Mi Home, there are alternative solutions:

Home Assistant: Full control of the smart home

Advantages:

  • 🏠 Local control: devices work without the Internet.
  • πŸ”§ Flexible Automation: Support for Python Terms, Cycles, and Scripts.
  • 🌍 Integration: Compatibility with 2000+ devices and services (including Xiaomi, Google, Apple).

How to connect Xiaomi to Home Assistant:

  1. Install Home Assistant on a Raspberry Pi or other server.
  2. In the configuration file configuration.yaml add integration xiaomi_miio:
xiaomi_miio:




host: IP_ address of hub




token: YOUR_TOKEN
  1. Get it. MIIO Token for your hub (instruction below).
  2. Reboot Home Assistant and add devices to the interface.

How to get MIIO Token:

  1. Install the Mi Home Token Extractor app on your smartphone (available on GitHub).
  2. Sign in to your Xiaomi account.
  3. Select a hub in the list of devices and copy the token.

⚠️ Note: The token gives full access to your devices, and do not share it with third parties or publish it publicly!

Matter: The Universal Standard for Smart Home

Since 2023, Xiaomi has been supporting the Matter protocol, which allows users to manage devices from different ecosystems (e.g. Google Home, Apple HomeKit, Amazon Alexa) without workarounds.

  • πŸ’‘ Lamps: Xiaomi Mi LED Bulb (Matter), Yeelight Pro.
  • πŸ”Œ Related: Aqara Smart Plug (Matter).
  • πŸšͺ Sensors: Aqara Door/Window Sensor (Matter).

How to connect Xiaomi device with Matter:

  1. Update the device firmware to the latest version (check compatibility on the official website).
  2. In the Mi Home app, go to your device settings and select Add via Matter.
  3. Scan it. QR-Device code in Google Home, Apple Home or other compatible app.

Limitations of Matter in 2026:

  • 🚫 Not all Xiaomi devices support Matter (e.g., older MiJia sensors don’t update).
  • 🚫 Xiaomi Mi Home Hub is not a Matter Controller (unlike Aqara Hub) M3).
  • 🚫 Local scripts through Matter are still inferior in flexibility Home Assistant.

πŸ’‘

Home Assistant is the best solution for those who want full control of a smart home without depending on the Xiaomi cloud. Matter is convenient for easy integration with other ecosystems (Google, Apple), but for now supports a limited list of devices.

FAQ: Answers to Frequent Questions

How to check the region of the Mi Home account?
Open the Mi Home app, go to Profile β†’ Settings β†’ If you are using a hub for the European market, you will have to create a new account with the region Russia or Europe.