NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Hardware v
« Previous 1 … 15 16 17 18 19 … 263 Next »
Hauppauge remote conflict

 
  • 0 Vote(s) - 0 Average
Hauppauge remote conflict
merc82
Offline

Junior Member

Posts: 42
Threads: 9
Joined: Sep 2007
#11
2014-04-05, 04:53 PM (This post was last modified: 2014-04-05, 04:58 PM by merc82.)
I've refined my script to add error checking when killing services and stopping the 950. I believe this will eliminate all but one possible timing issue so I can reduce delays in the TIMEOUT commands allowing the script to run faster.

The one remaining timing issue is with the restarting of ir.exe. If ir.exe doesn't fully start before the 950 is reactivated than the 950 will again control the remote. I'm unable to find any useful error codes for ir.exe that will prevent the script from advancing too soon. I tried to advance only if the ir.exe %errorlevel% is equal to 0 but it still restarts the 950 too soon.

Code:
[FONT=Lucida Console]
@ECHO off
cls
title IR Remote Reset - system start up
COLOR 1F
MODE con:cols=60 lines=20
ECHO.
ECHO *******************************
ECHO * Stopping IR Remote receiver *
ECHO *******************************
ECHO.
TIMEOUT 2
REM START "" "C:\program files\WinTV\ir.exe" /QUIT
START "" /min taskkill.exe /F /IM ir.exe
GOTO WAITSTART

:WAITSTART
ECHO.
ECHO * Waiting for services to start *
TIMEOUT 4
GOTO StopServices

:StopServices
ECHO.
ECHO *****************************************
ECHO * Stopping NextPVR and related services *
ECHO *****************************************
ECHO.
START "" /min taskkill.exe /F /IM NextPVR.exe
IF '%errorlevel%'=='1' TIMEOUT 5 GOTO StopServices
IF '%errorlevel%'=='0' GOTO HaupTVSRV

:HaupTVSRV
ECHO.
TIMEOUT 1
net stop "HauppaugeTVserver" 2>nul
NET START | FIND "HauppaugeTVserver" > nul
REM Errorlevel=0 for running service. 1 for a stopped service.
IF '%errorlevel%'=='0' TIMEOUT 5 GOTO HaupTVSRV
IF '%errorlevel%'=='1' GOTO NPVRSRV

:NPVRSRV
ECHO.
TIMEOUT 1
net stop "NPVR Recording Service" 2>nul
NET START | FIND "NPVR Recording Service" > nul
REM Errorlevel=0 for running service. 1 for a stopped service.
IF '%errorlevel%'=='0' TIMEOUT 5 GOTO NPVRSRV
IF '%errorlevel%'=='1' GOTO Disable950

:Disable950
ECHO.
TIMEOUT 1
ECHO ***********************************
ECHO * Disabling HVR-950Q USB TV Tuner *
ECHO ***********************************
ECHO.
devcon disable "USB\VID_2040&PID_7200"
REM Errorlevel=0 if successful. 1 if reboot is required.
IF '%errorlevel%'=='0' GOTO StartIRexe
IF '%errorlevel%'=='1' GOTO HaupTVSRV

:StartIRexe
ECHO.
TIMEOUT 2
ECHO *********************************
ECHO * Restarting IR Remote receiver *
ECHO *********************************
ECHO.
START "" /min "C:\Program Files\WinTV\ir.exe" /QUIET
ECHO * Waiting for Ir.exe to start *
TIMEOUT 5
ECHO.
ECHO *************************************
ECHO * Re-Enabling HVR-950Q USB TV Tuner *
ECHO *************************************
devcon enable "USB\VID_2040&PID_7200"
TIMEOUT 1
ECHO.
ECHO ********************************
ECHO * Restarting TV Tuner services *
ECHO ********************************
REM net start "HauppaugeTVserver"
net start "NPVR Recording Service"
ECHO.
ECHO *************************************************
ECHO *                                               *
ECHO * IR Remote Control reset to HVR-1600 complete  *
ECHO *                                               *
ECHO *************************************************
ECHO.
[/FONT]

If anyone is interested the task I set up to run the script after resuming is 'triggered on an event'. The event is 'Log:System, Source:Microsoft-Windows-Power-Troubleshooter, Event ID:1'.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): « Previous 1 2


Possibly Related Threads…
Thread Author Replies Views Last Post
  Replacing an MCE Remote Bobins 0 175 2025-06-08, 05:28 PM
Last Post: Bobins
  Hauppauge quadHD card no channels found (Debian 11) bgowland 11 1,156 2025-04-14, 03:47 PM
Last Post: bgowland
  Upgrade Hauppauge HVR2200 to Hauppauge Quad HD + NPVR Jim_J 1 893 2024-06-14, 05:21 AM
Last Post: sub
  Hauppauge quadHD and cable service tesla1886 2 906 2024-06-12, 02:42 PM
Last Post: tesla1886
Exclamation Hauppauge PVR/USBUIRT sync rtylerpaul 1 794 2024-04-30, 11:55 AM
Last Post: mvallevand
  Hauppauge quadHD problems NumberFive 17 7,577 2023-09-22, 04:09 PM
Last Post: i0zjh02
  Hauppauge WinTV-HVR4000 cbdc23@gmail.com 13 2,358 2023-09-14, 02:49 AM
Last Post: sub
  nextPVR support Hauppauge 01595? RedDawg 8 2,708 2023-06-16, 06:18 PM
Last Post: sub
  Usb dual HD Hauppauge tuner sound? eastavin 12 2,868 2023-03-01, 03:36 AM
Last Post: eastavin
  Replace Hauppauge tuner card with Hauppauge 1682 or HDHomeRun Flex Duo? mountainsoft 0 1,145 2022-10-29, 01:34 AM
Last Post: mountainsoft

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode