3.9 KiB
3.9 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.
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 parent —
pos_printer_ip→printer_ip, addedprinter_port. Removed:printer_name,remote_path,telegram_token,telegram_chat_id,whatsapp_number. config.jsonnot committed —.gitignoreexcludes it. Useconfig.example.jsonas template.- This machine is CT 166 (
.175), not CT 629 (.174) — CT 629 (OpenClaw) is stopped. Cron and manual runs both happen on CT 166 (OpenClaw2). Confirmed viaip addr.
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. Bareexcept: return Nonewas swallowing the error with no output. - Telegram alerts firing unexpectedly — parent script's top-level
exceptblock sent Telegram on any unhandled exception. When FreshRSS was unreachable, the no-items fallback crashed oncups.Connection()and triggered it. Fixed by removing CUPS and Telegram entirely. - FreshRSS unreachable from CT 166 via direct IP — intermittent
Connection refusedon192.168.0.157:80even 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 from CT 166 — must usegit.sethpc.xyz(Caddy, port 443). - Archive of old project — original files from
printer-automation/were moved toprinter-automation/Archive/before the Gitea clone was pulled in. Oldsummarize_news.pyis 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 (
pct exec 147) always returns None inside a CT — consider querying the Kuma HTTP status API instead - 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