Using Sonoff 4 Ch Pro R2 as intermediate switch

Hi All,

I am new to this whole IoT world and have been going through the forums for more than a couple of weeks. I had ordered R PI 3 Model B+ and 2 Sonoff 4 Ch Pro R2. My R Pi is ready with Hass.io but I have a certain situation here:

In my bedroom there are 2 way switches setup for a light and a fan so that the lights and fans can be switched on/off from the switch board near the door or from the one near the bed. Now the problem is, how do I setup my Sonoff 4ch pro with this such that I can control light/fan from both the existing physical switches or via HA properly? For me, it looks like this will be intermediate switch setup where sonoff ch4 will sit between the 2 physical switches. If so, how do i configure it such that it works as an intermediate switch? If not as intermediate switch, in what other way can this situation be handled?

I have already searched Google and this forum but didn’t find a solution. The ones that discuss about 3/4 way switches with sonoff are discussing setting up 2 or 3 sonoffs in 3/4 configuration, not with 2 physical switches. Also, they are about normal sonoff wifi switches, not sonoff ch4.

It will be really helpful if someone can point me in the right direction.

Thanks,
V

There are video explanations on you tube how to concurring single light bulb with two switches. I think dr zzzs channel has a video on it

Thanks for your reply. I have already checked those videos. As mentioned in my question, they are about using more than 3 sonoff wifi switches in 3/4 way setup. I have 2 physical switches which has to work with one of the relay in sonoff 4ch.

I see what i would do is.

Have the switches hard wired to be on all the time. Seperate the physical switch from the power wires so they no longer do anything. Put a sonoff behind each switch. Have the sonoff power up but not actually doing anything with the relay. Set them up as separate individual lights in home assistant. Hide them from the g.u.i. in customize yaml. Add an automation that toggles the real light when the ‘virtual light’ is toggled.

This is on the assumption you have live and neutral behind each switch.

Depending how how you setup the sonoff you could also have them subscribe to the topic of the 4ch light and also publish direct to that topic as well. However i think trouble shooting any problems would more difficult this way.

PS: I don’t have this kind of problem in my house but i would imagine above would work very well as long as you have wiring that allows both sonoff to be always powered on.

Thats the problem. I want the existing 2/3 way switch to work as usual plus I want it to be controlled from home assistant. So is there any way to give the current state of the light/fan to sonoff 4ch pro so I can see the current state of the light/fan in home assistant? Or I have to some how configure it to work as intermediate switch as I mentioned earlier.

Please note that I do not have normal sonoff wifi relay; I have sonoff 4ch pro which has 4 relays in it.

The physical switches will still work but they will use mqtt.

@vishnunn Have you managed to pull this off? I have exact the same need on my living room. I know I can achieve that with Sonoff Mini, but it would be cheaper if I can make it work with the 4CH (it’s exactly 4 bulbs)

No proper solution yet or I should say, not a solution that I would have preferred. I have not yet implemented it so didn’t post here but for each channel of R2 what I have planned is:

  • connect each channel normally with NC & NO; so i will have 1 physical switch and I can use home assistant to control the relay
  • For the 2nd physical switch I will solder wires to the buttons on R2 and connect them to the physical switch. So that means the 2nd physical switch will be actually mimicking the buttons on sonoff and will be a DC circuit.
  • This is based on my tests on sonoff board - when i short the 2 terminals of the button using a wire, the light turns on and when i remove the wire (un-short - if there is such a word), light turns off. It looks like it should be a straight forward job to connect a physical wall switch to it. The only problem that I could think of is that its DC and these wires may run close to AC wires(about 1 inch distance) - a possible disaster. So I am planning to provide a shield to the DC wires and ground the shield. Not sure if that would be enough; need to ask my electrical engineer uncle about the safety. If anyone here can put some light on this issue what would be great as well.

That will work, but at least for me it’s sub-optimal. I don’t want to have to solder/tinker with the boards because that makes a quick replacement (in case of device failure) impossible. It would also mean that you either:

  • Use an expensive parallel switch to perform the job of a regular switch (on your 2nd switch scenario)
  • Use a 1 parallel and 1 regular switch on a this “make-shift” 3 way setup, which will definitely not be up to code. May also cause confusion in the future for an electrician that you eventually hire.

You should also consider that DC voltage does not fare well with long cables, as voltage may drop through long runs. This may not be an issue because Sonoff normally uses pull-up resistors on the buttons, which mean they “activate” when grounded, but still is worth mentioning.

In my setup here I decided to use a bunch of Sonoff Minis. They have a built-in pair of leads exactly for that, and you can set up a 3 way correctly with them.

Hi. I am all for a better and cost effective solution if some one has it.

  • Not tinkering with the board is a very valid point for replacement for most people. I had not thought of that and now that I think about it, none of the things that I run on CH4ProR2 is critical so I think I can afford the downtime it will take for me to solder again. But I will keep that in mind for the POW R2 which I was planning to use for my water pump.
  • I didn’t get your point about parallel switch - All I need is one 2 way switch(for connection with 4ch pro directly), 1 regular switch(or another 2 way for DC) and some wires for DC. I already have 2 2way switches for each light; which means I don’t need new switches.
  • Length is also not a problem for me as 4ch is just about 10 inches away from my switch board.

Its good that mini solution works for you. For me its not an option as all the lights throughout the house I want to connect to home assistant are on 2 way switching which means a lot of sonoff minis. It won’t work for me mainly because of the cost as I would need 1 4ch for every 4 lights plus 1 mini for each light.