This module shows estimated arrival times for bus lines in Madrid, in MagicMirror².
It uses the official EMT API so, to install this module you will need to register yourself on the EMT OpenData platform here. Once registered, you need to "create an application" to obtain your clientId
and passKey
.
To use this module, add it to the modules array in the config/config.js
file:
modules: [
{
module: "MMM-emt",
position: "top_left", // Best results in left or right regions.
config: {
// See 'Configuration options' for more information.
}
}
]
The following property is required:
Option | Description |
---|---|
busStops |
List to query about all lines defined. It should be an array of stop codes. |
These two options are required:
Option | Description |
---|---|
clientId |
ClientId provided by EMT open-data platform. Default value: "" |
passKey |
Passkey provided by EMT open-data platform. Default value: "" |
All of these are optional:
Option | Description |
---|---|
highlightInterval |
Interval, in minutes, that is optimum. Busses in that interval will show highlighted. Possible values: an array of two values in 0-20 Default value: [5, 10] |
updateInterval |
Time between requests EMT platform in miliseconds. Possible values: any integer Default value: 60 * 1000 (one minute) |
showDestination |
Show the bus destination. Possible values: true or false Default value: true |