Add managed firmware update system#74
Conversation
Port the managed firmware update system from R_PRO-1 to all MSR-2 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
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 29 minutes and 54 seconds. 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
b1857ca to
e129a04
Compare
Ports the managed OTA update system from R_PRO-1 to all MSR-2 variants, so devices can self-update from the GitHub Pages manifests directly in Home Assistant. MSR-2 already publishes
firmware/manifest.jsonto Pages; this adds the device-side half.Changes
update: http_requestcomponent (Firmware Update entity in HA) +ota: http_requestplatform on all three variantssafe_modefor boot-loop recovery after a bad flashhttp_requestwithverify_ssl: true(esp-idf TLS, same as R_PRO-1)firmware-ble/manifest, andMSR-2_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 thereTesting
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. All three MSR-2 variants compile-verified on ESPHome 2026.1.3.
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.