Commit Graph

28 Commits

Author SHA1 Message Date
Mortdecai 1dfe8dadc2 docs: session handoff — Google Home print button (complete)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-11 04:52:17 -04:00
Mortdecai 93f6c33cd3 feat: simplify Google switch to on-only (state push restored)
Dropped the both-on/off-fire workaround now that HomeGraph reportState works
(new SA key + linked agent). turn_off is a no-op; on-tap prints; tile auto-reverts
via reportState. Verified: turn_on prints, turn_off does nothing. Docs/DECISIONS
updated to mark the HomeGraph auth issue resolved.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 04:53:26 -04:00
Mortdecai 660736747b docs: Google Home button confirmed working (switch tile); SA key regenerated
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 15:01:53 -04:00
Mortdecai 5c8f2d781e chore: gitignore service-account key files 2026-06-07 14:54:33 -04:00
Mortdecai b540d5e394 docs: expose POS briefing as a switch tile (scenes don't tile in Google Home)
Google renders SCENE devices (HA scripts/scenes) as voice/Routine-only, not as
tappable tiles -> the button was invisible. Switched the Google exposure to a
template switch (tiles like the TV). Documents the broken HomeGraph SA key
(invalid_grant) that disables requestSync/reportState until regenerated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 14:15:41 -04:00
Mortdecai 2691dc4073 docs: record HA deployment details + access method in DECISIONS
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 14:01:05 -04:00
Mortdecai 5ddac79fc7 docs: HA Google Home config deployed + verified (correct entity id)
Deployed script.print_daily_briefing (scripts.yaml) and exposed it in
google_assistant.entity_config on VM HA .146; ha core check passed, restarted,
request_sync OK. Verified end-to-end: HA script -> MQTT -> bridge -> printed.
Corrects the button entity id to button.pos_briefing_print_daily_briefing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 14:00:46 -04:00
Mortdecai b9865be55f fix: direct-IP fallback when printer_mac unset; force utf-8 in bridge subprocess
Final-review hardening:
- discover_printer falls back to direct IP reachability when printer_mac is
  empty (restores legacy behavior; avoids permanent unreachable on misconfig).
  Keeps the MAC check when a MAC IS set so we never print to a wrong DHCP tenant.
- bridge subprocess decodes child stdout as utf-8 explicitly, so a LANG=C systemd
  locale can't UnicodeDecodeError on the success checkmark and mis-report error.
- add tests for both no-MAC fallback paths (5 passed).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 13:48:59 -04:00
Mortdecai 03aa1fc7c7 docs: retire cron, record MQTT/discovery/gemma4 decisions
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 13:43:26 -04:00
Mortdecai f51ba718aa docs: HA script + Google Home exposure steps
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 13:42:40 -04:00
Mortdecai 35ba18257e feat: systemd unit + env template + installer for MQTT bridge
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 13:38:32 -04:00
Mortdecai 1187a82490 docs: correct paho v1 deprecation comment in bridge
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 13:38:04 -04:00
Mortdecai 980002064a feat: MQTT bridge exposing an HA button to print the briefing
Subscribes to posbriefing/button/press; on PRESS runs pos_briefing.py as a
subprocess (debounced via a lock) and reports status/availability. Registers an
HA button via MQTT discovery. Pins paho CallbackAPIVersion.VERSION1 (paho 2.1.0
is installed for claude and warns on the implicit default).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 13:37:41 -04:00
Mortdecai b901b8be6e fix: use fast model for story selection, gemma4 for summaries only
gemma4:26b under format:json ignores the bare-array instruction and returns a
reasoning object ({"thought": ...}), which broke Phase-1 selection (Unterminated
string -> silent fallback to first-5). Selection now uses ollama_select_model
(default qwen2.5:1.5b); summaries stay on gemma4:26b. Also tolerate dict-shaped
selection responses defensively.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 13:36:20 -04:00
Mortdecai 362053f8d6 feat: print to discovered printer IP
print_receipt now resolves the printer by MAC via discover_printer() instead of
a hardcoded IP. Verified end-to-end: physical receipt printed to 192.168.0.184.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 13:32:49 -04:00
Mortdecai 06bc18ed31 fix: add tests/pytest.ini + move Path import to top (completes 2308f24)
The prior commit only recorded the conftest.py deletion; this adds the actual
fix: tests/pytest.ini (pins rootdir to tests/ so the standard pytest command
no longer crashes on the dead /root/bin symlink) and the PEP8 import move.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 13:28:15 -04:00
Mortdecai 2308f24bc4 fix: pin pytest rootdir via tests/pytest.ini; move Path import to top
The root conftest.py did not prevent pytest's rootdir scandir from following
the dead CREATE_PROJECT.md symlink (-> inaccessible /root/bin), so the standard
'pytest tests/...' command crashed on collection. A minimal tests/pytest.ini
pins rootdir to tests/, so the repo root is never scanned. Also moves the
pathlib import to the top import block (PEP 8).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 13:27:54 -04:00
Mortdecai 7bfe862f53 feat: discover printer by MAC (survives DHCP IP changes)
Add discover_printer(), _mac_of(), _port_open(), _sweep_arp(), _cache_ip()
with PRINTER_MAC/PRINTER_SUBNET/CACHE_FILE config + unit tests. Also adds
conftest.py to work around broken symlink that blocked pytest collection.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 13:20:34 -04:00
Mortdecai fa580ec936 feat: summarize with gemma4:26b using converged prompt
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-07 13:17:28 -04:00
Mortdecai f19c04bdc1 feat: hourly weather forecast + steel141 migration notes
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 13:15:02 -04:00
Mortdecai c7b114da7a docs: implementation plan for HA/Google Home POS briefing trigger
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 13:07:10 -04:00
Mortdecai cb7ad8b0ff docs: design for HA/Google Home on-demand POS briefing trigger
Replaces the never-installed cron approach with an MQTT bridge mirroring the
lgtv pattern: Google Home button -> HA script/scene -> MQTT -> steel141 prints.
Adds MAC-based printer discovery (printer IP is DHCP-unstable) and a gemma4
summarizer swap. Includes scripts/dryrun.py (non-printing pipeline harness).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 13:01:15 -04:00
Seth 5061c21b94 Remove down-site alert from printed briefing 2026-03-17 15:04:16 -04:00
Seth cd05366c78 Fix Uptime Kuma check: SSH to pve173 instead of local pct exec 2026-03-17 01:32:26 -04:00
Seth 393de540ee Mark crontab thread resolved; schedule 4:58am and 3pm 2026-03-17 01:23:47 -04:00
Seth 779960108e Add SESSION.md with session memory and open threads 2026-03-17 01:16:36 -04:00
Seth 73c91a4528 Add CONTEXT.md with full project documentation 2026-03-17 00:17:38 -04:00
Seth 5e733a2aa9 Initial commit: POS-only daily briefing for Epson TM-m30 2026-03-17 00:15:49 -04:00