Skip to content

SamBroner/subway-e-ink-tracker

Repository files navigation

e-ink Subway & Weather Display

A Raspberry Pi-powered e-ink display showing real-time subway arrival times and weather forecasts. Perfect for mounting on your wall to check train times and weather before heading out.

Full Post here.

Features

  • Real-time subway arrival times
  • Current weather and 3-day forecast
  • Debug mode with automatic image preview
  • Native e-ink display support on Raspberry Pi

E-Ink Display Demo

Getting Started

Hardware

Raspberry Pi Setup

  1. Figure out how you're going to connect to the Raspberry Pi
  2. Install UV
  3. Enable the SPI interface
  4. Attach the e-ink display to the Raspberry Pi

To test the display on Raspberry Pi:

git clone https://github.com/sambroner/subway-eink.git
cd subway-eink
uv sync
uv run test.py

Installation

  1. Install uv (if not already installed)
  2. Install dependencies:
    uv sync
  3. Set up .env file (copy from .env.template)

Running on your wall

  1. Set up a systemd service

Running

If DEBUG=true in your .env:

  • Images will be saved to debug_output/current_display.png
  • Your system's default image viewer will automatically open and update with each refresh
  • The image viewer will refresh automatically when new data arrives

If DEBUG=false:

  • On Raspberry Pi: The e-ink display will update
  • On other platforms: An error will be raised (e-ink display only works on Raspberry Pi)

To run:

uv run runner.py

CairoSVG

Display Modes

Figuring out the right display mode was annoying. The full spec is here.

To Do

  • Consider checking if the wait time still makes sense and then refresh. E.g. It's 11am. Train Arrives at 11:04 and there's no update. When time turns to 11:01, even if no update, refresh.
  • Fix hourly weather... seems like it's only 100% or zero?

Credits

Setting up as a service

To have the display start automatically on boot:

sudo systemctl restart subway-eink.service
sudo systemctl stop subway-eink.service
[Unit]
Description=Subway E-Ink Display Service
After=network.target

[Service]
Type=simple
User=sambroner
WorkingDirectory=/path/to/repo
ExecStart=/path/to/uv run runner.py
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published