Giter Site home page Giter Site logo

mmm-cta's Introduction

MMM-CTA

Example of MMM-CTA

This MagicMirror Module is designed to display incoming bus and train times for the CTA (Chicago Transit Authority). The module will display up to the minute data for bus and train arrival times.

Get your CTA API keys!

You need to obtain API keys to access the live data to update your mirror:

Bus API: http://www.transitchicago.com/developers/bustracker.aspx

Train API: http://www.transitchicago.com/developers/traintrackerapply.aspx

The bus tracker API key can be obtained immediately, the train tracker key can take a few days to register. Please reference this github since it's already approved maybe it will help speed things along for you.

Installation

In your terminal, go to your MagicMirror's Module folder:

cd ~/MagicMirror/modules

Clone this repository:

git clone https://github.com/NateDee/MMM-CTA.git

Configure the module in your config.js file.

Using the module

To use this module, add it to the modules array in your config.js file.

modules: [
     {
	module: 'MMM-CTA',
	position: 'bottom_left',
	config: {
		updateTime: 60000, // 1 minute, the API does not update much more often so going below this is unnecessary
		ctaApiKey: 'you-bus-APIkey',
		busStopName: '',  // String value, Name your bus stop
		stopId: 561, // Bus station ID: Chicago and Milwaukee example; go to http://www.transitchicago.com/riding_cta/systemguide/default.aspx to find your stop ID
		maxResult: 4,  // The maximum number of incoming bussesy you want to display for bus stops
		ctaApiKeyTrain: 'your-train-APIkey',
		trainStopName: '',  //String value, name your train stop
		trainStationID: 41410, //Train station ID:  Chicago Blue line example; http://www.transitchicago.com/developers/ttdocs/default.aspx#_Toc296199909
		maxResultTrain: 5, // Max number of incoming trains to disply
		moduleInstance: 1, // To run multiple instances of this module
	},
     }
]

Configuration Options

Option Description
updateTime How often the requests should update; 60 * 1000 = 1 minute.
Expected Value type: int
ctaApiKey Your CTA Bus API key.
Expected Value type: string
busStopName Name you would like to give your bus stop.
Expected Value type: string
stopId The number of your stopID, find a stop ID:
http://www.transitchicago.com/riding_cta/systemguide/default.aspx
For help finding your stopID, see the FAQ below.
Expected Value type: int
maxResult The maximum number of bus results your station should display.
Expected Value type: int
ctaApiKeyTrain Your CTA Traing API key.
Expected Value type: string
trainStopName Name you would like to give your train stop.
Expected Value type: string
trainStationID Number of L station, find a station:
http://www.transitchicago.com/developers/ttdocs/default.aspx#_Toc296199909
Expected Value type: int
maxResultTrain The maximum number of train results to display.
Expected Value type: int
moduleInstance If running multiple instances, add a new instance to your config.js and increment this value by 1 for each additional instance.
Expected Value type: int

FAQ

  • I can't find my bus stop ID

    Follow the link in "Configuration Options", use the drop down menu to find your bus route. Under "Route Information", click the "Bus Stop List" link, which provides a table of StopID's matching the stop name and direction of travel.

  • I can't find my train station ID

    Follow the link in "Configuration Options", scroll down to the section titled "Parent Stop ID Quick Reference" and find your stationID. The table is labeled as StopID, but these are actually the StationID's.

  • I want more or different config options

    Create an issue here please.

mmm-cta's People

Contributors

natedee avatar lambtor avatar

Watchers

James Cloos 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.