How to connect Xiaomi gateway to the router: full instructions with error solutions

Xiaomi Mi Home Gateway is the central device of Xiaomi’s smart home ecosystem that links sensors, lamps, sockets and other gadgets into a single system. Without the right connection to the router, the gateway will not be able to control devices, synchronize data with the cloud or respond to automation scenarios. However, many users face problems: the gateway does not find the network, flashes yellow, is not detected in the Mi Home application or loses connection after a few hours.

In this article, we will discuss all the ways to connect the Xiaomi gateway to the router - from basic settings via Wi-Fi to alternative methods (via Ethernet or access point mode). IP-Address for stable operation and integration of the gateway with other smart home systems (for example, Home Assistant or Google Home). 1/2/3, Aqara Hub and its modifications.

1. Preparation for connection: what will be needed

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

  • 🔌 Gateway Xiaomi (any model) with a complete power supply (5V/1A or 5V/2A).
  • 📶 Router with Wi-Fi support 2.4 GHz (gateway does not work on the 5 GHz network!).
  • 📱 Smartphone with Mi Home app installed (version no lower than 6.0).
  • 🔑 Login and password from your Wi-Fi network (if you connect over the air).
  • 🔧 LAN-cable (optional, for Ethernet connection).

Important: Xiaomi gateway does not support connection to guest networks, corporate Wi-Fi with authorization through the portal or networks with hidden SSID. If your router is configured this way, temporarily disable these features or create a separate network for smart home devices.

📊 What is Xiaomi's gateway?
Mi Gateway 1/2
Mi Gateway 3
Aqara Hub
Other
I haven't bought it yet.

Security tip: If you use a gateway to control door locks or alarms, we recommend you set up a separate network for it. VLAN This will protect the smart home from potential hacker attacks through vulnerabilities in other devices.

2. Methods of connecting the gateway to the router

Xiaomi Gateway can be connected to the router in three ways, depending on the model of the device and your preferences:

  1. Wi-Fi (2.4 GHz) is the most common method, working with all models of gateways.
  2. Through Ethernet (LAN-cable available only for Mi Gateway 3 and Aqara Hub M2.
  3. In access point mode, a temporary option for initial settings (if the router is not available).

Let us examine each method in detail.

Connection via Wi-Fi (main method)

This method is suitable for most users.

Turn the gateway into the socket (the indicator should flash yellow)

Make sure your smartphone is connected to a 2.4 GHz network

Open the Mi Home app and click “Add Device”

Select "Gateway» → «Mi Gateway (or your model)

Follow the setup wizard by entering the Wi-Fi password-->

If the gateway is not connected:

  • 🔄 Restart router and gateway (turn off power for 30 seconds).
  • 📡 Check that the router only broadcasts the network in the 2.4 GHz band (many modern routers combine 2.4 and 5 GHz under one name – this must be turned off).
  • 🔒 Make sure that the Wi-Fi password does not contain Cyrillic symbols or special signs (for example, #, $,!).

💡

If your router supports "Smart Connect" (automatic switching between 2.4 and 5 GHz), disable it in the settings. Xiaomi gateway does not know how to work on such networks.

Ethernet connection (for Mi Gateway 3 and Aqara Hub)

New Gateway Models (Mi Gateway 3, Aqara Hub) M2) They support wired connectivity, which allows for more stable operation:

  1. Connect the gateway to the router through LAN-port (use a cable from the set or any other cable) Cat5e).
  2. Turn on the gateway power – the indicator should burn blue (if flashing yellow, check the cable).
  3. In the Mi Home app, select Add Device» → «Gateway» → «Connect to the wire».

Advantages of wired connection:

  • ⚡ Higher device response speed (important for motion sensor scenarios).
  • 📶 No problem with Wi-Fi coverage (relevant for larger homes).
  • 🔒 Fewer vulnerabilities to hack (wired connection harder to intercept).

Access Point Mode (if the router is not available)

If you don't have access to a router (for example, you're in a hotel or using the mobile Internet), you can configure the gateway in hotspot mode.

  1. Hold the button on the gateway for 10 seconds until the indicator starts flashing orange.
  2. On your smartphone, connect to a Wi-Fi network called lumi-gateway-XXXXX (password is not required).
  3. Open the Mi Home and Following wizard.

Limitations of this regime:

  • 🚫 No access to the Xiaomi cloud (only local network management is possible).
  • 📵 Smart home devices won’t work if you log out of the gateway network.
  • ⏳ After 30 minutes without connecting to the router, the gateway will automatically shut down.

3.Setting up the gateway in the Mi Home app

Once the gateway is physically connected to the router, you need to configure it in the Mi Home app, which includes linking to the account, selecting a region, and updating the firmware.

Follow the step-by-step instructions:

  1. Open the application and log in (use the Mi Account account, which is linked to China or Russia).
  2. Press «+» → «Add the device and select "Gateway».
  3. Follow the setup wizard: Confirm the flashing indicator on the gateway. Select your Wi-Fi network (2.4 GHz only!) and enter the password. Wait for the connection (may take up to 2 minutes).

Tie the lock to the room.

Update the firmware

Important! When the gateway first connects, it can request a local control token, which can be obtained in the device settings (General section» → «Local area network.This token will be needed to integrate with Home Assistant or other systems.

What if Mi Home doesn’t find the gateway?
If the application does not see the gateway, try: 1. Reboot the smartphone and the gateway. 2. VPN 3. Set the region in Mi Home to "China" (in profile settings). 4. Connect the smartphone to another Wi-Fi network (for example, mobile Internet) and repeat the search.

4. Solving common problems

Even after a successful connection, the Xiaomi gateway may not work as smoothly as below is a list of common bugs and ways to fix them.

Problem.Possible causeDecision
Gateway flashes yellow and doesn't connectNo connection to the router or servers XiaomiCheck the Wi-Fi password. Turn off the router's filtering. MAC-Reset the gateway (switch off power for 1 minute).
Gateway is connected, but devices are not respondingProblems with the Zigbee network or interferenceMove the gateway closer to the devices (max. distance - 10 m). Make sure there are no sources of interference (microwaves, wireless phones). Reset the gateway to factory settings (hold the 5 seconds button).
The gateway shuts down once a day.Router breaks connection due to energy savingIn the router settings, turn off "Energy Saving" for Wi-Fi. Set up static IP for the gateway (instruction below). Update the router firmware.
Voice control is not working (Alice, Google)Gateway is not synchronized with cloudCheck your Internet connection. Re-connect the gateway to Mi Home (remove and add again). Set up integration in the voice assistant app.

If the problem is not solved, try resetting the gateway to the factory settings:

  1. Press and hold the button on the gateway for 5-7 seconds until the indicator flashes yellow quickly.
  2. Release the button - the gateway will reset (take) ~30 seconds).
  3. Reconnect the gateway as you did in the first setup.

💡

If the gateway doesn't work after reset, check the power supply. Using a non-original adapter (with other current/voltage parameters) can lead to unstable operation.

5. Static adjustment IP lock-hole

By default, the router assigns a dynamic gateway IP-This is an address that can change when you reboot, which causes you to lose communication with your smart home devices. To avoid this, set up a static address. IP.

Instructions for popular routers:

  1. Open the router control panel (192.168.0.1 or 192.168.1.1).
  2. Go to DHCP → Address Reservation.
  3. Find it on the list. MAC-gateway address (starts with 78:11:DC or 7C:11:BE).
  4. Tie him to the free one. IP (for example, 192.168.0.100).
  5. Save the settings and restart the router.

5.2. On routers ASUS

  1. Go to the Local Network. → DHCP-server.
  2. In the "Manual Assignment" section add MAC-lock address and state IP.
  3. Apply the changes.

5.3. on Xiaomi routers (Mi Router)

  1. Open the Mi Wi-Fi app.
  2. Go to the Devices. → Xiaomi Gateway → Settings.
  3. Activate the option “Reserve” IP».

Why does it matter? Static. IP ensures that:

  • 🔗 Smart home devices will always be connected to the gateway.
  • 📡 Local management (without cloud) will work smoothly.
  • 🔧 Integration with Home Assistant or Node-RED is not interrupted.

Integration of the gateway with other systems

Xiaomi’s gateway can be connected not only to Mi Home’s native app, but also to other smart home platforms, which expands the automation capabilities.

6.1 Connection to Home Assistant

For integration:

  1. Install the Xiaomi Miio component via HACS or manually.
  2. In the configuration.yaml file, add:
miio:


devices:




- host: 192.168.0.100 # IP of your gateway




token: YOUR_TOKEN #Token from Mi Home




model: lumi.gateway #Glueway model

The token can be obtained using the Mi Home Token Extractor app (available on GitHub).

6.2 Connection to Google Home / Alice

For voice control:

  1. In Mi Home, go to Profile → Settings → Voice Assistants.
  2. Select Google Assistant or Yandex Alice and follow the instructions.
  3. Synchronize devices in the voice assistant app.

Limitations:

  • 🗣 Alice supports only basic commands (on/off).
  • 🔊 Google Home doesn’t work with some sensors (like a leak sensor).

Optimization of the lock

To ensure that the gateway works stably, follow these recommendations:

  • 📍 Accommodation: install a gateway in the center of the house, away from metal objects and appliances.
  • 🔄 Updates: Check firmware updates in Mi Home regularly (General section» → «Update»).
  • 📶 Wi-Fi: If possible, connect the gateway over cable (Ethernet) for maximum stability.
  • 🔋 Power: Use only the original power supply (non-original can cause failures).
  • 🛡 Security: Disable access to the gateway from the external network in the router settings.

If you have many Xiaomi devices (over 20), consider buying a second gateway.One gateway supports up to 30 devices, but with a large number of sensors, delays can occur.

💡

To increase the range of the Zigbee network, use devices with a repeater function (for example, Xiaomi Smart Plug or Aqara Wall Switch), which amplify the signal between the gateway and the sensors.

FAQ: Frequent questions

🔹 Can you connect the Xiaomi gateway to the router without the Mi Home app?
No, you need to use Mi Home for initial setup, but once connected, you can control the gateway through other systems (e.g., Home Assistant) without using Mi Home.
🔹 Why the lock flashes red?
The red indicator indicates a critical error: Power problems (check the power supply); internal memory failure (requires a gateway replacement); firmware failure (try updating manually through Mi Home); If the blinking does not stop, contact Xiaomi Support.
🔹 How to Reset the Gateway if it Doesn't React to a Button?
If the reset button doesn't work: Turn off the gateway power. Press the button and hold it, plug the power. Hold the 15-20 second button until the light flashes quickly. This is a forced reset that will work even when the device freezes.
🔹 Can I connect the gateway to 5 GHz Wi-Fi?
No, all Xiaomi gateways (including Mi Gateway 3) only work on a 2.4 GHz network. If your router does not support frequency sharing, you will have to buy a separate router for the smart home or turn off the 5 GHz network temporarily.
🔹 How to transfer the gateway to another router?
To reconfigure the gateway to a new router: Reset the gateway to factory settings (hold the 5 seconds button). Connect the smartphone to a new Wi-Fi network (2.4 GHz). In Mi Home, remove the old gateway and add it again by selecting a new network. Attention: when reset, all scripts and gateway settings will be deleted!