Start a new topic

2 way switch

I want to use my sonoff 4ch pro with a physical wired switch, but when I switch the light on using the sonoff if shows on state of the relay, when I switch the light off by the physical switch the relay remains energized (on state) so in order to turn my light on again using sonoff I need to ask Alexa to turn my light off. Any way there can be a setting where regardless of whether I say on or off it just changes state of the relay?this feels a bit more natural... Even if I need to do hardware changes or change the firmware myself for a unique solution

4 people like this idea

I guess terminology may depend on region.  In the UK we call this two-way switching, and the two switches at each end are two-way switches.  The middle switch on the drawing, that swaps the two strap links over, is an "intermediate switch".  I've seen the term three way used where there's an intermediate, but that's really a misnomer because you could have any number of intermediates.


3 people like this

problem is then you still rely on the module to switch lights on/off, when the device fails I don't have manual intervention. don't really mind not knowing the on/off state, just that if I say on or off change the state of the relay.

Wonder if there is any way to get the code and just change some lines

1 person likes this

Just for the record.  What you are calling a 2-way switch is known to electricians as a 3-way switch.  It has three connections.  In order to operate a light with two switches you need two 3-way switches.  In order to operate a light with three switches you need two 3-way switches and a 4-way switch.




What I would like to see produced is a 3-way wifi touch switch.  All that is needed is to use a relay with Common, NC, and NO contacts.  Incorporate a current sensor that will let the app know if the light is burning.  With this one simple device a user could replace one of the 3-way switches in either of the diagrams above and operate the light via wi-fi.  At the same time the other manual switches could also continue to work normally.

1 person likes this
Lots of activity throughout the night on the forum :) The 4ch pro is basically already a 3 way switch since it's got a No/Nc combination, but the software doesn't give me the option to toggle the relay, as stated a quick software change will make this possible. Regardless whether I say on or off just change the state of the relay, worst case if the light is already on and I tell Alexa to turn it on it will switch off but with my homemade arduino light controller I haven't come across anyone saying switch on if it is already on, sort of human nature to say the right thing. Even if the remove the on off state from the app to just replicate the buttons on the device itself, a simple push changes the state of the relay. Does anyone know where I can get the software to change it myself? My Arduino one works okayish but it's got bugs, the sonoff one so far is much more superior than my DIY option. As is now it just feels unnatural to switch a light off and guess with Alexa to turn off.... Nothing happens then having to say turn on in order to toggle the relay

@Chaun Booysen did you manage to find the solution?

Even we use bell switch, only way to use sonoff with original source code is by connect it to on/of switch at sonoff board. correct me if you have any other option without change the source code.

Tried using iftt but was a bit slow, eventually just wired the pushbuttons out to my wall switches, looks the same and the light switch (bell press) toggles the controller. User interface remains the same even if people don't know there's a controller but with the advantage of having wireless control. Just watch out for induced voltages when sharing same wireways as electrical installation. I used screened cat5 and earthed the screen. Also used some filter caps to earth to remove the 50hz induced voltage

I agree.  Often the best option to make an existing light into a wifi controlled smart light is to install a wifi switch such as the Sonoff basic by the light ceiling rose, but that would have to be wired in series with the wall switch for the wall switch to still operate the light. Then, when the wall switch is turned off, you no longer have control over the wifi switch as it has no power.  

It would be useful to have a version of the Sonoff wifi switch that could monitor the switched live wire and switch its state from on to off and vice versa based on whether the wall switch was turned on or off.  This would require 3 inputs, neutral, live and switched live, and then 2 outputs of neutral and live. 

as mentioned, these all require hardware changes, would make it simple to just install the device in a 2way (some countries call it a 3way) wiring and have one physical switch and the other the sonoff, a quick software update to toggle the device would easily fix the problem to turn lights off by turning the relay on.

I've managed to get it working via ifttt and apilio but there is about 15s delay

Rather than changing the existing hardware, my request would be for a new device that could handle this would be something they could produce.  It would be very popular for people wanting to retrofit Smart switching into older houses where changing the wall switch for a smart switch is not possible or where changing the light switches is not desirable.  

I would not want to install devices that have been altered in my house electrics and would rather have fully contained and certified devices produced specifically for that purpose.

If IFTTT integration were working I would be able to tell you if there is a ‘toggle’ option for EWeLink. I have a wemo Insight Switch and it has toggle. You could then link Alexa a custom phrase that gets IFTTT to toggle it. Can’t remember if it has toggle option. Even if there is no toggle option you could do it anyway by linking the free ‘Apilio’ to IFTTT, storing the device state and just performing the opposite. That would be quite easy if they get IFTTT going again. If IFTTT connecting was working the latency isn’t huge from Google-home->IFTTT->Apilio->Sonoff 4Ch. I use to turn on fans when cycling and it happens within a couple of seconds (from U.K.)
IFTTT should just already have the features Apilio has. I don’t get a 15s delay, but it is still annoying. I get that they want to keep it simple, but they could just have an advanced tab. You’d still get a delay from IFTTT but that varies with manufacturer. I can turn on (not off) a security camera using a custom phrase on a google home. That requires google>IFTTT>wink>canary-camera and takes less than 1s. Getting a constant live to a ceiling rose would be ideal, but in the U.K. it wouldn’t be allowed without an electrician or getting the council to inspect it. Changing switch sockets though you can do. I think they just need to get them to talk to each other more using the local network and AP mode if that is down. They could even get 2 way dimmers to work that way. I guess we wait and see what this upcoming update with LAN control does to how scenes work.
"Getting a constant live to a ceiling rose would be ideal, but in the U.K. it wouldn’t be allowed without an electrician or getting the council to inspect it."
I'm not sure that's the case, notifiable works are mainly ones that involve adding a new final circuit or work in bathrooms or similar special locations.   Wiring in a new switch or light fitting on an existing circuit is perfectly permissible (assuming done competently).   By the way rules vary within the UK so for example we're permitted a lot more DIY electrical work in Scotland than in England.


I didn’t realise that the rules were different in England vs. Scotland. TBH, they are a bit stupid as I’ve done more complicated things to use low voltages that would have been needed and if you sent enough current down a wire it would burn out even if the voltage was low. I thought in England you can add one socket or one lighting socket to an existing ring circuit that is already designed for that purpose, because we are pretending the pre-existing circuits are safe (even though they put a standard double plug socket in a bathroom - I guess because it doesn’t have a shower/bath or once wasn’t a bathroom). I would be very happy to be wrong though; I’ve deliberately not done things to avoid contravening rules.
Login or Signup to post a comment