This is a port of my raspberry pi thermostat
- This exist case lightening killed my pi zero and there is a silicon shortage making them unobtainable
The contents of the PICO folder goes on the pico W
- The
gps_cords.pyfile contains the location used for calculating sun set/rise - The
wifi_auth.pyfile contains the wifi SSID and passphrase lib/request.pyis a patched version ofurequests.pylib/uasync_requests.pyis a patched version of myrequest.pypatched foruasynciosupportmain_with_async_urequests.pyismain.pypatched to useuasync_requests- Not sure if doing that is a good idea, but it is unlikely to matter for this application
- Edit
remote_ipandremote_urlinmain.pyas needed on lines 41/42
The contents of server folder goes on your local server You will need to have a data folder in it with read/write access from the page
mkdir datachown www-data:www-data ./data
All the server does is deal with logging data, showing log data, restoring data to the pico after it boots
Note that this server is also running a ntp service
sudo apt-get install ntp
Hard coded values
- Time zone is set in
server/index.phpon line 5- This code assumes DST will start and end with a single calendar year, see lines 6/10
- Time zone is set in
PICO/main.pyon line 14 - The DST adjustment is set on line 17 of
PICO/lib/TIME.py- This is the offset, defaults to 3600 (1 hour), during DST 1 hour is added to the time