Skip to content

mt-empty/pi-inky-weather-epd

Repository files navigation

Pi Inky Weather Display

Build Status Rust Version License

A beautiful weather dashboard for Raspberry Pi with 7.3" e-paper display

Features • Quick Start • Hardware • Configuration • Development

Hourly timelapse

The generation of the image is abstracted away from the hardware, so it can be used on any hardware stack.

Note, the gif and images are a bit outdated, specifically UV icon colour changes depending on the UV gradient.

Hardware

Dashboard Case

Setup on Raspberry Pi

  1. Install the Inky library:

    curl https://get.pimoroni.com/inky | bash

    For detailed installation steps, refer to the official documentation.

  2. Download the latest release:

    Download the latest release for your architecture from the releases page and extract it:

    Architecture Guide
    Raspberry Pi Model Architecture Download
    Pi 1, Zero, Zero W arm-unknown-linux-gnueabihf ARMv6
    Pi 2, 3, 4, Zero 2 W (32-bit OS) armv7-unknown-linux-gnueabihf ARMv7
    Pi 3, 4, 5 (64-bit OS) aarch64-unknown-linux-gnu ARMv8
    x86 Linux x86_64-unknown-linux-gnu x64
     # Download and extract
     wget https://github.com/mt-empty/pi-inky-weather-epd/releases/latest/download/pi-inky-weather-epd-<architecture>.zip
     unzip pi-inky-weather-epd-<architecture>.zip
     chmod +x pi-inky-weather-epd
  3. Configure your weather data provider and location:

    Get your latitude and longitude from https://www.latlong.net/ and create a configuration file:

    mkdir -p ~/.config
    cat > ~/.config/pi-inky-weather-epd.toml << EOF
    [api]
    latitude = YOUR_LATITUDE   # e.g., -33.8727 # Sydney
    longitude = YOUR_LONGITUDE # e.g., 151.2057
    provider = "open_meteo"    # "open_meteo" (worldwide) or "bom" (Australia only)
    EOF

    See ./config/default.toml for more configuration examples.

  4. Set up an hourly cron job to update the display:

    (crontab -l 2>/dev/null; echo "0 * * * * cd /path/to/extracted/files && ./pi-inky-weather-epd && sudo <PYTHON_PATH> <IMAGE_SCRIPT_PATH> --file dashboard.png --saturation <SATURATION>") | crontab -

    Replace:

    • /path/to/extracted/files with your installation directory
    • <PYTHON_PATH> with path to Python (e.g., /usr/bin/python3)
    • <IMAGE_SCRIPT_PATH> with path to Inky's image.py (e.g., /home/pi/Pimoroni/inky/examples/7color/image.py)
    • <SATURATION> with the desired saturation level depending on your display (e.g., 1.0). If using the Inky Impression 7 colours, it is not recommended to change this for current icons

    Example of complete cron command:

    0 * * * * cd /home/pi/pi-inky-weather-epd && ./pi-inky-weather-epd && sudo /home/dietpi/env/bin/python3 /home/dietpi/Pimoroni/inky/examples/7color/image.py --file dashboard.png --saturation 1.0

Configuration

You can override the default configs located at ./config/ by creating a file at:

~/.config/pi-inky-weather-epd.toml

Configuration Examples

Here are example configurations. Note: some of these images are slightly outdated.

Default Configuration

Default configuration

Imperial Units

[render_options]
temp_unit = "F"
wind_speed_unit = "mph"

Date Format

You can customise the date format using chrono strftime specifiers. The default is "%A, %d %B" (e.g., "Saturday, 06 December").

[render_options]
# Example formats:
# date_format = "%B %-d, %Y"     # December 6, 2025 (US style)
# date_format = "%d/%m/%Y"       # 06/12/2025 (Australia/UK)
# date_format = "%m/%d/%Y"       # 12/06/2025 (USA)
# date_format = "%Y-%m-%d"       # 2025-12-06 (ISO 8601)
# date_format = "%a, %-d %b"     # Sat, 6 Dec
# date_format = "%d.%m.%Y"       # 06.12.2025 (Germany)

date_format = "%A, %d %B"

See chrono strftime documentation for all available format specifiers.

Use Clear night Icon instead of Moon Phase icon when Time=night and Weather=clear

Moon phase configuration

When the sky is clear, the moon phase icon is used instead of the clear night icon, you can disable with:

[render_options]
use_moon_phase_instead_of_clear_night = false

Set X-Axis Placement to be always at y=0

X-axis at minimum

The x-axis is no longer at the bottom of the graph when the temperature is below zero, it is now always positioned at x = 0.

[render_options]
x_axis_always_at_min = false

Dark Theme

Dark theme

[colours]
background_colour   = "black"
text_colour         = "white"

x_axis_colour       = "white"
y_left_axis_colour  = "red"
y_right_axis_colour = "blue"

actual_temp_colour  = "red"
feels_like_colour   = "green"
rain_colour         = "blue"

Auto-Update Interval

Enable auto-update when a new release is available. This is enabled by default.

[release]
# Set to 0 to disable auto-updating
update_interval_days = 7

Degraded Operation

The dashboard can still work using cached data for a while if the API is unreachable. A diagnostic icon and message appears on the display when issues occur.

Diagnostic Type Priority Icon
API Error High API Error
No Internet Medium No Internet
Incomplete Data Low Incomplete Data
Update Failed Low Update Failed

When multiple diagnostics occur, the highest priority diagnostic is displayed, lower priority ones are cascaded.

Inky Impression 7.3

Supported Colours at 1.0 Saturation (Without Dithering)

[0, 0, 0],        # Black
[255, 255, 255],  # White
[0, 255, 0],      # Green
[0, 0, 255],      # Blue
[255, 0, 0],      # Red
[255, 255, 0],    # Yellow
[255, 140, 0],    # Orange

Documentation and Resources

Contributing

Contributions are welcome!

If you are going to work on an issue, mention so in the issue comments before you start working on the issue.

Submitting a Pull Request

Before submitting, please make sure the following is done:

  • That there is a related issue and it is referenced in the PR text.
  • There are tests that cover the changes.
  • Ensure cargo fmt, clippy and test passes, enable the git hooks below.

Development Setup

  1. Install Git hooks (pre-push checks for formatting, tests, and version tags):

    ./scripts/setup-git-hooks.sh
  2. Create local config in config/local.toml:

    cp config/development.toml config/local.toml
    # Edit config/local.toml with your location settings
    cargo run

Running Tests

# Run all tests with default open-meteo config
RUN_MODE=test cargo test

# Test BOM API specifically
RUN_MODE=test APP_API__PROVIDER=bom cargo test --test snapshot_provider_test snapshot_bom_dashboard -- --ignored

# Review snapshot changes (uses insta crate)
cargo insta review

Dashboard Simulation

Generate 24 hours of dashboard images for testing time-dependent features or creating animations:

# Build with CLI support (not included in production builds)
cargo build --features cli

# Generate 24 hourly dashboards
./scripts/simulate-24h.sh [date] [start_hour] [timezone]

# Examples:
./scripts/simulate-24h.sh                                       # Default: today from midnight UTC
./scripts/simulate-24h.sh 2025-12-26 6                          # Start from 6am
./scripts/simulate-24h.sh 2025-12-26 0 "Australia/Melbourne"    # With specific timezone

How it works:

  • Automatically fetches fresh weather data before simulation base on your current config
  • Generates 24 hourly dashboards using consistent cached data
  • Output saved to simulation_output/ directory

Cross-Compilation for Target Release

Example for Raspberry Pi Zero:

cross build --release --target arm-unknown-linux-gnueabihf

Wish List

  • An algorithm that is smooth and only overshoots in the x dimension
  • Rain gradient that looks like rain
  • Overhaul the line SVG icons to match display colours
  • Inline all SVG icons into the template and have full control over all colours

Development Tips

This is optional, but you can use mDNS to access your Pi by hostname instead of IP address

To do this, you need to install avahi-daemon on your Pi. This is a service that allows you to discover devices on the network using their hostname

sudo apt-get install avahi-daemon
# Modify /etc/hosts to include your <hostname>.local
# 127.0.0.1   <hostname>.local <hostname>
sudo systemctl enable avahi-daemon
sudo systemctl start avahi-daemon

The Pi should now be discoverable by <hostname>.local

Add to your ~/.ssh/config:

Host pizero
  Hostname <hostname>.local
  User <your-username>
  IdentityFile <path-to-your-private-key>
  ServerAliveInterval 60
  ServerAliveCountMax 240

SSH into it by running ssh pizero

Sending Image to Pi Over SSH

Once you have your SSH setup:

cargo run   # to generate the image

chmod +x ./scripts/send-img-to-pi.sh
./scripts/send-img-to-pi.sh

Troubleshooting

  • Execute ./pi-inky-weather-epd separately and observe the logs for any errors, then open the generated image to see if it is correct
  • Run the cron script manually to see if there are any issues

Issues with Latest Version of Inky

If you encounter issues with the latest version of Inky, try manually installing version 1.5.0 of the Inky library. Refer to the official documentation.

Special Instructions for DietPi

For DietPi distro working with version 1.5, you may need to set include-system-site-packages = true in your Python virtual environment.

To do this, after creating your virtual environment (e.g., with python3 -m venv /path/to/env), open the file:

/path/to/env/pyvenv.cfg

And add or update this line:

include-system-site-packages = true

This allows the virtual environment to access system-wide Python packages, which may be required for the installation script to work.

You may also need to modify the Inky installation script so that pip3 points to the created environment's pip3 instead of the system pip3.

About

A weather display for any colour E-Paper Dispaly

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •