From 960b59a93903648c6833737a7bc199e3c2ab660b Mon Sep 17 00:00:00 2001 From: bharvey88 <8107750+bharvey88@users.noreply.github.com> Date: Wed, 10 Jun 2026 16:34:10 -0500 Subject: [PATCH 1/4] Add HTTP request OTA update system from R_PRO-1 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 --- .github/workflows/build.yml | 3 ++- Integrations/ESPHome/MTR-1.yaml | 13 +++++++++++++ Integrations/ESPHome/MTR-1_BLE.yaml | 13 +++++++++++++ Integrations/ESPHome/MTR-1_Factory.yaml | 12 ++++++++++++ 4 files changed, 40 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bccae58..b9aa44f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,8 @@ jobs: device-name: mtr-1 yaml-files: | Integrations/ESPHome/MTR-1_Factory.yaml - firmware-names: "1_Factory:firmware" + Integrations/ESPHome/MTR-1_BLE.yaml + firmware-names: "1_Factory:firmware,1_BLE:firmware-ble" core-yaml-path: Integrations/ESPHome/Core.yaml esphome-version: stable # Bypass check if manually triggered with bypass option diff --git a/Integrations/ESPHome/MTR-1.yaml b/Integrations/ESPHome/MTR-1.yaml index 3f93e8a..71244b3 100644 --- a/Integrations/ESPHome/MTR-1.yaml +++ b/Integrations/ESPHome/MTR-1.yaml @@ -32,6 +32,19 @@ dashboard_import: ota: - platform: esphome id: ota_default + - platform: http_request + id: ota_managed + +http_request: + verify_ssl: true + +safe_mode: + +update: + - platform: http_request + id: update_http_request + name: Firmware Update + source: https://apolloautomation.github.io/MTR-1/firmware/manifest.json wifi: power_save_mode: none diff --git a/Integrations/ESPHome/MTR-1_BLE.yaml b/Integrations/ESPHome/MTR-1_BLE.yaml index 6b2fd2e..5f8ad9e 100644 --- a/Integrations/ESPHome/MTR-1_BLE.yaml +++ b/Integrations/ESPHome/MTR-1_BLE.yaml @@ -32,6 +32,19 @@ dashboard_import: ota: - platform: esphome id: ota_esphome + - platform: http_request + id: ota_managed + +http_request: + verify_ssl: true + +safe_mode: + +update: + - platform: http_request + id: update_http_request + name: Firmware Update + source: https://apolloautomation.github.io/MTR-1/firmware-ble/manifest.json wifi: ap: diff --git a/Integrations/ESPHome/MTR-1_Factory.yaml b/Integrations/ESPHome/MTR-1_Factory.yaml index 724f94f..20fd1e5 100644 --- a/Integrations/ESPHome/MTR-1_Factory.yaml +++ b/Integrations/ESPHome/MTR-1_Factory.yaml @@ -41,7 +41,19 @@ logger: ota: - platform: esphome id: ota_esphome + - platform: http_request + id: ota_managed +http_request: + verify_ssl: true + +safe_mode: + +update: + - platform: http_request + id: update_http_request + name: Firmware Update + source: https://apolloautomation.github.io/MTR-1/firmware/manifest.json packages: core: !include Core.yaml From cdc40d0cb1f75b32e8d534e08d121ab07d8c8d1b Mon Sep 17 00:00:00 2001 From: bharvey88 <8107750+bharvey88@users.noreply.github.com> Date: Wed, 10 Jun 2026 16:58:12 -0500 Subject: [PATCH 2/4] Check for updates when WiFi connects 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. --- Integrations/ESPHome/MTR-1.yaml | 2 ++ Integrations/ESPHome/MTR-1_BLE.yaml | 2 ++ Integrations/ESPHome/MTR-1_Factory.yaml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/Integrations/ESPHome/MTR-1.yaml b/Integrations/ESPHome/MTR-1.yaml index 71244b3..87a214d 100644 --- a/Integrations/ESPHome/MTR-1.yaml +++ b/Integrations/ESPHome/MTR-1.yaml @@ -48,6 +48,8 @@ update: wifi: power_save_mode: none + on_connect: + - component.update: update_http_request ap: ssid: "Apollo MTR1 Hotspot" diff --git a/Integrations/ESPHome/MTR-1_BLE.yaml b/Integrations/ESPHome/MTR-1_BLE.yaml index 5f8ad9e..2fd8465 100644 --- a/Integrations/ESPHome/MTR-1_BLE.yaml +++ b/Integrations/ESPHome/MTR-1_BLE.yaml @@ -47,6 +47,8 @@ update: source: https://apolloautomation.github.io/MTR-1/firmware-ble/manifest.json wifi: + on_connect: + - component.update: update_http_request ap: ssid: "Apollo MTR1 Hotspot" diff --git a/Integrations/ESPHome/MTR-1_Factory.yaml b/Integrations/ESPHome/MTR-1_Factory.yaml index 20fd1e5..c480b60 100644 --- a/Integrations/ESPHome/MTR-1_Factory.yaml +++ b/Integrations/ESPHome/MTR-1_Factory.yaml @@ -33,6 +33,8 @@ esp32_improv: authorizer: none wifi: + on_connect: + - component.update: update_http_request ap: ssid: "Apollo MTR1 Hotspot" From 7ea863271f34649742c5834804ce00bbc5d2e2b9 Mon Sep 17 00:00:00 2001 From: bharvey88 <8107750+bharvey88@users.noreply.github.com> Date: Wed, 10 Jun 2026 21:50:45 -0500 Subject: [PATCH 3/4] Raise min_version to 2025.11.0 to match R_PRO-1's update-system floor --- Integrations/ESPHome/MTR-1.yaml | 2 +- Integrations/ESPHome/MTR-1_BLE.yaml | 2 +- Integrations/ESPHome/MTR-1_Factory.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Integrations/ESPHome/MTR-1.yaml b/Integrations/ESPHome/MTR-1.yaml index 87a214d..df11e00 100644 --- a/Integrations/ESPHome/MTR-1.yaml +++ b/Integrations/ESPHome/MTR-1.yaml @@ -8,7 +8,7 @@ esphome: name: "ApolloAutomation.MTR-1" version: "${version}" - min_version: 2025.8.0 + min_version: 2025.11.0 on_boot: - priority: 500 then: diff --git a/Integrations/ESPHome/MTR-1_BLE.yaml b/Integrations/ESPHome/MTR-1_BLE.yaml index 2fd8465..e73f411 100644 --- a/Integrations/ESPHome/MTR-1_BLE.yaml +++ b/Integrations/ESPHome/MTR-1_BLE.yaml @@ -8,7 +8,7 @@ esphome: name: "ApolloAutomation.MTR-1" version: "${version}" - min_version: 2025.8.0 + min_version: 2025.11.0 on_boot: - priority: 500 then: diff --git a/Integrations/ESPHome/MTR-1_Factory.yaml b/Integrations/ESPHome/MTR-1_Factory.yaml index c480b60..c2cf8bf 100644 --- a/Integrations/ESPHome/MTR-1_Factory.yaml +++ b/Integrations/ESPHome/MTR-1_Factory.yaml @@ -8,7 +8,7 @@ esphome: name: "ApolloAutomation.MTR-1" version: "${version}" - min_version: 2025.8.0 + min_version: 2025.11.0 on_boot: - priority: 500 then: From 99297c7ac422c242e122371545fbd8624277011a Mon Sep 17 00:00:00 2001 From: bharvey88 <8107750+bharvey88@users.noreply.github.com> Date: Wed, 10 Jun 2026 22:33:54 -0500 Subject: [PATCH 4/4] Release notes: compact formatting for the HA update dialog 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 --- .github/release-drafter.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 34cb900..8d1b19a 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -2,6 +2,7 @@ name-template: 'Release v$NEXT_PATCH_VERSION' tag-template: "$RESOLVED_VERSION" change-template: "- #$NUMBER $TITLE @$AUTHOR" sort-direction: ascending +category-template: '**$TITLE**' categories: - title: "🚨 Breaking changes" @@ -41,11 +42,9 @@ include-labels: no-changes-template: '- No changes' +# The shared build workflow appends a Full Changelog compare link to the +# release body (release-drafter cannot render 4-part version tags). template: | - ## What's Changed + **What's Changed** $CHANGES - - **Full Changelog**: https://github.com/ApolloAutomation/MTR-1/compare/$PREVIOUS_TAG...$RESOLVED_VERSION.1 - - Be sure to 🌟 this repository for updates! \ No newline at end of file