I would like to have a digital input on the Sonoff Basic. I see a lot of people asking for a good way to interface a simple digital input to turn the device on and off with a switch or other make/break action.
Since GPIO14 is pulled high and exposed on the header this would make the perfect place to implement this feature and it would not affect the standard operation of the unit. There are alternative firmwares that do this but I would like to use the stock firmware and the eWelink app.
When GPIO14 goes from high to low, turn the relay state on.
When GPIO14 goes from low to high turn the relay state off.
If the relay is already in the specified state, simply leave it alone.
We already have a momentary contact input with the stock push button switch. This change would give us an input that would work with a toggle switch or a sensor that provides a continuous high or low state.
In my case I want to use a simple photocell sensor that provides a digital 1 or 0 to switch the Sonoff and have a scene that turns a bunch of outdoor lights on. In other words use one Sonoff as a master photocell switch.
The sonoff Dual has the function you are looking for,
you can conect it to a pulse style switch (think dorbell)
and that way it will work wifi via app, or with the switch,