Xiaomi Gateway: How to Connect to a Smart Home in 10 Minutes

Xiaomi’s gateway is a central element of the smart home ecosystem from the Chinese brand, which connects sensors, lamps, sockets and other devices through the Zigbee protocol. Without it, most Mi Home gadgets simply will not work: the gateway acts as a bridge between them and your smartphone, processing commands and providing a stable connection. But many users face difficulties already at the stage of the first connection β€” the indicator flashes wrong, the application does not see the device, the Wi-Fi network refuses to synchronize.

In this article, we’ll look at all the ways Xiaomi connects to its gateway, from basic configuration via Mi Home to integration with third-party systems like Home Assistant or Google Home. We’ll focus on common bugs (such as when the gateway is not defined on the network) and the nuances of working with different versions of the firmware. If you’re just starting out building a smart home or want to reconfigure an existing gateway, here you’ll find the answers to all the questions.

What are Xiaomi gateway models and how they differ

There are several generations of Xiaomi gateways on the market, and their capabilities vary significantly.

  • πŸ”Ή Xiaomi Mi Smart Home Gateway 1 (first generation) - basic version with support for Zigbee 1.2, no Ethernet connection. It has a built-in speaker and LED indicator, but limited in the number of connected devices (up to 30).
  • πŸ”Ή Xiaomi Mi Smart Home Gateway 2 - An improved version with Ethernet port (an alternative to Wi-Fi), support for Zigbee 3.0 and an increased device limit (up to 128). Supports backup power via USB-C.
  • πŸ”Ή Xiaomi Mi Smart Home Gateway 3 (or Aqara Hub) M2) β€” The flagship model with advanced automation capabilities, Matter support and integration with Apple HomeKit. IR-blaster.
  • πŸ”Ή Aqara Hub E1 β€” A budget version from the subsidiary brand Aqara, compatible with the Xiaomi ecosystem. Supports up to 128 devices, but lacks dynamics and performance. IR-port.

If you want maximum compatibility with Xiaomi and Aqara devices, take the Gateway. 2 gateway 3. For a minimalist smart home (sensors) doors/windows + The first version will be enough. Please note that the first generation of gateways does not support the Zigbee protocol. 3.0, This could cause problems with new devices (e.g. Aqara sensors) FP2).

Important: All Xiaomi gateways only work with 2.4GHz Wi-Fi networks. Connecting to 5GHz or Ethernet (if there is a port) is possible, but requires additional settings.

Preparing for the connection: what to do before setting up

Before you start setting up, make sure you have everything you need:

Install the Mi Home app (version no lower than 6.0.100)

Prepare a Xiaomi account (register if not already)

Check that the router supports 2.4 GHz (turn off 5 GHz to avoid conflict)

Unpack the gateway and connect it to power (use the original adapter)

Make sure your smartphone is connected to the same Wi-Fi network as the gateway.-->

If you use an Ethernet gateway (like Gateway 2), connect it to your router via a cable. LAN. This will increase connection stability, especially if there are many Wi-Fi devices in the house. For models without Ethernet (for example, Gateway 1), be sure to check the strength of the Wi-Fi signal at the gateway installation site - a weak signal can lead to communication breaks with sensors.

Also consider:

  • πŸ“± The Mi Home app should be installed on a smartphone with Android 5.0+ or iOS 10.0+. On older versions of the OS, synchronization errors are possible.
  • 🌍 Xiaomi’s account region is better to choose China (if you bought a gateway in an official store) or Russia (for devices with local firmware.
  • πŸ”Œ Don't connect the gateway through USB-Hub or extension cord, which can cause unstable operation. Use only the original power supply.
πŸ“Š What is Xiaomi's gateway?
Mi Smart Home Gateway 1
Mi Smart Home Gateway 2
Mi Smart Home Gateway 3 (Aqara Hub M2)
Aqara Hub E1
Other
I haven't bought it yet.

Step-by-step: how to connect the Xiaomi gateway through Mi Home

Consider the standard way to connect via the Mi Home app (relevant for all gateway models).

  1. Open the Mi Home app and log in. Go to Devices section β†’ Add the device (+).
  2. Select the Gateway category (or enter the model name manually in the search bar).
  3. Click on your gateway model (e.g. Xiaomi Mi Smart Home Gateway 2).
  4. Follow the instructions on the screen: confirm the flashing of the indicator on the gateway (should burn orange or yellow).
  5. Select a 2.4GHz Wi-Fi network and enter a password. If the gateway supports Ethernet, the application will offer an alternative way to connect.
  6. Wait until the process is completed (usually takes 1-3 minutes) and after a successful connection, the gateway will issue a voice message in Chinese (e.g., "Shebei lianjie chenggong" - "Device is connected successfully").

If the gateway is not connected:

  • πŸ”„ Restart router and gateway (turn off power for 30 seconds).
  • πŸ“Ά Check that the smartphone and gateway are on the same Wi-Fi network.
  • πŸ› οΈ Update the gateway firmware through Settings β†’ Update in the application Mi Home.

πŸ’‘

If the gateway issues audible alerts in Chinese, you can turn them off in the device settings in Mi Home: go to Gateway Settings β†’ Night lighting mode β†’ Disable voice notifications

Setup of the gateway via Ethernet (for models with LAN-port)

Xiaomi Mi Smart Home Gateway 2 and Aqara Hub M2 Supports Ethernet connection, which is useful in the following cases:

  • πŸ“‘ Weak Wi-Fi signal at the gateway installation site.
  • πŸ”’ The need for increased connection stability (e.g. for security systems).
  • 🚫 Restrictions of router on the number of connected devices over Wi-Fi.

To connect the gateway through LAN:

  1. Connect the gateway to the router via an Ethernet cable (use the port) LAN, not WAN!).
  2. Connect the gateway to power. The indicator should light up blue (unlike orange when connected to Wi-Fi).
  3. In the Mi Home app, select Add Device β†’ Gateways, follow the instructions. The app will automatically determine the type of connection.

If the gateway is not defined by Ethernet:

  • πŸ”Œ Check the cable - try another one LAN-cable (for example, from a router).
  • πŸ”„ Reboot router and gateway.
  • πŸ› οΈ In the router settings, turn on the option IGMP Snooping (sometimes required to run Zigbee devices correctly).

πŸ’‘

Ethernet connectivity reduces the latency (ping) between the gateway and sensors, which is critical for security systems (e.g. motion sensors or gas leaks).

Integration of Xiaomi Gateway with Other Smart Home Systems

The Xiaomi gateway can be connected not only to Mi Home, but also to third-party platforms:

PlatformConnection methodLimitations
Google HomeThrough Mi Home. β†’ Settings β†’ Smart home. β†’ Google AssistantNot all devices are supported (for example, Aqara sensors may not be displayed)
Apple HomeKitOnly for the Aqara Hub M2 (scanning required QR-code in the Aqara Home app)Limited functionality (no support for some automation)
Home AssistantThrough Xiaomi Miio integration (device token required)You need skills to work with YAML-configuration
Alice (Yandex)Through Mi Home. β†’ Settings β†’ Smart home. β†’ YandexIt is unstable and often requires reconnection.

To connect to Home Assistant, you will need:

  1. Get your gateway Mi Home Token (e.g., through the Mi Home Token Extractor app for Android).
  2. Add Xiaomi Miio integration to configuration.yaml: miio: devices: - host: 192.168.1.100 # IP-gateway: YOUR_TOKEN_HERE model: lumi.gateway.v3 # lock-model
  3. Reboot Home Assistant.
How to get a gateway token without root rights?
If you don’t have access to root on Android, you can use an alternative method: 1. Install the Packet Capture app on your smartphone. 2. Run traffic capture and add a gateway to Mi Home. 3. In the logs, find a request to the user. API miot-spec.org – the token will be in the ssecurity parameter. ⚠️ This method does not work on all versions of the app and may violate Xiaomi’s privacy policy.

Typical Connection Errors and How to Fix Them

Even when following the instructions, users often face problems.

⚠️ Warning: If the indicator on the gateway flashes red, this means a critical firmware error, in which case you need to reset to factory settings (hold the reset button for 10 seconds) and reconnect.

Problem.Possible causeDecision
Gateway not found at Mi HomeDisparity between the account region and the gateway firmwareChange the region in Mi Home to China or update the firmware
Constant blinking in orangeIncorrect Wi-Fi password entry or weak signalCheck the password, move the gateway closer to the router, or use Ethernet
Gateway's connected, but can't see sensorsDevices are not coupled or too far from the gatewayReset the gateway and repeat pairing of sensors (hold the button on the sensor for 5 seconds)
Voice notifications in ChineseGateway region set as ChinaChange the region in Mi Home to Russia or turn off voice in the settings

If the gateway is connected but periodically disconnected:

  • πŸ”Œ Check the power supply – only use the original adapter (some unoriginal units give insufficient voltage).
  • πŸ“Ά Change the Wi-Fi channel on the router (Telephones 1, 6, or 11 are recommended to minimize interference).
  • πŸ› οΈ Update the router’s firmware – outdated versions may conflict with Zigbee devices.

πŸ’‘

If the gateway often loses communication with sensors, try adding a Zigbee repeater (such as the Xiaomi Smart Plug or Aqara Wall Switch) to the network, which will strengthen the signal and increase the coverage radius.

Additional settings: automation, scenarios and security

Once the gateway is connected, you can set up automation, for example, turning on the light when the motion sensor is triggered or alerting you when water leaks.

  1. In Mi Home, go to Automation β†’ Create a script.
  2. Select a condition (e.g. Motion Sensor β†’ Motion Detected).
  3. Add an action (such as a smart lamp) β†’ Turn on).
  4. Save the script and test it out.

To improve safety:

  • πŸ” Change the password from the Zigbee network (it is the default Wi-Fi password). This can be done in the gateway settings in Mi Home.
  • πŸ“΅ Turn off unnecessary notifications (such as low battery charge sensors) to avoid spam.
  • πŸ”„ Regularly update the gateway firmware – new versions fix vulnerabilities.

If you use a gateway for security (such as with door opening or smoke sensors), set up alerts on your smartphone:

  1. Go to the sensor settings in Mi Home.
  2. Enable the Notification option and select events (such as Opening a Door).
  3. Please provide contact information for emergency alerts (you can add several numbers).

πŸ’‘

For critical sensors (such as gas leaks), set up duplicate alerts via a Telegram bot or IFTTT β€” This will increase the reliability of the system.

FAQ: Answers to Frequent Questions

Can I connect the Xiaomi gateway without the Mi Home app?
Technically yes, but it requires manual setup via Telnet or SSH. For that, you need to: Get IP-Connect via Telnet (port 9898) using the command: telnet 192.168.1.100 9898 Enter a command to pair devices (for example, miio pair). ⚠️ This method is only suitable for experienced users and may violate the warranty.
Why does Xiaomi Gateway not see new sensors?
The reasons may be as follows: πŸ”‹ Battery discharged in sensor (check charge). πŸ“‘ The sensor is too far from the gateway (maximum distance is 10-15 meters in line of sight). πŸ› οΈ Outdated Gateway Firmware (Update via Mi Home). πŸ”„ The sensor is already coupled to another gateway (reset its settings by holding the button for 5 seconds).
How to reset the Xiaomi gateway to factory settings?
To reset: Find a small hole on the lock case that says Reset, insert a paper clip or toothpick into it, and hold it for 10 to 15 seconds until the indicator flashes yellow. Release the button, the gateway will reset and return to factory settings. After reset, it will need to be reconnected via Mi Home.
Can you use the Xiaomi gateway without the internet?
Yes, but with reservations: βœ… Local automation (for example, turning on the light on the motion sensor) will work. ❌ Notifications to the smartphone and control via Mi Home outside the home network – no. ⚠️ Some devices (e.g. cameras) require a cloud connection even for local operation. For full autonomy, set up a local network with Home Assistant.
How to connect Xiaomi gateway to two Wi-Fi networks at the same time?
Xiaomi gateway does not support simultaneous connection to two Wi-Fi networks. However: If the gateway has an Ethernet port (for example, Gateway 2), you can connect it to one network via cable and to the other via Wi-Fi (but only one connection will work).