Skip to content

feat: use HA ingress and the HA login for FTW - #25

Draft
frahlg wants to merge 4 commits into
mainfrom
codex/ha-ingress
Draft

frahlg wants to merge 4 commits into
mainfrom
codex/ha-ingress

Conversation

@frahlg

@frahlg frahlg commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Paired Core change srcfl/ftw#1786 is merged as 767b144a931da6a731c619a79483bd0013146e20. Core post-merge CI passes, including the Go race detector (test run 39629397313). The owner requested inclusion in the beta already being prepared; this PR does not start a separate Core release.

Open FTW inside Home Assistant using the existing HA administrator login. Enable ingress on port 18099, keep host networking for equipment, remove the direct web port/link, and force ingress mode in the wrapper and image. Supervisor's default administrator-only panel remains in force. Its built-in Show in sidebar toggle opens FTW in HA. The FTW panel title/icon and clearer sidebar instructions take the sidebar details from #26; this uses the ingress listener already provided by Core. The new Core mode handles setup, saved passwords, iframe security and URL prefixes.

Health checks use only the local health route. The native smoke test uses a Supervisor-addressed peer, rejects forged ingress headers from another peer, and keeps the restart, persistence, solver and cold restore checks. App-only revisions use 0.X.Y-betaN-R, verified with Supervisor's AwesomeVersion 25.8.0; syncing the same Core tag preserves that revision and a newer beta replaces it normally.

Draft: requires a published native beta containing Core #1786. The pin is still the existing public package, which lacks ingress and continues listening on 8080. Both native CI tests therefore fail the 18099 health check. Do not merge or install this draft. After the dependency is published, move the pin to its verified receipt and update the app revision/changelog to that version.

Validation:

  • 183 offline tests, repository checks, shell syntax and HA app lint pass.
  • Both native builds succeed; their runtime checks reject the incompatible old Core as expected.
  • The full native smoke script passes locally on ARM64 with clean Core 0ace65aa overlaid on the package. This includes ingress, forged-header refusal, worker handshake, restart, cold backup/restore and retained config/custom driver. This proves the paired source integration, not the pending public release package.
  • In a separate ARM64 HA OS/Supervisor test app, browser setup, protected settings save and Supervisor restart work through ingress without another password. Direct access returns 403 and ingress without an HA session returns 401. The Info page's Show in sidebar switch creates and removes the shortcut, survives a page reload, and clicking the shortcut opens FTW inside HA without another login.

Final package CI and real-device update await the new native beta. No real equipment, credentials, Cloud terms or user's HA configuration were changed. MQTT and native HA entities are not changed by this PR.

frahlg added a commit that referenced this pull request Nov 28, 2026
Builds on #25's ingress commits (cherry-picked above) and on #26,
which main merged since.

- Drop #26's launcher page and its busybox httpd. Core now answers
  ingress itself on 18099, so the sidebar panel opens FTW directly.
- Drop the `.ha.N` app revision from #25. Fredrik chose to ship
  ingress with the next beta, so the app keeps the Core version.
  Notes under "## Unreleased" in CHANGELOG.md now ship with the
  next pin instead of sitting below it.
- Drop the empty translations; the app has no ports or options.
- Tell people to pair the FTW app with the link or QR: the short
  code needs FTW's own web port, which the app closes.

Refs #25

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Fredrik Ahlgren <[email protected]>
frahlg added a commit that referenced this pull request Nov 28, 2026
- smoke_native.sh captured nothing before `grep -q`. Under pipefail,
  grep stops reading at its first match, the writer can die of
  SIGPIPE, and the line fails at random. That failed the aarch64 smoke
  in run 46113515200 ("MQTT broker lookup did not report"). The log,
  the redirect headers and the setup page are now read into a variable
  first.
- Drop `homeassistant: "2026.10.2"` from #25. Nothing here needs it:
  ingress and the X-Remote-User-Id header the app relies on come from
  Supervisor (since 2023), which updates itself, and the floor would
  only turn away beta users on an older Home Assistant.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Fredrik Ahlgren <[email protected]>
frahlg added a commit that referenced this pull request Nov 28, 2026
…er, name it FTW (beta) (#56)

* feat: open the FTW app through Home Assistant ingress

(cherry picked from commit af0b502)
Signed-off-by: Fredrik Ahlgren <[email protected]>

* fix: use Supervisors default admin-only ingress panel

(cherry picked from commit ff21dc2)
Signed-off-by: Fredrik Ahlgren <[email protected]>

* docs: show the FTW sidebar option in the ingress app

(cherry picked from commit d8d32d9)
Signed-off-by: Fredrik Ahlgren <[email protected]>

* feat(ftw-0x-beta): finish ingress on current main

Builds on #25's ingress commits (cherry-picked above) and on #26,
which main merged since.

- Drop #26's launcher page and its busybox httpd. Core now answers
  ingress itself on 18099, so the sidebar panel opens FTW directly.
- Drop the `.ha.N` app revision from #25. Fredrik chose to ship
  ingress with the next beta, so the app keeps the Core version.
  Notes under "## Unreleased" in CHANGELOG.md now ship with the
  next pin instead of sitting below it.
- Drop the empty translations; the app has no ports or options.
- Tell people to pair the FTW app with the link or QR: the short
  code needs FTW's own web port, which the app closes.

Refs #25

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Fredrik Ahlgren <[email protected]>

* feat(ftw-0x-beta): give Core Home Assistant's MQTT broker

The app now declares `services: - mqtt:want`. At start, run.sh asks
Supervisor for the broker (GET http://supervisor/services/mqtt) and
passes host, port, user and password to Core in FTW_HA_MQTT_*. Core
uses them while its own broker setting is empty (paired Core PR), so
FTW's entities appear in Home Assistant without typing anything.

No broker, a refusal, TLS only or a bad answer leaves the variables
unset and logs one line; Core always starts. Only Supervisor's answer
may set them: run.sh unsets any inherited values first.

The image gains jq to read the answer. The smoke test now runs Core
with a Supervisor that offers no broker and checks that Core starts
without one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Fredrik Ahlgren <[email protected]>

* feat(ftw-0x-beta): name the app FTW (beta)

Rename the store entry from "FTW (0.x beta)" to "FTW (beta)". The slug
stays ftw-0x-beta, so installs keep their data. The docs now say
"version 0.x" or "3.x" where the retired 3.x app, once also called
FTW (beta), could be confused with this one.

Start on boot is already Supervisor's default (`boot: auto`), and the
app linter refuses a key that repeats a default. It also refuses the
old `watchdog:` key as obsolete: Supervisor's Watchdog acts on the
Docker HEALTHCHECK, which already asks Core's /api/health. So the
manifest gains neither key; the docs drop the Start on boot step and
keep the one Watchdog switch Supervisor leaves off by default.

The README and the install steps get the My Home Assistant button that
opens the add-repository dialog with this repository filled in.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Fredrik Ahlgren <[email protected]>

* docs(ftw-0x-beta): name the paired Core PR

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Fredrik Ahlgren <[email protected]>

* fix(ftw-0x-beta): steady smoke test; no minimum Home Assistant version

- smoke_native.sh captured nothing before `grep -q`. Under pipefail,
  grep stops reading at its first match, the writer can die of
  SIGPIPE, and the line fails at random. That failed the aarch64 smoke
  in run 46113515200 ("MQTT broker lookup did not report"). The log,
  the redirect headers and the setup page are now read into a variable
  first.
- Drop `homeassistant: "2026.10.2"` from #25. Nothing here needs it:
  ingress and the X-Remote-User-Id header the app relies on come from
  Supervisor (since 2023), which updates itself, and the floor would
  only turn away beta users on an older Home Assistant.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Fredrik Ahlgren <[email protected]>

---------

Signed-off-by: Fredrik Ahlgren <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant