There are few reasons to add a touch switch to Sonoff:
- It is cool, especially with LED backlit.
- It can work as a latching switch so it is kinda stateless to the Sonoff relay state. For instance, after using a toggle switch to turn on or energize a Sonoff relay. Then you use Siri to turn off the Sonoff relay later, the toggle switch will still remain at the ON position. However, there is no such problem with touch switch in latched mode. It does not have ON or OFF position.
Parts | Qty | |
---|---|---|
Heltec Automation Capacitance Touch Switch Module | 1 |
Steps:
-
Solder two pins on the back of the touch switch to turn it to latched mode.
-
Connect VCC, GND, and OUT pins from touch switch to Sonoff Basic 3V3, GND, GPIO14 pins respectively.
-
Power up Sonoff Basic via USB port using FTDI device and browse to Sonoff-Tasmota web interface.
-
Navigate to Configuration, then Configure Module.
-
Set Module Type to 01 Sonoff Basic and GPIO14 Sensor to 09 Switch1.
-
Click Save.
The resistor between GPIO14 and Ground pins will filter off noise or interference introduced by the wire connecting the touch switch and Sonoff Basic board. Alternately, you can replace the connection wire with shielded wire or use ferrite bead, I guess. Without the resistor, I can trigger the relay by just squeezing the connecting wire.