This repo contains a python script which will pull in the weather from the OpenWeatherMap API and display it on a 2.13 in Waveshare e-paper HAT for the RasPi Zero/Zero W!
All you need to get started is an OpenWeatherMap API key and the appropriate hardware! Use the following steps to get set up:
-
Follow the instructions on the Waveshare wiki (under Hardware/Software setup) to prepare the required pre-requisites for the e-paper display.
-
Clone this repo into your "home" directory (~/) or elsewhere (just be sure to change the path in the final step).
-
Create a
config.json
file with your API key using the following format:
{
"api_key": "your_key_here"
}
- Add the following to the end of your crontab using
crontab -e
replacing the working directory followingcd
with wherever you've cloned this repo. You can change the update frequency from the 15 minutes set in the command below to whatever interval you desire:
*/15 * * * * cd /home/pi/2.13in-epaper-weather/ && /usr/bin/python3 weather.py > /tmp/epaper-weather.log 2>&1
- Enjoy your new e-paper weather notification system!