Skip to content

Python script to display weather and local tide times on a Pimoroni Inky Phat and Raspberry Pi Zero W

License

Notifications You must be signed in to change notification settings

tsak/weather-phat

Repository files navigation

Weather and tide time display

Using a Raspberry Pi Zero W and an Inky pHAT I am displaying my local weather as well as my local (UK) tide times.

Based on the weather-phat.py example script provided by Pimoroni. Additional documentation can be found here.

What it looks like

Prequisites

Install

git clone [email protected]:tsak/weather-phat.git
cd weather-phat
python3 -m venv venv
source venv/bin/activate
python3 -m pip install -r requirements.txt

Settings

Copy .env.example to .env and edit values.

CITY=London # City to use for geo location
COUNTRYCODE=GB # ISO country code for geo location
WARNING_TEMP=25.0 # Above this value the temparature will be displayed in Yellow or Red
ADMIRALTY_API_KEY= # Optional: Admiralty API key for UK tide times
ADMIRALTY_API_STATION_ID=0113 # Admiralty Tide time APIs station ID, e.g. `0113` for London, Tower Bridge
ADMIRALTY_API_HIGH_TIDE_CORRECTION=0 # Correction in minutes for High tide times, if you local beach is far from a station
ADMIRALTY_API_LOW_TIDE_CORRECTION=0 # Correction in minutes for Low tide times, if you local beach is far from a station

Local simulation

./weather-phat.py --type phat --simulate --colour yellow

Simulation preview

Crontab

On the Raspberry Pi, I run the script every hour to update weather and tide times.

0 * * * * /usr/bin/python3 /home/pi/weather-phat.py

About

Python script to display weather and local tide times on a Pimoroni Inky Phat and Raspberry Pi Zero W

Topics

Resources

License

Stars

Watchers

Forks