Station monitor for Poznań public transport bus and tram system.
This module is an extension of the amazing MagicMirror2 project by MichMich.
It is heavily based upon excellent MMM-KVV module by yo-less. Even this README is 80% coming from there.
The basis language is Polish (pl)
but due to almost identical code to MMM-KVV language support for German (de)
and English (en)
locales was already possible.
A working installation of MagicMirror2
You need to add following line on top of ~/MagicMirror/js/app.js
and ~/MagicMirror/js/electron.js
:
process.binding('http_parser').HTTPParser = require('http-parser-js').HTTPParser;
This needed because PEKA server returns malformed responses that can't be handled by default node.js http parser.
- Navigate into your MagicMirror's
modules
folder. - Execute
git clone https://github.com/ytmytm/MMM-pekavm.git
. - Execute
cd MMM-pekavm
. - Execute
npm install
.
Please note that this module auto-creates a module header which displays the name of the chosen 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-pekavm config entries to your config.js file to display multiple stations and configure them according to your needs.
Sample minimum configuration entry for your ~/MagicMirror/config/config.js
:
{
module: 'MMM-pekavm',
position: 'top_left',
config: {
stopID: 'RKAP46', // Which stop would you like to have displayed?
}
} // 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-pekavm',
position: 'top_left',
config: {
stopID: 'RKAP46', // Which stop would you like to have displayed?
maxConn: 6, // How many connections would you like to see?
lines: ["1","5","238"], // Which lines to show
alwaysShowTime: true, // Always show time of departure? (as HH:MM)
showMessages: true, // Show ZTM notifications about canceled lines, reroutes etc.?
labelRow: true, // Show or hide column headers
minTime: 180000, // Filter out departures earlier than this (in milliseconds)
reload: 60000 // How often should the information be updated? (in milliseconds)
}
} // If this isn't your last module, add a comma after the bracket
- Open your web browser and navigate to PEKA Wirtualny monitor.
- Use the search field to find the stop you are interested in.
- Once you can see the list of connections in your browser, click on the little text "Bezposredni link do przystanku" on the top right.
- You will see something like
www.peka.poznan.pl/vm/?przystanek=RKAP71
- This string
RKAP71
is thestopID
you are looking for.
Or you can just write down this symbol from the physical departures table on your stop.
Or you can search ZTM website and check virtual image of a departures table with stop symbol this link leads to RSTA41.
Option | Default | Description |
---|---|---|
stopID | RKAP46 | Which stop would you like to have displayed? Default: Rondo Kaponiera (level 0 tram stop) |
maxConnoptional |
8 | How many connections would you like to see? |
linesoptional |
[] | Which lines would you like to see? Default: all |
alwaysShowTimeoptional |
true | Show time of departure also as wall clock time (HH:MM) Possible values: true, false |
showMessagesoptional |
true | Show special ZTM notifications about canceled and rerouted lines, etc. Possible values: true, false |
labelRowoptional |
true | Show or hide column headers Possible values: true, false |
minTimeoptional |
0 | Filter out departures earlier than this (in milliseconds) because you need this time to get to the stop anyway. Default: 0 (show all departures) |
reloadoptional |
30000 | How often should the information be updated? (in milliseconds) Default: Every half minute |
MIT License
Copyright (c) 2017-2020 Maciej Witkowiak (https://github.com/ytmytm/)
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.