DEVLOG #7 - OTA FULLY IMPLEMENTED WITH AUTO-UPDATES, CAPTIVE PORTAL ADDED, FIRMWARE REFACTORED & STATUS LED
Website: https://spottr.brunogg.in
Work Done:
- Fully implemented Over-The-Air (OTA) updates for the scanner nodes. The
pi-bridgewatches Firebase for a new firmware version and publishes it over MQTT, each scanner compares it against its own version and only updates if it’s newer, then downloads, flashes and reboots itself. The version check runs on each scanner, so one publish updates every outdated node automatically - Set up automatic releases using a GitHub Action, so publishing a new release on GitHub writes the version and download URL to Firebase on its own, which then cascades down to every scanner. Now a single release publish updates the whole fleet with no manual steps
- Added a WiFi captive portal for first-time scanner setup. On first boot the scanner hosts its own network and serves a 4-step wizard (name the room, connect WiFi, set the broker, confirm) styled to match the website. Config is saved to NVS after every step and the portal won’t let a scanner boot into normal mode until setup is fully complete, so one firmware image now works for every scanner without editing code
-
Refactored the scanner firmware from one large file into separate modules (
config,portal,scanner,ota,ledandglobals) for cleaner, more maintainable code - Added a status LED on the scanner so its state can be read at a glance without a serial monitor - blinking while connecting, solid when online, a slow breathing fade while in the config portal, and a distinct pattern during an OTA update
- Fixed a bug where the dashboard counted an offline scanner as online, by trusting the health status set by the
pi-bridgeinstead of guessing from the last-seen timestamp
Future Work
- Build the Scanners Management page to assign rooms to auto-registered scanners and a Logs Page to view the history of every action performed
- Add offline buffering to the scanner firmware so badge detections aren’t lost if WiFi drops, and flush them once reconnected
- Add checksum verification to the OTA process so a corrupted download can’t be flashed to a scanner
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.