{"id":18879537,"url":"https://github.com/tayfunulu/modemrebooter","last_synced_at":"2025-10-15T11:08:10.266Z","repository":{"id":89981617,"uuid":"584305891","full_name":"tayfunulu/ModemRebooter","owner":"tayfunulu","description":"SONOFF S20/S26 - Internet Checker and automatic model rebooter with micropython","archived":false,"fork":false,"pushed_at":"2025-08-08T12:50:10.000Z","size":41,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-08T14:41:40.166Z","etag":null,"topics":["automation","esp8266","iot","micropython","modem","reboot","rebooter","sonoff","sonoff-s20","watchdog"],"latest_commit_sha":null,"homepage":"","language":"Python","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/tayfunulu.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":"2023-01-02T07:13:30.000Z","updated_at":"2025-08-08T12:50:14.000Z","dependencies_parsed_at":"2023-05-30T19:00:35.393Z","dependency_job_id":null,"html_url":"https://github.com/tayfunulu/ModemRebooter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tayfunulu/ModemRebooter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tayfunulu%2FModemRebooter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tayfunulu%2FModemRebooter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tayfunulu%2FModemRebooter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tayfunulu%2FModemRebooter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tayfunulu","download_url":"https://codeload.github.com/tayfunulu/ModemRebooter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tayfunulu%2FModemRebooter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279075637,"owners_count":26097955,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-15T02:00:07.814Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["automation","esp8266","iot","micropython","modem","reboot","rebooter","sonoff","sonoff-s20","watchdog"],"created_at":"2024-11-08T06:37:16.094Z","updated_at":"2025-10-15T11:08:10.248Z","avatar_url":"https://github.com/tayfunulu.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ModemRebooter\n## SONOFF S20/S26 - Internet Checker and automatic model rebooter with micropython\n\nSome modems and some service providers do not have a stable internet connection and sometimes the internet connection is randomly disconnected. In such cases, the best solution is to restart the modem. It is an important problem especially for people who remotely connect to devices at home. \n\nMy friend Mr. Cenap came to me with a similar problem. I prepared this product and small codes for him. I preferred to use a sonoff's smart plug to make it tidy. In this way, it was both a safe and visually better... \n\n![image](https://user-images.githubusercontent.com/11840582/210970263-f4bdb6d9-734b-406d-ac57-4675051ff585.png)\n\n\n**Device :** [SONOFF S20 / S26](https://sonoff.tech/product/smart-plugs/s26/) \u003cbr\u003e\n**Device for serial connection :** FT232RL TTL USB Serial Port Adapter \u003cbr\u003e\n**Hacking :** [Hacking Sonoff S26 WiFi Smart Plug](https://notenoughtech.com/home-automation/hacking-sonoff-wifi-smart-plug/) \u003cbr\u003e\n\n**Not:** you could easily make your own circuit. All you need is that a microcontroller like ESP or Pico and a Relay element. \n\n**WARNING : NEVER POWER YOUR DEVICE WITH POWERLINE DURING ALL PROCESS**\n\n1. Step: To make correct wiring between SONOFF device and USB serial Port adapter\n      \u003ccode\u003eGND-GND\u003c/code\u003e , \u003ccode\u003eVCC-VCC\u003c/code\u003e , \u003ccode\u003eRX-TX\u003c/code\u003e , \u003ccode\u003eTX-RX\u003c/code\u003e \n2. Step: Be sure to use 3.3 Volt: Probably there is small jumper on your FTL USB serial port adaper\n4. Step: install [esptool](docs.micropython.org/en/latest/esp8266/tutorial/intro.html) \n      - install esptool on PC\n      - powered device only with USB serial adapter with holding button on device to enter boot mode \n      - erase device and upload newest micropython code on device ( 1 MB ESP8266 code)  \n\n      ```sh\n      pip install esptool\n      esptool.py --port /dev/ttyUSB0 erase_flash\n      sudo esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=detect -fm dio 0  esp8266-1m-20220618-v1.19.1\n      ```\n      \nUpload codes (All .py files) on device with your favorite method. Mine is RSHELL. \n\n```\nsudo pip3 install rshell\nsudo rshell --buffer-size=30 -p /dev/ttyUSB0\nrsync . /pyboard\n```\n\n![image](https://user-images.githubusercontent.com/11840582/210970394-09c92544-9e2c-4604-aac5-32532961feaf.png)\n\n\n## Algorithm\n\n![image](https://user-images.githubusercontent.com/11840582/211072282-98657654-2961-4e2b-80bc-56c501638fa5.png)\n\n\n## Button Functions\n\none short press = rebooting \n5 sec long press  = delete stored wifi datas and disconnect (like factory reset)\n\n\n\u003cb\u003eSource :\u003c/b\u003e \n\n  * [WiFiManager](https://github.com/tayfunulu/WiFiManager)\n  * [Monitoring internet connection  - Jorge Alberto Díaz Orozco (Akiel)](https://dev.to/jadolg/monitoring-my-internet-connection-with-micropython-and-esp8266-42lp)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftayfunulu%2Fmodemrebooter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftayfunulu%2Fmodemrebooter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftayfunulu%2Fmodemrebooter/lists"}