How to connect the gateway Xiaomi Gateway 2: Instructions and configuration

The modern home is increasingly becoming a single ecosystem where each device can interact with the other, creating a comfortable and safe environment, and the centerpiece of such a system for many users is the Xiaomi Gateway 2, which acts as a bridge between your smart devices and the Internet. It is this compact device that unites disparate sensors, lamps and switches into a single network, allowing you to control them from a smartphone from anywhere in the world.

The process of initial activation of the device may seem complicated only at first glance, but with a certain sequence of actions it takes only a few minutes.It is important to understand that Xiaomi Gateway 2 runs on the Zigbee protocol, which means that you need a central control module to communicate with the Wi-Fi router. In this article, we will discuss in detail each step, from unpacking to creating complex automation scenarios.

Don’t ignore the preparation before you start installing, as this is where the underlying conflicts often arise, which prevent the system from running smoothly, you’ll need a stable 2.4GHz Wi-Fi connection and a Mi Home app installed on your mobile device. Let’s get to the technical aspects and nuances that will help you avoid common bugs.

Preparation of equipment and selection of installation site

The first step before any manipulation is to carefully prepare the workplace and check the configuration. Xiaomi Gateway 2 is a sensitive electronic device that requires proper placement to provide a quality radio signal. It is not recommended to install the gateway in closed metal cabinets, behind thick concrete walls or in close proximity to powerful sources of electromagnetic interference, such as microwave ovens or routers.

In the package you will find the gateway itself, the power supply with the appropriate fork, a brief instruction and double-sided tape for installation. It is critical to use only the original power supply from the kit, as the voltage and current are selected specifically for the stable operation of the ZigBee radio module. Using third-party adapters can lead to unstable operation or complete failure of the device.

Choose a location to install the gateway in the middle of the apartment or in the area where the maximum number of controlled devices is concentrated. ZigBee signal tends to fade when passing through obstacles, so an open space or placement on the shelf will provide the best coverage. If you plan wall installation, make sure that the surface is defatted and dry before sticking the sticky tape.

📊 Where do you plan to place the gateway?
In the middle of the apartment
In the hallway.
In the bedroom.
In the living room.
Kitchen.

Installation of the Mi Home application and account registration

To manage Xiaomi’s smart home ecosystem, you’ll need the official Mi Home mobile app (also known as Xiaomi Home), downloadable from the Google Play Store for Android devices or from the Apple App Store for iOS. Make sure you download the original app from developer Xiaomi Inc. to avoid interoperability and data security issues.

Once the app is installed, you need to create a Xiaomi account or log in to an existing one. When registering, it is important to choose the right region, as the list of available devices and the server through which the communication will be carried out depends on this. For devices purchased for the global market or in official Russian/CIS stores, the “Russia” or “Germany/Europe” region is usually chosen, while for Chinese versions of gadgets the region must be installed “China”.

The application interface may vary depending on the region chosen, but the basic logic remains the same: Once logged in, you will be asked to grant permissions to access geolocation, Bluetooth and LAN. Permission to access geolocation is a mandatory requirement for Android operating systems when scanning Wi-Fi networks, so denying this right will make it impossible to add a gateway.

💡

If the app doesn’t see the device when searching, try to force access to geolocation in your phone’s settings and restart the search.

The process of pairing the gateway with a Wi-Fi network

Now, to the most important step, connecting Xiaomi Gateway 2 to your home network. Put the gateway on the socket and wait until the indicator on the front flashes yellow to signal the pairing mode. If the indicator is on blue or white, it may have been configured before and needs to be reset to factory settings, holding the reset button for 5-10 seconds.

Open the Mi Home app, click the + button in the upper right corner to add a new device. The app will automatically scan the network and suggest adding the found gateway. If the automatic search fails, select the Smart Home category (or Security) in the list of devices and find Xiaomi Gateway 2 (ZNDMWG03LM model) manually. During the setup process, the system will ask you to select a Wi-Fi network and enter a password from it.

Note that the gateway only supports 2.4GHz networks. If your router broadcasts a 5GHz network of the same name (SSID), conflicts may arise. In this case, it is recommended to temporarily divide the networks in the router settings or disable 5GHz for the duration of settings. After successfully entering the password, the indicator on the gateway should light up in green, and a window will appear in the application asking you to name the device and select a room.

☑️ Checklist of connection

Done: 0 / 5

⚠️ Note: If the installation process is suspended 99% or the device disappears from the list of available, try to bring the phone as close to the gateway as possible (at a distance). 10-20 (c) at the time of transmission of the configuration data.

Set up ZigBee devices and create a network

Once the gateway is successfully connected to the Internet, it becomes ready to accept other ZigBee devices. To add motion sensors, doors, wireless switches or smart lamps, you need to put them in pairing mode, usually by quickly pressing a button on the sensor body or re-inserting the insulation tape.

In the application interface, select your gateway, go to the control menu and click Add Subdevice. The application will go into search mode, which lasts about 60 seconds. At this point, activate pairing mode on the added gadget. Successful connection is accompanied by a sound signal of the gateway, a change in the color of the indicator and the appearance of a new device in the list inside the gateway card.

ZigBee is mesh, which means that constant-powered devices (such as smart outlets or lamps) act as signal repeaters. This allows you to significantly expand the network range, since the signal is transmitted from device to device, not just directly to the gateway. Battery-powered sensors do not usually relay the signal, so their location should be in the zone of confident reception, either near the gateway or close to the active repeater.

Type of deviceNutritionRelaying the signalAverage working hours
Motion sensorBattery CR2450No.1.5 - 2 years
Door opening sensorBattery CR2450No.2 years
Wireless buttonCR2032 batteryNo.2 years
Smart socketNetwork 220BYeah (ZigBee)Indefinitely
Smart lamp.Network 220BYeah (ZigBee)Indefinitely

Integration with Apple HomeKit and voice assistants

One of the key features of Xiaomi Gateway 2 is native support for the Apple HomeKit platform, which allows you to manage Xiaomi devices through the Home app on iOS and voice through Siri. QR-In the Mi Home app, select "Setting up HomeKit" in the gateway settings and scan the code.

Once added to HomeKit, all compatible devices connected to the gateway will automatically appear in the Home app on your iPhone or iPad.This opens up opportunities for scripting beyond Xiaomi’s servers and managing via Siri. However, it is worth considering that HomeKit functionality can be limited to basic commands (on/off, color change) compared to the advanced settings in the native Mi Home app.

For users of the Yandex or Google Assistant ecosystem, integration is done via the cloud. In the Yandex (Device section) or Google Home application, you need to select the device search and find the skill "Xiaomi Home". Once you log in to your Xiaomi account and confirm access, all devices will be available for voice control, which allows you to say commands like "Alice, turn off the light in the living room" or "Ok Google, turn on night mode."

What if HomeKit doesn’t see the gateway?
Make sure your phone is connected to the same Wi-Fi network as the gateway. Try temporarily shutting down VPN and mobile internet, leaving only Wi-Fi. Also make sure the router doesn't have AP Isolation client isolation enabled.

Creating automation scenarios

The main strength of a smart home is automation, allowing devices to respond to events without human intervention. In the Mi Home app, go to the Smart Home tab and create new automation. The logic of scripting is always based on the principle of "If... then..." (If... then...).

As a condition (If) you can select the action of the sensor (for example, "Motion Sensor detected motion", "Door sensor is open", "Time 23:00"). As an action (To) you choose the reaction of the gateway or other devices (turn on the light, send a notification to the phone, turn on the siren, change the color of the backlight).

An example of a useful "Nightwatch" scenario: If the time between 23:00 and 6:00 and the motion sensor in the corridor worked, then turn on the gateway yellow at 10% brightness for 1 minute. This will allow you to safely walk around the house at night, not turning on the bright main lights. Another example: if everyone left the house (geolocation of the phones shows the exit from the radius), then turn off all the lamps and turn on security mode.

💡

Automations are performed locally on the gateway, so they will work even in the absence of the Internet, if the trigger is a local device (sensor).

⚠️ Note: When creating complex script chains, watch for logical conflicts. For example, one scenario may try to turn on the light while another simultaneously turns it off on the timer.

Solving Typical Problems and Updating Firmware

During operation, you may encounter a situation where the gateway becomes unavailable or devices begin to fall off. First of all, check the status of the software update. The device card in the Mi Home application often shows a notification of a new firmware version. Firmware update is an important process that corrects security errors and improves the stability of the ZigBee connection.

To update, go to the gateway settings (three dots in the corner), select "Update Check" and follow the instructions. During the process, the indicator will flash and the device will not be available for control. It is strongly recommended not to turn off the power of the gateway at this point, as this can lead to a software failure ("brick"), recovery from which is possible only through special debugging tools.

If the gateway is no longer responding, try rebooting: turn off the power for 10 seconds and turn on again. If the problem persists, perform a full reset by holding the button on the case to the audible signal. After reset, the device will have to be added again as new, so all the scenarios associated with it will need to be reconfigured.

Why is the gateway not connected to 5GHz Wi-Fi?
The hardware Wi-Fi module in Xiaomi Gateway 2 supports only 802.11 b/g/n, which operates exclusively in the 2.4 GHz band. The 5 GHz band (ac/ax standards) is not physically supported by the device's chip, so connecting to such a network is impossible by any software methods.
Can I use a gateway without the internet?
Without the Internet, you can't control devices remotely (from outside the home) and voice assistants won't work, but local scenarios (automations) already written in the gateway memory and Bluetooth control (if the phone is nearby) can continue to work. Initial setup without the Internet is impossible.
What is the maximum number of devices on the gateway?
Theoretically, ZigBee supports up to 32 subsidiaries directly on a single Xiaomi Gateway 2. However, in practice, it is recommended not to exceed 20-25 devices to ensure the stability and response speed of the network.
What does blinking in blue and yellow mean?
Blue usually indicates normal operation or pairing (device search) and yellow (orange) indicates Wi-Fi settings (waiting for a router connection) and red often indicates a network connection error or need to upgrade.