Skip to content
No description, website, or topics provided.
JavaScript CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
screenshots
.gitignore
LICENSE
MMM-TFL-Arrivals.css
MMM-TFL-Arrivals.js
README.md
node_helper.js
package.json

README.md

MMM-TFL-Arrivals

This a module for the MagicMirror.

This module gets real time arrival predictions for specific stops using the TfL API.

Installation

git clone https://github.com/ryck/MMM-TFL-Arrivals.git
cd MMM-TFL-Arrivals
npm install

Config

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

Option Description
app_id 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
app_key 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
naptanId Required A StopPoint id (station naptan code e.g. 940GZZLUAS). You can search for StopPoints IDs here

Type: string
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
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: 2000 (2 seconds)
limit Number of departures to return.

Type: string
Default: 5
color Use some accent colors for due and late status

Type: bool
Possible values: true or false
Default value: true
debug Show debug information.

Possible values: true or false
Default value: false

Here is an example of an entry in config.js

{
	module: 'MMM-TFL-Arrivals',
	position: 'bottom_left',
	header: 'Bus Arrivals',
	config: {
		app_id: "$APPID",
		app_key: "$APPKEY",
		naptanId: "940GZZLUBLM", // StopPoint id
		animationSpeed: 1000,
		fade: true,
		fadePoint: 0.25, // Start on 1/4th of the list.
		limit: 5,
		initialLoadDelay: 0,
		color: true,
		debug: false
	}
},

Dependencies

  • request (installed via npm install)

Thanks To...

You can’t perform that action at this time.