Files
POS-Automation/DECISIONS.md
T
2026-06-07 15:01:53 -04:00

57 lines
4.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# POS-Automation — Decisions
Format: `YYYY-MM-DD: <decision> — <why>`
- **2026-06-07: On-demand trigger via MQTT bridge (lgtv pattern), not cron.** Seth
wants a Google Home button, not a scheduled print. Bridge `pos-briefing-mqtt.service`
(systemd, `User=claude`) on steel141 subscribes to `posbriefing/button/press` on
broker CT 301 (192.168.0.154); HA exposes a `script` to Google as a Scene (button).
The earlier "schedule 4:58am/3pm" was never a real cron job — that commit only
edited SESSION.md.
- **2026-06-07: Printer discovered by MAC `50:57:9c:eb:0f:07`, not a fixed IP.** The
TM-m30's IP changes on every reboot (router DHCP, no reservation). Cache last IP
(`~/.cache/pos-briefing/last_ip`), verify by MAC + port, sweep the /24 on a miss.
A router DHCP reservation would make this belt-and-suspenders but isn't required.
- **2026-06-07: Summaries on `gemma4:26b`; story selection stays on a fast model.**
Seth asked to switch summaries to gemma4. gemma4:26b under `format:json` ignores
the bare-array instruction and emits a reasoning object (`{"thought": ...}`), which
broke Phase-1 selection. Selection now uses `ollama_select_model` (default
`qwen2.5:1.5b`); summaries use `ollama_model` = `gemma4:26b`. Also better latency
for an interactive button.
- **2026-06-07: yfinance installed on steel141** via `pip --user --break-system-packages`
(PEP 668). It was missing after the CT 166 → steel141 migration — the original
"not firing" had two causes: no cron ever installed + this missing dependency.
- **2026-06-07: HA side deployed on VM HA `192.168.0.146`** (`/config/scripts.yaml`
+ `script.print_daily_briefing` in `configuration.yaml` `google_assistant.entity_config`;
backups in `/config/.backup/`). MQTT-discovery button entity id is
`button.pos_briefing_print_daily_briefing` (HA prefixes the device name). Access:
`ssh seth@192.168.0.146` (key auth), `bash -lc "ha core check|restart"`, services via
`$SUPERVISOR_TOKEN``http://supervisor/core/api/`. See `docs/ha-setup.md`.
- **2026-06-07: Exposed to Google as a SWITCH tile, not a Scene.** HA scripts/scenes
get Google's Scene trait, which Google Home does NOT render as a tappable tile
(voice/Routine only) — the button was invisible. A template switch
(`switch.print_daily_briefing`) tiles like the TV. **Confirmed working end-to-end
2026-06-07: a Google Home tap printed a receipt.** State is forced off and both
on/off fire the print (debounce in bridge prevents double-print) because HomeGraph
state push is down — keep this until reportState works, then simplify to on-only.
- **2026-06-07: HomeGraph SA key regenerated.** The old `/config/SERVICE_ACCOUNT.json`
key was invalid (`invalid_grant` — rotated in the lgtv 06-06 cleanup, never refreshed),
breaking requestSync/reportState. Seth issued a new JSON key for `claude@seth-freiberg.iam`
(id `8e3e812b6913…`); deployed to HA (0600), restarted. Auth now succeeds
(400→404). **Residual:** requestSync/reportState still 404 ("agent not registered in
HomeGraph") even after a Google re-sync — control (EXECUTE) works, but live state
push to Google does not yet. Non-blocking for the print button (always-off by design).
Revisit if TV/projector live state matters (may need a full unlink+relink).
- **2026-06-07: paho-mqtt v1 callbacks (`CallbackAPIVersion.VERSION1`).** paho 2.1.0
is installed for `claude`; matches the working lgtv bridge. One-time deprecation
warning at startup is harmless.
## Deferred / Rejected
- **Print latency (~12 min/press):** gemma4:26b summarization (+ yfinance) dominates.
Acceptable for v1; the button returns immediately and `posbriefing/status` tracks
progress. Optimize later (model keep-alive, fewer/shorter summaries) if it annoys.
- **Router DHCP reservation for the printer:** Seth's router action; MAC discovery
makes it optional. Add if convenient to drop the sweep fallback.
- **zfs/reddit/grafana dashboard fields return None on steel141** (not the tank/ZFS
host; `cannot open 'tank'`). Out of scope for the trigger work — track separately.