This a module for the MagicMirror.
This module displays LIVE train departures from the specified station(s) using Realtime Trains API
- Navigate into your MagicMirror's
modules
folder and executegit clone https://github.com/ryck/MMM-UK-Realtime-Trains
. A new folderMMM-UK-Realtime-Trainss
will appear, navigate into it. - Execute
npm install
to install the node dependencies.
The entry in config.js
can include the following options:
Option | Description |
---|---|
user |
Required This is the username assigned to you on the Realtime Trains API Portal Type: string |
password |
Required This is the password assigned to you on the assigned to you on the Realtime Trains API Portal Type: string |
originStationCode |
Required CRS or TIPLOC for the origin / departure station. Type: string |
destinationStationCode |
Required CRS or TIPLOC for the destination / arrival station. Type: string |
limit |
Maximum number of trains displayed. Type: integer Default value: 10 |
updateInterval |
How often the data is updated. (Milliseconds) Type: integer Default value: 5 * 60 * 1 * 1000 (Every 5 minutes) |
initialLoadDelay |
The initial delay before loading. If you have multiple modules that use the same API key, you might want to delay one of the requests. (Milliseconds) Type: integer Possible values: 1000 - 5000 Default value: 0 |
animationSpeed |
Speed of the update animation. (Milliseconds) Type: integer Possible values: 0 - 5000 Default value: 1000 (1 second) |
debug |
Show debug information. Type: boolean Possible values: true or false Default value: false |
Here is an example of an entry in config.js
{
module: "MMM-UK-Realtime-Trains",
position: "top_right",
config: {
username: "YOUR_RTT_USERNAME",
password: "YOUR_RTT_PASSWORD",
originStationCode: "VIC",
destinationStationCode: "SRC", }
}
- axios (installed via
npm install
)
- Michael Teeuw for the MagicMirror2 framework that made this module possible.
- Realtime Trains for the guides and information they publish on their API.