fix: toggle TV power properly (ECP stays alive in standby)
This commit is contained in:
Executable
+19
@@ -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"
|
||||
Reference in New Issue
Block a user