Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 35

Thread: Improve reliability of STB channel changing?

  1. #11
    Join Date
    Nov 2003
    Location
    NextPVR HQ, Wellington, New Zealand
    Posts
    88,214
    Quote Originally Posted by jksmurf View Post
    Seems like most of the hundreds of hours are by users...
    I suspect you're right

  2. #12
    Join Date
    Jul 2005
    Location
    HK - Pal I
    Posts
    3,415
    Quote Originally Posted by sub View Post
    You might be able to look at running a batch file for your blaster, and starting the blaster from there with high priority.
    Right after several more (hundreds of ) hours of testing, and asking on stackoverflow about batch files and priorities, I have a batch file which appears to work (reasonably well) from the command line, but alas, not in NextPVR. Still occasionally misses a number but at least it does priority; I hope.

    GXPC4312H_StarterUUTX.bat calls GXPC4312H_UUTX.bat
    GXPC4312H_StarterUUTX.bat sets the priority for GXPC4312H_UUTX.bat

    As I said it works from the command line but it doesn't do anything in NextPVR? Seems odd?

    Executable: C:\Users\Public\NPVR\ChanChg\GXPC4312H_StarterUUTX .bat
    Arguments {channel}

    GXPC4312H_StarterUUTX.bat
    Code:
    REM
    SET command=GXPC4312H_UUTX.bat
    start "" /REALTIME /B %command% %*
    REM
    GXPC4312H_UUTX.bat
    Code:
    @echo off
    REM
    REM Devcon.exe restart USB\VID_0403*
    cd C:\users\public\NPVR\ChanChg\
    set "channel=%1"
    set "num=-1"
    REM by KM
    REM timeout 1
    REM
    :loop
    set /a num=num+1
    call set "name2=%%channel:~%num%,1%%"
    if defined name2 (
    REM ORIG SETTINGS uutx.exe -r3 -s500 -fGXPC4312H.ir %name2%
    uutx.exe -r3 -s10 -fGXPC4312H.ir %name2%
    echo %name2%
    goto :loop
    )
    REM timeout 2
    REM
    REM This is supposed to make the guide go away but I turned it off on NowTV
    REM
    REM uutx.exe -r3 -s50 -fGXPC4312H_JP_Remote.ir BACK
    REM
    REM
    Anything noticeable in the logs?

    btw I also for the Pronto and irsend Codes for my Global Cache blaster but the GC people don't really have a blaster exectuable (too low tech for that device) as they rely on many other vendors to write horribly complex software for it. After some pestering they provided me an exe that will send codes via the IP Address of the GC but I would have to write ANOTHER batch file to send the codes seperately as their executable doesn't "do" {Channel_d1} or read off an IR Def as arguments.

    They gave me this as a starter ...

    Code:
    @echo off
    
    set ip="192.168.0.203"
    
    :loop
    if "%1"=="" goto :done
    
    if "%1"=="1" goto :IR1
    if "%1"=="2" goto :IR2
    if "%1"=="2" goto :IR3
    :: Continue if statements for as many digits/commands as necessary
    
    :return
    shift
    goto :loop
    
    ::Make function for each IRn if statement above
    :IR1
    ::Hard code IR code for 'IR1' case
    .\main.exe %ip% 4998 sendir,1:1,1,38000,1,1,500,500
    goto :return
    
    :IR2
    ::Hard code IR code for 'IR2' case
    .\main.exe %ip% 4998 sendir,1:1,1,38000,1,1,250,500
    goto :return
    
    :IR3
    ::Hard code IR code for 'IR3' case
    .\main.exe %ip% 4998 sendir,1:1,1,38000,1,1,250,500
    goto :return
    
    :done
    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
    I have also been experimenting with TST10.exe to do a similar thing... don't change that dial...

    Meanwhile, on the plus side, I'm not actually watching any TV at all, as all my evenings are spent chasing blaster commands....

    k.
    Attached Images Attached Images  
    ASUS STRIX X470-F AMD 2700x 4GHz | Win10Prox64 | 32GB | NVIDIA GEforce GT1030 Fanless | WinTV DMB-TH | WinTV HVR-1280 | Hauppauge Colossus | Various HD's | AC86U | USB-UIRT | PCH-A110 | RPi2 | Sony Bravia LCD X9000F Android TV |. Frustrated that NextPVR is not working? Take a moment and consider this and this and this and this and this and this. Credit where credit's due; for one guy (with a wife and two kids), most problems are solved outrageously quickly. Patience.

  3. #13
    Join Date
    Dec 2005
    Location
    UK
    Posts
    3,105
    Does something a bit more simple help ...

    bat1.cmd
    set channel=%1
    start /realtime /b c:\foldera\folderb\bat2.cmd
    bat2.cmd

    c:\folderx\folderz\uutx.exe blah blah %channel% blah
    Plus NextPVR is able to provide the three digits as separate values. This would allow you to run uutx three times and send one digit each time that you run uutx. Might be more reliable.
    i5 750 2.67 GHz, 6 Gig, 1000 Gig, Nvidia N710
    2 x Hauppauge WinTV QuadHD DVB-T2

  4. #14
    Join Date
    Jul 2005
    Location
    HK - Pal I
    Posts
    3,415
    Cheers Graham will give it a whirl tomorrow probably.

    I thought the {channel_d1}, {channel_d2}... {channel_d4} arguments were exclusive to usbuirtsend?
    ASUS STRIX X470-F AMD 2700x 4GHz | Win10Prox64 | 32GB | NVIDIA GEforce GT1030 Fanless | WinTV DMB-TH | WinTV HVR-1280 | Hauppauge Colossus | Various HD's | AC86U | USB-UIRT | PCH-A110 | RPi2 | Sony Bravia LCD X9000F Android TV |. Frustrated that NextPVR is not working? Take a moment and consider this and this and this and this and this and this. Credit where credit's due; for one guy (with a wife and two kids), most problems are solved outrageously quickly. Patience.

  5. #15
    Join Date
    Nov 2003
    Location
    NextPVR HQ, Wellington, New Zealand
    Posts
    88,214
    Quote Originally Posted by jksmurf View Post
    Meanwhile, on the plus side, I'm not actually watching any TV at all, as all my evenings are spent chasing blaster commands....
    lol

  6. #16
    Join Date
    Nov 2003
    Location
    NextPVR HQ, Wellington, New Zealand
    Posts
    88,214
    Quote Originally Posted by jksmurf View Post
    I thought the {channel_d1}, {channel_d2}... {channel_d4} arguments were exclusive to usbuirtsend?
    No.

    When you setup a blaster in NextPVR you can specify the executable to run and any command line parameters to pass to the executable. You can make that command line anything you need to. Before running the executable though, NextPVR replace {channel} in the parameters with the channel number, and it'll replace {channel_d1}, {channel_d2}... {channel_d4} with a digit. The executable never actually sees these {token} type parameters, they are replaced by numbers prior to the executable being run.

  7. #17
    Join Date
    Jun 2007
    Location
    St. Paul, MN, USA
    Posts
    1,149
    Quote Originally Posted by jksmurf View Post
    GXPC4312H_StarterUUTX.bat
    Code:
    REM
    SET command=GXPC4312H_UUTX.bat
    start "" /REALTIME /B %command% %*
    REM
    I'd say make sure to use a the full path to GXPC4312H_UUTX.bat in the SET command line. When the batch file is run from NextPVR, the current directory is typically different from what it is when run from a command prompt.

  8. #18
    Join Date
    Jul 2005
    Location
    HK - Pal I
    Posts
    3,415
    Quote Originally Posted by Graham View Post
    Does something a bit more simple help ...

    bat1.cmd

    bat2.cmd

    Plus NextPVR is able to provide the three digits as separate values. This would allow you to run uutx three times and send one digit each time that you run uutx. Might be more reliable.
    Hiya,

    It seems I'm terrible with batch files. This is what I am trying but it does not quite work.
    The echo is just so I can see what is going on.

    Bat1.bat
    Code:
    REM
    echo %1 
    echo %2 
    echo %3
    SET ChDigit1=%1
    SET ChDigit2=%2
    SET ChDigit3=%3
    echo %ChDigit1%
    echo %ChDigit2%
    echo %ChDigit3%
    REM
    start "" /REALTIME /B C:\Users\Public\NPVR\ChanChg\GXPC4312H_UUTX.bat %ChDigit1% %ChDigit2% %ChDigit3%
    REM
    Bat2.bat
    Code:
    @echo on
    REM
    echo %ChDigit1%
    echo %ChDigit2%
    echo %ChDigit3%
    C:\Users\Public\NPVR\ChanChg\uutx.exe -r3 -s50 -fGXPC4312H.ir %ChDigit1%
    C:\Users\Public\NPVR\ChanChg\uutx.exe -r3 -s50 -fGXPC4312H.ir %ChDigit2%
    C:\Users\Public\NPVR\ChanChg\uutx.exe -r3 -s50 -fGXPC4312H.ir %ChDigit3%
    @echo off
    REM
    If I run the batch from the command line with GXPC4312H_StarterUUTX 325 it just says (3 times)

    Code:
    Error: missing IRCodeName.
    
    UUTX Usage:
            uutx [-r<repeatCount> ] [-d<deviceNumber> ] [-s<sleepms>] "<IRCode>"
                    -or-
            uutx [-r<repeatCount> ] [-d<deviceNumber> ] [-s<sleepms>] -f<fileName> <IRCodeName>
    However if I run it from the command line with GXPC4312H_StarterUUTX 3 2 5 it works (i.e. with spaces between the numbers). It works but sometimes misses digits, although that is a separate problem. It also spawns a new command window each time i.e. it doesn't go away?

    So I thought OK I will now try incorporating {channel_d1}{channel_d2}{channel_d3} in the calling batch In NextPVR) as the channel arguments. That doesn't work for me, no numbers come up at all.

    Code:
    019-03-17 15:09:02.602	[INFO][40]	Running blaster: C:\Users\Public\NPVR\ChanChg\GXPC4312H_StarterUUTX.bat 0 5 2
    2019-03-17 15:09:02.676	[DEBUG][40]	About to tune graph to: 
    <tuning>
      <type>HDPVR</type>
      <locator>
        <channel>523</channel>
        <input>3</input>
        <audio_input>HDMI Audio Input</audio_input>
        <blaster_executable>C:\Users\Public\NPVR\ChanChg\GXPC4312H_StarterUUTX.bat</blaster_executable>
        <blaster_args>{channel_d1} {channel_d2} {channel_d3}</blaster_args>
      </locator>
    </tuning>
    2019-03-17 15:09:02.676	[DEBUG][40]	About to switch HDPVR/Colossus to target: 
    LIVE&D:\GBPVRLiveTVBuffer\live-FOXCRIME-31669.ts
    2019-03-17 15:09:02.698	[INFO][40]	HDPVRRecorder.StartStream() allocated handle: 0x3E
    2019-03-17 15:09:02.698	[DEBUG][40]	stopping previous handle
    2019-03-17 15:09:02.698	[INFO][40]	HDPVRRecorder.StopStream(61)
    2019-03-17 15:09:04.838	[INFO][40]	HDPVRRecorder.StopStream(62)
    2019-03-17 15:09:04.847	[INFO][40]	No more streams active. Stopping device.
    2019-03-17 15:09:04.848	[DEBUG][40]	Graph stopping...
    If I just have ONE argument {channel} that does not work either.

    Any other suggestions please?

    k.
    Attached Images Attached Images  
    ASUS STRIX X470-F AMD 2700x 4GHz | Win10Prox64 | 32GB | NVIDIA GEforce GT1030 Fanless | WinTV DMB-TH | WinTV HVR-1280 | Hauppauge Colossus | Various HD's | AC86U | USB-UIRT | PCH-A110 | RPi2 | Sony Bravia LCD X9000F Android TV |. Frustrated that NextPVR is not working? Take a moment and consider this and this and this and this and this and this. Credit where credit's due; for one guy (with a wife and two kids), most problems are solved outrageously quickly. Patience.

  9. #19
    Join Date
    Dec 2005
    Location
    UK
    Posts
    3,105
    Quote Originally Posted by jksmurf View Post
    This is what I am trying but it does not quite work.
    I'm not sure what you are doing with batch file names ... You give examples of files called bat1.bat and bat2.bat but the batch file "start"ed by bat1.bat is called GXPC4312H_UUTX.bat

    You can put an EXIT command at the end of a batch file to force the batch file to end.

    There is a SLEEP N command that cause a batch file to wait for N seconds ... This might help if you pause for a second between each of the three executions of uutx.

    Also, I would experiment with and without the /B in the START command.

    Also, I would try the three digit version without the bat1 and bat2 malarkey ... Set NextPVR to run the three digit version (with three executes of uutx) ... If it misses digits, try adding a SLEEP 1 between each execute.
    Last edited by Graham; 2019-03-17 at 12:21 PM.
    i5 750 2.67 GHz, 6 Gig, 1000 Gig, Nvidia N710
    2 x Hauppauge WinTV QuadHD DVB-T2

  10. #20
    Join Date
    May 2006
    Location
    Canada
    Posts
    27,114
    Since -f means filename and you don't change directories in your batch file you would need to add the path before the filename when you call this

    -fGXPC4312H.ir

    Martin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •