From 5d4a6e81b3d7bf0712d69bbf2dcf0eb70f65b204 Mon Sep 17 00:00:00 2001 From: Brandon Harvey <8107750+bharvey88@users.noreply.github.com> Date: Tue, 7 Jul 2026 15:27:04 -0500 Subject: [PATCH 1/3] Unified firmware: runtime Bluetooth Proxy switch + Stable/Beta channel OTA MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Port of the pattern MSR-1 shipped as 26.7.9.1 (ApolloAutomation/MSR-1 #100/#103/#104), replacing the earlier firmware-channel branch: - bluetooth_proxy + esp32_ble_tracker compile into every image; a "Bluetooth Proxy" switch (default off, persisted) starts/stops scanning at runtime, re-applied at boot (on_boot -300). On this deep-sleep device the proxy pairs with "Prevent Sleep" for continuous use. The _BLE build split is retired: _BLE yamls stay compilable but their update entities point at the standard manifests (they were never published), so self-built _BLE devices converge onto the unified image. - Firmware Channel select (Stable/Beta) + apply_ota_source doing a direct set_source_url swap from per-variant ota_stable_manifest/ota_beta_manifest subs (${variant_slug} keeps PLT-1 vs PLT-1B on their own manifests); the channel is re-applied at boot (on_boot -100) - Firmware Update button holds prevent_deep_sleep for the download and re-arms sleep on the not-started path; no pre-OTA BLE disable (ESPHome's OTA quiesces BLE itself) - http_request consolidated into Core.yaml with the proven buffer sizes (rx 5120 / tx 2048 for GitHub release redirects) - _BLE variants' on_boot converted to list form so Core's on_boot entries merge instead of being replaced - Minimal images take over Pages firmware/ and firmware-b/ for OTA and adoption; improv images move to firmware-factory/ and firmware-b-factory/ (installer page repointed) - beta-channel/ wrappers default the select to Beta; build-beta.yml publishes manifest.json + manifest-b.json (absolute URLs) to the rolling beta-fw pre-release - min_version 2025.11.0 (update-system floor); version 26.7.12.1 Supersedes #69. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- .github/workflows/build-beta.yml | 103 ++++++++++++++ .github/workflows/build.yml | 8 +- Integrations/ESPHome/.gitignore | 1 + Integrations/ESPHome/Core.yaml | 129 +++++++++++++++++- Integrations/ESPHome/PLT-1.yaml | 9 +- Integrations/ESPHome/PLT-1B.yaml | 12 +- Integrations/ESPHome/PLT-1B_BLE.yaml | 58 ++++---- Integrations/ESPHome/PLT-1B_Minimal.yaml | 25 +++- Integrations/ESPHome/PLT-1_BLE.yaml | 55 ++++---- Integrations/ESPHome/PLT-1_Minimal.yaml | 22 ++- .../ESPHome/beta-channel/PLT-1B_Minimal.yaml | 9 ++ .../ESPHome/beta-channel/PLT-1_Minimal.yaml | 9 ++ static/index.html | 4 +- 13 files changed, 367 insertions(+), 77 deletions(-) create mode 100644 .github/workflows/build-beta.yml create mode 100644 Integrations/ESPHome/beta-channel/PLT-1B_Minimal.yaml create mode 100644 Integrations/ESPHome/beta-channel/PLT-1_Minimal.yaml diff --git a/.github/workflows/build-beta.yml b/.github/workflows/build-beta.yml new file mode 100644 index 0000000..e910585 --- /dev/null +++ b/.github/workflows/build-beta.yml @@ -0,0 +1,103 @@ +name: Build and Publish Beta + +# Builds PLT-1 firmware from the beta branch and publishes it as assets on a +# rolling "beta-fw" pre-release. The on-device "Firmware Channel" select points +# OTA updates at these assets. Stable firmware is built/published separately +# by build.yml (push to main -> GitHub Pages). + +on: + push: + branches: [beta] + paths: + - 'Integrations/ESPHome/**' + workflow_dispatch: + +# Least privilege: read-only by default; only publish-beta is elevated to write. +permissions: + contents: read + +jobs: + version: + name: Read version + runs-on: ubuntu-latest + outputs: + v: ${{ steps.read.outputs.v }} + steps: + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + persist-credentials: false + - id: read + run: | + v=$(awk '/substitutions:/ {f=1} f && /version:/ {print $2; exit}' \ + Integrations/ESPHome/Core.yaml | tr -d '"') + echo "v=$v" >> "$GITHUB_OUTPUT" + echo "Beta version: $v" + + build: + name: Build ${{ matrix.name }} + needs: version + strategy: + matrix: + include: + # Beta serves OTA updates only, so it builds the end-user Minimal + # images, not the first-flash improv images. + - { yaml: Integrations/ESPHome/beta-channel/PLT-1_Minimal.yaml, name: firmware-beta } + - { yaml: Integrations/ESPHome/beta-channel/PLT-1B_Minimal.yaml, name: firmware-b-beta } + uses: esphome/workflows/.github/workflows/build.yml@025a1e6255610c498ed590403b7e510b69e474df # 2026.4.1 + with: + files: ${{ matrix.yaml }} + esphome-version: stable + combined-name: ${{ matrix.name }} + release-version: ${{ needs.version.outputs.v }} + + publish-beta: + name: Publish beta release assets + needs: [version, build] + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Download firmware artifacts + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + path: fw + pattern: firmware* + + - name: Ensure rolling 'beta-fw' pre-release exists + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release view beta-fw -R "${{ github.repository }}" >/dev/null 2>&1 \ + || gh release create beta-fw -R "${{ github.repository }}" \ + --prerelease --title "Beta (rolling)" \ + --notes "Latest PLT-1 beta firmware. Auto-updated on every push to the beta branch." + + - name: Rewrite manifests to absolute URLs and upload assets + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + BASE="https://github.com/${{ github.repository }}/releases/download/beta-fw" + # Manifest names match the on-device variant_slug: "" and "-b". + declare -A DIRS=( [""]=firmware-beta ["-b"]=firmware-b-beta ) + for v in "" "-b"; do + src="fw/${DIRS[$v]}" + man=$(find "$src" -name manifest.json | head -1) + if [ -z "$man" ]; then + echo "::error::manifest.json not found for ${DIRS[$v]}" + exit 1 + fi + echo "Rewriting $man" + # Make ota.path and parts[].path absolute release-asset URLs so the + # device never has to resolve a relative path against a redirect. + # The two variants have distinct device names, so bin filenames + # don't collide in the flat release-asset namespace. + jq --arg base "$BASE" ' + .builds[0].ota.path = ($base + "/" + (.builds[0].ota.path | sub(".*/"; ""))) + | .builds[0].parts |= map(.path = ($base + "/" + (.path | sub(".*/"; "")))) + ' "$man" > "manifest$v.json" + cat "manifest$v.json" + gh release upload beta-fw "manifest$v.json" -R "${{ github.repository }}" --clobber + find "$src" -name '*.bin' -print -exec \ + gh release upload beta-fw {} -R "${{ github.repository }}" --clobber \; + done + echo "Beta assets published." diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e6173e3..8c8bf5c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,10 +24,16 @@ jobs: pull-requests: write with: device-name: plt-1 + # The Minimal yamls are the end-user images served at firmware/ and + # firmware-b/ (OTA updates and dashboard adoption). The improv images + # move to *-factory/ and are only used for first flashes via the web + # installer. yaml-files: | + Integrations/ESPHome/PLT-1_Minimal.yaml + Integrations/ESPHome/PLT-1B_Minimal.yaml Integrations/ESPHome/PLT-1.yaml Integrations/ESPHome/PLT-1B.yaml - firmware-names: "1:firmware,1B:firmware-b" + firmware-names: "1_Minimal:firmware,1B_Minimal:firmware-b,1:firmware-factory,1B:firmware-b-factory" core-yaml-path: Integrations/ESPHome/Core.yaml esphome-version: stable # Bypass check if manually triggered with bypass option diff --git a/Integrations/ESPHome/.gitignore b/Integrations/ESPHome/.gitignore index d8b4157..78a2a3e 100644 --- a/Integrations/ESPHome/.gitignore +++ b/Integrations/ESPHome/.gitignore @@ -3,3 +3,4 @@ # You can modify this file to suit your needs. /.esphome/ /secrets.yaml +beta-channel/.esphome/ diff --git a/Integrations/ESPHome/Core.yaml b/Integrations/ESPHome/Core.yaml index 28de2f9..045da8c 100644 --- a/Integrations/ESPHome/Core.yaml +++ b/Integrations/ESPHome/Core.yaml @@ -1,5 +1,41 @@ substitutions: - version: "26.3.2.1" + version: "26.7.12.1" + # Firmware variant identity: overridden to "-b" by the PLT-1B images so + # each hardware variant tracks its own manifests. + variant_slug: "" + # Default update channel on first boot (no stored user choice yet, i.e. a + # fresh flash). The beta-channel builds override this to "Beta" (see + # Integrations/ESPHome/beta-channel/) so firmware obtained from the beta + # channel keeps tracking it instead of offering a stable "downgrade". + firmware_channel_default: "Stable" + # Manifest URL bases. Stable = GitHub Pages (main branch builds). + # Beta = rolling "beta-fw" pre-release assets (beta branch builds). + stable_manifest_base: "https://apolloautomation.github.io/PLT-1" + beta_manifest_base: "https://github.com/ApolloAutomation/PLT-1/releases/download/beta-fw" + # Per-variant OTA manifest URLs picked by apply_ota_source. + ota_stable_manifest: "${stable_manifest_base}/firmware${variant_slug}/manifest.json" + ota_beta_manifest: "${beta_manifest_base}/manifest${variant_slug}.json" + +esphome: + # List form so package merging concatenates with each variant's own on_boot + # entries (mapping form would be replaced by the variant's block instead). + on_boot: + # Point the update entity at the selected channel's manifest. + - priority: -100 + then: + - script.execute: apply_ota_source + # Re-apply the Bluetooth Proxy switch after all components set up, so BLE + # scanning matches the persisted switch (proxy stays off by default). + - priority: -300 + then: + - if: + condition: + switch.is_on: bluetooth_proxy_switch + then: + - esp32_ble_tracker.start_scan: + continuous: true + else: + - esp32_ble_tracker.stop_scan: esp32: variant: esp32c3 @@ -10,6 +46,13 @@ esp32: assertion_level: SILENT enable_lwip_assert: false +esp32_ble_tracker: + id: ble_tracker + scan_parameters: + continuous: true + +bluetooth_proxy: + api: actions: - action: play_buzzer @@ -76,6 +119,17 @@ globals: captive_portal: +http_request: + verify_ssl: true + # GitHub release-asset downloads answer with a redirect carrying a + # ~3.6 KB Content-Security-Policy header; each header line must fit + # this buffer or the request fails with "HTTP_CLIENT: Out of buffer". + buffer_size_rx: 5120 + # The redirect target is a signed URL with a ~850-char query string; the + # follow-up request line must fit the TX buffer or esp_http_client_open + # fails with "Out of buffer" before sending anything. + buffer_size_tx: 2048 + i2c: sda: GPIO1 @@ -339,6 +393,34 @@ button: icon: mdi:power-cycle name: "ESP Reboot" + - platform: template + name: "Firmware Update" + id: update_firmware + icon: mdi:cloud-download + entity_category: "config" + on_press: + - logger.log: "Applying firmware update for the selected channel" + # OTA download needs the device awake for its whole duration. + - lambda: |- + id(deep_sleep_1).prevent_deep_sleep(); + - delay: 3s + - script.execute: apply_ota_source + - script.wait: apply_ota_source + # The manifest fetch runs in its own task; give it a fixed window to land + # (update.is_available stays false for same-version switches). + - delay: 5s + - lambda: id(update_http_request).perform(true); + # Only reached if the update did not start (e.g. manifest unreachable). + # Re-arm deep sleep unless something else is holding the device awake. + - if: + condition: + and: + - switch.is_off: prevent_sleep + - binary_sensor.is_off: ota_mode + then: + - lambda: |- + id(deep_sleep_1).allow_deep_sleep(); + - platform: factory_reset disabled_by_default: True name: "Factory Reset ESP" @@ -365,9 +447,24 @@ switch: condition: binary_sensor.is_off: ota_mode then: - - lambda: |- + - lambda: |- id(deep_sleep_1).allow_deep_sleep(); + # Note: on this deep-sleep device the proxy only forwards while the device + # is awake - pair it with "Prevent Sleep" to use it continuously. + - platform: template + name: "Bluetooth Proxy" + id: bluetooth_proxy_switch + icon: mdi:bluetooth + entity_category: "config" + restore_mode: RESTORE_DEFAULT_OFF + optimistic: true + on_turn_on: + - esp32_ble_tracker.start_scan: + continuous: true + on_turn_off: + - esp32_ble_tracker.stop_scan: + text_sensor: - platform: wifi_info @@ -385,7 +482,35 @@ text_sensor: update_interval: never entity_category: "diagnostic" +select: + - platform: template + name: "Firmware Channel" + id: firmware_channel + icon: mdi:source-branch + entity_category: "config" + optimistic: true + restore_value: true + options: + - "Stable" + - "Beta" + initial_option: "${firmware_channel_default}" + on_value: + then: + - script.execute: apply_ota_source + script: + - id: apply_ota_source + # Sets the OTA manifest URL from the Firmware Channel select (Stable/Beta). + # The manifest URLs are per-variant (ota_*_manifest substitutions via + # ${variant_slug}) so each hardware variant tracks its own manifests. + then: + - lambda: |- + const bool beta = id(firmware_channel).current_option() == "Beta"; + std::string url = beta ? "${ota_beta_manifest}" : "${ota_stable_manifest}"; + ESP_LOGI("firmware", "OTA manifest set to: %s", url.c_str()); + id(update_http_request).set_source_url(url); + - component.update: update_http_request + - id: statusCheck then: - if: diff --git a/Integrations/ESPHome/PLT-1.yaml b/Integrations/ESPHome/PLT-1.yaml index e70146c..0707965 100644 --- a/Integrations/ESPHome/PLT-1.yaml +++ b/Integrations/ESPHome/PLT-1.yaml @@ -7,7 +7,7 @@ esphome: name: "ApolloAutomation.PLT-1" version: "${version}" - min_version: 2025.6.0 + min_version: 2025.11.0 on_boot: - priority: 800.0 then: @@ -58,20 +58,17 @@ ota: - platform: http_request id: ota_managed -http_request: - verify_ssl: true - safe_mode: update: - platform: http_request - id: firmware_update + id: update_http_request name: Firmware Update source: https://apolloautomation.github.io/PLT-1/firmware/manifest.json wifi: on_connect: - - component.update: firmware_update + - component.update: update_http_request ap: ssid: "Apollo PLT1 Hotspot" diff --git a/Integrations/ESPHome/PLT-1B.yaml b/Integrations/ESPHome/PLT-1B.yaml index f6698dc..eeae577 100644 --- a/Integrations/ESPHome/PLT-1B.yaml +++ b/Integrations/ESPHome/PLT-1B.yaml @@ -1,3 +1,6 @@ +substitutions: + variant_slug: "-b" + esphome: name: "apollo-plt-1b" friendly_name: Apollo PLT-1B @@ -7,7 +10,7 @@ esphome: name: "ApolloAutomation.PLT-1B" version: "${version}" - min_version: 2025.6.0 + min_version: 2025.11.0 on_boot: - priority: 999.0 then: @@ -55,9 +58,6 @@ ota: - platform: http_request id: ota_managed -http_request: - verify_ssl: true - safe_mode: web_server: @@ -66,13 +66,13 @@ web_server: update: - platform: http_request - id: firmware_update + id: update_http_request name: Firmware Update source: https://apolloautomation.github.io/PLT-1/firmware-b/manifest.json wifi: on_connect: - - component.update: firmware_update + - component.update: update_http_request ap: ssid: "Apollo PLT1B Hotspot" diff --git a/Integrations/ESPHome/PLT-1B_BLE.yaml b/Integrations/ESPHome/PLT-1B_BLE.yaml index 7c4524a..16abbd1 100644 --- a/Integrations/ESPHome/PLT-1B_BLE.yaml +++ b/Integrations/ESPHome/PLT-1B_BLE.yaml @@ -1,3 +1,6 @@ +substitutions: + variant_slug: "-b" + esphome: name: "apollo-plt-1bble" friendly_name: Apollo PLT-1BBLE @@ -7,25 +10,27 @@ esphome: name: "ApolloAutomation.PLT-1BBLE" version: "${version}" - min_version: 2025.6.0 + min_version: 2025.11.0 + # List form so package merging concatenates with Core.yaml's on_boot + # entries (mapping form would replace Core's whole list instead). on_boot: - priority: 500 - then: - - text_sensor.template.publish: - id: apollo_firmware_version - state: "${version}" - - lambda: |- - id(deep_sleep_1).set_sleep_duration(id(deep_sleep_sleep_duration).state * 60 * 60 * 1000); - id(deep_sleep_1).set_run_duration(90 * 1000); - - if: - condition: - or: - - binary_sensor.is_on: ota_mode - - switch.is_on: prevent_sleep - then: - - lambda: |- - ESP_LOGW("Apollo", "Preventing Deep Sleep Due To OTA On Boot"); - id(deep_sleep_1).prevent_deep_sleep(); + - priority: 500 + then: + - text_sensor.template.publish: + id: apollo_firmware_version + state: "${version}" + - lambda: |- + id(deep_sleep_1).set_sleep_duration(id(deep_sleep_sleep_duration).state * 60 * 60 * 1000); + id(deep_sleep_1).set_run_duration(90 * 1000); + - if: + condition: + or: + - binary_sensor.is_on: ota_mode + - switch.is_on: prevent_sleep + then: + - lambda: |- + ESP_LOGW("Apollo", "Preventing Deep Sleep Due To OTA On Boot"); + id(deep_sleep_1).prevent_deep_sleep(); on_shutdown: - light.turn_off: rgb_light @@ -39,17 +44,20 @@ dashboard_import: ota: - platform: esphome id: ota_esphome + - platform: http_request + id: ota_managed -safe_mode: - -bluetooth_proxy: - active: true +update: + - platform: http_request + id: update_http_request + name: Firmware Update + source: ${stable_manifest_base}/firmware${variant_slug}/manifest.json -esp32_ble_tracker: - scan_parameters: - active: false +safe_mode: wifi: + on_connect: + - component.update: update_http_request ap: ssid: "Apollo PLT1B Hotspot" diff --git a/Integrations/ESPHome/PLT-1B_Minimal.yaml b/Integrations/ESPHome/PLT-1B_Minimal.yaml index bad38b3..72c36dc 100644 --- a/Integrations/ESPHome/PLT-1B_Minimal.yaml +++ b/Integrations/ESPHome/PLT-1B_Minimal.yaml @@ -1,13 +1,16 @@ +substitutions: + variant_slug: "-b" + esphome: - name: "apollo-plt-1b-minimal" - friendly_name: Apollo PLT-1B Minimal - comment: Apollo PLT-1B Minimal + name: "apollo-plt-1b" + friendly_name: Apollo PLT-1B + comment: Apollo PLT-1B name_add_mac_suffix: true project: - name: "ApolloAutomation.PLT-1B_Minimal" + name: "ApolloAutomation.PLT-1B" version: "${version}" - min_version: 2025.6.0 + min_version: 2025.11.0 on_boot: - priority: 999.0 then: @@ -49,12 +52,24 @@ improv_serial: ota: - platform: esphome id: ota_esphome + - platform: http_request + id: ota_managed + +safe_mode: + +update: + - platform: http_request + id: update_http_request + name: Firmware Update + source: https://apolloautomation.github.io/PLT-1/firmware-b/manifest.json web_server: port: 80 version: 3 wifi: + on_connect: + - component.update: update_http_request ap: ssid: "Apollo PLT1B Hotspot" diff --git a/Integrations/ESPHome/PLT-1_BLE.yaml b/Integrations/ESPHome/PLT-1_BLE.yaml index 62c32fb..77df559 100644 --- a/Integrations/ESPHome/PLT-1_BLE.yaml +++ b/Integrations/ESPHome/PLT-1_BLE.yaml @@ -7,25 +7,27 @@ esphome: name: "ApolloAutomation.PLT-1BLE" version: "${version}" - min_version: 2025.6.0 + min_version: 2025.11.0 + # List form so package merging concatenates with Core.yaml's on_boot + # entries (mapping form would replace Core's whole list instead). on_boot: - priority: 500 - then: - - text_sensor.template.publish: - id: apollo_firmware_version - state: "${version}" - - lambda: |- - id(deep_sleep_1).set_sleep_duration(id(deep_sleep_sleep_duration).state * 60 * 1000); - id(deep_sleep_1).set_run_duration(90 * 1000); - - if: - condition: - or: - - binary_sensor.is_on: ota_mode - - switch.is_on: prevent_sleep - then: - - lambda: |- - ESP_LOGW("Apollo", "Preventing Deep Sleep Due To OTA On Boot"); - id(deep_sleep_1).prevent_deep_sleep(); + - priority: 500 + then: + - text_sensor.template.publish: + id: apollo_firmware_version + state: "${version}" + - lambda: |- + id(deep_sleep_1).set_sleep_duration(id(deep_sleep_sleep_duration).state * 60 * 1000); + id(deep_sleep_1).set_run_duration(90 * 1000); + - if: + condition: + or: + - binary_sensor.is_on: ota_mode + - switch.is_on: prevent_sleep + then: + - lambda: |- + ESP_LOGW("Apollo", "Preventing Deep Sleep Due To OTA On Boot"); + id(deep_sleep_1).prevent_deep_sleep(); on_shutdown: - light.turn_off: rgb_light @@ -38,18 +40,21 @@ dashboard_import: ota: - platform: esphome id: ota_esphome + - platform: http_request + id: ota_managed -safe_mode: - -bluetooth_proxy: - active: true +update: + - platform: http_request + id: update_http_request + name: Firmware Update + source: ${stable_manifest_base}/firmware${variant_slug}/manifest.json -esp32_ble_tracker: - scan_parameters: - active: false +safe_mode: wifi: + on_connect: + - component.update: update_http_request ap: ssid: "Apollo PLT1 Hotspot" diff --git a/Integrations/ESPHome/PLT-1_Minimal.yaml b/Integrations/ESPHome/PLT-1_Minimal.yaml index 9c7d70a..02c308b 100644 --- a/Integrations/ESPHome/PLT-1_Minimal.yaml +++ b/Integrations/ESPHome/PLT-1_Minimal.yaml @@ -1,13 +1,13 @@ esphome: - name: "apollo-plt-1-minimal" - friendly_name: Apollo PLT-1 Minimal - comment: Apollo PLT-1 Minimal + name: "apollo-plt-1" + friendly_name: Apollo PLT-1 + comment: Apollo PLT-1 name_add_mac_suffix: true project: - name: "ApolloAutomation.PLT-1_Minimal" + name: "ApolloAutomation.PLT-1" version: "${version}" - min_version: 2025.6.0 + min_version: 2025.11.0 on_boot: - priority: 800.0 then: @@ -48,12 +48,24 @@ improv_serial: ota: - platform: esphome id: ota_esphome + - platform: http_request + id: ota_managed + +safe_mode: + +update: + - platform: http_request + id: update_http_request + name: Firmware Update + source: https://apolloautomation.github.io/PLT-1/firmware/manifest.json web_server: port: 80 version: 3 wifi: + on_connect: + - component.update: update_http_request ap: ssid: "Apollo PLT1 Hotspot" diff --git a/Integrations/ESPHome/beta-channel/PLT-1B_Minimal.yaml b/Integrations/ESPHome/beta-channel/PLT-1B_Minimal.yaml new file mode 100644 index 0000000..be924c8 --- /dev/null +++ b/Integrations/ESPHome/beta-channel/PLT-1B_Minimal.yaml @@ -0,0 +1,9 @@ +# Beta-channel build of PLT-1B_Minimal.yaml: the identical image except the Firmware +# Channel select defaults to "Beta" on first boot, so firmware obtained from +# the beta channel keeps tracking it. Built by build-beta.yml only; the +# stable (GitHub Pages) builds use PLT-1B_Minimal.yaml directly. +substitutions: + firmware_channel_default: "Beta" + +packages: + base: !include ../PLT-1B_Minimal.yaml diff --git a/Integrations/ESPHome/beta-channel/PLT-1_Minimal.yaml b/Integrations/ESPHome/beta-channel/PLT-1_Minimal.yaml new file mode 100644 index 0000000..1387589 --- /dev/null +++ b/Integrations/ESPHome/beta-channel/PLT-1_Minimal.yaml @@ -0,0 +1,9 @@ +# Beta-channel build of PLT-1_Minimal.yaml: the identical image except the Firmware +# Channel select defaults to "Beta" on first boot, so firmware obtained from +# the beta channel keeps tracking it. Built by build-beta.yml only; the +# stable (GitHub Pages) builds use PLT-1_Minimal.yaml directly. +substitutions: + firmware_channel_default: "Beta" + +packages: + base: !include ../PLT-1_Minimal.yaml diff --git a/static/index.html b/static/index.html index 81d3f8f..153f47f 100644 --- a/static/index.html +++ b/static/index.html @@ -84,11 +84,11 @@

Apollo PLT-1 Installer

Non Battery Firmware

- +

Battery Firmware

- +
From 230a74bcababdd030180358a20683582292f82a6 Mon Sep 17 00:00:00 2001 From: Brandon Harvey <8107750+bharvey88@users.noreply.github.com> Date: Tue, 14 Jul 2026 14:48:43 -0500 Subject: [PATCH 2/3] Enable API encryption MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add an empty encryption: key to the api: block so ESPHome/HA provisions a per-device API key on adoption, matching MSR-1. Bump firmware version to 26.7.14.1. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- Integrations/ESPHome/Core.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Integrations/ESPHome/Core.yaml b/Integrations/ESPHome/Core.yaml index 045da8c..90afe0f 100644 --- a/Integrations/ESPHome/Core.yaml +++ b/Integrations/ESPHome/Core.yaml @@ -1,5 +1,5 @@ substitutions: - version: "26.7.12.1" + version: "26.7.14.1" # Firmware variant identity: overridden to "-b" by the PLT-1B images so # each hardware variant tracks its own manifests. variant_slug: "" @@ -54,6 +54,7 @@ esp32_ble_tracker: bluetooth_proxy: api: + encryption: actions: - action: play_buzzer variables: From c023fa1e92113678f1b33a978e0b4fe98857b837 Mon Sep 17 00:00:00 2001 From: Brandon Harvey <8107750+bharvey88@users.noreply.github.com> Date: Fri, 24 Jul 2026 10:59:36 -0500 Subject: [PATCH 3/3] ci: repoint beta-fw tag after publish and pin build.yml Workflows SHA MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The publish-beta job created the rolling beta-fw release with gh release create, which tags the default-branch HEAD, and asset uploads never move the tag. So the release's source commit drifted away from the firmware actually published. Add a final step that force-updates the beta-fw tag to the built commit after assets land. Also pin the reusable build.yml workflow from @main to the pinned commit SHA so a moving branch can't change build behavior unnoticed. Ports the fixes from AIR-1 #117 and #118 to PLT-1. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- .github/workflows/build-beta.yml | 11 +++++++++++ .github/workflows/build.yml | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-beta.yml b/.github/workflows/build-beta.yml index e910585..f551653 100644 --- a/.github/workflows/build-beta.yml +++ b/.github/workflows/build-beta.yml @@ -101,3 +101,14 @@ jobs: gh release upload beta-fw {} -R "${{ github.repository }}" --clobber \; done echo "Beta assets published." + + - name: Point beta-fw tag at the built commit + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + # gh release create tags default-branch HEAD, and uploads never move + # the tag, so without this the release's source commit drifts away + # from the assets actually published. + gh api -X PATCH "repos/${{ github.repository }}/git/refs/tags/beta-fw" \ + -f sha="${{ github.sha }}" -F force=true + echo "beta-fw -> ${{ github.sha }}" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8c8bf5c..949e6e6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,7 @@ on: jobs: build-and-publish: - uses: ApolloAutomation/Workflows/.github/workflows/build.yml@main + uses: ApolloAutomation/Workflows/.github/workflows/build.yml@430d90dc695c6f7d1075c4e4a0df4b13a6496252 # main 2026-07-23 permissions: contents: write pages: write