Lately, I have been experimenting on how to DIY a simple WIFI switch which can switch on/off a remote device. I can use OpenHAB to design a screen and use it on my mobile phone to do the job but I wanted a physical switch. I have put together the switch using a Wemos D1 mini and a capacitive touch switch. The capacitive touch switch has a nice blue glow when it is turned on. A NPN transistor is used as a switch to pull the D1 mini GPIO to the ground when activated. Tasmota has a configuration for Switch mode . When a switch is toggled, it will send out a MQTT message. I have made both the Sonoff RF Switch and DIY switch listened to the same queue. When the switch is touched, it will turn on/off the Sonoff RF Switch. Cool !!!
An old techie.
www.gheesung.com