Skip to content

Add managed firmware update system#84

Open
bharvey88 wants to merge 5 commits into
betafrom
add-managed-update-system
Open

Add managed firmware update system#84
bharvey88 wants to merge 5 commits into
betafrom
add-managed-update-system

Conversation

@bharvey88

Copy link
Copy Markdown
Contributor

Ports the managed OTA update system from R_PRO-1 to all MSR-1 variants, so devices can self-update from the GitHub Pages manifests directly in Home Assistant. MSR-1 already publishes firmware/manifest.json to Pages; this adds the device-side half.

Changes

  • update: http_request component (Firmware Update entity in HA) + ota: http_request platform on all three variants
  • safe_mode for boot-loop recovery after a bad flash
  • http_request with verify_ssl: true (esp-idf TLS, same as R_PRO-1)
  • BLE variant is now built and published by CI to its own firmware-ble/ manifest, and MSR-1_BLE.yaml updates from it — without this, a BLE device taking an update would be silently converted to the factory (non-BLE) firmware and lose Bluetooth proxy
  • Manifest check triggered on wifi.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_version raised to 2025.11.0 to match the floor R_PRO-1 set when this system landed there

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. All three MSR-1 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 with ESP_ERR_HTTP_CONNECT in debug logs.

Port the managed firmware update system from R_PRO-1 to all MSR-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.
@bharvey88 bharvey88 added the new-feature New feature label Jun 11, 2026
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@bharvey88, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 29 minutes and 57 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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f4150de8-2295-43fc-9eb7-256084194bc8

📥 Commits

Reviewing files that changed from the base of the PR and between 5dafde0 and b6efb98.

📒 Files selected for processing (5)
  • .github/release-drafter.yml
  • .github/workflows/build.yml
  • Integrations/ESPHome/MSR-1.yaml
  • Integrations/ESPHome/MSR-1_BLE.yaml
  • Integrations/ESPHome/MSR-1_Factory.yaml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-managed-update-system

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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
@bharvey88 bharvey88 force-pushed the add-managed-update-system branch from 7c1867f to b6efb98 Compare June 11, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant