Rhein-Main local transport system (RMV) - Departure Monitor
After building my own mirror I've realized that there is no module available for my region to display departure times of trams.
I'm not so familiar with this programming language but after checking the code of other modules I've decided to write my own extension module
for the MagicMirror2 project by MichMich.
Please feel free to contact me in case you have questions, comments or improvements.
The departure monitor displays all leaving trams/busses/trains for a given station. It is necessary to specify the station ID to define the departure station. To define the direction it is also necessary to add the final destination of the trains/busses/trams which you are interested in. The module will not display all departures of a station, only the departures for the given final destinations.
v1.0.0: First Release
v1.0.1: IgnoringLines added
v1.0.2: Displayed data is splitted into the different transport types
v1.0.3: Minor Bug Fixing, 23-0 hour problems, no RTD available, ...
v1.0.4: Switch-option added in config to switch between all departures of the station and only interested ones(see Notes and Options)
v1.0.5: Ignoring transport types added
v1.0.5.1: update of Ignoring transport types
Note:
This module is available in English (en) and German (de).
- npm
- request
As similar to other modules:
- Navigate into your
MagicMirror/modules folder
git clone 'https://github.com/Com-Lum/MMM-RMV.git'
- Navigate into
MagicMirror/modules/MMM-RMV
- Execute
npm intall
- Multiple instances possible
- The Header of the module will be automatically chosen according to the station name placed in the config-file
- If no connection is available or all connections are blocked the module disappears after a few seconds
- If there is an error during data retrieving process it will be shown in the console
- if the train is not on time the line will be displayed in red (can be configured)
- Switch-Option: All departures of the station OR only departures according to the configured "fDestination"'s
Important: "fDestination" does not mean the arrival station which you are interested in! It has to be the final destination of the transport line!
- minimum configuration within
config.js
:
...
{
module: 'MMM-RMV',
position: 'top_right',
config: {
apiKey: '', // see chapter below
stationId: '', // default is: '30000001' - 'Frankfurt (Main) Hauptwache'
fDestination1: '', // default is: 'Frankfurt (Main) Hauptbahnhof'
}
}
...
- Configuration including optional parameters within
config.js
:
...
{
module: 'MMM-RMV',
position: 'top_right',
config: {
apiKey: '', // see chapter below
stationId: '',
fDest: true, // see chapter below
fDestination1: '',
fDestination2: '', // The final destination of the train will be displayed for each line.
fDestination3: '',
fDestination4: '',
fDestination5: '',
maxT: 60,
maxC: 6, // maximum displayed connections (standard = 15)
lines: '', // These lines will be ignored
Ctype: '', // These transport types will be ignored "Tram,Bus,Sub,Train,Unk"
labelRow: true, // Show or hide column headers
showblocked: false, // Show the blocked transport types/lines in a separate line
updateInterval: '1 * 60 * 1000' // default: once per minute
}
}
...
An apiKey has to be requested at RMV - opendata.
The stationId can be found in file 'StationID.txt' or at RMV - opendata.
The correct station name is in column 'E'.
Note: The stations have to be added in german only.
Option | Default | Description |
---|---|---|
stationId | 30000001 | Choose your departure station default value: '30000001' - 'Frankfurt (Main) Hauptwache' |
fDestoptional |
true | true: only departures with final destination specified in the "fDestination"'s. false: all departures of the station will be shown |
fDestination1 | 'Frankfurt (Main) Hauptbahnhof' | The final stop of the train line has to be added here! (station name) default value: 'Frankfurt (Main) Hauptbahnhof' |
fDestination2 | 'Frankfurt (Main) Flughafen Regionalbahnhof' | The final stop of the train line has to be added here! (station name) default value: 'Frankfurt (Main) Flughafen Regionalbahnhof' |
fDestination3optional |
The final stop of the train line has to be added here! (station name) |
|
fDestination4optional |
The final stop of the train line has to be added here! (station name) |
|
fDestination5optional |
The final stop of the train line has to be added here! (station name) |
|
maxToptional |
60 | Displayed Time Frame Note: only the lines within this time frame will be displayed. |
maxCoptional |
15 | Maximum displayed lines Note: only the lines within a time frame of 1 hours (default) will be displayed. If there less lines than the limit only the available lines will be displayed |
linesoptional |
Specific lines will be ignored (add commas between the lines)(For all trams with number >9 a "Tram" needs to be added before the number) Example: 'S8, S1,Tram11' |
|
Ctypeoptional |
Specific transport types will be ignored (add commas between the types) Example: 'Tram, Train,Sub,Bus,Unk' |
|
labelRowoptional |
true | Show or hide column headers |
showblockedoptional |
false | Show or hide a line with all blocked transport types/lines |
updateIntervaloptional |
'60000' | Update interval in milliseconds default: Once per minute |
MIT License
Copyright (c) 2018 Com-Lum (https://github.com/Com-Lum/)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.