(yet another) firmware for the sonoff s20 smart socket
- platformio support
- MQTT controllable
- OTA capable
- easy configuration through gcc preprocessor
#define
s
Have a look at src/config.h and adapt it to your needs.
~/git/sonoff-s20/ › pio run
~/git/sonoff-s20/ › pio run -t upload
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
As a light component
light:
- platform: mqtt
name: "Kitchen Light"
state_topic: "sonoff/<ESP8266 chip id>/state"
command_topic: "sonoff/<ESP8266 chip id>/command"
retain: true
As a switch component
switch:
- platform: mqtt
name: "Coffee Machine"
state_topic: "sonoff/<ESP8266 chip id>/state"
command_topic: "sonoff/<ESP8266 chip id>/command"
retain: true
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/.