Inky_pi is a project to display train and weather data on an Inky e-ink display using a Raspberry Pi. It is modular and fetches data from a variety of sources (OpenLDBWS, Huxley2, OpenWeatherMap).
Example outputs (generated with desktop output option):
Example terminal output (generated with terminal output option):
╭────────────── InkyPi Terminal Output ──────────────╮
│ Sun 10 Mar 2024 │
│ 16:03 │
│ 🌦 │
│ Current Weather: │
│ Temperature: 9.0°C │
│ Condition: Rain │
│ Today's Temperature Range: 7.5°C – 9.0°C │
│ Today's Condition: moderate rain │
│ Tomorrow's Condition: overcast clouds │
│ Train schedule from Kingston to London Waterloo: │
│ 16:04 | P3 to London Waterloo - On time │
│ 16:12 | P3 to London Waterloo - On time │
│ 16:34 | P3 to London Waterloo - On time │
╰────────────────────────────────────────────────────╯Weather icon drawing code was adapted from raspi-weather.
Project setup was aided using Sam Brigg's cookiecutter template fork.
Use the Poetry package manager to install Inky_pi.
poetry installpoetry shell
inky_pi display --helpAlternatively, the program can be called via its main function.
poetry shell
python -m inky_pi --helpThe program can be configured by
running python -m inky_web to launch the configuration editor web interface. The web interface creates/edits the
local .env file which holds application configuration.
API keys for configuration are needed for train data using OpenLDBWS and for weather data using OpenWeatherMap. Alternatively, train data can be fetched using Huxley2 without an API key (though the maintainer contends that the Huxley2 server goes down often without notice). A module for Weather Underground could be easily written as a contribution/exercise.
The program runs once per invocation. For automated scheduling, cron is recommended using the python main.py invocation as described above.
Development tools can be run using Invoke.
Virtual Environment: Poetry
A Poetry virtual environment must be created before running any dev tools:
poetry shellinvoke lintinvoke formatTesting: Pytest
invoke test
invoke coverageDocs Generation: Sphinx
invoke docsCI Workflow: Tox
toxCI/CD is configured and run using GitHub Actions.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to add/update tests as appropriate.