Introduction
The SONOFF ZBMINIR2 is a compact Zigbee smart switch that fits behind traditional wall switches. It allows you to control lights remotely while keeping manual switch functionality.
This smart module is designed to automate traditional one-gang wall switches and supports a maximum load of up to 10A. Its minimalist design makes installation quick and easy.
It communicates using the Zigbee 3.0 protocol, which means it requires a Zigbee gateway for remote control. Additionally, it functions as a signal repeater, making it a valuable component in any Zigbee network.
In this guide, we’ll walk you through how to turn a traditional wall switch into a smart switch, allowing you to control it manually as usual, but also via app or voice commands.
What You´ll need?
- 1x SONOFF ZBMINIR2
- A compatible Zigbee gateway
- Electrical tools
How to install
WARNING:
|
The SONOFF MINIR2, MINIR4 and MINIR4M shares the same electrical diagram and can be used in scenarios of just one traditional switch controlling the light (single-pole switch) and in situations that there are two or more traditional switches controlling the same light (two-way switch).
For the two-way switch it's important identify in each of the traditional switches are the light wire. The MINIR2 should (for an easy installation) installed there.
Steps for the installation
Let’s start by reviewing the wiring diagram.
- Identify the live line to power up the module
The first thing to do is power up the module. For this, you will need a live wire (L) and a neutral wire (N). These two wires will provide power to connect the module.
Use a voltage tester to identify which wire is live. Once you've done that, turn off the power at the circuit breaker, and we can proceed with the connections.
- Power off the circuit breaker
To grant your security, double check that the power is off.
- Power up the module
The live wire is the one carrying current, and it will be connected to the terminal marked with the letter “L” on the module. The neutral wire (usually white or blue, depending on the region) will be connected to the terminal marked with the letter “N”.
There are two terminals marked with the letter "N" on the module. You can connect the neutral wire to either of them. To simplify installations, SONOFF included these two terminals to eliminate the need for an additional connector. If you need to send the neutral wire to a light, for example, you can use one of these terminals for that purpose.
If the second "N" terminal is used, it’s important to ensure that both "N" terminals are connected to the same phase and neutral circuit to ensure the proper functioning of the module.
- Turn on the light wire
Once the module is powered, the next step is to connect the energy to the light or a set of lights. Simply connect the wire that goes to the light to the terminal labeled "O" – Output.
- Turn on the switch wires
Finally, to complete the module installation, you need to connect the traditional switch to the smart module. This is done using the terminals labeled “S1” and “S2”. Each of these wires will connect to the switch, allowing you to control the module physically as well.
- Turn on the circuit breaker
If everything is working correctly, the module will blink a light, indicating that it is ready to be paired with the eWeLink app.
- Testing
Now that the device is powered on, you can test if the connection is working properly. Simply press the small button on the module or toggle the switch itself. The expected result is that the light will turn on and off. If it doesn’t work, double-check the previous connections.
Pair with eWeLink app
To pair the SONOFF ZBMINIR2 module with the eWeLink app, follow these steps.
- Preparation:
- Make sure the SONOFF ZBMINIR2 module is correctly installed and powered on.
- Because this is a Zigbee device, please ensure that you have one of the compatibility gateways: Bridge-P, Bridge-U, NS Panel Pro, ZBDongle-E/P, iHost.
- Enter Pairing Mode:
- With the module powered on, press and hold the pairing button (usually marked as "P" or "Reset") for about 5 seconds.
- The LED on the module will start blinking rapidly, indicating it’s in pairing mode.
- Add Device in eWeLink App:
Open the eWeLink app on your smartphone and locate your zigbee gateway. In this case the ZBBridge-P.
Next, click on the gateway to see more details and start the pairing process. In this screen, click on "Add" button to start the paring process.
The app will search for available devices. After few seconds the SONOFF MINIR2 will be added to the app.
- Finish Pairing:
Once connected, the module’s LED will stop blinking and stay on, indicating successful pairing. Now, the device will appear in the eWeLink app’s device list, ready to be controlled.
Configure the correct switch mode
Now that the module is installed and configured in the app, it’s important to adjust it according to the correct type of traditional switch.
In the ZBMINIR2 settings menu, there is an option called “Switch Mode.” Here, you will find two options "Mode" and "Detach Relay". On the first option you can define how the physical traditional switch will behave.
You can choose from three options in Mode menu.
- Pulse Mode allows you to control devices with a short-duration action, meaning the device performs an action only while the switch is pressed. When you press the switch, the device performs an action (like turning on or off), but as soon as you release the switch, the action is undone. Pulse Mode is useful in situations where you need temporary or momentary control, without the device staying on or off after pressing the switch
-
Garage door switch: When you press the switch, the device (like a garage door opener) performs the action of opening or closing, but as soon as you release the button, the movement stops.
-
- Edge Mode: the relay toggles its state (ON/OFF) every time the external switch changes position — regardless of whether the switch is currently in the ON or OFF state.
This mode uses signal edge detection, meaning it reacts to both:
-
-
a falling edge (when the switch goes from open to closed)
-
and a rising edge (when the switch goes from closed to open)
-
Each press or change of position on the physical switch triggers the relay to switch:
-
-
First press → turns the light ON
-
Second press → turns the light OFF
-
Third press → turns it ON again
-
And so on..
-
This makes Edge Mode ideal for traditional two-way (staircase) switch setups, where the same light is controlled from two different locations.
Recommended when using standard rocker or toggle switches, especially in installations where the switch position does not necessarily reflect the actual state of the light.
- Following Mode: the relay status mirrors the physical state of the connected external switch. This creates a direct and synchronous relationship between the switch and the device, meaning the smart relay will always follow the manual switch's current state:
-
When the external switch is ON (closed) → the relay turns ON
-
When the external switch is OFF (open) → the relay turns OFF
-
Switch Modes Comparison
Feature | Edge Mode | Following Mode | Pulse Mode |
---|---|---|---|
🔧 Relay Behavior | Toggles the relay each time the switch changes state (on/off). | Relay mirrors the exact state of the physical switch (on = on, off = off). | Relay toggles briefly when the switch is pressed (momentary action). |
🧠 Logic | Reacts to signal edge (rising or falling). | Reacts to the steady state of the switch (open/closed). | Reacts to a pulse (press = trigger). |
🕹️ Recommended Switch Type | Toggle switches (e.g. staircase or two-way setups). | Rocker/mechanical switches, dry contact sensors. | Momentary push buttons (e.g. doorbell-type). |
🧰 Example | Flip switch → light turns on. Flip again → light turns off. | If switch is ON, light stays ON. If switch is OFF, light stays OFF. | Press button → light toggles once (on/off). |
📲 App Sync | App state may differ from physical switch position. | App state is always in sync with switch. | App reflects the relay toggle, not the button state. |
🎯 Best Use Case | Two-way control, multiple control points. | Simple manual switch mirroring or sensor input. | Short-trigger actions like gates, bells, or scenes. |
Practical use cases
Let's explore two common and practical use cases for devices like the SONOFF ZBMINIR2:
Creating a Schedule to Turn On the Light at a Specific Time
One of the most useful features of the SONOFF ecosystem is the ability to schedule actions automatically.
Goal: Turn on the light every day at a specific time (e.g., 7:00 PM).
How to set it up:
-
- Open the eWelink app and click on the ZBMINIR2 device
- On the screen bottom Tap on “Schedule”.
- Click on "Add" a new schedule
- Set the timer to 7:00 PM. On the Repeat option select "Everyday" and for the Action select "ON"
- Save the schedule.
Result: The light will automatically turn on every day at the chosen time — perfect for routines or creating presence when you're not home.
Create an automation using ZBMINIR2 and motion sensor
Now let’s see how simple it is to create an automation using the ZBMINIR2 and a motion sensor like the SNZB-03P.
Goal: When motion is detected in the hallway, the light turns on automatically.
What you need:
-
A motion sensor like SNZB-03P
-
The ZBMINIR2 connected to the light
-
A Zigbee hub (e.g., SONOFF Zigbee Bridge-P, Zigbee Bridge-U)
How to set it up:
- Open the eWelink app and on the bottom bar menu select the "Scene" option.
- Click on the plus button (+) to open the automation creation screen
- For the trigger section, choose the motion sensor (SNZB-03P). The trigger is responsible for starting the automation.
In this case, it will be whenever motion is detected.- Select the "Smart Device" option
- Select the motion sensor from the device list.
- Select option "Motion Detected"
- Select the "Smart Device" option
- For the action section choose the ZBMINIR2 that will turn the light when motion detects movement.
- Click on add to select the device from the list
- Select the "Smart Device" option
- Select the ZBMINIR2 from the device list
- Select the option "ON" to turn the light.
- Save the automation.
- Click on add to select the device from the list
Result: The light connected to the ZBMINIR2 will always turn on whenever motion is detected.
Conclusion
As we’ve seen, transforming and automating a traditional switch with the ZBMINIR2 is both easy and affordable.
One of its greatest advantages is its ability to function as a Zigbee signal repeater, helping to strengthen your Zigbee mesh network while also automating your lighting system and enabling advanced automations with a variety of sensors.
Compact, reliable, and highly versatile, the ZBMINIR2 is an excellent addition to any smart home, offering enhanced connectivity and seamless integration with your existing Zigbee ecosystem.