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
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.
@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.
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.