2.0 KiB
2.0 KiB
bus-department-schedule
Shows the next bus/trolleybus departures from Štípa,u potoka and Štípa,družstvo (lines 4, 5, 35, 36) on a 3.5" Turing Smart Screen driven from a Docker container on the Coolify home server. Scheduled times only (DSZO timetable pages); falls back to an analog clock when there is nothing to show.
Develop (no screen needed)
python3 -m venv .venv && .venv/bin/pip install -r requirements-dev.txt
.venv/bin/pytest
.venv/bin/python preview_board.py # writes docs/previews/board.png
Design: docs/superpowers/specs/2026-10-06-bus-board-design.md.
Plan: docs/superpowers/plans/2026-10-07-bus-board.md.
Run on the server
Find the stable device path (survives replug/reboot, unlike ttyACM0):
ls -l /dev/serial/by-id/
SCREEN_DEVICE=/dev/serial/by-id/<your-device> docker compose up --build -d
docker compose logs -f screen
Timetables are cached in the bus-board-data volume (/data); they refresh on
start and daily at 03:00 (retry every 15 min after a failure).
If something is wrong
- Blank screen:
docker compose logs screen; check ModemManager (systemctl status ModemManager, disable it or add a udev ignore rule). - Upside-down: set
SCREEN_ORIENTATIONtoLANDSCAPE. jízdní řád zastaralýon the board: a download failed for more than 3 days; checkdocker compose logs screen | grep refresh(DSZO may have changed a page).- Add or change lines: edit
lines.yaml(one entry per line per stop).
Config (env vars)
| Variable | Default | |
|---|---|---|
SCREEN_DEVICE |
/dev/ttyACM0 |
serial device, also passed into the container |
SCREEN_ORIENTATION |
REVERSE_LANDSCAPE |
flip to LANDSCAPE if upside-down |
SCREEN_BRIGHTNESS |
50 |
0–100 |
TZ |
Europe/Prague |
time zone for departures |
DATA_DIR |
/data |
cache directory |
LINES_FILE |
/app/lines.yaml |
line/stop/URL list |
The screen library is pinned to one upstream commit in the Dockerfile (LCD_COMMIT).