Xiaomi Gateway Connection: From Unpacking to Smart Home Integration

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 lockSupport for ZigBeeCompatibility with Mi HomeSupport for Home Assistant Support
Xiaomi Gateway 3ZigBee 1.2Yes (all regions)Partially (firmware required)
Xiaomi Gateway 4ZigBee 3.0Yes (Chinese version with limitations)Yes (via ZHA or Zigbee2MQTT)
Xiaomi Gateway ProZigBee 3.0 + MatterYes (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).

πŸ“Š What kind of smart home ecosystem do you use?
Xiaomi/Mi Home
Home Assistant
Apple HomeKit
Google Home
Another.

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:

  1. 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:

  1. Go to Profile. β†’ Automation β†’ Create.
  2. Select a condition (e.g. Motion Sensor β†’ Motion Detected).
  3. Specify the action (for example, the lamp β†’ Enable).
  4. 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:

  1. Make a backup of the settings in Mi Home (Site Profile β†’ Settings β†’ Backup).
  2. 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:

  1. 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).
  2. In the Mi Home app, go to the gateway section and click Add Device (+).
  3. 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?
If the sensor or lamp does not pair with the gateway, try the following steps: 1. Remove the device from the Mi Home (if it already exists) and start the procedure again. 2. Check if your gateway model supports the device (see the compatibility table above). 3. Update the gateway firmware and check for updates for the device itself. 4. If nothing helps, try connecting the device through alternative software (e.g., Zigbee2MQTT).

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:

  1. Install Home Assistant on a Raspberry Pi, NAS, or other server.
  2. 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 causeDecision
Gateway does not connect to Wi-FiWrong Password or 5 GHz NetworkCheck the network data, switch the router to 2.4 GHz mode
Devices are disconnected from the gatewayZigBee weak signal or interferenceMove the gateway closer to the devices, avoid metal obstacles
Gateway not updatedXiaomi server is not available or the old version of the softwareCheck your internet connection, try updating later
Voice commands are down.Mi Home region incorrect or lack of supportChange region to Russia or use Alice via Yandex IoT

If the gateway has stopped responding to commands, try:

  1. Reboot the device (turn off power for 30 seconds).
  2. Reset to factory settings (hold the button on the gateway for 10 seconds until the indicator starts flashing yellow).
  3. Update the Mi Home app to the latest version.

To diagnose device connection problems, use the built-in tool in Mi Home:

  1. Go to the gateway settings.
  2. Select ZigBee Devices β†’ Network Diagnostics.
  3. 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/zigbee2mqtt

Another useful trick is to prioritize traffic for the gateway in the router settings, which will reduce the delays in managing the devices.

  1. Go to the router control panel (usually at 192.168.1.1).
  2. Find the QoS (Quality of Service) section.
  3. Add in. MAC-gateway address in priority device list.

FAQ: Answers to Frequent Questions

Can I connect Xiaomi Gateway to a router via cable (Ethernet)?
Yes, but only the Xiaomi Gateway Pro model supports Ethernet connectivity. Conventional gateways (Gateway 3/4) only work on Wi-Fi (2.4 GHz). If you need a wired option, consider the Aqara Hub M2, which has an Ethernet port and is compatible with Xiaomi devices.
How to reset Xiaomi Gateway to factory settings?
To reset, hold the physical button on the gateway for 10-15 seconds until the indicator flashes yellow quickly, and then the device will return to the factory settings, and it can be reconfigured. Note: all paired devices and automation will be removed!
Why does the gateway flash red and not connect?
The red indicator signals a network connection error. Possible reasons: Wrong Wi-Fi password. Gateway is connected to 5 GHz (to switch to 2.4 GHz), Xiaomi server problems (check status on status.mi.com), Try rebooting the gateway and router, and check if the firewall blocks the connection to the Xiaomi cloud.
Can you use Xiaomi Gateway without the internet?
Yes, but with limitations: Local device management (lights on/off, sensors) will work. Automations created in Mi Home will not be performed without the Internet (they are handled by the Xiaomi cloud); Voice assistants (Alice, Google Assistant) also require a network connection. For full autonomy, use Home Assistant or other local control systems.
How to connect Xiaomi Gateway to Apple HomeKit?
Officially, Xiaomi’s gateway doesn’t support HomeKit, but there are workarounds: Use Home Assistant with HomeKit integration – this will allow you to manage devices via the Home app on iPhone. Install the HomeBridge plugin on Raspberry Pi and set up a connection between Mi Home and HomeKit. Both methods require additional customization and do not guarantee stable operation.