Creating a smart home ecosystem often seems like a challenging technical quest that only engineers can afford, but in reality, Xiaomiβs ecosystem has democratized the process as much as possible: You donβt have to slap walls or lay separate power cables to each switch to turn a regular apartment into a high-tech space.
The basic philosophy of the system is to automate routine activities: lights turn on when you enter a room, and a robot vacuum cleaner starts cleaning when you leave for work, and the centerpiece is not a smartphone, but a special gateway (hub) that connects all the disparate sensors into a single network, and it is with understanding the role of this device and choosing the right components that we begin our immersion into the world of automation.
In this article, we'll look at the architecture of the system, select the optimal gateway for your tasks, and Step-by-step customize the first scenarios that will really make life easier. You'll learn why some devices can't be seen in the application and how to make light bulbs flash red when the leak sensor is triggered.
System Architecture: How it Works Inside
The foundation of the ecosystem is to divide devices into two main groups by type of connection: Wi-Fi and Zigbee (or Bluetooth Mesh). Devices that work directly over Wi-Fi, such as robot vacuum cleaners, CCTV cameras and smart outlets, connect directly to your router. They do not require intermediate devices, but create an extra load on the wireless network if they are large.
The second, more important group for sensors, is the Zigbee protocol, which is an energy-efficient communication standard that allows tiny batteries in motion or temperature sensors to run for years without being replaced, but Zigbee devices themselves can't get online, they need a gateway translator, and it takes signals from the sensors and translates them into the Mi Home app on your phone.
What is the difference between Zigbee and Bluetooth Mesh?
It's important to understand that all commands are executed either through the company's cloud server or locally if you have the appropriate mode of operation set up. Local management is preferable, since it allows automation to work even when you turn off the Internet, although setting up this mode requires a little more attention. For beginners, cloud event processing is the standard and works quite quickly with a good connection.
Choosing a Gateway: The Heart of Your System
Choosing the right gateway is a critical factor that determines the stability of the entire system. There are many models on the market from different sub-brands of the ecosystem, such as Aqara, Xiaomi and Yeelight. For a user living in the CIS, the critical parameter is server region support. Most devices are more stable and faster when choosing a region "China", but some gateways may not connect if the region in the application does not coincide with the region of the device.
The most popular and versatile solution for a long time remained the gateway Aqara Gateway M2 or its newer version M1S. They support the Zigbee 3.0 protocol, have a built-in backlight, speaker for playing notifications and, most importantly, an infrared port for managing old household appliances (TVs, air conditioners).
When choosing, pay attention to the power mode. USB gateways can be powered by normal charging, but for reliability, it is better to use a power supply from the kit or a quality analogue so that power surges do not lead to network reboots. Power stability directly affects the response speed of the sensors.
| A model of a lock | Supported protocols | Features | Recommended region |
|---|---|---|---|
| Aqara Gateway M2 | Zigbee 3.0, Wi-Fi | IR port, loud speaker, LAN-port | China/Europe |
| Xiaomi Multimode | Zigbee, Bluetooth, Wi-Fi | Universality, Mesh support | China |
| Aqara Camera Hub G3 | Zigbee 3.0, Wi-Fi | 1080p camera, rotating mechanism | Europe/China |
| Yeelight Gateway | Zigbee, Wi-Fi | Integration with Yeelight lamps | China |
Basic set of sensors for start
After purchasing a gateway, the question for a beginner is: which sensors to buy first? There is no point in purchasing expensive CCTV systems unless you have basic security and comfort set up. The launch kit should cover the basic life scenarios: coming/going, leakage safety and climate control.
The first and foremost element is the motion sensor, which automatically turns on the lights in the hallway or bathroom, and triggers a "Security" scenario when you're not at home. Aqara's current models have a 170-degree viewing angle and a compact body that can be easily attached to double-sided tape anywhere in the room.
π‘
Place the motion sensor at a height of 2-2.5 meters and direct it so that it βcutsβ the space across the path of movement of a person, and not look him in the back β so the sensitivity will be maximum.
The second element is the door and window opening sensor, which is two parts: the main and the magnetic part, and when you open the magnet, the system instantly receives a signal, which is useful not only for security, but also for automation: for example, when you open the front door, you can turn on the light in the hallway, and when you open the window, the air conditioner turns off to save energy.
- π‘οΈ Temperature and humidity sensor is a small cube that will help automate the operation of the humidifier or air conditioner, maintaining the ideal microclimate.
- π§ The water leak sensor is a device that will save your budget, and when water hits your contacts, it sends a signal to the gateway, which can send a notification to your phone and shut down the electromagnetic faucet (if you have one).
- π Button-scenario β a universal remote for launching complex actions with one click, for example, turning off all the lights in the apartment before going to bed.
Installation and connection: step-by-step instructions
The setup process starts with the installation of the Mi Home app (or Aqara Home if you have chosen the device of this brand). After registering the account, click on the + symbol in the upper right corner and select the device search, at which point the gateway must be connected to the power and be located next to the smartphone.
As mentioned earlier, most devices labeled CN (China) must select the region "China"; if you make a mistake with the region, the device may simply be undecided or work with errors. Once you select the region, a search will begin, and an image of your gateway will appear on the screen.
The addition of peripheral sensors is similar, but with an important nuance: first you need to activate the pairing mode on the device itself. Usually this requires you to quickly press the hidden button 3-5 times before the indicator flashes. The system reaction time is limited, so keep the sensor close to the gateway (within 1-2 meters) at the time of pairing.
β οΈ Warning: Do not try to add Zigbee sensors unless you have a gateway installed and configured.Without a network coordinator, they will remain in sleep mode and will not be visible to the application.
Once successfully added, the device needs to be given a clear name (e.g., "Flight Door Sensor" rather than "Aqara Sensor 2839") and assigned a room, which is critical for proper voice control and scripting, and if you ignore room grouping, you'll find it difficult to navigate the 20+ device list in the future.
Creating the first automation scenarios
In fact, installing sensors doesn't make sense without adjusting the logic of how they work, which in the Xiaomi ecosystem is called "Scenarios" or "Automation." In the Mi Home app, the tab is called "Scenarios." Here we create a rule: "If (condition), then (action)".
Consider a classic example: turning on the light automatically in the corridor while you're driving; condition (If) is that the motion sensor is activated; action (To) is to put a smart light bulb or gateway into nightlight mode; however, to keep the lights from burning continuously while you're standing still, you need to add an additional condition or an off timer.
IF: Motion sensor (Corridor) -> Motion detected
E: Time -> Between 23:00 and 07:00
TO: Gateway -> Turn on nightlight
E: After 1 minute -> Turn off the nightπ‘
The main mistake of beginners is to forget about the condition "I" (time of day or illumination), because of which the light is turned on during the day when this is not necessary.
More complex scenarios can combine several conditions, such as the "I'm gone" scenario: pressing a wireless button at the door turns off all the lights, closes smart curtains, turns on the robot vacuum cleaner and activates camera security mode, creating such chains requires testing, since the delay between pressing and execution can be from 1 to 3 seconds.
Typical problems and their solution
Despite the reliability of the system, users often face connectivity problems, the most common of which is "Device not added." 90% of the time, this is because the smartphone is connected to a 5 GHz network, and smart devices (especially older models) only work in the 2.4 GHz band. Solution: switch Wi-Fi on your phone to a 2.4 GHz network during setup.
The second common problem is loss of communication with sensors. If the motion sensor has stopped responding, it's likely that the battery has gone down or it's too far from the gateway. The Zigbee protocol creates a mesh network where the constant-powered devices (sockets, switches) relay the signal. If the sensor is in the back room, try adding a grid-powered intermediate between it and the gateway.
β οΈ Note: When moving a gateway to a new apartment or changing a router, you will most likely have to reset all devices and bind them again, as network security keys may change.
Also worth mentioning is the problem of delays. If commands are executed slowly, check the Wi-Fi channel load. The smart home likes stability, so it's better to reserve static for the gateway. IP-address in the router settings so that it is always available at the same address.