Skip to content

A Raspberry Pi powered e-ink display that displays weather from Pirate Weather

Notifications You must be signed in to change notification settings

AlanCunningham/waveshare-eink-weather-display

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

E-ink Photoframe Weather Display

A Dark Sky Pirate Weather display for Waveshare's 7.5 inch e-ink display. Displayed in a nice photoframe.

E-ink photograme weather display

This project requires a Pirate Weather developer account.

Features:

  • Shows current and hourly Pirate Weather weather on Waveshare's 7.5 inch e-ink display, intended to be refreshed once or twice an hour
  • Graphs that show the chance of rain, cloud cover, and temperature over the next 12 hours
  • The current chance of rain and temperature
  • Weather icons from Adam Whitcroft’s excellent Climacons
  • Today's date

Parts

  • Raspberry Pi (any model should do as long as it has a GPIO header)
  • 7.5inch e-Paper HAT by Waveshare
  • Some way of mounting the eink display (I've put mine in a photo frame)

Installation

$ python3 -m venv eink_display_venv
$ source eink_display_venv/bin/activate
(eink_display_venv) $ pip install -r requirements.txt
  • Open settings.py and enter your:
    • Latitude
    • Longitude
    • Your Pirate Weather API key
    • Preferred units of measurement

Units of measurement options, from the old DarkSky docs:

auto: automatically select units based on geographic location
ca: same as si, except that windSpeed is in kilometers per hour
uk2: same as si, except that nearestStormDistance and visibility are in miles and windSpeed is in miles per hour
us: Imperial units (the default)
si: SI units

You should now be able to manually run the program and see the weather appear on your eink display. It'll take a few seconds to update.

(eink_display_venv) $ python main.py

E-ink photograme weather display updating

Automating it

You can automate the weather updates by running the program in a cronjob.

On your Raspberry Pi:

$ crontab -e

The following cron will update the weather display once every hour, on the hour. Remember to put in your actual paths to this project and your python virtual environment that you created earlier:

# m h dom mon dow  command
  0 *  *   *   *   cd /path/to/waveshare-eink-weather-display && /path/to/virtual_environment/bin/python main.py 

Reading the display

The display is split into the following sections:

  • Todays date
  • An icon summarising the weather
  • On the left, the chance of rain as a percentage for the current hour
  • On the right, the current temperature
  • The left graph shows both chance of rain (solid black line) and cloud cover (dotted line) as percentages over the next 12 hours
  • The right graph shows the temperature over the next 12 hours
  • Both graphs have the time in 24 hour format on the x axis - ie, 11, 12, 13 is 11:00, 12:00, 13:00 respectively