Two OFF-path bugs found during live testing:
- bscpylgtv's key store defaulted to a CWD-relative ./.aiopylgtv.sqlite;
under systemd (cwd=/) it couldn't open the pairing key db. Pass an
absolute key_file_path (LGTV_KEY_FILE override, else ~/.aiopylgtv.sqlite).
- A TV woken seconds earlier answers TCP :3000 but rejects WebSocket control
for ~20-30s. Retry power_off (2 attempts, 10s apart); common case still
succeeds first try in ~3s. Kept under the bridge's 60s subprocess timeout.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Rework the MQTT bridge into a single deployable unit:
- Drop the self-SSH hop; run locally on steel141 (on the TV's LAN, has
bscpylgtv, effectively always-on).
- Cache last-known TV IP and probe it directly; /24 ping-sweep only on a
cache miss. Stops the 30s HA state poll from flapping/spamming the net.
- WoL now unicast (last-known IP) + broadcast, ports 9/7, 3 bursts.
- systemd unit (User=seth, EnvironmentFile for MQTT_PASSWORD), install.sh,
env template, .gitignore. Removes the half-finished lgtv.sh.new.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>