fix: toggle TV power properly (ECP stays alive in standby)

This commit is contained in:
Harley
2026-07-23 00:02:16 -04:00
parent a950674d1e
commit d60bf58e3b
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
# Toggle TV power and switch to Computer (HDMI1) input when turning on
set -euo pipefail
ROKU_IP="10.0.1.93"
ROKU_ECP="http://${ROKU_IP}:8060"
# Send Power toggle
curl -s -X POST "${ROKU_ECP}/keypress/Power" > /dev/null
# Wait for TV to process the power command
sleep 5
# Switch to Computer (HDMI1) input
# This will fail silently if the TV is off, which is fine
curl -s -X POST "${ROKU_ECP}/launch/tvinput.hdmi1" > /dev/null || true
echo "TV power toggled"