Internetzugriff: fehlenden Einrichtungs-Runbook nachgereicht, Pfad-Freigabeliste korrigiert
REVERSE_PROXY.md verwies auf INTERNET_ZUGRIFF_EINRICHTEN.md, das nie geschrieben wurde - jetzt vorhanden (Cloudflare-Konto, Nameserver-Umstellung, Cloudflared/NPM-Add-ons, Pfad-Freigabeliste eintragen, Prüfung). Dabei einen echten Fehler in der Freigabeliste gefunden: sie ging noch von einem companion-app-Web-Build unter /local/dm360/ aus (Planungsstand 2026-08-11) - das wurde nie gebaut, die App ist nativ/sideload-only. Ersetzt durch den tatsächlichen Fernbedarf: das OTA-Bündel unter /audi_dashboard_static/app/* (@capgo/capacitor-updater). Damit genügt auch ein einziger Hostname statt der ursprünglich erwogenen App-/API-Trennung. COMPANION_APP_ARCHITECTURE.md §5 und AGENTS.md entsprechend nachgezogen. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -420,11 +420,21 @@ wraps the web app for iPhone; a PWA home-screen install is the accepted intermed
|
||||
### B) Infrastructure / commissioning (partly waits for FMM003 hardware)
|
||||
|
||||
- [ ] Switch `datametric360.app` nameservers at all-inkl to Cloudflare ("full setup") —
|
||||
prerequisite for the tunnel; domain carries nothing else, so this is consequence-free
|
||||
- [ ] Decide hostname split (app on apex + API on `api.` subdomain, or vice versa)
|
||||
- [ ] Choose reverse proxy (Nginx Proxy Manager vs. Traefik) — **can be done before hardware**
|
||||
against the existing HA API
|
||||
- [x] Define the reverse-proxy path allowlist (depends on final entity/service names)
|
||||
prerequisite for the tunnel; domain carries nothing else, so this is consequence-free. Step-by-
|
||||
step runbook for this and everything below it now exists:
|
||||
[`homeassistant/INTERNET_ZUGRIFF_EINRICHTEN.md`](homeassistant/INTERNET_ZUGRIFF_EINRICHTEN.md)
|
||||
(written 2026-08-28) — account creation, DNS/nameserver changes, and clicking through the HA
|
||||
add-on UI all remain the owner's own action; nothing here can be done unattended.
|
||||
- [x] Decide hostname split — **resolved 2026-08-28: no split, one hostname is enough.** The original
|
||||
app-domain-vs-API-subdomain question assumed a served web build; distribution stayed native/
|
||||
sideload only (never built as a web app), so `https://datametric360.app` alone covers both API
|
||||
calls and the app's own OTA bundle. See `COMPANION_APP_ARCHITECTURE.md` §5 item 4.
|
||||
- [x] Choose reverse proxy — **decided 2026-08-28: Nginx Proxy Manager**, not Traefik. See
|
||||
`COMPANION_APP_ARCHITECTURE.md` §5 item 3.
|
||||
- [x] Define the reverse-proxy path allowlist (depends on final entity/service names) — kept current
|
||||
2026-08-28: corrected the stale `/local/dm360/*` assumption (never built) to the app's real
|
||||
remote need, its OTA bundle at `/audi_dashboard_static/app/*` (`@capgo/capacitor-updater`). See
|
||||
`homeassistant/REVERSE_PROXY.md`.
|
||||
- [ ] Install/wire the FMM003; record firmware version (Codec JSON is firmware-dependent)
|
||||
- [x] Generate TLS certificates for Mosquitto + device (small private CA) — done 2026-08-11, 10-year
|
||||
validity; Mosquitto configured (`certfile`/`keyfile`/`cafile`/`require_certificate: true`).
|
||||
@@ -4515,6 +4525,71 @@ cluster (`total_vehicle_mileage_read_from_can`, `front_left_door`, ...) both sti
|
||||
majority-vote fix didn't regress the two-simultaneous-sources case `.7` was built to solve. `node --check`
|
||||
clean, manifest bumped to `2026.8.28.8`, `audi_ha_test` restarted and confirmed clean via log.
|
||||
|
||||
## AH. Setup-Menü: fester Beispielname zusätzlich zum tatsächlich zugeordneten Sensor (2026.8.28.17)
|
||||
|
||||
Owner: the sensor-identity hint next to each Setup field headline (`entitaetIdKurz()`, section AG) changes
|
||||
with whatever is currently mapped - useful for confirming a mapping, but it gives no orientation on what to
|
||||
search for *before* anything is mapped, or after resetting/remapping. Wanted a second, permanently fixed
|
||||
example name shown alongside it - `(z. B. can_fuel_volume)` / `(z. B. engine_ignition_or_acc_status)` -
|
||||
styled prominently ("Sensorname-Font", white/big), with the real currently-mapped sensor kept smaller/grey
|
||||
exactly as before.
|
||||
|
||||
Added a static `"beispiel"` string to every entry in the `FELDER` catalog (`einstellungen.py`) - one
|
||||
plausible real-world sensor-ID suffix per role (`can_fuel_volume`, `engine_ignition_or_acc_status`,
|
||||
`external_power_voltage`, `oil_change_due`/`oil_change_distance`, `front_left_door`, ...), several taken
|
||||
directly from this project's own real Setup data (sections AC/AG). `FELDER` is serialized to the frontend
|
||||
verbatim (`zuordnung.py`'s `katalog`), so no publish/service change was needed - the new key just appears on
|
||||
`feld.beispiel` in JS.
|
||||
|
||||
`setupFeldzeile()` (`audi-dashboard-app.js`) now renders two stacked lines on the right side of each field's
|
||||
header instead of one: `feld.beispiel` (fixed, never changes with the mapping) as
|
||||
`.setup-feld-beispiel` - monospace like the sensor-ID font used elsewhere in this file
|
||||
(`.entitaet-eintrag-id`), but larger (14px) and full-brightness (`var(--fg)`) - and the existing
|
||||
`entitaetIdKurz()`-derived real mapping as `.setup-feld-hinweis`, unchanged styling (12.5px, `var(--fg2)`).
|
||||
Both sit inside a new `.setup-feld-hinweise` flex-column wrapper (right-aligned, 2px gap); `.setup-feld-kopf`
|
||||
switched from `align-items:baseline` to `flex-start` to keep the label aligned with the top of the now
|
||||
two-line block instead of its vertical center. No change needed to `entitaetIdKurz()`/`praefixPaar()`
|
||||
themselves (section AG's majority-vote logic) - only what's displayed alongside their result changed, not
|
||||
how the real mapping is computed.
|
||||
|
||||
Verified live in `audi_ha_test` (not just read from source): read the first six rendered Setup rows via the
|
||||
shadow DOM after a real restart - every row correctly shows both the fixed example and the real, currently
|
||||
mapped sensor's short ID side by side and independently (e.g. Tankfüllstand: beispiel `fuel_level`, real
|
||||
`fuel_level_in_tank_read_from_can` - genuinely different strings, confirming the example does not track the
|
||||
mapping). `node --check` clean, `py_compile` clean on `einstellungen.py`, manifest bumped to `2026.8.28.17`,
|
||||
`audi_ha_test` restarted and confirmed clean via log (single `audi_dashboard` loader warning, no traceback).
|
||||
No companion-app change needed - the Setup menu is an HA-panel-only concept (parity rule's own carve-out,
|
||||
already established for this exact screen in sections R/AF).
|
||||
|
||||
**Correction (2026.8.28.18), owner rejected the two-line design outright.** The invented static per-field
|
||||
`beispiel` guesses were simply wrong for some fields ("Reichweite"/"Sofort-Aktualisierung" specifically
|
||||
called out) - a hand-picked guess can't be trusted the way the actually-mapped sensor's own derived name can.
|
||||
Owner's correction: **only one line**, showing the real, currently-mapped sensor (the existing
|
||||
`entitaetIdKurz()` result, dynamic - not a static guess) formatted as `(z. B. REAL_SENSOR_NAME)`; the
|
||||
`(z. B. `/`)` wrapper text in the same size/color as the field label on the left (`.setup-feld-label`,
|
||||
14.5px/`var(--fg)`), the sensor name itself inside in the same size/color as the existing unit bracket
|
||||
(`.setup-feld-einheit`, `[on/off]`/`[km]` - 12.5px/`var(--fg3)`); remove entirely for list fields (Türen/
|
||||
Fenster - already excluded from `erwartet` by `feld.liste`, just needed the static example line gated the
|
||||
same way, which it wasn't).
|
||||
|
||||
Removed the `"beispiel"` catalog data from `einstellungen.py`'s `FELDER` entirely (dead/wrong data, not
|
||||
worth keeping around) and the `.setup-feld-hinweise`/`.setup-feld-beispiel` classes. `setupFeldzeile()`
|
||||
now renders a single `<span class="setup-feld-hinweis">(z. B. <span class="setup-feld-einheit">...</span>)
|
||||
</span>` - reusing the existing `.setup-feld-einheit` class for the inner sensor-name span instead of a new
|
||||
rule, since the requested style is byte-identical to what that class already provides. `.setup-feld-hinweis`
|
||||
itself changed from the old small/grey 12.5px to the label's own 14.5px/`var(--fg)`; `.setup-feld-kopf`
|
||||
reverted to `align-items:baseline` (single line again, no more two-line stacking).
|
||||
|
||||
Verified live in `audi_ha_test` at `2026.8.28.18` (a fresh page load was required to see it - the panel's
|
||||
script URL is version-query-busted and a stale tab keeps the old bundle even after the backend restarts,
|
||||
confirmed via `performance.getEntriesByType('resource')` showing `?v=2026.8.28.18` only after navigating
|
||||
again, same lesson as sections N/W): read every rendered Setup row's markup and computed styles - "Reichweite"
|
||||
now shows the real `vehicle_range_read_from_can`, "Sofort-Aktualisierung" shows the real `refresh_now`
|
||||
(both previously wrong static guesses), "Türen"/"Fenster" show no hint at all, and the wrapper/inner-name
|
||||
computed styles matched the label (14.5px) and unit-bracket (12.5px, grey) styles exactly, byte for byte.
|
||||
`node --check` clean, `py_compile` clean on `einstellungen.py`, `audi_ha_test` restarted and confirmed clean
|
||||
via log (single `audi_dashboard` loader warning, no traceback).
|
||||
|
||||
---
|
||||
|
||||
## Working conventions (observed — keep them)
|
||||
|
||||
Reference in New Issue
Block a user