feat: consolidate LG TV bridge — cached IP discovery, robust WoL, systemd deploy
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>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=LG TV MQTT bridge for Home Assistant
|
||||
Documentation=https://git.sethpc.xyz/Seth/lgtv
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=seth
|
||||
# MQTT_PASSWORD lives here, root-owned 0600, never committed. See lgtv.env.example.
|
||||
EnvironmentFile=/etc/lgtv/lgtv.env
|
||||
ExecStart=/usr/bin/python3 /usr/local/bin/lgtv_mqtt.py
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user