Xiaomi switches are among the most popular lighting automation devices in the smart home system, combining minimalist design, reliability and extensive integration capabilities with other gadgets in the Mi ecosystem. Home/Mijia. But installing and configuring them often raises questions for beginners: how to connect wires correctly, avoid installation errors, and sync with the application? In this article, we will examine all the steps from choosing a model to fine-tuning scenarios.
Xiaomi switches require not only mechanical wiring but also software binding to the hub (such as the Aqara Hub or Mi Smart Gateway), without which the device will not be able to work in the smart home system, even if it is physically installed correctly. We will consider both electrical installation (including circuits for 1-, 2- and 3-key models) and software configuration with the latest versions of the Mi Home application.
Choosing a Xiaomi switch model: what to consider before buying
Before you connect the switch, it is important to choose a model that will suit your tasks and the type of wiring. Xiaomi offers several lines:
- πΉ Aqara Wall Switch β universal models with support for neutral wire (L/N) It's good for most homes.
- πΉ Mi Smart Wall Switch - budget option, but requires the mandatory presence of neutral in the switchboard.
- πΉ Xiaomi Opple β premium switches with touch control and backlight, compatible with Apple HomeKit.
- πΉ Aqara Wireless Switch β wireless buttons that do not require wall mounting (operated by batteries).
Key parameters in the selection:
| Parameter | Aqara (with neutrality) | Aqara (without neutral) | Mi Smart | Opple |
|---|---|---|---|---|
| Neutral wire required | β Yes. | β No. | β Yes. | β Yes. |
| Max. Load power. | 1,000 watts | 800 watts | 1200 watts | 2200 watts |
| Support for HomeKit | β No. | β No. | β No. | β Yes. |
| Price (2026) | 1200 β½ | 1500 β½ | 900 β½ | 2,500 β½ |
Non-neutral wire switches (e.g. Aqara) D1) Only suitable for homes with old phase-zero wiring, where the neutral is not in the junction box, installation is more difficult and requires additional precautions.
If you're not sure what type of wiring you're going to use, check it with an indicator screwdriver or a multimeter. In modern homes, neutral (N) is usually present, but in older buildings (before the 2000s) it may not be.
Preparation for installation: tools and safety
Installing a Xiaomi switch requires basic wiring skills. If you've never dealt with electricity, you'd better hire a specialist.
- π§ Tools: cross/flat screwdriver, indicator screwdriver, pliers, knife for cleaning wires, level (for even installation).
- π Materials: tape, terminal pads (if there is not enough length of wires), plastic rosette (if the old one is damaged).
- π± Software: Mi Home app (last version), Xiaomi account with China or Russia tied (depending on the switch model).
β οΈ Warning: Before you start, make sure you turn off the power on the shield! Don't turn off the lights enough, you need to turn off the entire line to which the switch is connected.
Also consider:
- πΉ Xiaomi switches donβt work without a hub (like Aqara Hub) M2 If it is not available, the device will only function as a mechanical switch.
- πΉ For models without neutral (Aqara) D1) You will need a bypass (bypass capacitor), which comes with a complete set.
- πΉ If the wall is aluminum wiring, use terminal pads - a twist of aluminum with copper (switch wires) will lead to oxidation.
Turn off the power on the shield.|Check the absence of voltage indicator|Prepare tools and terminals|Make sure there's a hub (Aqara/Mi Gateway)|Take a picture of the current connection scheme-->
Xiaomi switch connection schemes: step-by-step instructions
The way you connect depends on the switch model and the type of wiring, and the three most common circuits are below.
1. Connecting a single-key switch with a neutral (Aqara Single Switch)
The simplest circuit, which is suitable for most modern homes, would require wires.
- π΄ L β Phase (coming from the distribution box);
- π΅ N - neutral;
- π‘ L1 β phase on the lamp (leaves to the lamp).
Procedure:
- Connect the L (phase) to the L terminal on the switch.
- Connect N (neutral) to the terminal N.
- Connect. L1 (lamp phase) to the terminal L1.
- Lock the switch in the rosette and turn on the electricity.
Important: If there is no neutral in the switchboard, use a circuit without it (see next section).
2. Connection without neutral (Aqara) D1)
This circuit is more complex and requires the use of a bypass (included). Bypass provides power to the switch through the lamp when it is turned off.
Connection order:
- Connect the L (phase) to the L terminal on the switch.
- Connect. L1 (lamp phase) to the terminal L1.
- Install the bypass parallel to the lamp (in the junction box or next to the cartridge).
- Lock the switch and check the work.
β οΈ Attention: Bypass can cause a weak glow LED-If it is critical, use lamps with drivers that support bypass operation (for example, Xiaomi Yeelight).
3. connection of the two-key switch (Aqara Double Switch)
Two-key models control two independent lighting lines.
- π΄ L - general phase;
- π΅ N - neutral;
- π‘ L1 β first-lamp phase;
- π’ L2 β second-lamp.
Algorithm:
- Connect L and N to the corresponding terminals.
- Connect. L1 and L2 exit-plate.
- Make sure the wires donβt cross or touch each other.
What to do if the wires are too short?
Software setting: linking the switch to Mi Home
After installation, the switch should be added to the smart home system.
- Install the Mi Home app (available for Android and iOS).
- Log in to your Xiaomi account and select the region "Russia" or "China" (depending on the model of the switch).
- Press "+" β "Add the device" β Choose the category "Smart Home" β "Switches".
- Follow the instructions on the screen: Hold the button on the switch until the indicator flashes (usually 5-10 seconds).
If the switch is not located:
- πΉ Make sure that the hub (Aqara Hub or Mi Gateway) is on and connected to the same Wi-Fi network as the phone.
- πΉ Check that the switch is within a radius of 1-2 meters from the hub.
- πΉ Restart the hub (turn off power for 10 seconds).
π‘
If the Aqara switch is not added to the Mi Home, try changing your account region to Mainland China. D1) They are not officially supported in the Russian region, but they work through a Chinese server.
Setting up scenarios and automation
The main advantage of Xiaomi switches is the ability to create automated scripts.
- π Morning wake-up: lights are turned on gradually from 7:00 to 7:30.
- π "Homeless: All lamps turn off when the last family member leaves (by geolocation).
- π¬ Mode: Single press turns off the main light and turns on Yeelight backlight.
How to set up a script in Mi Home:
- Open the tab "Automation" β "Create".
- Select a trigger (e.g., βTimeβ or βPush a buttonβ).
- Add an action (e.g., "Switch on the lights").
- Save the script and test it out.
For advanced automation, use Yandex Alice or Google Assistant:
- At Mi Home, go to Profile" β "Smart services" β "Yandex".
- Log in and allow access to the devices.
- You can now control the light with a voice that says, "Alice, turn on the light in the living room."
π‘
For stable scenarios, make sure that the hub (Aqara Hub) is connected to the Internet via Ethernet, not Wi-Fi, which will reduce delays when executing commands.
Common mistakes and their solution
Even with proper installation, problems can arise, and here are the most common ones and ways to fix them:
| Problem. | Possible cause | Decision |
|---|---|---|
| The switch is not added to the Mi Home. | Incompatible region of the account | Change region to "China" in profile settings |
| The lamp flashes when switched off. | Incorrect operation of the bypass (for models without neutral) | Replace the lamp with a compatible one (e.g. Yeelight) or add a 100k Ohm resistor parallel to the lamp |
| The switch is warming up | Poor contact in terminals or overload | Check the plug tightening and reduce the load (max. 1000W for most models) |
| Delay in on/off | Zigbee weak signal between hub and switch | Install a signal repeater (e.g. Aqara Range Extender) |
β οΈ Warning: If the switch sparkles when pressed after installation, immediately disconnect it from the mains! this is a sign of poor contact or incorrect phase connection. check all connections and contact the electrician if necessary.
Integration with other smart home systems
Xiaomi switches can be connected not only to Mi Home, but also to other platforms:
- π‘ Home Assistant: Xiaomi Miio or Zigbee2MQTT (base-based hub CC2531 or ConBee II).
- π Apple HomeKit: Xiaomi Opple models only or across HomeBridge.
- π€ Google Home: through official integration into Mi Home (Smart Services tab").
Example of settings for Home Assistant:
# Configuration for Zigbee2MQTT (fragment configuration.yaml)
zigbee2mqtt:
external_converters: []
devices:
'0x123456789abcdef':
friendly_name: "Living room switch"
retain: trueTo connect to Apple HomeKit without Opple:
- Install HomeBridge on Raspberry Pi or NAS.
- Add the homebridge-mi-aqara plugin.
- Enter the token from Mi Home (you can get it through Mi Home Token Extractor).