Cut off HDMI signal

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
SimPlayer
Posts: 128
Joined: 01 Apr 2016, 05:57

Cut off HDMI signal

Post by SimPlayer » 15 Feb 2023, 14:20

Hi guys.

Is there a way to simply cut off/turn on a HDMI signal by AHK code? Of course, pulling out the plug does it but it would be nice to make it happen by a command.

Best regards,

SimPlayer

malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Re: Cut off HDMI signal

Post by malcev » 16 Feb 2023, 00:14

Search for SetVCPFeature.

SimPlayer
Posts: 128
Joined: 01 Apr 2016, 05:57

Re: Cut off HDMI signal

Post by SimPlayer » 16 Feb 2023, 14:12

Yes, but I don't want to control the monitor itself, just cut off the HDMI signal from the computer to the monitor.

SimPlayer

malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Re: Cut off HDMI signal

Post by malcev » 17 Feb 2023, 07:55

What do You mean by cut off?
With SetVCPFeature You can change input source of monitor.

SimPlayer
Posts: 128
Joined: 01 Apr 2016, 05:57

Re: Cut off HDMI signal

Post by SimPlayer » 17 Feb 2023, 11:35

Hi

Well, let me explain. I have two sources and one monitor. What I want to do is switch the HDMI between these two sources. There is ofcourse HDMI switches available, but the problem is that there´s no one pushing the switch button, It has to be a time related switch, say every 10 minute the picture will change from one source to the other.
The way to do this is a automatic HDMI switch like this; https://www.amazon.com/Fosmon-HD8061-Automatic-Switching-Switcher/dp/B01D3JE0MS.
This switch has a master/slave function that means if the master HDMI is cut off, the switch uses the slave port, and when the master HDMI is on again, the switch connects to that one. So, if I could cut off the HDMI line by AHK code, the problem would be solved.

SimPlayer

malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Re: Cut off HDMI signal

Post by malcev » 17 Feb 2023, 14:46

Use hdmi switcher with rs232 support or connect 2 hdmi sources to monitor directly without switcher.

SimPlayer
Posts: 128
Joined: 01 Apr 2016, 05:57

Re: Cut off HDMI signal

Post by SimPlayer » 17 Feb 2023, 17:04

Well, the RS232 is not an option, it's expensive and I haven't got any experience of how to make it work, and the monitor is too small for PiP function. So, I'm left with two possibilities, either to cut off/pause the HDMI signal from one source, or to totally power down the source. The power down isn't good because startup takes time and stresses the computer when done every ten minute all day long. A simple Send command in AHK would be a saver here.

SimPlayer

malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Re: Cut off HDMI signal

Post by malcev » 17 Feb 2023, 18:19

Expensive?
https://www.aten.com/eu/en/products/professional-audiovideo/video-switches/vs481b/
About 50$
I am not talking about pip function.
I am talking about changing input source directly in monitor with SetVCPFeature api.
PS Forget about "simple sending command" from ahk - You can cut off signal of hdmi only from bios.

SimPlayer
Posts: 128
Joined: 01 Apr 2016, 05:57

Re: Cut off HDMI signal

Post by SimPlayer » 18 Feb 2023, 04:54

Hi

Ok, thanks, now I get it. The problem with RS-232 is that I haven't got a port on the computer, only USB. I did find some adapters at https://www.iftools.com/shop/index.en.php but it's way too complicated to assemble and get it working, I'm afraid.
But, the SetVCPFeature, is it really possible to change HDMI input to the monitor by code? I do have 2 HDMI inputs on the monitor so technically it can be done. The other HDMI source is a camera hard drive, so I can't do anything to that HDMI input, so that's why my original idea was to block the HDMI signal from the computer and by the automatic switch change HDMI input to the monitor.

SimPlayer

malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Re: Cut off HDMI signal

Post by malcev » 18 Feb 2023, 05:04

You need 10$ converter like this
https://www.aten.com/global/en/products/usb-solutions/converters/uc232a/
But, the SetVCPFeature, is it really possible to change HDMI input to the monitor by code?
Yes, search forum.

gmoises
Posts: 75
Joined: 18 Nov 2017, 16:43

Re: Cut off HDMI signal

Post by gmoises » 18 Feb 2023, 14:13

There are ways to turn off a monitor using powercfg.exe
windows - batch script to turn off monitor? - Stack Overflow
https://stackoverflow.com/questions/48979552/batch-script-to-turn-off-monitor

or using NirCND
turn off / on a single monitor from command line on Windows
https://www.nirsoft.net/articles/turn_off_single_monitor_command_line.html

SimPlayer
Posts: 128
Joined: 01 Apr 2016, 05:57

Re: Cut off HDMI signal

Post by SimPlayer » 18 Feb 2023, 14:28

Hi

Well, I don´t want to turn off the monitor, just the signal to the monitor...

SP

SimPlayer
Posts: 128
Joined: 01 Apr 2016, 05:57

Re: Cut off HDMI signal

Post by SimPlayer » 20 Feb 2023, 05:07

malcev wrote:
17 Feb 2023, 18:19
Expensive?
https://www.aten.com/eu/en/products/professional-audiovideo/video-switches/vs481b/
About 50$
I am not talking about pip function.
I am talking about changing input source directly in monitor with SetVCPFeature api.
PS Forget about "simple sending command" from ahk - You can cut off signal of hdmi only from bios.
OK, I´m thinking about buying this Aten switch but I haven´t really got the idea about how to send the commands to the com port. Is it possible to connect AHK to this, to send command to the USB-RS-232-Aten Switch from a AHK script?

SP

malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Re: Cut off HDMI signal

Post by malcev » 20 Feb 2023, 08:34

Yes, I think You can do it with file object to send needed data through com.
Also aten has utility and You can automate it.

SimPlayer
Posts: 128
Joined: 01 Apr 2016, 05:57

Re: Cut off HDMI signal

Post by SimPlayer » 21 Feb 2023, 04:40

Hi all.

Well, this seems to have been a RTFM problem :D
There´s instructions in the manual how to achieve this;

Code: Select all

; Turn Monitor Off:
SendMessage, 0x112, 0xF170, 2,, Program Manager  ; 0x112 is WM_SYSCOMMAND, 0xF170 is SC_MONITORPOWER.
; Note for the above: Use -1 in place of 2 to turn the monitor on.
; Use 1 in place of 2 to activate the monitor's low-power mode.
return
I made a couple of lines AHK code that activates monitor off by pressing esc and monitor on by pressing p.
This seems to work, the monitor looses input and the switch i mentioned earlier should do the rest of the job.

SimPlayer

Code: Select all

esc::
Sleep 1000
SendMessage, 0x112, 0xF170, 2,, Program Manager  
p::
Sleep 1000
SendMessage, 0x112, 0xF170, -1,, Program Manager
Return

Post Reply

Return to “Ask for Help (v1)”