/MMM-mvgmunich

MagicMirror² Module to monitor public transport (U-bahn, tram, bus, S-Bahn) in Munich

Primary LanguageJavaScriptMIT LicenseMIT

MMM-mvgmunich GitHub license Build Status Known Vulnerabiliries Code Climate

MagicMirror² Module to monitor public transport (U-bahn, tram, bus, S-Bahn) in Munich - Germany.

Example

Dependencies

  • instance of MagicMirror²
  • urlencode (linux: npm install urlencode)

Installation

  1. Clone this repository in your MagicMirror installation under modules.
  2. Rename plugin foler from 'MMM-mvgmunich' to 'mvgmunich'
  3. Install dependencies in main MagicMirror folder
  4. Add configuration block to your config.js:
{
  module: "mvgmunich",
  position: "bottom_left",
  header: "MVG",
    config: {
      haltestelle: "Hauptbahnhof",
      maxEntries: 10,             // 10 items on screen
      updateInterval: 60000,      // 60 s
      showIcons: true,            // Show transport type icon
      transportTypesToShow: {
        "ubahn": true,            // show ubahn route
        "sbahn": true,            // show sbahn route
        "bus": true,              // show bus route
        "tram": true              // show tram route
      },
      ignoreStations: [],         // destination not to be shown
      timeToWalk: 10,             // 10 min walking time to station. Default is 0
      showWalkingTime: false,     // if the walking time should be included and the starting time is displayed
      showTrainDepartureTime: true,     // show tran departure time
      trainDepartureTimeFormat: "relative",   // format of the train departure time
      walkingTimeFormat: "relative",    // format of the walking time
    }
},

Config Options

Option Description
haltestelle Station for which you want to display data.
Default: Hauprbanhof
Source: http://www.mvg-live.de/MvgLive/MvgLive.jsp
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
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.
Default: false
showTrainDepartureTime If the time of train departure should be displayed.
Default: true
trainDepartureTimeFormat Train departure time format. Absolute: 21:10; Relative: in 8 min;
Default relative
walkingTimeFormat Walking time format. Absolute: 21:08; Relative in 6 min;
Default relative