Files
POS-Automation/SESSION.md
T
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

4.1 KiB

SESSION.md — POS-Automation

Context Files

  • /root/bin/core_homelab.md — cluster topology, SSH aliases
  • /root/bin/services_directory.md — active service IPs and domains
  • /root/bin/SESSION.md — global session memory
  • ./CONTEXT.md — project infrastructure, config keys, known issues
  • ./config.example.json — config template

Project Summary

POS-only daily news briefing for the Epson TM-m30 receipt printer (192.168.0.137:9100). Fetches unread articles from FreshRSS, selects and summarizes them using Ollama, collects dashboard data (weather, ZFS, Grafana, markets, Uptime Kuma), builds a native ESC/POS receipt via python-escpos, and sends it over TCP. Runs daily at 04:30 via cron on CT 166 (192.168.0.175). Forked and rewritten from Seth/PrinterAutomation — all PDF, CUPS, Telegram, and WhatsApp code removed.

Memory Discipline

  • Update SESSION.md immediately when a durable fact, decision, or fix is discovered.
  • Before every final reply, run a memory check and append any missing durable notes.
  • End every reply with one line: Session memory: updated or Session memory: no new durable facts.

Gitea

  • Repo: https://git.sethpc.xyz/Seth/POS-Automation
  • Remote: https://<token>@git.sethpc.xyz/Seth/POS-Automation.git
  • Parent repo: https://git.sethpc.xyz/Seth/PrinterAutomation
  • API key: see /root/bin/printer-automation/GITEA_API.md

Session Notes

Infrastructure decisions

  • ESC/POS over TCP only — printer at 192.168.0.137:9100. No CUPS fallback, no PDF. The TM-m30 accepts raw ESC/POS bytes directly on port 9100.
  • No Telegram/WhatsApp — alert integrations existed in the parent project but were never intentionally active for POS output. Removed entirely.
  • No CLI flags — parent script had --POS / --pdfonly / standard-mode paths. This project is always POS; the script runs one path unconditionally.
  • Config key renames from parentpos_printer_ipprinter_ip, added printer_port. Removed: printer_name, remote_path, telegram_token, telegram_chat_id, whatsapp_number.
  • config.json not committed.gitignore excludes it. Use config.example.json as template.
  • CT 166 (openclaw2) and CT 629 (openclaw) both retired. POS-Automation now runs on steel141.

Bug fixes & discoveries

  • Missing weather on cron run — WMO weather code map was incomplete (e.g. code 73 = moderate snow not mapped, returned 'Unk'). Expanded map to cover all common WMO codes (51-55 drizzle, 61-65 rain, 71-77 snow/sleet, 80-86 showers, 95-99 storms). Also increased API timeout from 5s → 15s to prevent silent failures. Bare except: return None was swallowing the error with no output.
  • Telegram alerts firing unexpectedly — parent script's top-level except block sent Telegram on any unhandled exception. When FreshRSS was unreachable, the no-items fallback crashed on cups.Connection() and triggered it. Fixed by removing CUPS and Telegram entirely.
  • FreshRSS unreachable via direct IP — intermittent Connection refused on 192.168.0.157:80 even though host is pingable and Apache is running inside CT 120. Appears to be a transient Proxmox vmbr ARP/firewall state issue — resolves on its own. fresh.sethpc.xyz (Caddy) works as fallback but can return 502 when proxying slowly. Best approach: use direct IP, accept occasional failures.
  • Gitea direct IP (192.168.0.125:80) unreachable — must use git.sethpc.xyz (Caddy, port 443).
  • Archive of old project — original files from printer-automation/ were moved to printer-automation/Archive/ before the Gitea clone was pulled in. Old summarize_news.py is preserved there if needed.

Open threads

  • Update crontab to point to /root/bin/POS-Automation/pos_briefing.py — runs at 4:58 AM and 3:00 PM daily
  • Uptime Kuma check — Kuma is v1 (no REST API). Fixed by SSHing to pve173 and running pct exec 147 from there. Key auth already configured.
  • ETH-USD yfinance occasionally fails with NoneType — add per-ticker exception handling
  • Investigate why CT 166 intermittently cannot reach CT 120 (192.168.0.157:80) — check Proxmox firewall rules on the bridge