Is there any way to programmatically turn a HDMI TV on/off on windows?
Either using an application or script/programming interface.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityIs there any way to programmatically turn a HDMI TV on/off on windows?
Either using an application or script/programming interface.
First check if your graphics card (hardware) supports HDMI CEC. Then also the drivers must support it. But according to this review, very few cards have CEC support.
For PCs without CEC support, there exists various products which add CEC support. They connect between the PC and TV on HDMI cable plus via USB to PC. The software sends CEC commands to adapter via USB. One example of such product is: USB HDMI CEC adapter from Pulse-eight.
There is a workaround to shutdown the TV (especialy samsung tvs)from the PC: over TCP/IP.
If your tv supports tcp/ip commands (nearly all Samsung tvs with network capability), you can schedule shutdown script on the pc. The script will run a python code automatically to send the "power button" interaction to the TV over TCP/IP, when you shutdown the pc. All you will need some SW;
GUIDE:
#!/usr/bin/env python3
import samsungctl
import time
config = {
"name": "samsungctl",
"description": "PC",
"id": "",
"host": "192.168.0.10",
"port": 55000,
"method": "legacy",
"timeout": 0,
}
with samsungctl.Remote(config) as remote:
for i in range(1):
remote.control("KEY_POWEROFF")
time.sleep(0.5)
"PATH of python installation folder"\python "PATH of the SHUTDOWN.PY folder"\shutdown.py
That's it! Whenever you shutdown the PC the script will run automatically and shutdown your samsung TV over TCP/IP.
At now, Intel graphics cards still doesn't support it.
Consumer Electronic Control (CEC): Intel graphics do not support this feature.
Source: Intel: FAQ about HDMI Technology