Skip to content

A MagicMirror² module to display data from multiple TFL stop points

Notifications You must be signed in to change notification settings

threesquared/MMM-TFL-Stops

Repository files navigation

MMM-TFL-Stops

This a module for MagicMirror².

This module gets arrival predictions for multiple StopPoints using the TfL API and displays them in a single table.

image

Installation

cd modules
git clone https://github.com/threesquared/MMM-TFL-Stops.git
cd MMM-TFL-Stops
npm install

Config

The entry in config.js can include the following options:

Option Description
appId Required This is the App ID assigned to you on the TfL Open Data Portal. Details on how to request an App ID can be found here

Type: string
appKey Required This is the App key assigned to you on the TfL Open Data Portal. Details on how to request an App key can be found here

Type: string
stops Required An array of StopPoint ids (station naptan code e.g. 940GZZLUAS). You can search for StopPoints IDs here

Type: string
timeOffset Optionally only show predictions which arrive in more than provided number of seconds.

Type: integer
Default value: 0
updateInterval How often the arrival information is updated.

Type: integer
Default value: 1 min
fade Fade the future events to black. (Gradient)

Type: bool
Possible values: true or false
Default value: true
fadePoint Where to start fade?

Type: bool
Possible values: 0 (top of the list) - 1 (bottom of list)
Default value: 0.25
animationSpeed Speed of the update animation. (Milliseconds)

Type: integer
Possible values:0 - 5000
Default value: 2000 (2 seconds)
limit Number of departures to return.

Type: string
Default: 5

Here is an example of an entry in config.js

{
    module: 'MMM-TFL-Stops',
    position: 'bottom_left',
    header: 'Departures',
    config: {
        appId: "$APPID",
        appKey: "$APPKEY",
        stops: [
            {
                naptanId: "910GBRUCGRV",
                direction: "inbound"
            },
            {
                naptanId: "490013736T"
            },
            {
                naptanId: "490013736Z"
            }
        ],
        timeOffset: 300,
        animationSpeed: 1000,
        fade: true,
        fadePoint: 0.25,
        limit: 5,
    }
},

Acknowledgements

About

A MagicMirror² module to display data from multiple TFL stop points

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages