ZigDash

How I made my shutter smart with a SONOFF MINI-ZBRBS

My office shutter has an electric motor and a regular up/down switch on the wall. I put a SONOFF MINI-ZBRBS, a small Zigbee shutter module, into the wall box behind that switch. The wall switch still works exactly as before, and now the shutter also opens and closes from a tile in ZigDash, at home and from anywhere.

How it works

A shutter motor has two power wires: one turns it up, the other turns it down. The wall switch sends live to one of them. The MINI-ZBRBS sits in between: the motor's two wires go to its outputs (Lout1 and Lout2), and the old switch goes to its inputs (S1 and S2). When you press the switch, the module drives the motor. When ZigDash asks over Zigbee, it drives the motor too.

The module also knows where the shutter is, so you can send it to 50% instead of only all the way up or down. And because it is mains-powered, it works as a Zigbee router that makes your network stronger.

What you need

Turn the power off at the breaker before you open the switch. The box has 230V in it. If you're not comfortable working with mains, have an electrician do the wiring. SONOFF recommends a 1 A circuit breaker (MCB or RCBO) in front of the module.

1. Wire the module

The module has six terminals, printed on it: N, L, Lout1, Lout2, S1 (up) and S2 (down). It has no earth terminal. This is how I wired mine:

TerminalGoes toIn my box
NNeutralThe blue neutral wires, joined in a WAGO 221, with a short wire from there to N (see the note below on its colour)
LLiveThe live supply of the box
Lout1Motor: up (SONOFF calls it forward)The motor's black wire
Lout2Motor: down (reverse)The motor's brown wire
S1The switch's up outputOne of the old switch's outputs
S2The switch's down outputThe old switch's other output

The old switch stays. Its common terminal gets live, as before. Its two outputs no longer go to the motor: they go to S1 and S2, and tell the module which way to drive. S1 and S2 are mains inputs, not low voltage: feed the switch's common from the same live, on the same breaker, as L.

Earth: keep the motor's yellow-green earth joined to the box's earth, as it was. It doesn't go to the module.

Up and down: wire colours are different in every house. Before you disconnect the switch, note which motor wire its up output fed, and mark it: that one goes to Lout1. If you get them the wrong way round, step 4 shows how to fix it.

Use a blue (or grey) wire for the neutral jumper. I only had red to hand, so in my photos the short wire from the WAGO to N is red, with a blue ferrule at the module end. Red normally means live, and whoever opens this box next shouldn't have to guess. If you use another colour, mark it with blue tape at both ends.
Two blue neutral wires and a red wire joined in an orange WAGO 221 lever connector; the red wire goes to the N terminal of the SONOFF module
Neutral: the box's blue neutrals in a WAGO 221, and a short red wire from there to the module's N.
The back of the old shutter switch with three red wires in its terminals
The old shutter switch, kept: live in on its common, and its up and down outputs now go to S1 and S2. Which terminal is the common differs between switches; check yours before you disconnect it.
The open wall box with the switch pulled out and the SONOFF MINI-ZBRBS wired: two red wires from the switch to S1 and S2, the motor's brown and black wires to Lout2 and Lout1, live to L and neutral to N
Everything wired, before it goes back into the wall. From left on the module: S2, S1, Lout2, Lout1, L, N.

Check that every screw terminal is tight. Leave the module outside the box for now, with its terminals facing away from you: you'll pair it in the next step.

2. Pair it with ZigDash

Pairing needs the module powered and its button pressed, so it's the one moment you work near a live box. Press only the button, with a plastic tool (the back of a pen), and touch nothing else. Rest the module on something that doesn't conduct, not touching the metal frame of the switch.

  1. In ZigDash, open Devices and tap Start pairing.
  2. Turn the breaker on. Press and hold the module's button for about 5 seconds, until its blue LED blinks slowly. It stays in pairing mode for up to 3 minutes.
  3. ZigDash shows the new device. Give it a name you'll recognise, like Office shutter.
  4. Turn the breaker off. Fold the wires in, put the module behind the switch, close the box and turn the breaker back on. Everything else is done from your phone and the Zigbee2MQTT web page.

3. Tell it what kind of switch you have

The module has to know how your wall switch behaves:

The easiest way is the Zigbee2MQTT web page: open the device, go to its Exposes tab and set external_trigger_mode to edge or pulse. (The module's button can do it too: a quick triple press steps to the next switch type and the LED blinks three times; you may need to repeat it. That means opening the box again, so I used Zigbee2MQTT.)

Then press the wall switch up, off and down: the shutter should move and stop as it always did. If it doesn't, the mode is wrong; set the other one.

4. Calibrate

The module learns how long the shutter takes to go all the way up and down. Without that, it can open and close, but it can't go to a position like 50%.

  1. In the Zigbee2MQTT web page, on the device's Exposes tab, set motor_travel_calibration_action to start_automatic.
  2. Let it run: the shutter goes all the way one way, then the other. Don't touch the switch while it does. When it's done, motor_travel_calibration_status shows Calibrated.

(On the module itself, holding the button for more than 10 seconds, until the LED breathes, starts the same calibration.) If automatic calibration doesn't finish (with a weak motor, for example), SONOFF and Zigbee2MQTT both describe a manual calibration: you mark fully open and fully closed yourself.

Up and down swapped? Turn the breaker off, swap the wires on Lout1 and Lout2, then calibrate again. Zigbee2MQTT's invert_cover option only flips the position it reports; it doesn't change which way the motor turns.

5. A shutter tile in ZigDash

  1. On your dashboard, tap Add from a device and pick the shutter.
  2. The tile has Open, Stop and Close buttons, and a row of position presets (0, 25, 50, 100 by default). You can turn on a position slider in the tile's settings.
  3. From anywhere: with ZigDash Pro, turn on remote control and the same tile works away from home, with no port opened on your router and no monthly fee.

The wall switch and the app work side by side: the switch is still there for anyone who doesn't have the app, and the tile keeps working whether the shutter was last moved by hand or from the phone.

SONOFF is a trademark of its owner. ZigDash isn't affiliated with SONOFF or ITEAD. Follow the manual that comes with your module and your local electrical rules.
Did you do this too? Tell me how it went, or what was different in your box: [email protected] or the community.