Sonoff S20 WiFi Smart Socket
Sonoff S20 WiFi Smart Socket
Project to get a webserver on Sonoff WiFi Smart Socket: https://github.com/jedie/micropython-sonoff-webswitch
Here current screenshots:
Here current screenshots:
-
- Posts: 969
- Joined: Sat Feb 03, 2018 7:02 pm
Re: Sonoff S20 WiFi Smart Socket
Looks good!
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Re: Sonoff S20 WiFi Smart Socket
Now i add a new feature: checkboxes for each day of the week where timers are active
But currently i store the selected days only in RTC RAM... (The timers stored as a json file in filesystem)
So next thing is to store the days in filesystem, too.
But currently i store the selected days only in RTC RAM... (The timers stored as a json file in filesystem)
So next thing is to store the days in filesystem, too.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Sonoff S20 WiFi Smart Socket
Very nice work.
Sonoff products seem finally to have come of age. I spent a lot of time on the Sonoff Basic in-line switch. This has gone through three hardware redesigns. Unlike the R1 and R2 units, the new R3 units actually work reliably with decent wireless range. I gather from @kevinkk525 that the S20 is good, too. These things have a lot of potential MicroPython applications and are very hacker-friendly.
Sonoff products seem finally to have come of age. I spent a lot of time on the Sonoff Basic in-line switch. This has gone through three hardware redesigns. Unlike the R1 and R2 units, the new R3 units actually work reliably with decent wireless range. I gather from @kevinkk525 that the S20 is good, too. These things have a lot of potential MicroPython applications and are very hacker-friendly.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Sonoff S20 WiFi Smart Socket
v0.8.1 is out...
New:
New:
- handles time zones: User can set his timezone via web page (pre filled via JavaScript). All times are converted from UTC to his local time.
- A Device name can be saved via web page, and will be displayed on every page. Helpfull if you have more than one device. In the screenshots the same saved to test-esp8233
- many bug fixes
Re: Sonoff S20 WiFi Smart Socket
v0.9.0 is available
I've refactor the timer schedule. This makes the functionality much more robust and reliable.
From the README:
I've refactor the timer schedule. This makes the functionality much more robust and reliable.
From the README:
However, it is still the situation that now and then the RAM is not sufficient. But I already have an idea what I can optimize.The Device always tries to turn the power ON/OFF based on the current timer. Even after a power failure. However, this only works correctly if the current time is set correctly by the RTC. The current time is automatically retrieved from the Internet via NTP sync. At boot and also repeated after start. Of course, this can only work if the device is connected to the Internet via WiFi
You can "overwrite" the current timer at any time by pressing the button on the device. This overwrite will stay until the next timer. After a power failure the "overwrite" information is deleted and the timer regulates the power again.
-
- Posts: 969
- Joined: Sat Feb 03, 2018 7:02 pm
Re: Sonoff S20 WiFi Smart Socket
Are you already using littlefs? That would free 4kb of RAM
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Re: Sonoff S20 WiFi Smart Socket
MicroPython v1.12 is expected to be released within a few days and it'll have littlefs built-in...
Re: Sonoff S20 WiFi Smart Socket
Now it's possible to dim the power LED:
See also: viewtopic.php?f=2&t=7414
See also: viewtopic.php?f=2&t=7414