From f13dfd350be7150265b4aa241f4d63d4f29955de Mon Sep 17 00:00:00 2001 From: Jackson Andres Date: Wed, 14 Oct 2026 19:45:00 -0400 Subject: [PATCH] Browser installer on GitHub Pages installer/apollo-mtr-1.factory.yaml is the example config without Wi-Fi credentials, with Improv serial and the access point. A version tag on the GitHub mirror builds it with esphome/build-action and publishes the page, firmware and manifest to GitHub Pages. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/installer.yml | 80 ++++++++++++++++ README.md | 10 +- docs/developing.md | 12 ++- installer/apollo-mtr-1.factory.yaml | 56 +++++++++++ installer/index.html | 144 ++++++++++++++++++++++++++++ 5 files changed, 299 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/installer.yml create mode 100644 installer/apollo-mtr-1.factory.yaml create mode 100644 installer/index.html diff --git a/.github/workflows/installer.yml b/.github/workflows/installer.yml new file mode 100644 index 0000000..3ad71e3 --- /dev/null +++ b/.github/workflows/installer.yml @@ -0,0 +1,80 @@ +# Builds installer/apollo-mtr-1.factory.yaml and publishes the browser +# installer (installer/index.html, the firmware and its ESP Web Tools +# manifest) to GitHub Pages. Runs on a version tag (v2026.10.0) or by hand. +# The site holds one firmware: the latest build. + +name: Installer + +on: + push: + tags: + - "v*" + workflow_dispatch: + +permissions: {} + +concurrency: + group: installer + cancel-in-progress: false + +jobs: + build: + name: Build + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - name: Version + id: version + run: | + if [[ "$GITHUB_REF_TYPE" == "tag" ]]; then v="${GITHUB_REF_NAME#v}"; else v="dev-${GITHUB_SHA::7}"; fi + echo "version=$v" >> "$GITHUB_OUTPUT" + + - name: Build firmware + id: build + uses: esphome/build-action@ae5408cdbc4f70692bf8e345c4982bca05a93667 # v8.1.0 + with: + yaml-file: installer/apollo-mtr-1.factory.yaml + version: 2026.8.2 + complete-manifest: true + substitutions: | + follow_me_version=${{ steps.version.outputs.version }} + + - name: Assemble site + env: + BUILD_DIR: ${{ steps.build.outputs.name }} + VERSION: ${{ steps.version.outputs.version }} + run: | + mkdir -p site/fonts + cp -r "$BUILD_DIR" site/firmware + rm -f site/firmware/*.elf + cp wizard/fonts/*.woff2 wizard/fonts/OFL.txt site/fonts/ + sed "s/__VERSION__/$VERSION/g" installer/index.html > site/index.html + ls -R site + + - name: Upload site + uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 + with: + path: site + retention-days: 1 + + publish: + name: Publish + needs: build + runs-on: ubuntu-latest + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Configure Pages + uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0 + + - name: Deploy + id: deployment + uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1 diff --git a/README.md b/README.md index 4088218..4ffc86e 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,15 @@ All values for your stairs come from the setup wizard: the shape, the number of - The sensor and the WLED controller on the same network. - Straight, L-shaped or U-shaped stairs, with at most one landing. -## Installing on an Apollo MTR-1 +## Installing from the browser + +Open the [follow-me installer](https://randompedestrian07.github.io/follow-me-stairs/) in Chrome or Edge on a computer, and connect the MTR-1 with a USB-C data cable. The installer flashes the firmware and then asks for your Wi-Fi. Installing erases the sensor. A sensor that already has a follow-me setup must go through the setup wizard again. + +The installer firmware has no Wi-Fi credentials. If the Wi-Fi step does not appear, connect a phone to the `Apollo MTR1 Hotspot` network and enter your Wi-Fi there. + +To change the firmware yourself, install with ESPHome instead. + +## Installing on an Apollo MTR-1 with ESPHome 1. Copy `example/apollo-mtr-1.yaml` into your ESPHome configuration folder. 2. Put this repository in the same folder, as a folder named `follow-me-stairs`. diff --git a/docs/developing.md b/docs/developing.md index a0631f0..6ea7ede 100644 --- a/docs/developing.md +++ b/docs/developing.md @@ -89,6 +89,14 @@ These addresses have no authentication. Any device on the network can use them. - The LD2450 reports target x mirrored. The stored setup keeps the radar's own frame. Code that draws radar readings or decides left and right must negate x. - The LD2450 sees about 60° to each side and about 6 m out. The wizard warns when part of the stairs is outside that area. -## Not built +## Browser installer -- Installing a prebuilt firmware from a web browser. +| Path | Contents | +|---|---| +| `installer/apollo-mtr-1.factory.yaml` | The installer firmware: `example/apollo-mtr-1.yaml` without Wi-Fi credentials, with Improv over USB serial and the access point | +| `installer/index.html` | The installer page. `__VERSION__` is replaced with the release version. | +| `.github/workflows/installer.yml` | Builds the firmware with ESPHome and publishes the page, the firmware and its manifest to GitHub Pages | + +The workflow runs on the GitHub mirror when a tag that starts with `v` arrives, for example `v2026.10.0`. The tag without the `v` becomes the firmware's project version. The site holds one firmware: the latest build. + +The installer firmware leaves out Improv over Bluetooth. With it, flash use goes from 69% to 91%. diff --git a/installer/apollo-mtr-1.factory.yaml b/installer/apollo-mtr-1.factory.yaml new file mode 100644 index 0000000..0693fb4 --- /dev/null +++ b/installer/apollo-mtr-1.factory.yaml @@ -0,0 +1,56 @@ +# Apollo MTR-1 with the follow-me stair light: the firmware the browser +# installer flashes (installer/index.html, published to GitHub Pages by +# .github/workflows/installer.yml on every version tag). +# +# Same as example/apollo-mtr-1.yaml without Wi-Fi credentials. After flashing, +# the installer page asks for Wi-Fi over USB (Improv serial). Without it, the +# sensor opens the "Apollo MTR1 Hotspot" access point with a captive portal. +# Improv over Bluetooth is left out: it raises flash use from 69% to 91%. + +substitutions: + name: apollo-mtr-1 + version: "26.3.2.1" # Apollo's MTR-1 release, shown as its firmware version + follow_me_version: "dev" # set by the installer workflow from the tag + follow_me_dir: ../firmware + +esphome: + name: "${name}" + friendly_name: Apollo MTR-1 + comment: Apollo MTR-1 with follow-me-stairs + name_add_mac_suffix: true + project: + name: "follow-me-stairs.apollo-mtr-1" + version: "${follow_me_version}" + min_version: 2026.8.2 + on_boot: + - priority: 500 + then: + - text_sensor.template.publish: + id: apollo_firmware_version + state: "${version}" + - priority: -10 + then: + - if: + condition: + - lambda: "return id(runTest);" + then: + - lambda: "id(testScript).execute();" + +logger: + +ota: + - platform: esphome + id: ota_default + +wifi: + power_save_mode: none + ap: + ssid: "Apollo MTR1 Hotspot" + +improv_serial: + +captive_portal: + +packages: + core: github://ApolloAutomation/MTR-1/Integrations/ESPHome/Core.yaml@26.3.2.1 + follow_me: !include ../firmware/follow-me.yaml diff --git a/installer/index.html b/installer/index.html new file mode 100644 index 0000000..722bf83 --- /dev/null +++ b/installer/index.html @@ -0,0 +1,144 @@ + + + + + +Follow-Me Installer + + + + + +
+
+ FOLLOW-ME + VERSION __VERSION__ +
+ +
+
STAIR LIGHT · APOLLO MTR-1 · WLED
+

A stair light that follows you.

+

A radar sensor at the stairs tracks where each person is. An LED strip along the stairs lights the part next to that person, and the lit part moves with them, up or down.

+ +
+ +
+

Install on an Apollo MTR-1

+

Use Chrome or Edge on a computer. Phones and other browsers cannot connect to the sensor over USB.

+
    +
  1. Connect the MTR-1 to this computer with a USB-C data cable. A charge-only cable does not work.
  2. +
  3. Click Install Follow-Me and pick the sensor from the list.
  4. +
  5. When the install is complete, enter your Wi-Fi name and password.
  6. +
  7. Click Visit device to open the sensor's web page.
  8. +
+ + +

This browser cannot install firmware. Open this page in Chrome or Edge on a computer.

+

The installer works only over HTTPS. Open this page from its https:// address.

+
+
Installing erases the sensor. A sensor that already has a follow-me setup must go through the setup wizard again. To keep the setup, update the sensor from ESPHome instead.
+
+ +
+

NEXT: SET UP YOUR STAIRS

+

On the sensor's web page, click Set up Follow-Me. The setup wizard asks for the shape of your stairs, has you walk them once, and lines up the LED strip. It takes about ten minutes.

+

If the Wi-Fi step did not appear, connect your phone to the Apollo MTR1 Hotspot network and enter your Wi-Fi there.

+

WLED needs some settings changed first. The wizard checks them and can change them for you.

+
+ + + + +
+ +