MagicMirror module for Transport For London tube line status designed to replicate the TFL status board.
-
Navigate into your MagicMirror's
modulesfolder and executegit clone https://github.com/SilverBirchh/MMM-TFL.git. -
cd MMM-TFLand executenpm install. -
Add this module to your
config.jsfile.
- In a terminal navigate into your MagicMirror's
modulesfoldercd MMM-TFLand executegit pull.
To use this module, add it to the modules array in the config/config.js file:
modules: [
{
module: 'MMM-TFL',
position: 'top_right', // This can be any of the regions but works best on either side of the display
config: {
updateTime: 600000,
modes: ['tube', 'overground'],
lines: 'all',
}
}
]| Option | Description |
|---|---|
updateTime |
Number. Optional. The interval time in seconds to update the status of the tube line. Defaults to 600000 (30 minutes) |
modes |
Array. Optional. The lines displayed can be refined by a mode if you only want to all lines in a specific mode. Saves having to add quite a few lines to the lines array. Defaults to ['tube', 'overground'] |
lines |
Array / String. Optional. The tube lines you want to keep track of. If you specify a line but not the mode it is contained in, the line will not be included on the board. Can be an array of line id's e.g. ['central', 'bakerloo', 'circle'] or all which will display all lines. Defaults to all. |
app_id |
String. Optional. Your personal App ID from https://api-portal.tfl.gov.uk/login |
app_key |
String. Optional. Your personal App key from https://api-portal.tfl.gov.uk/login |
| Id | Line | Mode |
|---|---|---|
| bakerloo | Bakerloo | tube |
| central | Central | tube |
| circle | Circle | tube |
| district | District | tube |
| hammersmith-city | Hammersmith & City | tube |
| jubilee | Jubilee | tube |
| metropolitan | Metropolitan | tube |
| northern | Northern | tube |
| piccadilly | Piccadilly | tube |
| victoria | Victoria | tube |
| waterloo-city | Waterloo & City | tube |
| dlr | DLR | dlr |
| london-overground | London Overground | overground |
| tram | Tram | tram |
| tfl-rail | TFL Rail | tflrail |
| arriva-trains-wales | Arriva Trains Wales | national-rail |
| c2c | c2c | national-rail |
| chiltern-railways | Chiltern Railways | national-rail |
| cross-country | Cross Country | national-rail |
| east-midlands-trains | East Midlands Trains | national-rail |
| first-hull-trains | First Hull Trains | national-rail |
| first-transpennine-express | First TransPennine Express | national-rail |
| gatwick-express | Gatwick Express | national-rail |
| grand-central | Grand Central | national-rail |
| greater-anglia | Greater Anglia | national-rail |
| great-northern | Great Northern | national-rail |
| great-western-railway | Great Western Railway | national-rail |
| heathrow-connect | Heathrow Connect | national-rail |
| heathrow-express | Heathrow Express | national-rail |
| island-line | Island Line | national-rail |
| merseyrail | Merseyrail | national-rail |
| northern-rail | Northern Rail | national-rail |
| scotrail | ScotRail | national-rail |
| southeastern | Southeastern | national-rail |
| southern | Southern | national-rail |
| south-western-railway | South Western Railway | national-rail |
| thameslink | Thameslink | national-rail |
| virgin-trains | Virgin Trains | national-rail |
| virgin-trains-east-coast | Virgin Trains East Coast | national-rail |
| west-midlands-trains | West Midlands Trains | national-rail |
You can optioanlly include an API key from TFL. Although TFL doesn't require one to use the API. You can get a key from here. After getting your keys you can add them to the config. This project does not use any external dependencies. Any improvements please feel free to submit a PR.
[ ] - Add bus status
[ ] - Add alerts at certain times
[ ] - Testing
- Michael Teeuw for creating the awesome MagicMirror2 project that made this module possible.
