On-bus prediction screen prototype using MBTA API. (Ubuntu/Python/Flask) {not affiliated with the MBTA}
Prototype code, not production ready!
Demonstrate an on board passenger information screen for a transit vehicle showing a map of the current location, route/stops, rail lines and a list of upcoming stops with predictions. Keep the setup lightweight on a simple Ubuntu/Python/Flask platform for quick demonstration in a virtual machine for eventual installation on on-board router or Raspbery Pi equipment.
See image at ExampleScreenShot.png included in the repository:
- Get MBTA key request here
- Get Mapbox key & set up map and style
- Set up Ubuntu Server main user as "user" (command line only with Open SSH)
- Pull down repositiry 'git ...' (Update variables.template as variables.env with your key values)
- Run '~/mbtaonbus/bash_scripts/setup.sh'
- Navigate to http://mbtaonbus/ on local network and pick a bus (or run screen_setup.sh to run a browser display locally in the VM)
- Size VM window to 1024 x 786
- Navigate to http://mbtaonbus/preds-dark/####/ where #### is a valid operating bus number for a pure white on black version.
- Error handling
- List all buses on main page (not just first 50)
- Set bus ID as system variable if exists go directly to predictions for that bus
- Black background version
- Set default virtual machine resolution on boot.
- Start brand new GitHub repository rebuilding based on GTFS-RT feed and test with other transit properties
LILEE Systems was the inspiration for this prototype. They have an on-vehicle router that supports Ubuntu Virtual Machines and has an HDMI port to support a screen. STS Datasheet. Soon I will add in a small zip file of scripts to set up a Raspberry Pi 0W to power a 7" screen.