ePrivacy and GPDR Cookie Consent by TermsFeed Generator Home Automation System - External buttons and switches on the SONOFF Basic with TASMOTA | IoT - smartHome | DomoticsDuino - Computer engineer, Smart Home, Flight Sim and others...
IoT - smartHome (181 posts)

Home Automation System - External buttons and switches on the SONOFF Basic with TASMOTA [Versione in italiano]

by Marco Lamanna



I need to control SONOFF using either physical buttons and switches and not only through OpenHAB

The easiest way is to use a button directly connected to the physical button pins in the SONOFF. I already made a test with my first SONOFF Basic, as described in a previous post(https://www.domoticsduino.cloud/en/blog/1/iot-smarthome/post/2017/08/home-automation-system-sonoff-and-mqtt_19.html).

In this way we could activate and deactivate SONOFF as we do using the physical button. But I need to control the SONOFF through switches too. Reading the TASMOTA documentation, I discovered that I could connect a button / switch to the GPIO14 pin. Then I could tell TASMOTA what kind of object I connected...if a standard button or a switch.

To do so, I have to connect the button / switch to the GPIO14 pin and to the GND pin on the board; both of them are easily reachable. The GPIO14 pin is the one which is not utilized on the serial interface, and the GND is just beside it (already used for the serial communication).





When the hardware link are OK, I have to configure TASMOTA

In the configuration menĂ¹ of the web interface, I choose 09 Switch1 as the new value for GPIO14 drop down list.



Then, I have to set SwitchMode parameter accordly to my needs, through the Console: if I will work with a button, I set up the value 3, otherwise I will put 0


And finally here is a video with my test