Sonoff S20 Smart Socket

Jörg Ostertag edited this page Jul 28, 2018 · 9 revisions

Serial Connection

Please see the Hardware Preparation page for general instructions.

S20 Smart Socket The picture shows how to program the S20 Smart Socket powered by the FTDI USB converter. With newer US sockets, either use a right-angle header, or remove the header after flashing. Otherwise, the pushbutton may rub against a pin and get stuck.



Step 1.

Be sure it is NOT plugged in!

Remove the "hidden" screw.

SonoffSC

Step 2. (optional)

Remove the board so you can access the GND,TXD,RXD,VCCIO better. There are 2 screws. At the Red and the Blue cable. Be careful not to damage the soldered connection!

SonoffSC

Step 3.

Connect the jumper cables.

SonoffSC

RX and TX is reversed.

From top to bottom (see image below):

  • Vcc (3,3V)
  • TXD
  • RXD
  • GND

S20 Board

Connected? Hold the little button pressed while connecting the USB cable to your Notebook, PC etc. after ca. 2 sec. let go of the button. It is now in flashing mode. Follow the Hardware Preparation page for general instructions.

OpenHab configuration

sonoff.items:

Switch S20_1 "Coffee S20-1 Powerplug" (LR,gLight) 
       { mqtt=">[broker:cmnd/sonoff-S20-1/POWER:command:*:default],
                 <[broker:stat/sonoff-S20-1/POWER:state:default],
                 <[broker:stat/sonoff-S20-1/RESULT:state:JSONPATH($.POWER)],
                 <[broker:tele/sonoff-S20-1/STATE:state:JSONPATH($.POWER)]
                 "}
Switch S20_1_Reachable "S20-1 reachable" <contact> (gReachable)
       { mqtt="<[broker:tele/sonoff-S20-1/LWT:state:MAP(reachable.map)],
               <[broker:stat/sonoff-S20-1/RESULT:state:ON],
               <[broker:stat/sonoff-S20-1/POWER:state:ON],
               <[broker:tele/sonoff-S20-1/STATE:state:ON]
               " }

default.sitemap:

        Switch item=S20_1 labelcolor=[S20_1_Reachable == "ON" = "green",S20_1_Reachable == "OFF" = "red"]

Home
Theo's Tasmota Tips
What's New

Getting Started

Upload tools

Usage

Devices - Additional Info

Home Automation Integration

Other Integrations

Further Topics

ESP32

Misc

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.