docs: record once-and-for-all decisions (single host, cached IP, robust WoL)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,36 @@
|
|||||||
|
# LG TV Bridge — Decisions
|
||||||
|
|
||||||
|
Format: `YYYY-MM-DD: <decision> — <why>`
|
||||||
|
|
||||||
|
- **2026-06-01: Single bridge, single host — runs on steel141, pve173 retired.**
|
||||||
|
The bridge had been running on pve173 (always-on node) since 2026-03-23,
|
||||||
|
SSHing to steel141 for every TV op. Consolidated everything onto steel141.
|
||||||
|
*Why:* the WebOS pairing key (`/home/seth/.aiopylgtv.sqlite`) lives only on
|
||||||
|
steel141, so `power_off` always routes through it regardless of bridge host —
|
||||||
|
pve173 added an SSH hop and a second host for no real availability gain (the
|
||||||
|
TV is uncontrollable whenever steel141 is down anyway). One host, no SSH hop.
|
||||||
|
|
||||||
|
- **2026-06-01: Cached-IP discovery, sweep only on miss.** Persist last-known TV
|
||||||
|
IP in `~/.cache/lgtv/last_ip`; probe it directly (TCP :3000/:3001). Full /24
|
||||||
|
ping-sweep runs only on a cache miss, then re-caches. *Why:* the old code
|
||||||
|
ping-swept all 254 hosts over SSH on every 30s HA state poll — slow, network
|
||||||
|
spam, and racy (stale ARP) → the chronic "flaky state in HA" symptom.
|
||||||
|
|
||||||
|
- **2026-06-01: Robust WoL — unicast + broadcast, ports 9/7, 3 bursts.** *Why:*
|
||||||
|
old code sent broadcast-only on ports 9/1235 once. Unreliable wakes. NOTE: the
|
||||||
|
remaining wake failures are TV-side (Quick Start+ / Mobile TV On must be ON;
|
||||||
|
wired Ethernet far more reliable than Wi-Fi for LG WoL) — not fixable in code.
|
||||||
|
|
||||||
|
- **2026-06-01: Deps via `pip --user --break-system-packages` for `seth`.** paho
|
||||||
|
+ bscpylgtv live in `/home/seth/.local` (PEP 668 box). Matches how bscpylgtv
|
||||||
|
was already installed; the systemd unit runs `User=seth`.
|
||||||
|
|
||||||
|
## Deferred / Rejected
|
||||||
|
- **DHCP reservation for the TV (static IP):** not done — Pi-hole doesn't run
|
||||||
|
DHCP (router does), so it's Seth's action on the router. The cached-IP probe
|
||||||
|
makes it unnecessary for correctness; a reservation would just let us drop the
|
||||||
|
sweep-fallback entirely. Add if convenient.
|
||||||
|
- **Unique per-instance MQTT client_id:** rejected — keeping a fixed
|
||||||
|
`lgtv-bridge` id means a duplicate instance is *loud* (reconnect war in broker
|
||||||
|
logs) rather than silent. Single-instance discipline is the real guard. (A
|
||||||
|
duplicate on 2026-06-01 during this very migration is what surfaced all this.)
|
||||||
Reference in New Issue
Block a user