{"id":24795231,"url":"https://github.com/nightvisi0n/sonoff-s20","last_synced_at":"2026-04-14T03:32:35.400Z","repository":{"id":87421846,"uuid":"104650727","full_name":"nightvisi0n/sonoff-s20","owner":"nightvisi0n","description":"(Yet another) custom firmware for the sonoff s20 smart socket","archived":false,"fork":false,"pushed_at":"2017-09-24T18:11:50.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-03T04:38:36.731Z","etag":null,"topics":["arduino","esp8266","internet-of-toilets","iot","mqtt","platformio","sonoff","sonoff-s20"],"latest_commit_sha":null,"homepage":null,"language":"Arduino","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nightvisi0n.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-24T14:35:24.000Z","updated_at":"2017-09-24T15:25:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"24c5219d-2cea-459d-bb64-c1f3c23b62bc","html_url":"https://github.com/nightvisi0n/sonoff-s20","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/nightvisi0n/sonoff-s20","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nightvisi0n%2Fsonoff-s20","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nightvisi0n%2Fsonoff-s20/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nightvisi0n%2Fsonoff-s20/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nightvisi0n%2Fsonoff-s20/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nightvisi0n","download_url":"https://codeload.github.com/nightvisi0n/sonoff-s20/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nightvisi0n%2Fsonoff-s20/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31781292,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","esp8266","internet-of-toilets","iot","mqtt","platformio","sonoff","sonoff-s20"],"created_at":"2025-01-29T23:29:07.856Z","updated_at":"2026-04-14T03:32:35.384Z","avatar_url":"https://github.com/nightvisi0n.png","language":"Arduino","funding_links":[],"categories":[],"sub_categories":[],"readme":"# (yet another) firmware for the [sonoff s20 smart socket](http://sonoff.itead.cc/en/products/residential/s20-socket) #\n\n[![](https://travis-ci.org/nightvisi0n/sonoff-s20.svg?branch=master)](https://travis-ci.org/nightvisi0n/sonoff-s20)\n\n## Features ##\n\n1.  [platformio](http://platformio.org/) support\n1.  MQTT controllable\n1.  [OTA capable](http://docs.platformio.org/en/latest/platforms/espressif8266.html?highlight=ota#over-the-air-ota-update)\n1.  easy configuration through gcc preprocessor `#define`s\n\n## Configuration ##\n\nHave a look at [src/config.h](src/config.h) and adapt it to your needs.\n\n## Compilation ##\n\n```shell\n~/git/sonoff-s20/ › pio run\n```\n\n### Upload (via USB to Serial Adapter) ###\n\n```shell\n~/git/sonoff-s20/ › pio run -t upload\n```\n\n### Upload (via OTA) ###\n\nFirst change the OTA password in [platformio.ini](platformio.ini) if you modified the default one in [src/config.h](src/config.h).\n\n```shell\n~/git/sonoff-s20/ › pio run -t upload -e ota --upload-port=\u003cesp8266 ip address\u003e\n```\n\n## Integration into [home-assistant](https://home-assistant.io/) ##\n\n### As a [light component](https://home-assistant.io/components/light.mqtt/) ###\n\n```yaml\nlight:\n  - platform: mqtt\n    name: \"Kitchen Light\"\n    state_topic: \"sonoff/\u003cESP8266 chip id\u003e/state\"\n    command_topic: \"sonoff/\u003cESP8266 chip id\u003e/command\"\n    retain: true\n```\n\n### As a [switch component](https://home-assistant.io/components/switch.mqtt/) ###\n\n```yaml\nswitch:\n  - platform: mqtt\n    name: \"Coffee Machine\"\n    state_topic: \"sonoff/\u003cESP8266 chip id\u003e/state\"\n    command_topic: \"sonoff/\u003cESP8266 chip id\u003e/command\"\n    retain: true\n```\n\n## License ##\n\nCopyright (C) 2017 nightvisi0n\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnightvisi0n%2Fsonoff-s20","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnightvisi0n%2Fsonoff-s20","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnightvisi0n%2Fsonoff-s20/lists"}