Skip to content

(Yet another) custom firmware for the sonoff s20 smart socket

License

Notifications You must be signed in to change notification settings

nightvisi0n/sonoff-s20

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

(yet another) firmware for the sonoff s20 smart socket

Features

  1. platformio support
  2. MQTT controllable
  3. OTA capable
  4. easy configuration through gcc preprocessor #defines

Configuration

Have a look at src/config.h and adapt it to your needs.

Compilation

~/git/sonoff-s20/ › pio run

Upload (via USB to Serial Adapter)

~/git/sonoff-s20/ › pio run -t upload

Upload (via OTA)

First change the OTA password in platformio.ini if you modified the default one in src/config.h.

~/git/sonoff-s20/ › pio run -t upload -e ota --upload-port=<esp8266 ip address>

Integration into home-assistant

light:
  - platform: mqtt
    name: "Kitchen Light"
    state_topic: "sonoff/<ESP8266 chip id>/state"
    command_topic: "sonoff/<ESP8266 chip id>/command"
    retain: true
switch:
  - platform: mqtt
    name: "Coffee Machine"
    state_topic: "sonoff/<ESP8266 chip id>/state"
    command_topic: "sonoff/<ESP8266 chip id>/command"
    retain: true

License

Copyright (C) 2017 nightvisi0n

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.