Creating real-time bus displays in limited time
27.09.23 - Flutter Firebase Festival
Hi, I’m Fré
Lead App Developer @
📍 Bruges, Belgium
🎉 Flutter enthousiast
Shuttle bus Bruges
Improve mobility in the city center
Bruges has small streets which are hard to access with bigger busses.
Partnership with Keolis
The city partnered with Keolis, a mobility provider who was one of our clients already
Onboard displays
The busses needed to have onboard displays, showing and announcing the upcoming bus stops.
“The deadline is in 2 weeks”
Challenges
Real-time data
The display needs to update when the bus leaves and arrives at a stop
Announcements
Visually impaired passengers have to be notified about the upcoming stops
OTA updates
An over-the-air update mechanism is required to easily apply changes and fixes
Physical challenges
The setup has to endure riding on cobblestones all day
Solutions
Industry standard screen
We chose a solid type of screen that is used in other buses or trains as well. These can endure heavy bumps when the bus rides over the cobblestones
Onboard audio
We chose to use the normal audio system of the bus via the 3.5mm audio jack. It is the easiest way to get started without having to install another system.
Raspberry Pi
RPis have all necessary connections (HDMI, audio, WiFi) for a relatively cheap price and can be stowed away easily. Since it can run multiple OSes via the SD card, it provides a flexible solution.
FullPageOS
RPi / Chromium distro
A distro that displays a full screen Chromium browser and visits the predefined URL when starting up.
Simple setup
Only requires configuration for the URL and network credentials. The license plate is included in the URL to identify the bus.
Flutter for Web
The web already provides an OTA update mechanism.
--autoplay-policy=no-user-gesture-required
Available via nightly build
🔗 github.com/guysoft/FullPageOS
KeoCount
Driver assistant app
Made in 2019 using Flutter and already part of the busses.
Collecting events
The driver sees the schedule and manually passes in when the bus stops, when it leaves, how many people got on, etc.
Batched uploads
These events are sent in batches and only get uploaded when there’s an internet connection. On Android tablets, this only takes about 2 seconds to send.
SIM card on tablet
This allowed us to have a constant internet connection but also acts as a hotspot for the Raspberry Pi
What about Firebase?
Hooray it works 🎉
… in the office
Busses arrived
The busses were still being assembled and not available during our development
Install the RPis
Which didn’t go as smoothly as expected…
New RPis are delivered
Second attempt at installing them 🙏
First production test at the press conference
Start of the shuttle bus service 💪
Thanks!
Fré Dumazy
Lead App Developer
Email: fre@skystoneapps.com
Twitter: @FresidentDumazy
LinkedIn: linkedin.com/in/dumazy