2011-01-18, 07:16 PM
I have occasional trouble with my HD-PVR, and it seems to be resolved by occasionally turning it off and on again. Since I have the occasional recording fail I want a way to reset the box at the beginning of every recording and I almost have it, but not quite.
Using some X10 software I can turn the power to the device off and back on programmatically, and adding the calls to the batch file I use for changing channels seems like a good means to do it. The problem is npvr tries to create the graph for the recording before the box is finished resetting, so now it fails consistently and reliably.
I thought I'd be clever and add a delay to the channel change script, giving the box about 10 seconds to finish resetting before continuing. Using the TIMEOUT command, I can indeed add a 10 second delay to the batch file and I've verified that it's taking that long since I cycle the HDPVR, wait 10 seconds and then issue my firewire command to change the channel. I can observe the delay. However, something a little peculiar happens when I do this.
Looking at npvr's logs, without any delay npvr goes from calling the channel change script to trying to setup the filter in about a second:
However, when adding a delay to the batch file npvr just waits a little while before continuing. It's not as fast as usual, but it's not waiting for the batch file to finish either - it seems to wait an extra 4-6 seconds but then goes ahead and resumes. Isn't that odd?
So, any suggestions? While I think it would be great if npvr actually waited for the channel change to finish, I know mine is a bit of an odd request so I'm not exactly expecting a change to npvr. I know I can use the Windows Task Scheduler to cycle the power on the HDPVR periodically, but that runs the risk happening during a recording to screwing it up. So, any other ideas?
Thanks,
Tim
Using some X10 software I can turn the power to the device off and back on programmatically, and adding the calls to the batch file I use for changing channels seems like a good means to do it. The problem is npvr tries to create the graph for the recording before the box is finished resetting, so now it fails consistently and reliably.
I thought I'd be clever and add a delay to the channel change script, giving the box about 10 seconds to finish resetting before continuing. Using the TIMEOUT command, I can indeed add a 10 second delay to the batch file and I've verified that it's taking that long since I cycle the HDPVR, wait 10 seconds and then issue my firewire command to change the channel. I can observe the delay. However, something a little peculiar happens when I do this.
Looking at npvr's logs, without any delay npvr goes from calling the channel change script to trying to setup the filter in about a second:
Code:
2011-01-18 13:33:43.879 [INFO][7] Running blaster: C:\vid\STB\channel.bat 951
2011-01-18 13:33:44.598 [INFO][7] Creating graph
However, when adding a delay to the batch file npvr just waits a little while before continuing. It's not as fast as usual, but it's not waiting for the batch file to finish either - it seems to wait an extra 4-6 seconds but then goes ahead and resumes. Isn't that odd?
Code:
2011-01-18 13:32:27.320 [INFO][7] Running blaster: C:\vid\STB\channel.bat 951
2011-01-18 13:32:31.830 [INFO][7] Creating graph
2011-01-18 13:32:31.866 [DEBUG][7] FindFilterByName failed to locate filter: Hauppauge HD PVR Crossbar
So, any suggestions? While I think it would be great if npvr actually waited for the channel change to finish, I know mine is a bit of an odd request so I'm not exactly expecting a change to npvr. I know I can use the Windows Task Scheduler to cycle the power on the HDPVR periodically, but that runs the risk happening during a recording to screwing it up. So, any other ideas?
Thanks,
Tim