This Magic Mirror module shows Dutch train departures requested from the NS API.
Clone this repository in you modules folder with:
git clone https://github.com/mfurious/MMM-NsInfo.git
To use this module, add the follwing configuration to your config/config.js
file. This is an example for the departure times from Utrecht Central.
modules: [
{
module: "MMM-NsInfo",
position: "top_right",
config: {
station: "Utrecht Centraal",
stationId: "UT",
apiKey: "YOUR_API_KEY_HERE",
maxDepartures: 5
}
},
}]
Option | Description |
---|---|
module |
Module Name. (See MM Documentation) |
position |
Postion of the module. (See MM Documentation) |
header |
Title displayed. (See MM Documentation) |
apiKey |
Your NS API key. |
station |
The name of your station. Type: String Default: Utrecht centraal |
stationId |
The ID of your station. Type String Default: UT |
maxDepartures |
The maximum amout of departures shown on the dashboard. Type integer Default: 5 |
updateInterval |
The amount of time between updates (in minutes).. Type integer Default: 5 |
This module is based on the NS API, you can request a key from this website
To lookup a Station ID, you can use to stations.js
file. Make sure to set you API Key in stations.js itself, as it cannot access the config file variable.
Neither the author or NS are in any way reliable for inaccuracies and have no liabilities regarding usage of the module in any kind.
v1.0.1