Introduction to the Xiaomi Smart Home Ecosystem
Xiaomi Smart Home is one of the most affordable and functional automation platforms in the world, with more than 2,000 devices, from light bulbs and sockets to robot vacuum cleaners and security sensors, and the main advantage of being unified through the Mi Home app, which runs on Android, iOS and even the web interface.
But many users are struggling with the initial setup phase, from the Mi Home Gateway hub not connecting to Wi-Fi, sensors not being defined by the system, scripts are running with delays. In this article, we will take a step-by-step setup of Xiaomiβs smart home from scratch, from choosing a hub to creating complex automation, and also reveal the nuances that the official instructions keep silent.
Itβs important to understand that Xiaomi offers two parallel smart home solutions: the classic Mi Home app and the new Aqara Home (for Aqara brand devices).Weβll focus on the former, as it supports most budget Xiaomi and Mijia devices. If you have Aqara devices (for example, the M2 hub or E1 series sensors), some of the features may differ.
Step 1: Selecting and Connecting a Smart Home Hub
A hub (or gateway) is a central device that links all sensors and actuators into a single network. Without it, most Xiaomi devices (such as door-opening sensors or buttons) simply won't work. In 2026, three hub models are relevant:
- πΉ Xiaomi Mi Home Gateway 3 β basic model with support for Zigbee 3.0, built-in speaker and RGB-It's good for most tasks.
- πΉ Xiaomi Mi Home Gateway 2 is an outdated model (released until 2021), but is still on sale.
- πΉ Aqara Hub M2 β Advanced hub with Zigbee 3.0 support, Ethernet connectivity and advanced scripts. Compatible with Mi Home, but requires a separate application for full functionality.
For starters, just get the Gateway 3. Its average price is about 3,000 rubles, making it one of the most affordable Zigbee hubs on the market. An important nuance is that the hub must be connected to the 220V outlet permanently - if the power is turned off, the entire local network of the smart home will stop working.
The process of connecting the hub:
- Download the Mi Home app (App Store/Google Play).
- Sign up or sign in to your Xiaomi account (be sure to link your phone number!).
- Press + β Add the device β Gateway.
- Select the Hub model and follow the instructions on the screen.
- Connect the hub to the outlet - it should flash a yellow light.
- Bring your phone to the hub (for Bluetooth data transfer) and wait for the setup to be completed.
β οΈ Note: If the hub doesnβt connect to Wi-Fi, check that your router is running in the 2.4GHz band. Many modern routers only give away 5GHz by default, which the hub doesnβt support. Also disable the function "Client Isolation" in the router settings - it blocks the interaction of devices in the local network.
Step 2: Connect devices to the hub
After setting up the hub, you can add other devices. Xiaomi offers a wide range of gadgets for the smart home:
- π‘ Lighting: Yeelight lamps, Mijia LED tapes, switches.
- π Power management: Mi Smart Plug sockets, hidden installation relay.
- πͺ Security: sensors for opening doors / windows, movement, water leakage, smoke.
- π‘οΈ Climate: Thermostats, hygrometers, Mi Smart Fan fans.
- π€ Robots: Mi Robot Vacuum vacuum cleaners, mops, air purifiers.
The general connection algorithm:
- In the Mi Home app, click + β Add the device.
- Select a category (e.g., "Lighting") and a specific model.
- Follow the instructions on the screen. Most devices will require:
Some devices (like Yeelight bulbs) connect directly to Wi-Fi and donβt require a hub, but for automation scenarios to work, itβs best to tie them to a gateway.
β οΈ Warning: If the device is not identified, check: πΆ Distance to the hub - it should not exceed 10-15 meters (without obstacles). π Battery level (for sensors) For example, Mijia door opening sensors are battery-operated. CR1632, discharged in 1-2 years. π Availability of Hub firmware updates (checked in device settings in Mi Home).
Make sure the hub is on and connected to the internet |
Check the compatibility of the device with your hub |
Recharge/replace batteries (for autonomous sensors) |
Shut down. VPN on the phone (can block the connection)-->
Step 3: Configure rooms and areas in the application
To make things more convenient, you need to spread them out into rooms, like the lamp in the bedroom and the motion sensor in the hallway, you need to have different groups.
- In Mi Home, go to Profile β Smart Home Settings β Rooms.
- Click Add Room and specify the name (e.g., "Bedroom", "Kitchen", "Corridor").
- Drag the devices to the appropriate rooms.
You can also create zones, like, "First floor" or "Kid's room," which is useful if you have a large house with several hubs.
- π In the Smart Home Settings, select Zones.
- π Add a new zone and give it its name.
- π Tie the necessary rooms and devices to the zone.
Tip: Use room icons for visual difference. Mi Home has over 50 standard icons (bathroom, living room, garage, etc.) and the ability to upload your own image.
π‘
If you have multiple hubs (for example, on different floors), assign them names in the format of "Hub 1 - 1 floor", "Hub 2 - 2 floors", which will make it easier to set up interior scenarios.
Step 4: Creating automation scenarios
The main thing about a smart home is to automate routine activities, for example, you can configure:
- π Automatic lights on at dawn.
- πͺ Activation of the fan when opening the window.
- π§ Sending notifications when water leaks.
- π Simulating presence (casual lights on) when you are not at home.
To create a script:
- In Mi Home, go to Automation section β Add.
- Select the type of trigger (condition): β° Time (e.g., "Every day at 7:00 a.m"). π± Geolocation (when you return home). π According to the state of the device (for example, "If the motion sensor is triggered"). π‘οΈ Weather (if the temperature has dropped below 0)Β°C).
Turn on the lamp β Select the device β Set brightness 70%
Save the script and test it out.
An example of a complex scenario:
Condition: Motion sensor in the corridor worked And time between 22:00 and 6:00 Action: Turn on the nightlight at 30% brightness β Wait 2 minutes β Turn off the nightlight if no movement is detected
| Type of trigger | Example of use | Limitations |
|---|---|---|
| Timely. | Turning on the coffee maker at 7:30, turning off the lights at 23:00 | Does not take into account your real presence at home |
| Geolocation. | Turn on the heater when you are driving home | Requires constant access to GPS on your phone |
| Status of the device | Smoke sensor hood activation | Delayed execution up to 1-2 seconds |
| The weather. | Closing the blinds in high wind | It only works when connected to the internet. |
β οΈ Note: Geolocation-based scenarios may not work if your phone is power-saving or Mi Home background access is turned off. On Android, check your battery settings: Settings β Annexes β Mi Home β Battery β No restrictions.
How to eliminate delays in scripts?
Step 5: Integration with voice assistants
Xiaomi Smart Home can be controlled by voice via Alice (Yandex), Google Assistant or Siri (HomeKit).
- π€ For Alice: In the Mi Home app, go to Profile β Settings β Voice control β Yandex. Sign in through Yandex. Allow access to your devices. In Yandex with your camera, click Devices. β Add β Xiaomi.
For Google Assistant:
- In Mi Home, select Profile β Settings β Voice Control β Google Assistant.
- Follow the instructions for linking accounts.
- In the Google Home app, devices will appear automatically.
Examples of voice commands:
- π¦"Alice, turn on the light in the living room for 50%"
- π‘οΈ"Okay, Google, show me the temperature in the bedroom"
- πͺ"Ciri, close the curtains in the office" (requires settings through HomeKit)
After resetting, all devices and scripts will have to be reconfigured, so use this method only as a last resort.
Step 7: Advanced Features (for Power Users)
If standard Mi Home features arenβt enough, you can extend the capabilities of a smart home by:
- π Home Assistant: an open automation platform that supports integration with Xiaomi through the Xiaomi Mi Home plugin. Allows you to create complex scripts using Python scripts.
- π§ Node-RED: Visual editor for creating automation streams, suitable for integrating Xiaomi with other systems (e.g. Philips Hue or Sonoff).
- π Grafana + InfluxDB: for visualizing sensor data (temperature, humidity, power consumption) in the form of graphs.
Example of setting up Home Assistant:
# Configuration fragment for connecting Xiaomi hub
xiaomi_aqara:
gateways:
- key: YOUR_GATEWAY_KEY
host: 192.168.1.100 # IP-Hub address on the local network
port: 9898For receipt YOUR_GATEWAY_KEY Use the Mi Home Token Extractor utility (available on GitHub).Be careful: transferring the access token to third parties may compromise your Xiaomi account.
How to get a token for Home Assistant?
FAQ: Frequent questions about Xiaomi smart home
Can you use a Xiaomi smart home without the internet?
How many devices can you connect to a single Xiaomi hub?
How to transfer a smart home to another Xiaomi account?
β οΈ When you reset devices, all scripts and settings will be lost!