Reset Xiaomi Gateway 2 to factory settings: 3 working ways

Xiaomi Gateway Gateway 2 (Also known as the Aqara Hub M2) β€” The central device of Xiaomi’s smart home ecosystem, which manages sensors, lamps and other accessories, is sometimes challenged to return it to factory settings: when selling, after a firmware failure, or when transferring to another Mi system. Home/Aqara Unlike the first generation, the Gateway 2 It has its own nuances of reset, which are important to consider, so as not to turn the device into a β€œbrickΒ».

In this article, we will discuss three official reset methods (via the app, physical button, and alternative methods) and how to avoid common errors, such as why the gateway may not appear on the list of devices to add after a reset, or how to move it between Mi Home and Aqara Home accounts correctly. If you plan to sell the gateway or just want to start setting up from a clean slate, this guide will help you do everything without risking damage to the device.

When do I need to reset Xiaomi Gateway 2?

Resetting to factory settings is an extreme measure, which is resorted to in several cases:

  • πŸ”„ Transferring the device to a new owner, without resetting, the previous account will remain tied to the gateway, and the new user will not be able to add it.
  • 🐞 System failures: the gateway does not respond to commands, is constantly restarted or is not synchronized with sensors.
  • 🏠 Transfer between ecosystems: moving from Mi Home to Aqara Home (or vice versa) requires a complete cleanup of settings.
  • πŸ”’ Forgotten Wi-Fi password: If the gateway cannot connect to the network due to altered router data, resetting will help set it up again.

Before resetting, however, check for alternative solutions:

  • ⚑ Reboot the gateway (turn off power for 10 seconds).
  • πŸ“Ά Make sure the router is distributing 2.4GHz (gateway does not work with 5GHz).
  • πŸ”„ Update your firmware with Mi Home or Aqara Home.

⚠️ Warning: Once reset, all automation, device groups and attached sensors will be removed!

πŸ“Š You’ve dropped Xiaomi’s gateway before?
Yes, through the app.
Yeah, with a button on the case.
No, it's my first time.
I tried it, but it didn't work out.

Method 1: Reset via Mi Home or Aqara Home

The safest method is to use an official app, which is suitable if the gateway is still responsive to commands and connected to your account.

Instructions for Mi Home:

  1. Open the Mi Home app and go to the Devices tab.
  2. Select your Xiaomi Gateway 2 (it can be displayed as the Aqara Hub M2).
  3. Click on the three dots in the upper right corner β†’ Settings.
  4. Scroll down and select Remove the device.
  5. Confirm the action - the gateway will be untied from the account and reset.

Instructions for Aqara Home:

  1. In the Aqara Home app, go to Devices β†’ select the gateway.
  2. Click on the gear icon (Settings) β†’ Delete the device.
  3. Confirm deletion. The gateway will return to factory settings.

If, after removal, the gateway does not appear in the list of devices available for addition:

  • πŸ”Œ Reboot it (remove the power supply for 15 seconds).
  • πŸ“± Make sure your phone is Bluetooth and Geolocation enabled (required to find devices).
  • 🌐 Check that the phone and gateway are connected to the same Wi-Fi network (2.4 GHz).

β˜‘οΈ Preparation for discharge through the annex

Done: 0 / 4

Method 2: Hardware reset button on the body

If the gateway does not respond to commands from the application or you have forgotten your account information, you will have to use a physical reset button. On Xiaomi Gateway 2, it is located on the underside of the case (near the power cable connector).

Step-by-step:

  1. Turn off the gateway from the power supply (remove the plug from the socket).
  2. Press and hold the reset button (it is recessed in the case - use a paper clip or toothpick).
  3. Without releasing the button, connect the power back.
  4. Hold the button for another 10-15 seconds until the indicator starts flashing yellow (it will light up blue first).
  5. Release the button – the gateway will reset and reset (the indicator will turn orange, then blue).

If the indicator doesn't flash yellow, repeat the procedure by holding the button longer.

Problem.Reason.Decision
The indicator won't light up.Failed power supply or cableTry another adapter (5V/1A)
Blinks red.Firmware errorReset again or update the software
After discharge, no activationPlug the button contactsCarefully press the button again.
Can't find Wi-Fi.The router only works 5 GHzEnable 2.4GHz mode or use a different router

⚠️ Note: Do not use foreign objects (needles, pins) to reset - they can damage the contacts of the button.

What to do if the reset button does not work?
If the button is not responsive to pressing, it may be mechanically damaged. In this case, try: 1. Gently blow the hole with compressed air (a canister for cleaning equipment). 2. Use a thinner and stiffer object (for example, an unbended stationery clip). 3. If nothing helps, contact the service center, as you will need to disassemble the case.

Method 3: Alternative methods of discharge

If the standard methods don't work, you can try the less obvious ones, they're suitable for power users and they need to be accurate.

Method 1: Telnet reset (for firmware up to 1.5.6)

Early versions of Xiaomi Gateway 2 allowed you to connect over Telnet and perform reset commands. This method rarely works now, but it is worth trying:

  1. Connect the gateway to the router via Ethernet (if a wired connection is used).
  2. Find him. IP-address in the router's device list (usually starting with 192.168.x.x).
  3. Connect to Telnet using the command: telnet [IP-lock-house] 23 Default Login and Password: Admin / Admin.
  4. Perform the reset command: reset_factory

Method 2: Reflashing with Mi Home Developer Mode

If the gateway "blocked" after an unsuccessful update, you can try to reflash it manually:

  1. Install Mi Home in Developer Mode (China Mainland account required).
  2. Connect the gateway to the computer by USB (use OTG-cable).
  3. In the app, select Add Device Manual β†’ Gateway 2 β†’ Update Firmware.
  4. Download the official firmware from the Mi Home website and follow the wizard's instructions.

πŸ’‘

If the gateway is not added to the app after the reset, try changing your account region to China Mainland (in the Mi Home profile settings), which sometimes resolves firmware compatibility issues.

What do I do after the dump?

After the successful reset, the Xiaomi Gateway 2 will return to factory settings, and then it needs to be re-introduced and configured.

  1. Appendix to the annex: πŸ“± Open Mi Home or Aqara Home β†’ Add the device. πŸ” Select the Gateway (Gateway) β†’ Xiaomi Gateway 2. πŸ”„ Follow the instructions on the screen (bring the phone to the gateway for Bluetooth pairing).
  2. Network setup: πŸ“Ά Select a Wi-Fi network (2.4 GHz) and enter a password. πŸ”Œ If you use Ethernet, connect the cable to the port on the gateway.

Device recovery

  • πŸ”„ Add sensors and lamps again (click the pairing button on each device).
  • πŸ“ Restore Automation through Scripts or Automation in the App.

If the gateway does not see previously connected sensors (for example, Aqara Door Sensor), they will have to be reset separately - usually there is a button on the sensor body (hold 5-10 seconds).

Common Mistakes and How to Avoid Them

Even experienced users sometimes make mistakes when resetting Xiaomi Gateway 2, and here are the most common ones and ways to prevent them:

  • ❌ Reset during firmware update: If you interrupt the update process, the gateway can turn into a brick. Always wait for the update installation to be completed (the indicator is on green).
  • ❌ 5GHz Wi-Fi usage: Gateway only works with 2.4GHz networks. If the router does not support frequency sharing, temporarily disable 5GHz in settings.
  • ❌ Reset button incorrectly held: If you release the button too early (before the yellow blink), the reset will not be performed. Hold it for at least 10 seconds after the power is connected.
  • ❌ Attempted reset via third-party firmware: Some users try to flash the gateway with custom firmware (for example, to integrate with Home Assistant).This can lead to loss of warranty and unstable work.

⚠️ Warning: If the gateway flashes red continuously after reset, it indicates a critical firmware error, in which case only flashing through Mi Home Developer Mode or contacting a service center will help.

πŸ’‘

Before reset, be sure to check the lock firmware version in the app. If it is older than 1.4.0, after reset, you may have problems adding devices - update the firmware in advance!

FAQ: Frequent questions about resetting Xiaomi Gateway 2

Can I drop a gateway without a button if it breaks?
Yes, but it's going to require disassembling the case, and underneath the plastic cover, there are reset contacts (RSTs) on the board that you can close with tweezers, but it's risky to go to the service.
Once the airlock is discharged, it doesn't turn on.
Check the power supply (should give 5V/1A). If the indicator does not burn at all, the fuse on the board may have burned out. Try connecting the gateway to another power source (for example, from a router).
How to move the gateway from Mi Home to Aqara Home after resetting?
After reset, add the gateway to Aqara Home as a new device. If it was previously tied to the Mi Home, pre-delete it from your Xiaomi account via the web version of Mi Account.
Can I roll back the firmware after resetting?
Officially, no. Xiaomi doesn't provide older versions of firmware for manual installation, and the only option is to flash custom firmware (like OpenAqara), but that voids the warranty.
Will the gateway reset if you disconnect it from power for a long time?
No. Xiaomi Gateway 2 has nonvolatile memory (NVRAM), so power outages don't result in a reset.