Whilst many of you probably have DirectTV type "Web Tuner" channel changers for your Set Top Boxes (STBs), the STBs from our IPTV provider remains resolutely IR Based (i.e. operated by a Remote).

In my ongoing search for the perfect (quick, reliable) IR-based channel changer I have been trying various executables for my USB-UIRT, but I also had some Global Cache IP2IR devices (Flex and iTach) from another Project.

Executable from Global Cache:

A while back a NextPVR user asked whether the Global Cache devices had an executable. After some pestering of the Global Cache support I got hold of such an exe (which is based on Python) and an example script to make it work, so I thought I'd share it here. The helpful GC support folks said:

[QUOTE]"I looked through our internal scripts and I've attached a zip file that has a little test utility we've used internally. It's not quite what you described but might be close enough to allow you to perform most of the functions you wanted.

To run it you would call the following from a command line: main.exe 4998 sendir,1:1,1,38000,10,1,500,500

Where you'd replace with your unit's IP address, and sendir,1:1,1,38000,10,1,500,500 with the IR code you want to send (in the GC format). The '4998' is the TCP port which will always be 4998 for IR units.[QUOTE]

Below is my batch file, with the IR codes for 0~9 and OK (specific for my remote) as learnt by the iTach unit (you can use GCs iLearn.exe or the free iScrutinizer with support via the folks at JP1). You only really need 0~9. Again this is only an example you need to learn your own codes and amend the red items below.

@echo off
CD E:\Storage\CompuHW\IoT_Stuff\Global Cache Utils\FromGlobalCacheSendIRExe\GC_CC_Exe

set ip=""

if "%1"=="" goto :done

if "%1"=="0" goto :IR0
if "%1"=="1" goto :IR1
if "%1"=="2" goto :IR2
if "%1"=="3" goto :IR3
if "%1"=="4" goto :IR4
if "%1"=="5" goto :IR5
if "%1"=="6" goto :IR6
if "%1"=="7" goto :IR7
if "%1"=="8" goto :IR8
if "%1"=="9" goto :IR9
if "%1"=="OK" goto :IROK

:: Continue if statements for as many digits/commands as necessary

goto :loop

::Make function for each IRn if statement above
::Hard code IR code for 'IR0' case
.\main.exe %ip% 4998 sendir,1:1,1,38400,3,69,347,173,22,22BBBBB,22,65BBBBBCBCBBBBBBBBBCCCCCCCC,22,1743,347,87,22,3692
goto :return

::Hard code IR code for 'IR1' case
.\main.exe %ip% 4998 sendir,1:1,1,38400,3,69,347,173,22,22BBBBB,22,65BBBBBCBCBCBBBBBBBBCCCCCCC,22,1743,347,87,22,3692
goto :return

::Hard code IR code for 'IR2' case
.\main.exe %ip% 4998 sendir,1:1,1,38400,3,69,347,173,22,22BBBBB,22,65BBBBBCBCBBCBBBBBBCBCCCCCC,22,1743,347,87,22,3692
goto :return

::Hard code IR code for 'IR3' case
.\main.exe %ip% 4998 sendir,1:1,1,38400,3,69,347,173,22,22BBBBB,22,65BBBBBCBCBCCBBBBBBBBCCCCCC,22,1743,347,87,22,3692
goto :return

::Hard code IR code for 'IR4' case
.\main.exe %ip% 4998 sendir,1:1,1,38400,3,69,347,173,22,22BBBBB,22,65BBBBBCBCBBBCBBBBBCCBCCCCC,22,1743,347,87,22,3692
goto :return

::Hard code IR code for 'IR5' case
.\main.exe %ip% 4998 sendir,1:1,1,38400,3,69,347,173,22,22BBBBB,22,65BBBBBCBCBCBCBBBBBBCBCCCCC,22,1743,347,87,22,3692
goto :return

::Hard code IR code for 'IR6' case
.\main.exe %ip% 4998 sendir,1:1,1,38400,3,69,347,173,22,22BBBBB,22,65BBBBBCBCBBCCBBBBBCBBCCCCC,22,1743,347,87,22,3692
goto :return

::Hard code IR code for 'IR7' case
.\main.exe %ip% 4998 sendir,1:1,1,38400,3,69,347,173,22,22BBBBB,22,65BBBBBCBCBCCCBBBBBBBBCCCCC,22,1743,347,87,22,3692
goto :return

::Hard code IR code for 'IR8' case
.\main.exe %ip% 4998 sendir,1:1,1,38400,3,69,347,173,22,22BBBBB,22,65BBBBBCBCBBBBCBBBBCCCBCCCC,22,1743,347,87,22,3692
goto :return

::Hard code IR code for 'IR9' case
.\main.exe %ip% 4998 sendir,1:1,1,38400,3,69,347,173,22,22BBBBB,22,65BBBBBCBCBCBBCBBBBBCCBCCCC,22,1743,347,87,22,3692
goto :return

::Hard code IR code for 'IROK' case
.\main.exe %ip% 4998 sendir,1:1,1,38400,3,69,347,173,22,22BBBBB,22,65BBBBBCBCBCBCCBBBBBCBBCCCC,22,1743,347,87,22,3692
goto :return

echo Complete

REM This will loop through the arguments and if they're a match to one of the predefined values it'll send the code in the matching "IRn" function. Then you would just call the batch file like this myBatch.bat 1 2 1 or with as many parameters as needed. Note: the batch file would need to be in the same directory as main.exe.
REM Learned Codes from a GC Unit can be in GC or GC_Compressed_Format (so they are shorter and easier to handle).
REM In NextPVR you must use a SPACE between the channel numbers in the arguments i.e. {channel_d1} {channel_d2} {channel_d3}; you might need {channel_d2} {channel_d23 {channel_d4}.
REM You many have OK or Enter - not that important
I could not upload the executable so here is a link to it.
It will only last 100 days I think, so maybe you will have to reply to the post :-).

Telnet Scripting Tool TST10:

Separately, I did some brief experimentation with the Telnet Scripting Toool TST10.exe, which is still available around the net.

This is a Batch File to Change ONE Channel (671) using TST10.exe.
CD "E:\Storage\CompuHW\IoT_Stuff\TST10"
start cmd /c tst10.exe /r:SampleScriptCh671.txt /o:output.txt /m
REM The WAIT command in the script must be completeir,1:<IRConn>,<ID>\x0D where <IRConn> is the IR Connector number ON the GC Device (see Manual) and <ID>=command isssued (IR Code).
This is the sample script (SampleScriptCh671.txt) that the batch file operates with. The sendir codes are the same one you learn using ilearn for the above. The "completeir,1:1,6" codes are just confirmation from the iTach units that the code was sent and the numbers should match the sent code sequence X:Y,Z.
Code: 4998
SEND "sendir,1:1,6,38400,3,69,347,173,22,22BBBBB,22,65BBBBBCBCBBCCBBBBBCBBCCCCC,22,1743,347,87,22,3692\m"
WAIT "completeir,1:1,6"
SEND "sendir,1:1,7,38400,3,69,347,173,22,22BBBBB,22,65BBBBBCBCBCCCBBBBBBBBCCCCC,22,1743,347,87,22,3692\m"
WAIT "completeir,1:1,7"
SEND "sendir,1:1,1,38400,3,69,347,173,22,22BBBBB,22,65BBBBBCBCBCBBBBBBBBCCCCCCC,22,1743,347,87,22,3692\m"
WAIT "completeir,1:1,1"
Whilst I guess some clever person could make the batch file dynamic based on {channel_d1} etc, clearly writing a separate script file for each channel is somewhat cumbersome, so the GC main.exe script above (first option) is probably your best bet unless you can find a telnet scripting tool that can go to a lookup table for the numbers 0~9 unfortunately so it can be used with ANY channel sequence. TST10.exe does not seem to stretch to this.

Hope this helps someone!