Add managed firmware update system#95
Conversation
Port the managed firmware update system from R_PRO-1 to all MTR-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.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe PR adds a BLE firmware to the build workflow, bumps ESPHome min_version to 2025.11.0 across device configs, migrates OTA to http_request-based updates with wifi-triggered checks, and updates the release-drafter template. ChangesESPHome OTA Migration and BLE Build Integration
Release Drafter
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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
41c8325 to
99297c7
Compare
Ports the managed OTA update system from R_PRO-1 to all MTR-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, andMTR-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 thereTesting
Tested end to end on a physical MTR-1 (both the factory-path and BLE-path manifests): flash → update offered in HA with release notes → OTA install from Pages → reboot on new version → Bluetooth proxy intact on the BLE variant. Verified across seven consecutive mock releases on a fork.
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.Summary by CodeRabbit
New Features
Chores