How to start building a Xiaomi smart home
Xiaomi's ecosystem offers one of the most affordable and functional solutions for home automation, but before buying sensors and sockets, it's important to understand the key principles: device compatibility, communication protocol (ZigBee/Wi-Fi/Bluetooth) The central hub that will manage the entire system.
Xiaomiβs main advantage is cross-platform: most devices work through a single Mi Home app (or Xiaomi Home in newer versions). However, there are nuances: for example, the Aqara series sensors require a separate Aqara Hub, and some devices (like Yeelight) have their own applications but integrate into the overall ecosystem. Without a ZigBee hub (like Xiaomi Mi Smart Home Gateway), you will not be able to connect door opening, movement or leak sensors β they work only through this protocol.
If you are a beginner, start with a minimum set:
- π± Smartphone on Android/iOS with the Mi Home app
- π Smart socket (for example, Xiaomi Mi Smart Plug) for remote control of household appliances
- π¦ Smart Lamp (Yeelight or Mi) LED Smart Bulb for lighting
- πͺ ZigBee (Xiaomi Mi Smart Home Gateway 3)
Device Choice: What to Buy for Basic Automation
Xiaomi ecosystem has hundreds of devices, but enough to start 5-7 The rule of thumb is, give priority to ZigBee-enabled devices that are more stable than Wi-Fi analogues and don't overload your home network.
Here is the best set for an apartment area 50-70 Β²:
| Type of device | Model | Protocol | Price (2026) | Why? |
|---|---|---|---|---|
| Central hub | Xiaomi Mi Smart Home Gateway 3 | ZigBee 3.0 | ~3 500 β½ | Sensor control, siren, RGB-lighting |
| Motion sensor | Xiaomi Mi Motion Sensor 2 | ZigBee | ~1 200 β½ | Automatic lighting when driving |
| Opening sensor | Aqara Door and Window Sensor | ZigBee | ~900 β½ | Door/window control, gas leakage (with gas sensor) |
| Smart socket | Xiaomi Mi Smart Plug Wi-Fi | Wi-Fi | ~800 β½ | Remote control of equipment, monitoring of energy consumption |
| Smart lamp. | Yeelight LED Smart Bulb (Color) | Wi-Fi/Bluetooth | ~1 500 β½ | Brightness adjustment, color scenes, timers |
β οΈ Note: If you plan to use Aqara devices (such as leakage sensors or buttons), buy an Aqara Hub instead of a Xiaomi Gateway.
For advanced automation, add:
- π‘οΈ Aqara Smart Radiator Thermostat for heating control
- π§ Aqara Water Leak Sensor for the bathroom and kitchen
- π Xiaomi Mi Smart Speaker for voice control
- πΊ Smart TV (Mi) TV Mi Home support for centralized management
Installation and connection of the Xiaomi Mi Smart Home Gateway hub
The hub is the brain of your smart home, and without it, ZigBee devices (sensors, buttons, some switches) won't work. 10-15 minutes, but there are critical nuances:
1. Hub location: place it in the center of the apartment, at a height 1.5-2 Avoid metal surfaces and thick walls, which will screen the ZigBee signal, optimally on a shelf or wall in the hallway.
2. Network connection: the hub requires constant power (included) and connection to the router via Ethernet. Wi-Fi version of the hub (Gateway 3) is unstable - use the cable!
Step-by-step:
- Connect the hub to the outlet and router via Ethernet.
- Open the Mi Home app, click on it. + β Add the device β Gateway.
- Choose the region of China β it is important for the correct operation of sensors!
- Press the button on the hub when the app asks to confirm the connection.
- Wait for the firmware update (it can take up to 10 minutes).
Hub connected to router via cable|
The indicator on the hub burns blue|
The appendix displays the status "Online"|
The firmware has been updated to the latest version-->
β οΈ Note: If the hub is not connected, check:
- π Power: The indicator should be orange (load) or blue (work).
- π Network: Turn it off VPN Check that the router does not block ports 80 and 443.
- π± Region: If China is not selected, some sensors will not be recognized.
What to do if the hub is not updated?
Connecting devices to the hub and setting up in Mi Home
Once the hub is installed, you can add other devices.The process is universal for most Xiaomi gadgets, but there are exceptions (for example, Yeelight requires its app to initially set up).
The general connection algorithm:
- Open Mi Home, press + β Add the device.
- Select a category (e.g., Sensors and switches for Motion Sensor).
- Activate the device: Sensor: Remove the battery film (if any). Sockets: hold the button 5 seconds until the indicator flashes. Lamps: turn on / off 3 times in a row.
Wait for confirmation in the appendix.
β οΈ Note: If the device is not located, check:
- π Power: Sensors require batteries (usually) CR2032 or AAA).
- πΆ Distance: Maximum distance between hub and device β 10-15 meters (no obstacles).
- π Reboot: Reboot the hub and router if the connection freezes.
Once connected, the devices will appear in the Mi Home main menu, where you can:
- π Rename (e.g., "Bedroom Lamp" instead of "Bedroom Lamp "Yeelight_123").
- π Set up notifications (for motion/open sensors).
- β±οΈ Create timers (for example, turn off the socket at night).
- π Grouping in groups (for example, all lamps in the living room).
π‘
To speed up the connection of multiple devices, use the βQuick Addβ mode in Mi Home: go to Profile β Settings β Laboratory β Quick addition of devices.
Creating Automations (Scenes and Rules)
The main advantage of a smart home is the automation of routine activities. In Mi Home, this is done through Scenes and Automation.
- π Scene β a set of manually triggered actions (e.g., βEvening Modeβ turns off the lights and turns on the TV).
- βοΈ Automation β the βif... then...β rule (e.g., βif the motion sensor is triggered, turn on the lights").
Examples of useful automation:
| Trigger (condition) | Action. | Example of use |
|---|---|---|
| The motion sensor is activated. | Turn on the Yeelight lamp | Lighting in the hallway at the entrance |
| Door opening sensor activated | Turn on the siren at the hub | Security alarms |
| Time 22:00. | Turn off all sockets. | Saving electricity |
| Temperature below 18Β°C | Turn on the heater through the socket | Climate support |
How to create automation:
- In Mi Home go to Automation β Create β If...
- Select a trigger (such as a motion sensor). β Traffic detected).
- Click Add Action and select the device (e.g. Yeelight) β Turn on).
- Keep the rule and test it.
π‘
For stable automation, turn off battery optimization for the Mi Home app in Android settings (or enable background update on iOS).
β οΈ Warning: Avoid cyclical automation (e.g., βif the lamp is on, turn off the socket, and if the socket is off, turn on the lampβ). This leads to looping and overloading the hub.
Integration with voice assistants (Alice, Google, Siri)
Smart home Xiaomi can control voice through Yandex Alice, Google Assistant or Apple HomeKit (with restrictions).
Connection to Yandex Alice:
- Open the Yandex app with Alice.
- Go to Devices β Add the device β Xiaomi.
- Enter the username/password from your Mi Home account (use the same region as in the hub!).
- Allow access to the devices.
Now you can use commands:
- π‘ "Alice, turn on the light in the living room"
- π "Alice, turn off the kettle socket"
- π‘οΈ "Alice, what's the temperature in the room?"
β οΈ Note: Not all Xiaomi devices are supported by Alice. For example, Aqara sensors may not be displayed. For a full list of compatible devices, see Yandex documentation.
Connection to Google Assistant:
- In the Google Home app, click + β Set up your device β Are there devices already?
- Select Xiaomi Mi Home and sign in.
- Assign room devices (for example, "Bedroom", "Kitchen").
How to connect Xiaomi to Apple HomeKit?
Advanced Features: Home Assistant and Local Management
The Mi Home app is convenient for basic settings, but has limitations:
- π Xiaomi Cloud Dependence (Device Fails in Case of Server Failure).
- β³ Delays in execution of commands (up to) 1-2 seconds).
- π No complex automation (e.g. time of day and weather).
The solution is the Home Assistant platform, which allows you to manage devices locally and create complex scenarios.
The advantages of Home Assistant:
- π Local control: devices work even without the Internet.
- β‘ Instant response: teams are executed for 0.1-0.3 seconds.
- π Advanced analytics: power consumption graphs, sensor response history.
- π€ Integration: support 2000+ devices, not just Xiaomi).
How to connect Xiaomi to Home Assistant:
- Install Home Assistant on Raspberry Pi or NAS (Instructions: Official website).
- In the configuration file configuration.yaml add: xiaomi_aqara: gateways: - key: YOUR_GATEWAY_KEY (The key can be obtained through Mi Home with this tool).
- Reboot Home Assistant and add devices to the interface.
Example of automation in Home Assistant (turn on the light when driving and if it is dark outside):
automation:
Alias: "The hallway: light by movement (at night)"
trigger:
platform: state
entity_id: binary_sensor.motion_sensor_158d0001234567
to: "on"
condition:
- condition: sun
after: sunset
before: sunrise
action:
service: light.turn_on
entity_id: light.yeelight_12345678π‘
Home Assistant requires basic knowledge in IT, But it gives you complete control of the smart home. + voice-assistant.