Giter Site home page Giter Site logo

mmm-uk-realtime-trains's Introduction

MMM-UK-Realtime-Trains

This a module for the MagicMirror.

This module displays LIVE train departures from the specified station(s) using Realtime Trains API

Installation

  1. Navigate into your MagicMirror's modules folder and execute git clone https://github.com/ryck/MMM-UK-Realtime-Trains. A new folder MMM-UK-Realtime-Trainss will appear, navigate into it.
  2. Execute npm install to install the node dependencies.

Config

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",			}
		}

Dependencies

  • axios (installed via npm install)

Thanks To...

mmm-uk-realtime-trains's People

Contributors

ryck avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.