This is a Magic Mirror Module (https://github.com/MichMich/MagicMirror/), which displays real time estimated departures for public transport in the Czech Republic.
Beware that by using this you might be violating idos.cz ToS
Clone this module into your Magic Mirror modules folder.
- Go into Magic Mirror's
modules
folder - Execute
git clone https://github.com/soyrubio/MMM-idos.git
.
In order to use this module, add the following configuration into Magic Mirror's config file (located in 'config/config.js'):
var config = {
modules: [
{
module: 'MMM-idos',
header: 'Praha Masarykovo n.', // no header will be displayed if ommited
position: 'top_right', // position of the module
config: {
stopId: 'Praha%20Masarykovo%20n.', // "https://idos.idnes.cz/vlakyautobusymhdvse/odjezdy/vysledky/?f=the_stop
torPorts: ['9050', '9052'], // tor won't be used if ommited
/* other configurations */
}
}
]
}
If Tor ports are selected, the module will randomly choose one to access to the idos.cz website. If you want to set up Tor for anonymous access, and don't know how to, you can read this article.
Option | Description |
---|---|
stopId |
Required Id of the stop (parameter "z" in stop's livetable url). Type: int Default value: none |
maximumEntries |
Optional The maximum entries shown. Type: int Default value: 10 |
refreshInterval |
Optional How often to check for the next lines. Type: int Default value: 30000 milliseconds (60 seconds) |
fade |
Optional Fade the future lines to black. (Gradient) Type: boolean Default value: true |
fadePoint |
Optional Where to start fade? Type: float Default value: 0.25 (start on the 1/4 th of the list) |
blink |
Optional Whether departures should blink when departure time is <1 min. Type: boolean Default value: true |
displaySymbol |
Optional Whether to display bus/tram symbols. Type: boolean Default value: true |
displayLineNumber |
Optional Whether to display line number. Type: boolean Default value: true |
displayDestination |
Optional Whether to display destination stop. Type: boolean Default value: true |
torPorts |
Optional Tor ports, which will be randomly chosen to access the website, if ommited, Tor won't be used Type: array ot strings Default value: [] |
The module is based on the MMM-imhdsk By Adman, his module is far better than my own would be so this is basically the MMM-imhdsk module remade to fetch departures data from the idos.cz website. Thanks Adman!