Commit Graph

3 Commits

Author SHA1 Message Date
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 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