Estimated Time of Arrival (ETA) for the Hong Kong Transport. It uses the API provided by DATA.GOV.HK and support several Hong Kong transport.
This module aims to be the replacement the MMM-HK-KMB and MMM-HK-Transport modules.
This module includes a data extraction script for MTR Bus routes in the scripts/ directory. The script extracts route and station information from the MTR Bus Data Dictionary PDF and converts it to JSON format for use in the module.
For detailed information on how to use the script, please refer to scripts/README.md.
A working installation of MagicMirror².
No runtime dependencies required.
To add this module, go to MagicMirror folder and run the following command
cd modules
git clone https://github.com/winstonma/MMM-HK-Transport-ETATo use this module, add it to the modules array in the config/config.js file:
{
module: "MMM-HK-Transport-ETA",
position: "top_right",
config: {
// See 'Configuration options' for more information.
transportETAProvider: "mtr",
sta: "Hong Kong",
},
},The following properties can be configured:
| Option | Description |
|---|---|
transportETAProvider |
Which ETA provider should be used. Possible values: mtr, kmb, ctb, mtrbus, lrt or gmbDefault value: mtr |
reloadInterval |
How often does the content needs to be fetched? (Milliseconds) Possible values: 1000 - 86400000 Default value: 60000 (1 minute) |
updateInterval |
How often do you want to display a relative time? (seconds). If set to 0, the relative time would not be displayed.Possible values: 0 - 60000 Default value: 5000 (5 seconds) |
animationSpeed |
Speed of the update animation. (Milliseconds) Possible values: 0 - 5000 Default value: 2500 (2.5 seconds) |
showHeader |
Display the header. Possible values: true or false Default value: false |
For MTR, KMB, CTB, MTR Bus, GMB and LRT configuration, please use the MMM-HK-Transport-ETA-Configurator. This web-based tool simplifies the process of finding the correct configuration values for your desired transport lines and stations.
