The Xiaomi Gateway is a central element of Xiaomiβs smart home ecosystem that connects sensors, lamps, sockets and other devices using the ZigBee protocol. Without the right connection and setup, the gateway will not be able to control peripheral gadgets, and you will lose the ability to automate lighting, security or climate control. In this article, we will examine not only basic connectivity through the official Mi Home application, but also alternative integration methods (for example, through Home Assistant), as well as typical errors that interfere with the stable operation of the system.
It is important to understand that the configuration process may vary depending on the gateway model (Gateway 3, Gateway 4, Gateway Pro) and the region of purchase of the device. For example, the Chinese versions often require additional manipulation to work in Russia or Europe. We took these nuances into account and prepared a universal guide that is suitable for both beginners and experienced users of smart homes.
1. Preparation for connection: what will be needed
Before you start setting up, make sure you have everything you need. The minimum set includes the Xiaomi Gateway itself, the power supply (company), a smartphone with the Mi Home app installed (or alternative smart home software), and a stable Wi-Fi connection at 2.4 GHz. Note: the gateway does not support 5 GHz networks, so if your router only works in this range, you will need to change the settings or use a separate access point.
Also check device compatibility. Not all Xiaomi sensors and lamps work with all versions of the gateway. For example, Gateway 3 does not support the ZigBee 3.0 protocol used in new devices in the Aqara ecosystem.
| A model of a lock | Support for ZigBee | Compatibility with Mi Home | Support for Home Assistant Support |
|---|---|---|---|
| Xiaomi Gateway 3 | ZigBee 1.2 | Yes (all regions) | Partially (firmware required) |
| Xiaomi Gateway 4 | ZigBee 3.0 | Yes (Chinese version with limitations) | Yes (via ZHA or Zigbee2MQTT) |
| Xiaomi Gateway Pro | ZigBee 3.0 + Matter | Yes (global version) | Yes (native support) |
If you plan to use a gateway with Home Assistant or other automation systems, prepare in advance. USB-Firmware cable (if required) and check for a free port on the router for Ethernet connection (relevant for Gateway Pro).
2. Connection of the gateway to the network: step-by-step instructions
Start by physically connecting the device. Connect the gateway to the power supply and plug the plug into the socket. The indicator on the front should flash orange, which is a signal that the device is ready to be set up. If the indicator is not lit or flashing red, check the power cable and the socket. For models with Ethernet support (for example, Gateway Pro), connect the network cable to the router.
Follow the instructions:
- Install the Mi Home app on your smartphone (available for Android and iOS). Sign up or sign in to your existing Xiaomi account.
Check 2.4 GHz network support on the router
Install the Mi Home app and register
Connect the gateway to power and wait for the orange indicator
Write down the password from the sticker on the device
Prepare the main Wi-Fi network data (name and password)-->
If there is an error during the connection stage, try restarting the gateway (turn off power for 10 seconds) or changing your smartphone β some Android models with custom firmware may conflict with Xiaomiβs setup protocol.
β οΈ Note: If you are using the Chinese version of the gateway (CN-In the region, to work in Russia, you may need to change the server in Mi Home to Mainland China, but this will limit the functionality of some devices (for example, voice assistant Alice will not work.
3.Setting up the gateway in the Mi Home app
Once connected successfully, the gateway will appear in the main Mi Home menu.
- π§ Update your firmware β check for updates in the device settings section. New versions often fix compatibility errors.
- π΅ Set up sound alerts β the gateway can play melodies when sensors are triggered (for example, when opening a door).
- π Change region β if the device is purchased in China, changing the region to βRussiaβ can add support for the Russian language in voice prompts.
- π Reset to factory settings β useful if the gateway has previously been used by another user.
You can focus on automation, and you can create scenarios for device interactions, like this:
If the motion sensor detects activity,
Turn on the Yeelight lamp connected to the gateway.For this:
- Go to Profile. β Automation β Create.
- Select a condition (e.g. Motion Sensor β Motion Detected).
- Specify the action (for example, the lamp β Enable).
- Save the script and test it out.
π‘
If the gateway does not find connected devices (such as sensors), try rebooting it and reset the sensor settings (usually holding the button on the device for 5-10 seconds until the indicator starts flashing quickly).
In some cases, after a firmware update, the gateway may forget previously paired devices, to avoid this, before upgrading:
- Make a backup of the settings in Mi Home (Site Profile β Settings β Backup).
- Disable automations that may conflict with the new version of the software.
Connecting devices to the gateway
Once the gateway is set up, you can add other Xiaomi ecosystem gadgets to it, and the mating process is standard for most devices:
- Activate the pairing mode on the device (for example, for the Aqara door opening sensor, you need to insert a battery and wait for the indicator to flash).
- In the Mi Home app, go to the gateway section and click Add Device (+).
- Follow the instructions on the screen. You usually need to confirm the device's addition manually (for example, press a button on the sensor).
Some devices (e.g. Xiaomi Mi Temperature and Humidity Sensor) may not be automatically detected.
- π‘ Move the gateway closer to the pairing device - the distance should not exceed 10 meters.
The Xiaomi Gateway 3 gateway supports no more than 30 devices at a time.If youβre planning a large smart home system, consider switching to Gateway 4 or Gateway Pro, which can manage up to 128 devices.
What to do if the device is not added?
5. Alternative ways of connecting: Home Assistant and not only
The official Mi Home app isnβt for everyone, for example, because of automation restrictions or Xiaomiβs cloud binding, and the alternative is to integrate the gateway into Home Assistant, an open platform for smart homes, which will require:
- Install Home Assistant on a Raspberry Pi, NAS, or other server.
- Add Zigbee Home Automation (ZHA) or Zigbee2MQTT integration.
Advantages of this approach:
- π Local management β all data stays on your network, no matter what the Xiaomi cloud.
- π οΈ Flexible Automation β You can create complex scenarios using logical conditions.
- π Support for other brandsβ devices, for example, IKEA Tradfri or Philips Hue.
Example configuration for Zigbee2MQTT:
Configuration.yaml for Home Assistant
zigbee2mqtt:
data_path: /config/zigbee2mqtt
devices: devices.yaml
mqtt:
base_topic: zigbee2mqtt
server: mqtt://localhost
serial:
port: /dev/ttyUSB0 # Port to which the gateway is connectedβ οΈ Note: Xiaomi Gateway 3 firmware via third-party tools (e.g. Tasmota) will void the warranty and may result in unstable operation.
6. Solving common problems
Even after a successful connection, users often encounter errors, and here are the most common ones and ways to fix them:
| Problem. | Possible cause | Decision |
|---|---|---|
| Gateway does not connect to Wi-Fi | Wrong Password or 5 GHz Network | Check the network data, switch the router to 2.4 GHz mode |
| Devices are disconnected from the gateway | ZigBee weak signal or interference | Move the gateway closer to the devices, avoid metal obstacles |
| Gateway not updated | Xiaomi server is not available or the old version of the software | Check your internet connection, try updating later |
| Voice commands are down. | Mi Home region incorrect or lack of support | Change region to Russia or use Alice via Yandex IoT |
If the gateway has stopped responding to commands, try:
- Reboot the device (turn off power for 30 seconds).
- Reset to factory settings (hold the button on the gateway for 10 seconds until the indicator starts flashing yellow).
- Update the Mi Home app to the latest version.
To diagnose device connection problems, use the built-in tool in Mi Home:
- Go to the gateway settings.
- Select ZigBee Devices β Network Diagnostics.
- Check the signal level and connection status of each device.
π‘
If the Xiaomi Gateway is not visible on the network after a reset, try connecting directly to it via a temporary access point (as in the first setup), which often helps restore the connection without completely flashing it.
7. Optimization of the gateway: advice from experienced users
To ensure that the smart home system works consistently, follow these recommendations:
- π‘ Place the gateway in the center of the house β this will provide uniform coverage with the ZigBee signal. Avoid installation near sources of interference (microwaves, routers 5 GHz).
- π Update your firmware regularly β new versions fix vulnerabilities and add support for devices.
- π Use an Uninterruptible Power Supply (UPS) β This will protect the gateway from failures when power is cut.
- π Monitor network load β if more than 20 devices are connected to the gateway, consider adding a second gateway to distribute the load.
For advanced users, it is useful to set up a backup for the gateway configuration. In Mi Home, this is done through the Profile β Settings β Backup. Save the cloud storage settings file (like Google Drive) β this will help to quickly restore the system after a crash.
If you are using Home Assistant, set up automatic backup of the Zigbee2MQTT database:
Example of a script for automatic backup (for Linux)
#!/bin/bash
tar -czvf /backup/zigbee2mqtt_$(date +%Y-%m-%d).tar.gz /config/zigbee2mqttAnother useful trick is to prioritize traffic for the gateway in the router settings, which will reduce the delays in managing the devices.
- Go to the router control panel (usually at 192.168.1.1).
- Find the QoS (Quality of Service) section.
- Add in. MAC-gateway address in priority device list.