A real-time transit departure board built with Slint, displaying arrivals from the OneBusAway Puget Sound API.
Designed to run on a PROXmobil3 with a framebuffer display, but also works as a desktop window for development.
Requires the OBA_API_KEY environment variable to be set with an OneBusAway Puget Sound API key. Email oba_api_key@soundtransit.org to request one.
board <stop_name> <stop_id> [stop_id...]
Example:
OBA_API_KEY=your-key cargo run -- "University District" 40_990001 40_990002
OBA_API_KEY=your-key cargo run -- "University District" 40_990001 40_990002
cargo zigbuild --release --target armv7-unknown-linux-gnueabihf.2.28 --no-default-features --features framebuffer
-
Build the ARM binary (see above).
-
Copy the binary to the device over SSH:
cat target/armv7-unknown-linux-gnueabihf/release/board | ssh root@<DEVICE_IP> 'cat > /init/board/exe && chmod +x /init/board/exe' -
Create the systemd service at
/init/board/board.serviceon the device:[Unit] Description=Board Display Service After=network.target [Service] Type=simple Environment=OBA_API_KEY=your-key ExecStart=/init/board/exe "Your Stop Name" your_stop_id your_stop_id2 Restart=always RestartSec=2 WorkingDirectory=/init/board [Install] WantedBy=multi-user.target
-
Create the autorun script at
/init/autorun/99-board.shto install the service on boot:#!/bin/sh mount -o remount,rw / # Set timezone (adjust as needed) ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime # Disable default PM3 UI systemctl stop nx systemctl mask nx systemctl stop init-abtproxy systemctl mask init-abtproxy # Install and start board service cp /init/board/board.service /etc/systemd/system/ systemctl daemon-reload systemctl enable board.service mount -o remount,ro / /usr/bin/NxExe watchdog 0 systemctl start board.service
-
To update the stop or API key later:
ssh root@<DEVICE_IP> mount -o remount,rw / vi /init/board/board.service mount -o remount,ro / systemctl daemon-reload systemctl restart board.service
Inspect raw API data and see how arrivals are deduplicated:
OBA_API_KEY=your-key cargo run --bin debug_arrivals -- "University District" 40_990001 40_990002
Uses Nix for the development environment:
nix-shell