…and another Open Source package to run it.
I only recently noticed that ITEAD Studios have added a light switch to their Sonoff line-up.
The switch comes in either EU or US single-gang switch-plate sizes and has a glass front panel with a capacitive touch switch. Inside there’s an ESP8285 module providing remote services via ITEAD’s EweLink cloud application.
There aren’t too many hardware details available on the Sonoff Touch at the moment (what sort of PSU is utilized, or even whether it’s a relay or a triac based device), but people have already started hacking it (no doubt spurred on by a statement in the comments section of the product page that this device “can’t be reprogrammed”). David Pye seems to be first out of the gate with his (PubSubClient) MQTT implementation; not just identifying GPIO0 as the pin connected to the touch-switch, but also providing short write-ups (with photos) on how to prepare the device for programming, configuration and usage, but also providing bonus “long-touch” and “short-touch” modes in his firmware.
Note that, unsurprisingly, the Sonoff Touch requires that a neutral lead be available in the existing switch box, as well as the switched live lead. This is something you need to check‡ before ordering a bunch of these (it’s very common for only the live lead to be available).
David’s additional switch handling looks like it might open up quite a few possibilities:-
- Add an on-time limit for specific lights.
- Control actual on/off based on time of day.
- Control on/off by ambient light level (assuming you have MQTT capable sensors).
- Put unit into OTA mode (ie:- limit reprogramming to those with physical access).
- Use “long-press” to signal MQTT to switch all controllable lights in room on/off.
- Additional ten-second press mode for all controllable lights in house on/off.
Seems like you could have tons of fun with this. Nice one, David!
‡ Hint – Don’t check a bathroom or toilet light switch and assume that all of the other switches in your house will be the same!