Skip to content

About

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.

Resources

Stars

7 stars

Watchers

1 watching

Forks

Repository files navigation

MMM-HK-Transport-ETA Module

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.

Screenshot

MMM-HK-Transport-ETA module running in MagicMirror<sup>2</sup>

Data Extraction Script

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.

Prerequisite

A working installation of MagicMirror².

Dependencies

No runtime dependencies required.

Installation

To add this module, go to MagicMirror folder and run the following command

cd modules
git clone https://github.com/winstonma/MMM-HK-Transport-ETA

Usage

To 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",
		},
	},

Configuration options

The following properties can be configured:

General options

Option Description
transportETAProvider Which ETA provider should be used.

Possible values: mtr, kmb, ctb, mtrbus, lrt or gmb
Default 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

Supported Transport Providers

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.

About

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.

Resources

Stars

7 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages