Add managed firmware update system#99
Conversation
Port the managed firmware update system from R_PRO-1 to all AIR-1 variants: - Add http_request OTA platform alongside the existing esphome OTA - Add update component pulling the firmware manifest from GitHub Pages - Add safe_mode for recovery from failed updates - Build and publish the BLE variant (firmware-ble) so BLE devices update from their own manifest instead of being converted to the factory firmware
The http_request update component polls every 6h and the first poll fires before the network is up, so a freshly booted device would not see an available update for 6 hours. Trigger a manifest check as soon as WiFi connects.
|
Warning Review limit reached
More reviews will be available in 30 minutes. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Home Assistant shows only the first 255 characters of an ESPHome release summary, so boilerplate is expensive and ## headings render oversized in the update dialog: - Render category titles and What's Changed in bold instead of H2 - Drop the star-the-repo footer - Drop the Full Changelog line: it semver-truncates 4-part versions (always links ...X.Y.Z.1) - the shared build workflow now appends a correct compare link instead
bf4b33f to
d3cf392
Compare
|
About time 😉 |
Ports the managed OTA update system from R_PRO-1 to all AIR-1 variants, so devices can self-update from the GitHub Pages manifests directly in Home Assistant.
Changes
update: http_requestcomponent (Firmware Update entity in HA) +ota: http_requestplatform on all three variants, pulling from the existing GitHub Pages manifestssafe_modefor boot-loop recovery after a bad flashhttp_requestwithverify_ssl: true(esp-idf TLS, same as R_PRO-1)firmware-ble/manifest, andAIR-1_BLE.yamlupdates from it — without this, a BLE device taking an update would be silently converted to the factory (non-BLE) firmware and lose Bluetooth proxywifi.on_connect: the update component's first 6-hour poll fires before the network is up and skips silently, leaving the entity stale for ~6h after every boot (R_PRO-1 has this today). The trigger makes the entity accurate within seconds of boot.min_versionraised to 2025.11.0 to match the floor R_PRO-1 set when this system landed thereDeep-sleep note: prevent-sleep defaults on and the existing OTA-mode handling keeps the device awake during installs; for sleep-enabled units the on_connect check costs a couple of seconds of awake time per wake cycle.
Flash usage after the port (local compile, ESPHome 2026.1.3): AIR-1 66%, Factory 90.6%, BLE 93.6%.
Testing
The identical port was tested end to end on a physical MTR-1 (factory and BLE manifest paths): flash → update offered in HA with release notes → OTA install from Pages → reboot on new version → Bluetooth proxy intact on the BLE variant. AIR-1 fork CI verified building and publishing both manifests; all three variants compile-verified locally.
Note for support: devices need outbound HTTPS (443) to
apolloautomation.github.io— isolated IoT VLANs that block egress will show "up to date" forever withESP_ERR_HTTP_CONNECTin debug logs.