Xiaomi’s smart home ecosystem is no longer a novelty, but it still raises questions for apartment owners. Unlike private homes, where automation is often tied to complex engineering systems (heating, watering, protecting a large plot), urban priorities are different: compactness, energy efficiency, integration with household appliances and, of course, safety without unnecessary costs. Xiaomi offers one of the most flexible solutions – a modular system that can be built “by the bricks”, starting with basic sensors and ending with full automation of lighting, climate and even cleaning.
The Mi's main advantage Home/Aqara (Xiaomi’s two key smart home platforms are compatibility with the 90% The brand’s devices don’t have to buy a hub separately (most of the time, it’s a router or a column), but there’s also a pitfall: not all devices work directly with each other, and some features require a Gateway. In this article, we will analyze how to build a smart home system in a Xiaomi-based apartment from scratch, which devices to choose for specific tasks, and why it is sometimes cheaper to buy a ready-made kit than to assemble it piecemeal.
What is Xiaomi Smart Home System and How Does It Work?
At the heart of the ecosystem is the central Mi Home app (or Aqara Home for Aqara devices), which connects all gadgets into a single network.
- Devices (sensors, lamps, sockets) connect to the hub or directly to the router using ZigBee, Wi-Fi or Bluetooth protocols.
- Hub (e.g. Xiaomi Mi Smart Home Gateway or Aqara Hub) M2) It is a bridge between Xiaomi devices and the cloud.
- The cloud processes commands, sends notifications, and allows you to control your home remotely.
- Automations are configured in the app: for example, if the motion sensor is triggered at night → light up to 30% brightness».
Xiaomi’s key feature is the openness of the platform, with many devices supporting integration with Google Assistant, Apple HomeKit (via Aqara), and even Yandex Alice, which means you can control your smart home by voice or through third-party apps, but there’s a caveat: to work fully with HomeKit, you’ll need an Aqara hub, not a standard Mi Gateway.
It is important to understand that Xiaomi offers two parallel directions:
- 🔹 Mi Smart Home – Xiaomi-branded devices (usually cheaper but with limited functionality).
- 🔹 Aqara – premium lineup with advanced features (e.g. HomeKit support, more sensors included).
⚠️ Note: Mi Smart Home and Aqara devices are not always compatible at the automation level. Door/Window Sensor will not be able to directly control the Aqara Smart Plug socket without additional scripts.
What devices are needed for a smart home in an apartment: minimum and extended set
You can build a smart home system from a basic set (for lighting automation and safety) and from an extended set (with climate control, multimedia and robot cleaners).
Minimum set (from 5 000) ₽)
- 💡 Xiaomi Mi Smart Home Gateway 3 – Device Communication Hub (required for ZigBee sensors).
- 🔌 Xiaomi Mi Smart Socket – a smart socket for remote control of household appliances.
- 🚪 Xiaomi Mi Door/Window Sensor 2 — door-opener/window (2 pc for front door and balcony).
- 👁️ Xiaomi Mi Motion Sensor 2 – motion sensor for light automation.
- 💡 Yeelight LED Bulb – a smart lamp with brightness and color adjustment.
Extended set (from 20 000) ₽)
| Category | The device | Function | Approximate price |
|---|---|---|---|
| Climate | Aqara Temperature & Humidity Sensor | Microclimate control, automation of heaters / air conditioners | 1 500 ₽ |
| Security | Xiaomi Mi Home Security Camera 2K | Video surveillance with facial recognition, cloud storage | 4 000 ₽ |
| Lighting | Yeelight Lightstrip Plus | RGB-backlighting with synchronization of music/films | 3 500 ₽ |
| Cleaning | Xiaomi Mi Robot Vacuum-Mop 2 Pro | Vacuum cleaner with floor washing function and laser navigation | 25 000 ₽ |
| Management | Aqara Hub M2 | Hub with HomeKit support and local automation | 5 000 ₽ |
For an apartment with an area of 60 m2, a minimum set is enough, but if you want to automate the climate (heating, humidification), multimedia (synchronization of light with a TV) or cleaning, you will have to expand the system. For example, to integrate with air conditioning, you will need Xiaomi Mi Air Conditioning Companion (about 2000). ₽), Aqara Curtain Driver (3,500) ₽).
Make sure the hub supports all selected devices|
Check compatibility with your router (2.4 GHz required)|
Evaluate the need for backup power for the hub (when the lights are turned off)|
View reviews on the stability of specific sensors (some models glitches at low temperatures)
-->
How to connect and configure a Xiaomi smart home: step-by-step instructions
The setup process can be divided into 4 steps: Hub installation, device addition, automation creation and testing. Let's take each step with the basic kit example.
1. Hub installation (Gateway)
Xiaomi Mi Smart Home Gateway 3 connects to the outlet and syncs with the Mi Home app:
- Download the Mi Home app (App) Store/Google Play) and register.
- Press «+» → «Add the device» → Choose Gateway 3.
- Hold your phone to the hub and wait for the beep (voice greeting in Chinese).
- Connect the hub to a 2.4 GHz Wi-Fi network (5 GHz is not supported!).
Once connected, the hub will flash orange (device search) or blue (operating mode). If the indicator is red, check your Internet connection.
Addition of devices
Each device is added through the application:
- 🔌 For smart socket: plug in, hold the button for 5 seconds until the indicator flashes. In the application, select Mi Smart Socket.
- 🚪 For the door sensor: remove the protective film from the battery, press the button on the sensor, select the application Door/Window Sensor 2.
- 💡 For a smart lamp, screw the lamp, turn on the light 3 times in a row. In the application, select Yeelight.
If the device is not located, check:
- 📶 Distance to the hub (no more than 10 meters for ZigBee).
- 🔋 Battery charge (in sensors used) CR2032 or CR1632).
- 🌐 Internet availability (the hub must be online).
3. Creating automation
Go to the section "Automation" (Profile) → Automation) and click "Add." Examples of useful scenarios for an apartment:
- 🌙 Night mode: If the Motion Sensor is triggered from 23:00 to 7:00 → Turn Yeelight on at 20% brightness.
- 🚪 Security: If the Door Sensor is open for more than 5 minutes → Send notifications and turn on the Mi Home Camera.
- ☀️ Morning Rise: At 7:00, turn on the Smart Socket and gradually increase the brightness of Yeelight.
For complex scenarios (e.g., if the temperature is above 25)°C and no one's home. → Air conditioning is required ) Aqara Hub M2, The standard Mi Gateway does not support multi-level conditions.
💡
If automation doesn’t work, check the priority of scripts in settings. Xiaomi executes them in order, and an earlier rule can block subsequent ones.
Typical Mistakes When Setup Xiaomi Smart Home and How to Avoid Them
Even with a simple system, users face problems that are often associated with incorrect network topology or device incompatibility, and here are the most common errors and solutions:
1.The devices do not connect to the hub
Causes and solutions:
- 📡 ZigBee weak signal: Hub should stand in the middle of apartment, not in corner.Use repeaters (e.g. Xiaomi Mi Smart Wall Switch).
- 🔋 Discharged batteries: Mi Door Sensor sensors often stop working after 6 to 12 months.Replace CR2032 on CR2016 (They are thicker and hold the charge longer).
- 🔄 Firmware conflict: Update the hub and devices to the latest version in Mi Home → Profile → Firmware Update.
2 Automation is not stable
This is most often related to:
- ⏱️ Cloud delays: Xiaomi processes commands on servers in China, so sometimes there are lags.The solution is to use local automation (available only on Aqara hubs).
- 🌐 Internet problems: If the hub disconnects from the network, ZigBee devices will continue to work locally, but notifications will not come.
- 🔀 Scenario conflict: For example, if you have a rule to turn off the lights when no movement is present and simultaneously turn on the lights on schedule, they will interfere with each other.
⚠️ Note: If you are using the Mi Gateway 3 firmware-old 1.5.6_0034, Automation with Aqara sensors won't work. Update the hub manually through Settings → Firmware update.
3.Smart home 'gluts' after lights out
Most Xiaomi hubs do not have backup power, so when power is cut:
- 🔌 Wi-Fi devices (outlets, lamps) will turn off and will not restore the connection automatically.
- 📡 ZigBee network will fall apart, and the hub will take 5-10 minutes to reconnect the sensors.
Decisions:
- 🔋 Buy UPS (Uninterruptible Power Supply) for Hub and Router.
- ⚡ Use smart sockets with a battery (such as Aqara Smart Plug) T1), who remember the state before disconnecting.
How to reset the Xiaomi hub to factory settings?
Xiaomi Smart Home integration with other systems: Home Assistant, Google Home, Alice
One of Xiaomi’s strengths is its ability to integrate with third-party platforms, allowing you to manage devices via voice assistants or create complex automations that are not available in the standard Mi Home app.
1. Connect to Google Assistant / Apple HomeKit
For Google Assistant:
- Open Mi Home, go to Profile → Settings → Google Assistant.
- Sign in through your Google account and select your sync devices.
- Say in your voice, “OK Google, turn on the light in the living room.”
For HomeKit (only for Aqara devices):
- Buy the Aqara Hub M2 Or Aqara Camera Hub. G2H.
- In the Aqara Home app, go to Settings → HomeKit and scan it QR-code.
- Add the devices to the Apple Home app.
2.Integration with Home Assistant
Home Assistant is an open platform for smart homes that allows you to create complex scenarios.
- Install Home Assistant on the Raspberry Pi or NAS.
- Add Xiaomi Miio integration via Configuration.yaml: miio: devices: - host: 192.168.1.100 # IP-hub address: YOUR_TOKEN # Token from Mi Home model: lumi.gateway.mcn03
- Get the token through the Mi Home app (instruction: GitHub).
The advantages of Home Assistant:
- 🔗 Local management without depending on the cloud Xiaomi.
- 📊 Advanced analytics (e.g., monthly temperature charts).
- 🤖 Complex Automation with Node-RED.
⚠️ Note: After connecting to Home Assistant, some Xiaomi devices may stop working in the original Mi Home app.
Real cases: how Xiaomi smart home simplifies life in an apartment
The theory is good, but how does a smart home system work in practice? Consider 3 real-world automation scenarios for a typical apartment.
Case 1: Saving electricity
Problem: Forget to turn off the lights in the hallway or the heater in the bathroom.
Decision:
- 💡 Install Yeelight in the hallway and Mi Smart Socket for the heater.
- 📱 Set up automation: If the Motion Sensor doesn't capture the movement for 5 minutes → Turn off the lights if the bathroom temperature is above 24°C → heater off.
Savings: up to 30% on electricity due to the exclusion of “background” consumption.
Case 2: Safety during the holidays
Problem: You are afraid to leave your apartment unattended during your trip.
Decision:
- 🚪 Install. Door/Window Sensor to the front door and windows.
- 🎥 Add the Mi Home Camera 2K cloud-recorded.
- 🔦 Set up "presence simulation mode": Turn on the lights at random times (from 18:00 to 23:00); turn on the TV for 30 minutes (via Mi Smart Plug); send a notification if the motion sensor is triggered in your absence.
Case 3: Comfortable climate
Problem: In summer, the apartment is stuffy, in winter - dry air.
Decision:
- 🌡️ Install Aqara Temperature & Humidity Sensor in every room.
- ❄️ Connect the air conditioning system with Mi Air Conditioning Companion.
- 💧 Add the Xiaomi Mi Smart Humidifier.
- ⚙️ Set up automation: If the temperature > 26°C → air-condition on 24°C. If humidity < 40% → humidifier.
💡
The most effective way to save money with a smart home is to automate climate control, and according to Xiaomi, users using temperature and humidity sensors cut their heating/cooling costs by 20 to 40 percent.