The MMM-MVG-LocalTransport
module is a module for MagicMirror2 which displays departures time for public transport in Munich, Germany.
- Clone repo into your MagicMirror modules folder.
cd ~/MagigMirror/modules/
git clone https://github.com/trgraglia/MMM-MVG-LocalTransport
- Install npm packages
cd MMM-MVG-LocalTransport
npm install
- Setup a local Python REST API for the module to call which retrieves MVG data.
- Find out your Station ID
- Open a browser and go to: http://localhost/_api/mvg/query/YourStation
- For example: http://localhost/_api/mvg/query/Petuelring
- Take note of the
id
property - Take note of the
name
property
- Add the module to the MagicMirror config,
config/config.js
{
module: 'MMM-MVG-LocalTransport',
position: 'bottom_right',
header: '<name property from above>',
config: {
id: '<id property from above>'
}
},
The following properties can be configured:
Option | Description |
---|---|
initialUpdateInterval |
The delay before the first API call. (Milliseconds) Default value: 15000 (15 Seconds) |
retryUpdateInterval |
The delay before calling the API again after the API returns an error. (Milliseconds) Default value: 10000 (10 Seconds) |
dataUpdateInterval |
The interval between API calls. (Milliseconds) Default value: 60000 (60 Seconds) |
domUpdateInterval |
The interval for updateing the dom when not explicitly triggered. (Milliseconds) Default value: 20000 (20 Seconds) |
apiBaseStation |
The REST API url up to the station id. Default value: '' |
id |
The station ID according to MVG. Default value: '' |
perLineDepartureLimit |
The number of departures to show per line per direction. Default value: 3 |