https://github.com/tbouron/mmm-lothianbuses
MagicMirror module that displays real time information about Lothian Buses bus stops
https://github.com/tbouron/mmm-lothianbuses
lothian-buses magic-mirror-modules magicmirror magicmirror2
Last synced: 11 months ago
JSON representation
MagicMirror module that displays real time information about Lothian Buses bus stops
- Host: GitHub
- URL: https://github.com/tbouron/mmm-lothianbuses
- Owner: tbouron
- License: apache-2.0
- Created: 2019-10-27T22:32:06.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-10-01T10:26:46.000Z (over 5 years ago)
- Last Synced: 2025-03-26T03:11:36.417Z (about 1 year ago)
- Topics: lothian-buses, magic-mirror-modules, magicmirror, magicmirror2
- Language: JavaScript
- Homepage:
- Size: 94.7 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MagicMirror Module: Lothian Buses
`MMM-LothianBuses` is a module for [MagicMirror](https://github.com/MichMich/MagicMirror) that allows you to display real time information about Lothian Buses bus stops.
The data is provided by [Transport for Edinburgh Open data](https://tfe-opendata.readme.io/) scheme.

## Usage
### Prerequisites
This module requires an API key to work. The key is free but you need to make [a request to get one here](http://www.mybustracker.co.uk/?page=API%20Key).
### Setup
Clone this module into your MagicMirror's `modules` directory
```shell script
cd modules
git clone https://github.com/tbouron/MMM-LothianBuses
```
then add the module to your MagicMirror's configuration. Here is an example:
```javascript
/* MagicMirror/config/config.js */
{
/* ...your other config here */
modules: [
/* ...your other modules here */
{
module: 'MMM-LothianBuses',
header: 'Buses',
position: 'top_left',
config: {
apiKey: '',
busStopIds: [
'',
'',
'',
['', '', '', ...]
....
]
}
}
]
}
```
### Configuration options
| Configuration key | Description | Default | Required |
| --- | --- | --- | ---|
| apiKey | The API key for the transports of Edinburgh open data. You can [request one here](http://www.mybustracker.co.uk/?page=API%20Key). | `null` | Yes |
| busStopIds | The list of bus stop IDs to display. Each items can either be a string containing the bus stop ID, or an array where the first item is the bus stop ID, and the subsequent ones are line numbers that needs to be included. | `[]` | Yes |
### Finding bus stop IDs
Go to [Google maps](https://www.google.co.uk/maps) and click on the bus stop you are interested in. The information card will display the bus stop ID associated to it.