Sonoff S20

Installation

  • Flash ESPEasy firmware (stable version R120)
    esptool.py --port /dev/ttyUSB0 write_flash -fs 1MB -fm dout 0x0 ESPEasy_R120_1024.bin
  • Connect with access point ESP_0 (password: configesp) and browse to 192.168.4.1

Configuration

  • GPIO13 - green LED (low = on)
    Image description
  • GPIO0 - button
    Image description
  • GPIO12 - relay + blue LED (high = on)
    Image description
  • Rules
    on RelayOff do
    gpio,12,0
    endon
    on RelayOn do
    gpio,12,1
    endon
    on Button#State do
    if [Relay#State]=0
    event RelayOn
    else
    event RelayOff
    endif
    endon
    on Clock#Time=All,%sunset% do
    event RelayOn
    endon
    on Clock#Time=All,23:59 do
    event RelayOff
    endon