This is a module I made for the MagicMirror², an open source modular smart mirror platform.
It displays real time Pittsburgh bus information from Port Authority for chosen bus routes and bus stops, including:
- chosen bus route
- arrival time
- remaining minutes to arrival time
- bus direction(inbound/outbound)
- chosen bus stop(name)
- bus destination
Javascript, Node.js
- Add MMM-PGHBus to your
MagicMirror/modules
directory
cd ~/MagicMirror/modules
git clone https://github.com/yuhanx0728/MMM-PGHBus/
cd MMM-PGHBus/
npm install
- Configure your
MagicMirror/config/congfig.js
file
modules: [
{
module: 'MMM-PGHBus',
position: 'top_left',
config: {
key: "", // get developer API key from https://truetime.portauthority.org/bustime/home.jsp
busStopPairs: [], // add as many "bus-stopID"s as you want, e.g."71C-2573", "71A-2573", "71A-2633"; stopID can be found on Google Map
useHeader: true, // optional, default true
header: "When Do Buses Come", // optional
verbose: false, // optional, default false
maxWidth: "450px", // optional, default 450px
updateInterval: 45 * 1000, // bus schedule update speed, optional, default 45s
animationSpeed: 3000 // fade in & fade out speed, optional, default 3s
}
}
]