Skip to content

FalseIlyu/MMM-IdF-Transport

 
 

Repository files navigation

Don't forget to take a look at MMM-HK-Transport-ETA Module by winstonma whose older module makes the foundation for this one.

Dataset about the line (referentiel-des-lignes-de-transport-en-commun-dile-de-france.csv) from Île de France Mobilités

MMM-IdF-Transport

Station monitor for the Île de France Transport Network.

This module is an extension of the amazing MagicMirror2 project by MichMich which has inspired me to share my coding skills with others as well. Check it out, you know you want to :).

It's always nice to see mirrors using my work, so feel free to send me some screenshots of your implementations.

Lastly, why not join in on our discussions at the official MagicMirror2 Forum?

Screenshots

fr en
French version English version
zh-tw or zh-hk
:-------------------------: :-------------------------:
Chinese version

Current version

v1.3.0

Languages

As of version 1.3.0, MMM-HK-Transport features language support for Chinese (zh-hk and zh-tw) and English (en) mirrors. This modification feature support for french (fr) mirrors.

Prerequisite

A working installation of MagicMirror2

Dependencies

Installation

Go to MagicMirror folder and execute the following command:

cd modules
git clone https:/FalseIlyu/MMM-IdF-Transport.git
cd MMM-IdF-Transport
npm install

Module behavior

Please note that this module auto-creates a module header which displays the name of the chosen Hong Kong local transport stop. It is therefore recommended not to add a 'header' entry to your config.js for this module.

This module automatically disappears from your mirror as soon as a station has stopped offering connections at night. It reappears as soon as your chosen station is scheduled to be served again.

This module has been programmed to allow for multiple instances. Simply add more MMM-IdF-Transport config entries to your config.js file to display multiple stations and configure them according to your needs.

Configuration

Sample minimum configuration entry for your ~/MagicMirror/config/config.js:

...

{
    module: 'MMM-IdF-Transport',
    position: 'top_left',
    config: {
        apiKey: 'someapikey', // You need to make a key on https://prim.iledefrance-mobilites.fr/fr
        stops: [
            { stopID: 'STIF:StopPoint:Q:473921:' }
        ],
    }
} 				// If this isn't your last module, add a comma after the bracket

...

Sample configuration entry for your ~/MagicMirror/config/config.js with optional parameters:

...

{
		module: 'MMM-IdF-Transport',
		position: 'top_left',
		config: {
            header: false,
			apiKey: 'someapikey', // You need to make a key on https://prim.iledefrance-mobilites.fr/fr
			stops: [
				{
					stopID: 'STIF:StopArea:SP:72203:',
					lineID: 'STIF:Line::C01383:',
				},
			],
			showLabelRow: true, 	// Show or hide column headers
			reloadInterval: 60000, 	// How often should the information be updated? (In milliseconds)
			nbStopInfo: 3		// Maximum nb of stopInfo to show per stop

		}
} 						// If this isn't your last module, add a comma after the bracket

...

Figuring out the correct stopID

  1. Open your web browser and navigate to the Île de France Mobilités Page.
  2. Create an account and generate an API Key.
  3. Look for your station in the station reference dataset.
  4. Once you can see the stop in your dataset, copy its STIF reference it should look like STIF:StopPoint:Q:474017:.

Config Options

Option Default Description
apiKey None, must be generated on PRIM The key to access the real time arrival/departure API
stopID STIF:StopPoint:Q:473921:
Which stop would you like to have displayed?
Default: STIF:StopPoint:Q:473921:

lineID
optional
n\a
Filter the stop with the specified line
Possible values: STIF:Line::C01383:

showLabelRow
optional
true
Show or hide column headers
Possible values: true, false

reloadInterval
optional
60000
How often should the information be updated? (In milliseconds)
Default: Every minute

nbStopInfo
optional
n\a
Maximum nb of stopInfo to show per stop
Default: All stopInfo will be shown if not set

header
optional
true
Show or hide module header
Possible values: true, false

About

MagicMirror² module - test

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 94.4%
  • CSS 5.6%