echo off cls rem Created Jan 10 2011 rem This batch file uses the dtvTune executable to change channels on DTV rem STBs via the ethernet connection. rem rem This batchfile and the dtvTune.exe file go into the SageTV directory rem rem You also need to add the following registry key (as a string type) to rem HKEY_LOCAL_MACHINE\SOFTWARE\Frey Technologies\Common\EXEMultiTunerPlugin rem "command"="DirecTVMultiChg.bat %DEVICE% %CHANNEL%" rem rem In the script below, the %1 represents the tuner device (%DEVICE%) name rem passed from SageTV. The %2 represents the channel (%CHANNEL%) value passed rem from SageTV. rem Both values used as arguments to the executable batch file rem Each device must be assigned to an IP address set CURDEVICE=%1 IF %CURDEVICE% EQU 192.168.0.30 set USEIP=192.168.0.30 IF %CURDEVICE% EQU 192.168.0.32 set USEIP=192.168.0.32 IF %CURDEVICE% EQU DSS3 set USEIP=192.168.0.202 IF %CURDEVICE% EQU DSS4 set USEIP=192.168.0.203 IF %CURDEVICE% EQU DSS5 set USEIP=192.168.0.204 rem Convert channel designations to tuning commands set CHANRAW=%2 rem It is unclear at this point if we need to support dashed channels. Even rem if we did, it should probably be added to the dtvTune executable and not rem here... rem Keeping this code around just in case rem set DASHCHECK=%CHANRAW:~-2% rem set ISDASHED=%DASHCHECK:~0,1% rem IF %ISDASHED% EQU - goto adddash rem set CHANPRE=N/A rem set CHANPRERAW=N/A rem set CHANSUB=N/A rem set USECHANNEL=%CHANRAW% rem goto dotuning dtvTune.exe -channel %CHANRAW% -ip %USEIP%