MMM-MVG

MagicMirror² Module to monitor public transport (U-Bahn, Tram, Bus, S-Bahn) in Munich - Germany.
This magic mirror module is an independent project and is not affiliated with, endorsed by, or associated with MVG (Münchner Verkehrsgesellschaft mbH), the Munich public transportation company. Any use of data or information related to MVG services is for personal, non-commercial purposes and should comply with their terms of use.
Installation
- Clone the module into your MagicMirror module folder and execute
npm install in the module’s directory.
cd ~/MagicMirror/modules
git clone https://github.com/KoblerS/MMM-MVG
Configuration
To display the module insert it in the config.js file.
Simple configuration
{
module: "MMM-MVG",
position: "bottom_left",
header: "MVG",
config: {
station: "Hauptbahnhof",
maxEntries: 10,
updateInterval: 60000,
showIcons: true,
transportTypesToShow: {
"ubahn": true,
"sbahn": true,
"bus": true,
"regional_bus": true,
"tram": true
},
ignoreStations: [],
lineFiltering: {
"active": true,
"filterType": "whitelist",
"lineNumbers": ["U1", "U3", "X50"]
},
timeToWalk: 10,
showWalkingTime: false,
showTrainDepartureTime: true,
trainDepartureTimeFormat: "relative",
walkingTimeFormat: "relative",
showInterruptions: true,
showInterruptionsDetails: false,
countInterruptionsAsItemShown: false,
}
}
Examples
|
|
| Stations names with arrival time |
 |
config: {
station: "Hauptbahnhof",
maxEntries: 10,
updateInterval: 60000,
showIcons: false,
transportTypesToShow: {
"ubahn": true,
"sbahn": false,
"bus": false,
"regional_bus": false,
"tram": false
},
ignoreStations: [],
timeToWalk: 0,
showWalkingTime: false,
showTrainDepartureTime: true,
trainDepartureTimeFormat: "relative",
walkingTimeFormat: "relative",
}
|
|
| Stations names with icons and arrival time |
 |
config: {
station: "Karlsplatz",
maxEntries: 15,
updateInterval: 60000,
showIcons: true,
transportTypesToShow: {
"ubahn": true,
"sbahn": true,
"bus": false,
"regional_bus": false,
"tram": true
},
ignoreStations: [],
timeToWalk: 0,
showWalkingTime: true,
showTrainDepartureTime: true,
trainDepartureTimeFormat: "relative",
walkingTimeFormat: "relative"
}
|
|
| Stations names with icons, arrival time and walking time |
 |
config: {
station: "Karlsplatz",
maxEntries: 15,
updateInterval: 60000,
showIcons: true,
transportTypesToShow: {
"ubahn": true,
"sbahn": true,
"bus": true,
"regional_bus": false,
"tram": true
},
ignoreStations: [],
timeToWalk: 0,
showWalkingTime: true,
showTrainDepartureTime: true,
trainDepartureTimeFormat: "absolute",
walkingTimeFormat: "relative"
}
|
|
| Stations names with icons, arrival time and disruption marking |
 |
config: {
station: "Harras",
maxEntries: 10,
updateInterval: 60000,
showIcons: true,
transportTypesToShow: {
"ubahn": true,
"sbahn": true,
"bus": true,
"regional_bus": false,
"tram": false
},
ignoreStations: [],
timeToWalk: 0,
showWalkingTime: false,
showTrainDepartureTime: true,
trainDepartureTimeFormat: "absolute",
walkingTimeFormat: "relative",
showInterruptions: true,
showInterruptionsDetails: false,
countInterruptionsAsItemShown: false
}
|
|
| Stations names with icons, arrival time, disruption marking and disruptions details (disruption details are not counted as new lines) |
 |
config: {
station: "Harras",
maxEntries: 10,
updateInterval: 60000,
showIcons: true,
transportTypesToShow: {
"ubahn": true,
"sbahn": true,
"bus": true,
"regional_bus": false,
"tram": false
},
ignoreStations: [],
timeToWalk: 0,
showWalkingTime: false,
showTrainDepartureTime: true,
trainDepartureTimeFormat: "absolute",
walkingTimeFormat: "relative",
showInterruptions: true,
showInterruptionsDetails: true,
countInterruptionsAsItemShown: false
}
|
|
| Stations names with icons, arrival time, disruption marking and disruptions details (disruption details are counted as new lines) |
 |
config: {
station: "Harras",
maxEntries: 10,
updateInterval: 60000,
showIcons: true,
transportTypesToShow: {
"ubahn": true,
"sbahn": true,
"bus": true,
"regional_bus": false,
"tram": false
},
ignoreStations: [],
timeToWalk: 0,
showWalkingTime: false,
showTrainDepartureTime: true,
trainDepartureTimeFormat: "absolute",
walkingTimeFormat: "relative",
showInterruptions: true,
showInterruptionsDetails: true,
countInterruptionsAsItemShown: true
}
Dependencies
- instance of MagicMirror²
- Nothing else, module is small and simple! 🙌
Config Options
| Option |
Description |
station |
Station for which you want to display data. Default: Hauptbahnhof Source: https://www.mvg.de/meinhalt.html |
maxEntries |
Number of items shown in table. Default: 8 |
updateInterval |
Update interval Default: 60000 |
ubahn |
Show data for U-Bahn. Possible values: true or false Default: true |
bus |
Show data for Bus. Possible values: true or false Default: true |
regional_bus |
Show data for regional Bus. Possible values: true or false Default: true |
tram |
Show data for Tram. Possible values: true or false Default: true |
sbahn |
Show data for S-Bahn. Possible values: true or false Default: true |
ignoreStations |
Ignore destinations based on a array list. Possible values e.g.: ["Feldmoching", "Hauptbahnhof"] Default [] |
timeToWalk |
Time to walk to the station from your current location Default: 0 minutes |
showWalkingTime |
If the time to leave should be displayed which includes the walking time. Possible values: true or false Default: false |
showTrainDepartureTime |
If the time of train departure should be displayed. Possible values: true or false Default: true |
trainDepartureTimeFormat |
Train departure time format. Absolute: 21:10; Relative: in 8 min; Possible values: relative or absolute Default relative |
walkingTimeFormat |
Walking time format. Absolute: 21:08; Relative in 6 min; Possible values: relative or absolute Default relative |
showInterruptions |
Gray-out lines with interruptions; Possible values: true or false Default false |
showInterruptionsDetails |
Show interruptions details in a new line after the item with interruptions; Possible values: true or false Default false |
countInterruptionsAsItemShown |
Count interruption detail lines as line of a transport (number of lines will not explode in case of many interruptions; Possible values: true or false Default false |
lineFiltering.active |
Flag to activate or deactivate line filtering Possible values: true or false Default false |
lineFiltering.filterType |
Whitelist or blacklist option lines from lineFiltering.lineNumbers Possible values: whitelist or blacklist Default blacklist |
lineFiltering.lineNumbers |
lines that should be on the white-/blacklist Possible values ["U1, U3, X50"] Default value [] |
评论