Building a smart home based on the Xiaomi ecosystem in an apartment is not only convenient, but also a real saving of time, energy and even money. Unlike country houses, which require complex security and climate control systems, apartments need compact but functional solutions. Xiaomiβs main advantage is the compatibility of devices with each other, affordable prices and easy integration through a single application Mi Home (now Mi Home App merged with Xiaomi Home into one app).
But many people face common mistakes: buying devices that donβt work together, ignoring geofence settings, or misplacing sensors. This article presents unique device layouts for typical apartments (studios, 1-bedroom, 2-bedroom), step-by-step instructions for setting up automation and solving problems that arenβt written in the official guides, such as how to get around the limit on the number of connected devices to a single hub, or why scenarios work with a delay.
1. What Xiaomi devices are needed for a smart home in an apartment
The main mistake of beginners is to buy devices at random, without considering their compatibility and real needs. For example, the door opening sensor is useless if you do not have pets or children, and a smart socket is not necessary if all the equipment is already energy efficient.
- π Central hub: Xiaomi Mi Smart Home Hub 2 (supports Zigbee 3.0, Matter, and up to 128 devices) or Aqara Hub M2 (Better for automation, but without Matter support).
- π Smart sockets: Xiaomi Smart Plug Wi-Fi (for managing household appliances) or Mi Power Strip (extension with 3 outlets) + USB).
- π‘ Lighting: Yeelight LED Smart Bulb (color lamp with 16 million shades) or Mi LED Desk Lamp (table lamp with brightness adjustment).
- πͺ Security Sensors: Xiaomi Door/Window Sensor 2 (for doors/windows and Mi Motion Sensor 2 (lens-loop 170Β°).
- π‘οΈ Climate Control: Xiaomi Temperature & Humidity Sensor 2 (precisely up to the top) Β±0.3Β°C) and Mi Smart Fan (fan with application control).
For advanced automation, add:
- π Smart speaker: Xiaomi Smart Speaker (with Alice or Google Assistant) for voice control.
- πΊ Smart TV: Mi TV Q2 (with built-in Mi Home to manage other devices).
- π° The Aqara Water Leak Sensor + Xiaomi Smart Valve (automatically blocks water in case of leakage).
β οΈ Note: If you live in an apartment with aluminum wiring (typical for homes older than 2000), smart outlets Xiaomi can not withstand loads above 10A. 3500W (For example, Smart Plug Zigbee, or use the Aqara Smart Wall Switch relay that is mounted into the wall.
2. Schemes of placement of devices for typical apartments
The layout of the devices depends on the layout, and the best designs for the most common types of apartments, proven in practice, should be in the radius. 10-15 Meters from the hub (for Zigbee) or have stable Wi-Fi (for devices without a hub).
| Type of apartment | Recommended devices | Number of | Places of installation |
|---|---|---|---|
| Studio (20-30 Β²) | Hub, 2 outlets, 1 motion sensor, 1 door opening sensor, 2 lamps | 6-7 piece. | Hub - at the TV, motion sensor - above the front door, sockets - for the kettle and air conditioner |
| 1-room-room (35-50 Β²) | Hub, 3 outlets, 2 motion sensors, 1 leak sensor, 3 lamps, thermohygrometer | 10-12 pcs. | The sensor of the leak - under the sink, thermohygrometer - in the bedroom, sockets - for the heater, humidifier, TV |
| 2-room-room (50-70 Β²) | Hub, 4 outlets, 3 motion sensors, 2 opening sensors, 1 smoke sensor, 4 lamps, smart fan | 14-16 piece. | Smoke sensor in the kitchen, opening sensors on the balcony door and windows, fan in the bedroom |
πΉ Critical areas for sensors:
- πͺ Entrance door: opening sensor + Xiaomi Home Security Camera 2K (if there is a risk of hacking).
- π₯ Kitchen: Mi Smoke Detector Smoke Sensor (required!) + Aqara Gas Sensor (if the stove is gas).
- π§ Bathroom/toilet: leak sensor under sink and washing machine.
- ποΈ Bedroom: Thermohygrometer at a height of 1.5 m from the floor (not next to the battery!).
β οΈ Attention: If your apartment has thick concrete walls (panel houses), the Zigbee signal may not pass between rooms:
- Use the Xiaomi Zigbee Repeater (Signal Repeater).
- Place a hub in the center of the apartment (for example, in the hallway).
- For Wi-Fi devices, set up a Mesh network via Xiaomi router AX3600.
π‘
For apartments with metal doors (e.g. armored), the opening sensors may not work smoothly, in which case you can choose models with an external antenna or use Aqara magnetic contacts with amplified signal.
3. Step-by-step setup of a smart home through Mi Home
Once you buy the devices, you need to connect them to a single system, using the official Mi Home app (available for Android and iOS), Importantly, all devices must be from the same region (for example, China or Europe), you can not mix regions, this will lead to incompatibility!
Step 1: Installation and configuration of the application
- Download Mi Home from the App Store or Google Play.
- Sign up via your phone number or Xiaomi account.
- In the application settings, select the region "Russia" (if you bought the device in Russia) or "China" (if you ordered from Aliexpress).
Step 2. Connecting the hub
- Connect the Mi Smart Home Hub 2 to the socket and wait for the blue indicator to flash.
- In the app, click "+ β Add the device β hub".
- Follow the instructions: the application will offer to connect to the temporary Wi-Fi network hub (the name will be type) MiHub_XXXX).
- After connecting the hub will automatically update the firmware (this will take time). 5-10 minute).
Step 3: Adding other devices
For each device, the algorithm is similar:
- Press "+ β Add device" and select category (e.g., "Lighting").
- Activate the pairing mode on the device (usually hold the 5-second button until the indicator blinks).
- Bring the device closer to the hub (at a distance). 1-2 square).
- Wait for confirmation in the appendix.
β οΈ Note: If the device is not connected, check:
- π Battery charge (in sensors often discharged batteries out of the box").
- πΆ Wi-Fi signal (the hub must be in the coverage area of the router at a frequency of 2.4 GHz).
- π Region in the app (if the hub is from China and the region in Mi Home is Europe, the connection will not be possible).
Make sure the hub is plugged in and flashes blue|Check that the phone is connected to 2.4 GHz Wi-Fi|Remove and insert batteries in sensors|Place the hub and device next to each other (within 1 meter)|Update the Mi Home app to the latest version-->
4. Creating automation: scenarios and triggers
The main advantage of a smart home is that it has automatic scenarios that save time, like lights turning on when you're driving and the heater turning off when you're not at home. Mi Home has two types of automation:
- π Simple scenarios (one action per trigger).
- π€ Complex scenarios (chain of actions with conditions).
Examples of useful scenarios for an apartment:
| Script | Trigger. | Action. | Additional conditions |
|---|---|---|---|
| "Morning Rise" | Alarm clock at 7:00. | Turn on the lamp at 30% brightness, start the coffee maker | Only on weekdays. |
| "Nobody's Home" | Geozon (all left the apartment) | Turn off all outlets, turn on "Security" mode | Ignore pets (if there is a motion sensor with sensitivity settings) |
| "Night mode" | 22:00 or the Sleeping Team | Turn off the lights, turn on the humidifier, close the curtains (if there is a Mi Smart Curtain) | Only if someone is at home (by geofence) |
| "Emergency blackout" | The leak sensor went off. | Shut off the water (Smart Valve), send a notification | Repeat every 5 minutes until the problem is resolved. |
How to create a script:
- Open Mi Home, go to the Automation tab" β "Create".
- Select "Trigger" (for example, "Motion Sensor Activated").
- Add "Action" (e.g., "Switch on the lamp").
- Set up the "Terms" (for example, "Only from 18:00 to 23:00").
- Save the script and test it out.
π‘ Secret Life Hack: If scripts are triggered with a delay (e.g., lights are turned on through a 2-3 So, after you move, reduce the number of devices that are connected to one hub. 30 For larger apartments, use two hubs (e.g. one for lighting, one for security).
π‘
To make scripts work faster, turn off the cloud sync option in the hub settings, which will reduce latency, but automation will only work if you have local Internet.
5. Integration with voice assistants and other systems
Xiaomiβs smart home can be controlled not only through the app, but also through voice (via Alice, Google Assistant or Siri), and also connect to other ecosystems, such as Apple HomeKit or Yandex Smart Home.
Connection to Alice (Yandex):
- Open the Yandex app with Alice.
- Go to Devices. β Add the device β Xiaomi".
- Enter the username/password from your Mi Home account.
- Allow access to the devices.
Now you can say, "Alice, turn on the light in the room," or "Alice, show the temperature in the bedroom."
Connection to Google Assistant:
- At Mi Home, go to Profile. β Settings β Google Assistant".
- Click βConnectβ and log in through your Google account.
- The Google Home app will feature a βXiaomiβ section with all devices.
Home Assistant (for advanced users):
If you need more flexibility than Mi Home offers, use Home Assistant, an open platform for smart homes.
Example of configuration for integration.yaml in Home Assistant
mqtt:
broker: core-mosquitto
discovery: true
Xiaomi Connects with Mi Home Token
xiaomi_miio:
devices:
- host: 192.168.1.100 # IP of your hub
Token: YOUR_TOKEN_HERE # Get a token through Mi Home Token Extractor
model: lumi.gateway.mcn02β οΈ Note: When integrating with Home Assistant, disable cloud sync in the hub settings, otherwise devices will be duplicated and commands will conflict.
How to Get Mi Home Token for Home Assistant
6. Solving typical problems and errors
Even in a well-tuned smart home, there are periodic failures, and here are the most common problems and ways to solve them:
- π Device does not connect to hub: Check that hub and device are from the same region (e.g. both "China"). Update the hub's firmware via Settings β Update: Reset the device to factory settings (usually a 10 second Reset button).
- πΆ Sensor communication is constantly lost: Check the batteries (even new ones can be discharged). Reduce the distance between the sensor and the hub (maximum 10 meters for Zigbee). Add a Xiaomi Zigbee Repeater signal repeater.
- β³ Latency scenarios: Turn off cloud sync in the hub settings. Break up devices into two hubs (e.g. lighting and security). Check internet speed (minimum 10 Mbps for stable operation).
- π Hub constantly reboots: Unplug it from the socket for 1 minute, then plug it again. Check the voltage on the network (the hub is sensitive to jumps). If the problem recurs, reset the hub to factory settings.
π οΈ If nothing helps:
- Check the status of Xiaomi servers β perhaps the problem is on the manufacturerβs side.
- Remove and reinstall the Mi Home app (sometimes the cache interferes with the work).
- Contact Xiaomi support via the in-app chat (attach screenshots of errors).
π‘
If after updating the firmware hub stopped working old devices, try rolling back the version of the software through Settings β Update β Beta. Sometimes new firmware breaks compatibility with old sensors.
7 Smart Home Security: How to Protect Data
Smart devices collect data about your habits, and leaking them can be a problem.
- π Use a complex password for your Xiaomi account (at least 12 characters with numbers and special signs).
- π‘οΈ Enable two-factor authentication in your account settings.
- π Set up a guest Wi-Fi network for smart devices (separate from the main network).
- π Update your firmware regularly (there is an automatic update option in Mi Home).
- π΅ Disable cloud sync if you donβt use external control (this will reduce the risk of hacking).
β οΈ Note: If you use Home Assistant or other third-party platforms, never open your router ports to access from the Internet. VPN (For example, use WireGuard or use Nabu Casa (the official cloud service for Home Assistant).
π How to check if your smart home is hacked:
- Check the list of connected devices in Mi Home β there should be no unknown gadgets.
- Open the hub activity log: If there are teams you haven't sent, that's cause for concern.
- Use the Fing app to scan the network, and it will show all connected devices.
8 How Much Does Xiaomi Smart Home Cost: Budget Calculation
The cost of a smart home depends on the number of devices and their type. Below is an approximate calculation for an apartment of 50 m2 (1-room), Prices are current for 2026 (including discounts on AliExpress and in official Xiaomi stores).
| The device | Model | Number of | Price per pc. (β½) | Totally (β½) |
|---|---|---|---|---|
| hub | Xiaomi Mi Smart Home Hub 2 | 1 | 3 500 | 3 500 |
| Smart socket | Xiaomi Smart Plug Wi-Fi | 3 | 1 200 | 3 600 |
| lamp | Yeelight LED Smart Bulb | 2 | 1 800 | 3 600 |
| Motion sensor | Mi Motion Sensor 2 | 2 | 900 | 1 800 |
| Opening sensor | Xiaomi Door/Window Sensor 2 | 2 | 800 | 1 600 |
| Thermohygrometer | Xiaomi Temperature & Humidity Sensor 2 | 1 | 1 100 | 1 100 |
| Total. | 11 | 15 200 |
π° How to save money:
- Buy devices in Chinese stores (for example, on AliExpress with reviews not lower than 4.8).
- Look for kits (e.g. "Hub") + 3 sensors are cheaper than individually).
- Watch Black Friday or 11.11 (down to 50%).
- Use cashback services (e.g. LetyShops or EPN).
β οΈ Warning: When buying devices from China, check the voltage! some outlets and hubs are designed for the purpose of using the power supply. 220V, But there are models only for 110V (Also note the firmware region β Chinese devices may not have Russian in the interface.