docs: retire cron, record MQTT/discovery/gemma4 decisions

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Mortdecai
2026-06-07 13:43:26 -04:00
parent f51ba718aa
commit 03aa1fc7c7
2 changed files with 42 additions and 6 deletions
+7 -6
View File
@@ -7,7 +7,7 @@ Fetches unread articles from FreshRSS, selects and summarizes them via Ollama, t
Forked from `Seth/PrinterAutomation` on Gitea. Forked from `Seth/PrinterAutomation` on Gitea.
## Components ## Components
- `pos_briefing.py` — Main script. Run directly or via cron. - `pos_briefing.py` — Main script. Run directly or via the MQTT bridge (Google Home button).
- `config.json` — Credentials and endpoints (not committed). - `config.json` — Credentials and endpoints (not committed).
- `config.example.json` — Template for config.json. - `config.example.json` — Template for config.json.
@@ -47,11 +47,12 @@ Forked from `Seth/PrinterAutomation` on Gitea.
- **Uptime Kuma:** CT 147 — queried via `pct exec 147` (requires Proxmox host). - **Uptime Kuma:** CT 147 — queried via `pct exec 147` (requires Proxmox host).
- **This script runs on:** steel141 (`192.168.0.141`). Previously CT 166 (retired). - **This script runs on:** steel141 (`192.168.0.141`). Previously CT 166 (retired).
## Cron ## Trigger
Runs daily at 04:30 via crontab on steel141: On-demand only — **no cron**. Google Home button → HA `script.print_daily_briefing`
``` → MQTT `posbriefing/button/press` on broker CT 301 (192.168.0.154) →
30 4 * * * python3 /root/bin/POS-Automation/pos_briefing.py >> /var/log/pos_briefing.log 2>&1 `pos-briefing-mqtt.service` on steel141 (systemd, `User=claude`) → `pos_briefing.py`
``` → printer discovered by MAC → ESC/POS over TCP. See `docs/ha-setup.md` and
`docs/superpowers/specs/2026-06-07-ha-google-home-trigger-design.md`.
## Setup ## Setup
```bash ```bash
+35
View File
@@ -0,0 +1,35 @@
# 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: 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.