Using Sonoff Basic. Possible to add a touch on/off unit to lamp?

I have some lamps that I plan to put on the sonoff basic. I mostly use my voice or home assitant mobile app to control everything. I was wondering though if its possible to add a touch on/off module in some way so that guest would be able to touch a module mounted on the lamp to control the lamp and still have it remain under the control of the sonoff basic and HA?

Technically - Yes.
Safely - probably not.

Touch modules are available which detect capacitive coupling of your body, however these need safe isolation from deadly mains voltages. Several resilient 1MR resistors can reduce the danger, however many modules are designed for use on isolated low voltage power supplies (e.g. certified isolated Type 2).

A Sonoff Basic uses an internal switching power supply which is not designed with the levels of isolation required for your body to come into regular contact with the low voltage supply rails.

The Tasmota forum explicitly mentions the risk of specific Sonoff devices which don’t attempt AT ALL to isolate the low voltage circuity, meaning any additional sensors or switches are live at mains voltage.

Given the additional risk of capacitive touch - I’d stick to a separate RF remote.

If this helps, :heart: this post!

1 Like

Thank you. That is helpful. Would you be able elaborate more on how I can use an RF remote to control a lamp while still having HA and the Sonoff or some other piece of hardware that would integrate into my smart home?

Any RF remote (e.g. Z-Wave, Zigbee) would work as a means of toggling the lamp state via an automation and the Sonoff. I’d not recommend the otherwise very nice and cheap IKEA Tradfti Zigbee remotes as they can eat CR3032 batteries, and generally be a PITA with protocol ‘additions’.

If you really like capacitive touch, a USB power supply could run an ESP8288 (e.g. Wemos D1 mini) with a cap touch module, or potentially a relay module, LED tape, and so on. The difference from the Sonoff is the use of a low voltage isolated PSU.

I guess you could also use a Sonoff basic, but powered from a USB supply - e.g. don’t connect the mains PSU, and back feed isolated 5V into the programming pins. Then I’d be more confident of using a cap touch module as a GPIO input (again, experiment with additional 1MR touch pad resistors)

Just check first that the lamp is double insulated - i.e. has no earth bond (as this would defeat cap touch on the body).

1 Like