Maker · Tinkering · Side project

Odenwald Monitor

A live map of train delays and weather on the Odenwaldbahn: 30 stations on the lines RE80, RB81, RB82, RE85 and RB86, between Frankfurt/Darmstadt, Hanau and Eberbach.

Goal: see at a glance, per station, how late the next trains are and what the weather is doing there.

Result: ✅ A working web app with live data, built as a home-server project. It shows the current state only and keeps no history. It is not a hosted service: you download it and run it yourself. That needs a free key for the DB Timetables API; the README has all the commands.
Odenwald Monitor: a map of the Rhine-Main and Odenwald region with station markers coloured by delay and ringed by weather risk, a popup for Groß-Umstadt Wiebelsbach with delay, weather and four departures, a detail panel on the right and a legend at the lower left.

The app running on my computer, Saturday 28 November 2026, 16:20. The popup shows Groß-Umstadt Wiebelsbach: the 16:20 RB82 to Erbach is 11 minutes late, the other three departures are on time. The legend at the lower left explains the delay colours and the weather ring.

What it shows

How it works

A Python script (scheduler.py) fetches train and weather data every 10 minutes and writes it to small JSON files. The frontend is a single index.html with a Leaflet map on OpenStreetMap tiles, with no framework and no build step. Trains come from the DB Timetables API (free tier, registration required); the weather comes from Bright Sky, which serves data of the German weather service DWD and needs no key. On my side it runs in a screen session on a home Ubuntu server.

For the trains, two calls per station and hour are merged by trip ID: the planned timetable and the real-time changes. The difference is the delay in minutes.

The weather ring, exactly

The ring shows the current conditions at the nearest DWD weather station. It is not a forecast: the rain figure is what fell in the last 60 minutes. The script adds points for each condition:

Condition at the weather stationPoints
More than 0.5 mm of rain in the last 60 min+2
More than 2 mm in the last 60 min (in addition)+2
Condition contains “snow” or “ice”+3
Mean wind above 40 km/h+2
Wind above 60 km/h (in addition)+2
Condition contains “fog” or “mist”+1
Temperature below −5 °C+2

Low is 0–2 points, medium 3–4, high 5 or more. So light rain alone stays low, heavy rain is medium, and high needs a combination, for example heavy rain with strong wind, or snow with frost. The thresholds are my own engineering defaults, not validated against actual delays.

The hard part: station IDs

The DB API identifies stations by a numeric EVA ID. Many IDs in commonly circulating lists are wrong for Odenwaldbahn stations, because they collide with stations elsewhere in Germany. For example, the ID I had for Bad König Zell returned trains for Zieverich near Cologne, and the one for Langstadt returned Langlau in Bavaria. Fixing this took several attempts with different APIs and cross-checking. The corrected set is in the repository, and the README keeps a list of the dead ends so others do not repeat them. If a station still shows “Fallback (simulated)” in the sidebar, its ID is probably still wrong for that station, and the app then shows flagged simulated data instead of nothing.

What it deliberately is not

It does not collect history. When I built it, a university project already tracked how late trains are at stations over time, and doing the same again made no sense. So this is a viewer for right now, not a statistics project, and it makes no claims about which line is late how often.

Status and limits

ItemStatus
Live map with delay colours, popups and detail panel✅ works
Weather ring from current DWD measurements✅ works; rules documented above
Station IDs✅ corrected set; a few small halts may still fall back to simulated data, flagged in the sidebar
Release✅ v1.0.1, 28 November 2026, archived on Zenodo
Delay history and statistics☐ not planned
Public hosted version☐ none: each person installs it themselves, with their own free DB API key

Get it

Odenwald Monitor on GitHub (MIT licence). The README has the install and start commands. Archived on Zenodo: all versions, DOI 10.5281/zenodo.24631020 (always the latest) · version 1.0.1, DOI 10.5281/zenodo.24631306.

Cite as: Radulov, I. A., & Claude (Anthropic). Odenwald Monitor, version 1.0.1. Zenodo, 28 November 2026. https://doi.org/10.5281/zenodo.24631306