I needed a solution to remote mount a Sonoff Basic inside of a light fixture and also remotely control it from the light switch. I want to be able to control the lights through a wall switch but not disconnect the power to the Sonoff so that if a light is turned off by the switch it can still be turned on with the app or Alexa, just like a Sonoff Touch.
My home is over 100 years old and some of the switch wiring has not been upgraded. Those switches only have a two wire circuit where only the hot is run through the switch (no common or ground wire). The solution I came up with was to create an N.O. momentary contact from a standard Decora light switch by adding a spring from a ball point pen. By soldering wires to the Sonoff's tactile switch on the pcb and connecting them to the modified Decora light switch through the original house wiring I am able to remotely control the Sonoff.
Any momentary switch would work however I wanted the look of a standard Decora switch. As an option, I can also install the Sonoff in any single gang box along with the modified switch as long as there is a common wire available in the box.
The Sonoff Basic has the original firmware installed, no need to install modified firmware for this mod.