MagicMirror Module that displays departure information about public transportation in Hamburg, Germany. It uses v5.hvv.transport.rest
(also see hvv-rest).
hvv-rest
was deprecated. Even though I'm not personally using MagicMirror anymore, I updated the endpoint to db-rest
to make this module somewhat working again but I'm not planning to implement anything new. But feel to share or contribute your ideas!
Clone this module into your MagicMirror's modules
directory:
cd modules
git clone https://github.com/lucoel/MMM-HVV
Add this to your MagicMirror config.js
file:
{
/* ...your other config */
modules: [
{
module: "MMM-HVV",
position: "bottom_left",
config: {
station: Number
}
}
];
}
Using the REST API you can GET /locations
.
curl 'https://v6.db.transport.rest/locations?query=Feldstraße,Hamburg&results=1' -s | jq
[
{
"type": "station",
"id": "694779",
"name": "Feldstraße (Heiligengeistfeld), Hamburg",
"location": {
"type": "location",
"id": "694779",
"latitude": 53.556976,
"longitude": 9.968714
},
"products": {
// …
}
}
]
With this method you can also search for the (optional) direction ID.
Option | Description | Default |
---|---|---|
station required |
The station/stop ID where you want to start | undefined |
destination |
Only show departures for a specific direction/destination ID | undefined |
maxDepartureTime |
Maximum time until departure in minutes | 20 |
showIcons |
Show line icons for every departure | true |
header |
Custom header text | HVV Departures |