Start a new topic

Sonoff with 2-way Physical switches

Hello, I have a scenario in which I have 2 physical switches to control a light and I want to connect it with my sonoff 4ch pro r2. I was thinking of connecting one of these physical switches to sonoff so that I can control the light using the physical switches and eWelink. Can anyone provide me a connection diagram for this scenario? I understand that the live status of the switch won't be updated properly if we combine it with physical switches. I'm okay with with that.

Best Answer


 If you want to fully integrate Sonoff Mini with existing manual switches, you not only need to have live and neutral to power the Mini, but the live to the first switch needs to originate from the Mini (connection S1) and the load from the last switch needs to return to the Mini as well (connection S2). 

When I started renovating my house in France 10 years ago, I was interested in automation but didn't like or couldn't afford the options available at that time.   Not knowing what might come up in future I decided to have a central wiring box in each room with all the lights and switches wired separately from that box, something I'm sure professional electricians would have frowned upon, as that obviously meant more wire, but only cost a few Euros more.  But now I'm reaping the benfits, it is very simple for me to include the Mini in any of the lighting circuits.

How smug do I feel now?  Annoyingly so!  Sorry.

Thanks Tony & Paul for your comments. I've been trying to find an affordable solution to automate, and clearly SONOFF has that covered...if  you're a forward thinker like Paul, unfortunately I am not.

However I think I may have come up with a potential solution, and wondering if anyone can think of a reason  this ( see drawing) wouldn't work? 

 I'm only an amateur so treat anything I say with caution, but I'm fairly sure the circuit connected between S1 and S2 is purely for the Mini to detect when the status of any switch changes, it is not to be treated as a switched live to power anything, and I'm sure you should never attach a live feed to the S1 connection, as you have in your diagram with the red wire connecting the 4th and 5th connection points.  The load for the light has to come from directly from the "L out" connection point, the fourth from left.

This doesn't help you solve your problem, but hopefully will help you avoid damaging your Mini.

1 person likes this


I agree with Paul. The S1 and S2 connections are passive and are sensed by the cpu. You should not connect any voltage source to these. 

Re-wire and just connect the two switches to S1 and S2. That is independent of the live and neutral wires.

The live mains goes to Lin and the "live" side of the bulb goes to Lout.

The neutrals are joined on the circuit board track, so they become common. Connect a black wire from here to the other side of the bulb,

Now the bulb can be turned on/off by wifi or by the external switch changing state.

1 person likes this

Thanks again you guys, I  had thought it S1 or S2 could accept voltage...and I believe it can, however only 3.3 volts.

In my quest to create an affordable automated 2 way, I present another configuration to overcome the lack of enough conductors in the wall to perform the task with only 1 SONOFF.

Does anyone see any problems with this configuration using eWelink App scene?



That looks OK to me, but I don't think it's necessary to connect the L Out from the first Mini to the second Mini as you are going to use the Scenes in ewelink . You can just use the second Mini as the connection to the lights, and have conditions to replicate any changes in state of either Mini to the other Mini, 4 conditions in all. M1 on turn M2 on, M1 off turn M2 off, M2 on turn M1 on, M2 off turn M1 off.

I've not used scenes much, I think that would work.

Good luck!

You don't need 2 minis. 

In your original diagram, you had the 2 switches wired as 2-way cicuit, so do that with s1 and s2 (no need for any power there)...

S1---------< ========= >-------S2

Then connect your live feed to Lin

One side of the bulb to Lout

The other side of the bulb to common neutral. (neutral in, "neutral side" of bulb, mini neutral).

Now the mini is powered on, the bulb is lit when mini turns on.

Mini turns on/off by wifi or toggling switches.

Sorry Tony,  I'm probably missing something but I don't understand how that can work with only 3 wires running between the 2 switches.  Surely the S1 to S2 circuit requires 3 wires between the switches, and then there needs to be another 2 wires for neutral and switched live from the Mini to the light?  I think Phil's main problem is that he only has 3 wires between the switches, with live/neutral available at the first switch, and the light being powered from the second.

1 person likes this

Hi Paul,

Yes you are right.

I remembered his first circuit diagram showing the switches connected in that pattern, but forgot about the split between the line in and the light connection.

If he could pick up the lighting power, separately in the ceiling, then it might be easier with the mini located near the light.

1 person likes this
What do we do if we have 3 physical switches to control a lamp and a sonoff mini?


The number of switches doesn't really matter. Whatever your switch circuit happens to be, you should be able determine that from the lamp's point of view, there is 1 ine in and 1 line out. In a normal household circuit those 2 lines would be live and switched live.

For the mini, you have to isolate the switch circuit from the lives mains, so it is just passive switches interconnected with no power applied to them. Then identify the 2 lines that would be "in" and "out". Connect those to the S1 and S2 on the mini. Any switch change will be detected by the mini and it will  toggle the lamp power.


S1--------[-< ]=====[ x ]=====[>-]-------S2

The 3 boxes are your switches.

Login or Signup to post a comment