Xiaomi smart locks (including models under the Mi Home, Aqara and Yeelight brands) require an administrator code to set up, reset or add new users. Without this code, you won't be able to control the lock through the app, change security settings or restore access after a crash. The problem is that the manufacturer rarely specifies the standard code in the documentation, and users often lose or forget it after the initial setup.
This article will help you understand where to look for the factory administrator code for your lock model, how to reset it through official and informal methods, and what to do if the previous owner did not provide access. We analyzed the instructions for popular models (including Xiaomi Mi Smart Door Lock, Aqara N100/N200, Yeelight Smart Lock) and collected current data for 2026.
1. Standard Administrator Codes for Xiaomi Locks
Most Xiaomi smart locks come with a factory administrator code, which can be found in one of the following places:
- π¦ On the device box β often pasted on the inside of the lid or on a label with a serial number (look for inscriptions like Admin Code, Master). PIN or ).
- π In the paper manual, it's called "First Connection" or "Security" and in the Chinese market models, the code can be specified in characters (e.g., characters, ).
- π On the warranty card β some sellers put the code next to the serial number.
- π± In annex Mi Home/Aqara β If the lock has already been connected, the code can be displayed in the device settings (path: Device) β Settings β Security β Administrator code).
For most Xiaomi Mi Smart Door Lock models (such as Mijia Smart Door Lock 1S or 2S), the standard administrator code is 123456 or 888888. However, locks for the European market (with EU firmware) can use a unique code generated during the first setup, in which case the factory code is missing and must be reset.
β οΈ Warning: If you buy a lock from hand, be sure to ask the seller for an administrator code or reset before handing over the device. Without this code, you will not be able to re-attach the lock to your Mi Home account!
2. How to find out the administrator code through the Mi Home app
If the lock is already connected to your Mi Home account, you can view or generate a new one directly in the app. The instructions are relevant for Mi Home 6.0+ (2023-2026):
- Open the Mi Home app and go to the Devices tab.
- Select your lock from the list (e.g., Xiaomi Smart Door Lock).
- Slap the icon. βοΈ Settings in upper right corner.
- Go to Security or Access Management (the name may vary depending on the model).
- Find the Administrator Code or Master PIN. The current code will be displayed here (may be hidden by stars β click on the icon of the eye). ποΈ, show).
If the code is not displayed or the section is blocked, it means:
- π You do not have administrator rights (the lock is linked to another account).
- π΅ The lock is disconnected from the network (check the connection to Xiaomi Gateway or Wi-Fi).
- π Requires firmware update (in older versions of the application, the section may be missing).
In Aqara models (such as the Aqara N100), the administrator code can be found in the Aqara Home app along the way: Device β Settings β Security β Administrator password. If a partition is missing, try updating the app to the latest version.
π‘
If the code in the app is hidden but you have forgotten it, try entering the last PIN you use β sometimes the system saves it in the cache.
3. Resetting the administrator code through the hardware button
If you can't get the code through the app (for example, a lock is tied to someone else's account), the only way is through a hardware reset. Most Xiaomi locks support this procedure, but it differs depending on the model.
| Model of the castle | Resetting method | Notes |
|---|---|---|
| Xiaomi Mi Smart Door Lock 1S/2S | 1. Remove the battery lid. 2. Press and hold the Reset button (little red or black) for 10 seconds until the light flashes. 3. Enter a new code on the lock keyboard. | After the reset, the lock will be detached from all accounts. |
| Aqara N100/N200 | 1. Unscrew the screws on the inner panel. 2. Press the RST button on the board 5 times in a row. 3. The lock will emit an audible signal - enter a new code. | Requires a Torx T5 screwdriver. |
| Yeelight Smart Lock | 1. Hold the Unlock button for 15 seconds. 2. After the double beep, enter 0000 (factory code for resetting). | It only works on firmware until 2023. |
β οΈ Important: Hardware reset removes all user codes, fingerprints and connection data to the Mi Home. After the procedure, the lock will be like new - you need to add it again to the application.
Make sure the batteries are charged (at least 50%)|
Prepare a screwdriver for disassembly (if required)|
Write down the serial number of the castle (in case of request for support)|
Check for a backup mechanical key
-->
4. Alternative ways to get an administrator code
If the standard methods donβt work, try one of these options:
- π§ Contact Xiaomi for support β send a photo of the box, check and serial number of the lock to support mail@mi.com (for the European market or through the form on the website mi.com/support. In response, you may send a code or instructions for resetting.
- π οΈ Use service commands - some locks support hidden combinations for resetting. N100 You can try to enter on the keyboard: #999*123456# (where 123456 β factory-code).
- π§ Connect via Xiaomi Gateway β if the lock is integrated into the Mi Home system, try removing it from the app and adding it again.
For Zigbee-enabled locks (like Aqara), try resetting the code via the Xiaomi Gateway hub:
- Open Mi Home and go to the hub settings.
- Select Zigbee Devices β Your Lock β Delete.
- Press the button on the hub for 5 seconds to reboot it.
- Add the lock again β sometimes it resets the code to standard.
β οΈ Warning: Some gray sellers offer services to crack the codes of Xiaomi locks through connection to the board.This not only violates the warranty, but can damage the device.
What to do if the lock is blocked after a failed reset?
5. How to protect the administrator code from loss
To avoid the problem of losing code in the future, follow these guidelines:
- π Save the code in the password manager (e.g. Bitwarden, 1Password) The name of the Xiaomi Lock Admin Code".
- π± Take a picture of the box and the instructions β sometimes the code is printed in small print on the sticker.
- π Make a physical copy β write the code on paper and store it in a safe place (for example, in a safe or together with documents for an apartment).
- π₯ Configure a backup administrator β in the Mi Home application you can add a second user with administrator rights (path: Device) β Access management β Add administrator).
If you sell or transfer the lock to another person, make sure to reset through the hardware button, which will delete all your data and allow the new owner to configure the device from scratch, otherwise they will not be able to control the lock through their Mi Home app.
π‘
Never use simple codes like 1111 or 0000, which are easy to pick up, and the best option is a 6-digit code without repeating numbers (for example, 472951).
6. Frequent mistakes and how to avoid them
When working with the administrator code, users often make these mistakes:
| Mistake. | Effects of consequences | How to avoid |
|---|---|---|
| Use one code for all locks | If the code is leaked, the attacker will gain access to all your devices. | Generate unique codes for each lock. |
| Storing code in phone notes without encryption | If you steal a phone or hack an account, the code will be known to third parties. | Use secure password managers. |
| Resetting the lock without a backup mechanical key | If the reset goes wrong, you may be left without access to the door. | Always keep the key on hand during the procedure. |
| Ignoring firmware updates | Older versions may have vulnerabilities that allow you to reset code without access. | Check for updates in Mi Home regularly. |
Another common problem is the firmware conflict, for example, if you bought a lock for the Chinese market (with CN firmware) but you try to connect it to your European Mi Home account, the admin code may not work.
- Check the region of your account in Mi Home (in your profile settings).
- If the region does not match the castle region, create a new account for the respective country.
- Update the lock firmware through Mi Home β sometimes this solves the compatibility problem.