From 66b0f516c3abdf87aef84769394dc99df0fa5c81 Mon Sep 17 00:00:00 2001 From: Mortdecai Date: Mon, 1 Jun 2026 20:16:46 -0400 Subject: [PATCH] docs: record OFF-path gotchas (CWD-relative key path, freshly-woken retry) Co-Authored-By: Claude Opus 4.8 (1M context) --- DECISIONS.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/DECISIONS.md b/DECISIONS.md index 2db91f8..dc25c6e 100644 --- a/DECISIONS.md +++ b/DECISIONS.md @@ -25,6 +25,18 @@ Format: `YYYY-MM-DD: ` + bscpylgtv live in `/home/seth/.local` (PEP 668 box). Matches how bscpylgtv was already installed; the systemd unit runs `User=seth`. +- **2026-06-01: power_off must pass an absolute `key_file_path`.** bscpylgtv's + `StorageSqliteDict` defaults the key DB to `os.getcwd()/.aiopylgtv.sqlite` + (its `$USER_HOME` fallback is not `$HOME`). The old pve173 setup worked only + because it SSHed in as seth, landing CWD in `/home/seth`. Under systemd + (cwd=/) it threw `sqlite3.OperationalError: unable to open database file`. + Fix: `WebOsClient.create(ip, key_file_path="~/.aiopylgtv.sqlite")`. + +- **2026-06-01: power_off retries (2×, 10s apart).** A TV woken seconds earlier + answers TCP :3000 but refuses a WebSocket control session for ~20-30s, so an + immediate OFF-after-ON can fail. Retry covers it; normal case (TV already up) + succeeds first try in ~3s. Bounded under the bridge's 60s subprocess timeout. + ## 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