2020 is a turning point for the mass adoption of automation technologies in everyday life. If you have long postponed familiarity with the ecosystem Xiaomi Mi Home, now is the right time to turn a regular apartment into a high-tech space. The market is filled with affordable devices, and the software has achieved stability, allowing you to create complex chains of action without having to be a programmer.
The biggest mistake for beginners is to buy disparate gadgets without understanding the overall architecture of the system. To make a smart home work as a single organism, rather than as a set of remotes in a smartphone, you need to clearly plan the network structure and choose the right entry point. In this article, we will discuss the fundamentals of building a system based on the Zigbee and Wi-Fi protocols, relevant for this year.
You'll have the ability to control lighting, climate and safety with just one touch, and central control will not only allow you to control your devices remotely, but also make them respond to changes in the environment, for example, the system will turn off the lights when you leave, or turn on the humidifier when the air is dry.
Selection of central gateway and communication protocols
The foundation of any automation system is a gateway (hub), which integrates devices that operate at different frequencies. In 2020, the de facto standard for energy-efficient devices became the Zigbee 3.0 protocol, which is much more stable and faster than its predecessor, and it is through the gateway that motion, temperature and water leakage sensors transmit signals to the cloud and to your phone.
There are several hub options, and the choice depends on your ambitions. For the base scenario, the Xiaomi Mi Smart Home Hub (formerly Gateway 2), which also acts as a nightlight and emits alarm bells, will suit you. More advanced users choose the Aqara Hub M1S or M2, which supports integration with Apple HomeKit and has a built-in IR port to control old household appliances.
β οΈ Note: Zigbee devices do not connect directly to a Wi-Fi router. They require a compatible gateway, otherwise they will remain invisible to the application.
It's important to consider the range of the network. Zigbee creates a mesh structure, where every device powered by the network (like a smart outlet) acts as a signal repeater, which allows you to cover large areas without losing communication, unlike Bluetooth devices, which require you to constantly be near the phone.
π‘
For a large apartment, choose a gateway with support for Zigbee 3.0 and place smart sockets evenly in the rooms to amplify the mesh network signal.
Basic set of sensors for start
Once the gateway is installed, you need to fill the system with sense organs, sensors collect information about the environment and transmit it for processing, and without them, the smart home is blind and deaf, it will not be able to respond to your actions or changes in the weather outside.
The starter package should include devices that provide basic safety and comfort. A motion sensor (for example, Aqara Motion Sensor) will trigger the lights in the hallway or notification of uninvited guests. The door opening sensor will tell if someone enters the apartment or opens a window while the air conditioner is operating.
- π‘οΈ Temperature and humidity sensor β critical for automation of climate engineering and microclimate control.
- π§ Water leak sensor β will save from the flood, instantly sending a notification and blocking the electromagnetic faucet (if available).
- π Wireless button β a universal remote for running scripts, turning off all devices or calling emergency services.
Don't ignore the light sensor, which is often built into other devices or available as a standalone module, and it allows you to implement a smart light scenario where the lamps only turn on when the room is dark and there's someone in it, saving energy and extending the life of the light bulbs.
Smart lighting: lamps and switches
Lighting is the most visible part of a smart home, and there are two main ways for the user to do it: replace the light bulbs with smart light bulbs, or install smart light switches. Smart lights like the Yeelight Smart LED Bulb allow you to change color temperature and brightness, creating an atmosphere for a movie or work.
However, the lamps have a significant disadvantage: if someone clicks a conventional switch on the wall, the lamp will turn off and lose contact with the network. To avoid this problem, professionals recommend installing smart switches (for example, Aqara Wall Switch), which require a neutral wire (N) in the rosette, but ensure the stable operation of the Zigbee network.
If there is no neutral wire, there are zero-free versions of the switches, but they may require a special capacitor to be installed in the chandelier for stable operation. Also popular are Aqara Opple wireless switches, which can be glued anywhere on the wall and programmed to control any group of lamps.
| Type of device | Protocol | We need a lock. | Substantive function |
|---|---|---|---|
| Yeelight Bulb | Wi-Fi | No. | Color, brightness, temperature |
| Aqara Switch (Zero Line) | Zigbee | Yes. | On/off, dimming |
| Aqara Switch (Fire) | Zigbee | Yes. | On/off (requires zero) |
| Philips Hue | Zigbee | Yeah. | Premium light, wide palette |
π‘
For new buildings, always plan to connect neutral wires to switches β this will expand the choice of compatible equipment in the future.
Managing household appliances and outlets
To make smart old devices like floor lamps, heaters, or coffee machines, just a simple smart socket, devices like the Xiaomi Mi Smart Plug that can track power consumption and remotely break the circuit, and it's the perfect way to automate water heating or humidifier activation.
For infrared-controlled TVs and air conditioners, the irreplaceable universal IR remote is built into the M2 hub or by buying a separate Aqara IR Remote, you can turn on the air conditioner on schedule or turn off the TV with your voice through Alice or Siri. This makes "stupid" equipment part of the ecosystem.
Special attention should be paid to safety: smart sockets with child protection and power statistics help to detect faulty appliances, and if a device starts to consume abnormally much power, the system can warn about this or automatically turn off power.
β οΈ Note: Do not connect powerful heating appliances (boilers, electric boilers) to smart outlets if their total power exceeds the nominal value of the socket (usually 10A or 2.2 kW).
The scenarios for using sockets are almost limitless: You can set up automatic charging of an electric car at night at a reduced rate or simulate the presence of the owners, turning on and off the lights at random times during vacation.
Scenario creation and automation
The magic of a smart home is revealed in scenarios, if β That action chains. Mi Home provides a powerful, if sometimes confusing, tool to create them. The logic is simple: choose a trigger device (condition) and an executing device (action).
An example of a basic security scenario is, "If the leak detector detects water and any time of day, then send a notification to the phone and turn on the siren on the airlock." More complex scenarios can include delays and additional conditions, such as, "If the motion sensor is triggered And it's night, then turn on the nightlight for 5 minutes."
βοΈ Checking before starting the script
It is important to distinguish between on-premises and cloud scenarios. Local scenarios run faster and work even when there is no Internet (if the hub and devices are on the network). For maximum response speed, try to build chains based on Zigbee devices and the local hub, avoiding dependence on external servers where it is critical.
The Secret to Stability
Keep in mind the geolocation. The "I'm gone" scenario can be triggered automatically when you disconnect your phone from your home Wi-Fi, so you don't have to worry if you've turned off the iron or closed the door.
Frequent problems and their solution
Despite the system's fine-tuning, users can face difficulties, one of the most common is the "fell-off" of devices, usually due to overloading of the Wi-Fi channel or weak Zigbee signal, the solution lies in the correct network layout and the use of repeaters.
Another problem is delays in executing commands. If the lights turn on 2-3 seconds after clapping your hands, check the load on the gateway. It may have too many complex scenarios, or it is too far from the router.
- π Resetting the device to factory settings often solves the problem of hanging.
- πΆ Updating the gateway firmware and all devices to the latest versions eliminates known bugs.
- π Rebooting the router and hub once a month helps clear the cache and stabilize the connection.
When migrating to a new phone or changing your account region, it may be difficult to access devices. The region chosen when registering a Xiaomi account determines the server on which the data is stored. Devices purchased for China may not be seen in the European account without changing the region in the application settings.
β οΈ Warning: If you change region in the Mi Home app, the list of devices will disappear from view, although it will not be deleted.