NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Information Community Announcements v
« Previous 1 … 8 9 10 11 12 … 56 Next »
Auto restart recording service utility

 
  • 0 Vote(s) - 0 Average
Auto restart recording service utility
frankmcg
Offline

Senior Member

Posts: 312
Threads: 23
Joined: Sep 2006
#51
2008-04-15, 09:29 PM (This post was last modified: 2008-04-15, 09:38 PM by frankmcg.)
Noticed a side effect of the change in the code today. I've my box setup to wake up at 5am, update the EPG using XMLTV grabber then go back into standby. However the script is sending a restart to the app keeping it alive and hence delaying the standby for up to an hour. Log below:


15/04/2008 4:58:07.67 standby status is 0x00000012
15/04/2008 4:58:07.76 gbpvr_monitor woke from standby
15/04/2008 4:58:09.51 GBPVR restarted
15/04/2008 4:58:20.79 Ir.exe killed
15/04/2008 4:58:21.43 Ir.exe restarted
15/04/2008 5:06:49.95 GBPVR killed due to no active window
15/04/2008 5:06:49.98 GBPVR restarted
15/04/2008 5:13:23.54 GBPVR killed due to no active window
15/04/2008 5:13:23.59 GBPVR restarted
15/04/2008 5:16:52.82 GBPVR killed due to no active window
15/04/2008 5:16:52.89 GBPVR restarted
15/04/2008 5:21:55.62 GBPVR killed due to no active window
15/04/2008 5:21:55.65 GBPVR restarted
15/04/2008 5:39:34.48 GBPVR killed due to no active window
15/04/2008 5:39:34.59 GBPVR restarted
15/04/2008 5:54:36.79 GBPVR killed due to no active window
15/04/2008 5:54:36.85 GBPVR restarted
15/04/2008 6:09:32.81 standby status is 0x00000000
15/04/2008 6:09:33.01 standby status is 0x00000004

Any thoughts? The gaps between the timestamps seem pretty odd?

Couple of things just occured to me. It's checking 6 times for the "no active window" consistent with $IR_retry_count = 6 in the script. I've also got $Sleep_Interval = 360000 ie 6 mins vs your script using 2mins I think. But only the first couple of gaps seem to be 6 mins, then it gets wider and wider?!
frankmcg
Offline

Senior Member

Posts: 312
Threads: 23
Joined: Sep 2006
#52
2008-04-18, 09:06 PM
Tried experimenting with a fix on this problem but not getting anywhere. I added a count to the script $standby_retry_count = 2 and edited the check_gbpvr function with:

$ii = 0
$PID = ProcessExists($GBPVR_app)
If $PID and $ii < $standby_retry_count Then
ProcessClose($PID)
RunWait (@ComSpec & ' /c echo %date% %time% GBPVR killed due to no active window >> ' & $Log_file , "" , @SW_HIDE)
EndIf
$ii = $ii + 1

which I think means it should only do the check three times printing a GBPVR killed due to no active window message in the log. This is the result:


18/04/2008 4:58:08.78 standby status is 0x00000012
18/04/2008 4:58:08.87 gbpvr_monitor woke from standby
18/04/2008 4:58:09.64 GBPVR restarted
18/04/2008 4:58:21.81 Ir.exe killed
18/04/2008 4:58:22.45 Ir.exe restarted
18/04/2008 5:09:26.92 GBPVR killed due to no active window
18/04/2008 5:09:26.95 GBPVR restarted
18/04/2008 5:18:26.79 GBPVR killed due to no active window
18/04/2008 5:18:26.90 GBPVR restarted
18/04/2008 5:52:22.37 GBPVR killed due to no active window
18/04/2008 5:52:22.40 GBPVR restarted
18/04/2008 6:09:15.82 standby status is 0x00000000
18/04/2008 6:09:16.00 standby status is 0x00000004

So the count seems to be working but for some reason it's staying awake for c 40mins doing another check, waiting 10mins then finally going back to sleep.

My postupdateepg.bat file calls a psshutdown which should send it to sleep straight away, but as you can see this doesn't seem to be happening so I'm assuming my usual go to sleep after 10mins setting is eventually kicking in. Perhaps the autoit script is preventing the psshutdown from running?

Sorry for rambling!
gEd
Offline

Posting Freak

London
Posts: 3,518
Threads: 100
Joined: Jan 2005
#53
2008-04-18, 09:27 PM
I'm really sorry I didn;t reply to your previous email. When I originally read it, it was very late and I'd had a few, so I thought I'd better leave it until the next day.....and then forgot.

re: renderer not supported error.
I'm trying to figure out of the script is correctly detecting that you have the VMR render not supported dialogue box or if it is being incorrectly detected. Does the script only report "GBPVR killed due to no active window" when it wakes up to downloaded the epg or at other times as well?

do you suffer from "VMR9 renderer not supported" when the pc wakes from standy during the evening?

I think I had this problem when I updated my ATI drivers via windows update, so I rolled back.

re: keeping pc awake.
I have no ideas atm. perhaps kill the script for a day or so and check the windows event log to check when it goes to sleep without the script running.

did you remove <PVRX2FriendlyName>PVRX2</PVRX2FriendlyName> from your config.xml?
“If this is the way Queen Victoria treats her prisoners, she doesn't deserve to have any.”
frankmcg
Offline

Senior Member

Posts: 312
Threads: 23
Joined: Sep 2006
#54
2008-04-20, 05:26 PM
I'm not getting the killed due to no active window error other than when it wakes to download the epg. For example, a recording in the middle of last night:

20/04/2008 3:56:36.85 standby status is 0x00000012
20/04/2008 3:56:37.90 gbpvr_monitor woke from standby
20/04/2008 3:56:38.79 GBPVR restarted
20/04/2008 3:56:49.84 Ir.exe killed
20/04/2008 3:56:50.48 Ir.exe restarted
20/04/2008 4:53:47.59 standby status is 0x00000000
20/04/2008 4:53:48.21 standby status is 0x00000004

which is what you would expect. I don't get the vmr9 renderer error any more since fixing the script with the dllcall.

Something very strange going on though. It looks like it's getting caught in a cycle of calling check_GBPVR. Only thing is I've put a sleep interval on that loop of 11 mins (660000) so it shouldn't interupt the auto standby after 10mins, but as you can see from the below, it's checking more often than that, and it's ignoring my code to only check 3 times before stopping??


20/04/2008 4:58:08.57 standby status is 0x00000012
20/04/2008 4:58:09.78 gbpvr_monitor woke from standby
20/04/2008 4:58:10.62 GBPVR restarted
20/04/2008 4:58:21.71 Ir.exe killed
20/04/2008 4:58:22.35 Ir.exe restarted
20/04/2008 5:02:50.76 GBPVR killed due to no active window
20/04/2008 5:02:50.85 GBPVR restarted
20/04/2008 5:13:31.20 GBPVR killed due to no active window
20/04/2008 5:13:31.25 GBPVR restarted
20/04/2008 5:17:32.28 GBPVR killed due to no active window
20/04/2008 5:17:32.31 GBPVR restarted
20/04/2008 5:24:35.07 GBPVR killed due to no active window
20/04/2008 5:24:35.12 GBPVR restarted
20/04/2008 5:29:03.82 GBPVR killed due to no active window
20/04/2008 5:29:03.87 GBPVR restarted
20/04/2008 5:40:38.18 GBPVR killed due to no active window
20/04/2008 5:40:38.21 GBPVR restarted
20/04/2008 5:49:39.18 GBPVR killed due to no active window
20/04/2008 5:49:39.23 GBPVR restarted
20/04/2008 5:58:10.04 GBPVR killed due to no active window
20/04/2008 5:58:10.07 GBPVR restarted
20/04/2008 6:01:38.51 GBPVR killed due to no active window
20/04/2008 6:01:38.59 GBPVR restarted
20/04/2008 6:10:33.85 standby status is 0x00000000
20/04/2008 6:10:34.03 standby status is 0x00000004
frankmcg
Offline

Senior Member

Posts: 312
Threads: 23
Joined: Sep 2006
#55
2008-04-20, 05:54 PM (This post was last modified: 2008-04-20, 05:55 PM by frankmcg.)
Another idea - could the script somehow be interrupting the epg update? So what's happening is that the epg update is underway, then the script tries to close then restart the app interrupting the update. This update then keeps trying to restart which would also explain a load of entries in the event log, which show psshutdown starting then stopping numerous times when it should of course only be running once?

If that's the case, is there a way to detect when an epg update is happening (I don't think it stops the recording service but not sure) and have the script wait until it's done?
gEd
Offline

Posting Freak

London
Posts: 3,518
Threads: 100
Joined: Jan 2005
#56
2008-04-20, 08:07 PM
yes that's exactly what's happening. The epg update runs gbpvr in the background with no active window so my script incorrectly assumes that this is a vmr9 error and kills it off.

maybe the windows scheduler is then restating it.

bugger, I hadn't considered EPG update when I added this mod. oh well. I'll need to go away and think how to detect if an epg update is in progress.

If you are no longer getting this error in normal use, I would recommend that you change the function check_gbpvr to:

Func Check_GBPVR ()

If WinExists ( $GBPVR_Window ) then
WinActivate ( $GBPVR_Window )
Else
Run ($GBPVR_Path & $GBPVR_launch, "",@SW_MAXIMIZE )
Writetolog ("GBPVR restarted")
If WinWaitActive ( $GBPVR_Window ) Then
WinActivate ( $GBPVR_Window ) ; ensure GB-PVR has focus
Else
; GBPVR failed to start
Writetolog ("Failed to start GBPVR")
MsgBox (0, "FATAL ERROR STARTING GBPVR", "Problem trying to restart GBPVR!!" )
EndIf
EndIf
EndFunc

I just looked back through my log and I can see one instance (since Feb) when it happened whilst EPG update was in progress. It's strange that I have not seen this more often, especially as I empty all pending recordings and reschedule them, which takes a few minutes.

Sorry for the hassle.
“If this is the way Queen Victoria treats her prisoners, she doesn't deserve to have any.”
gEd
Offline

Posting Freak

London
Posts: 3,518
Threads: 100
Joined: Jan 2005
#57
2008-04-20, 09:53 PM
The only way I can think of (with my very limited programming skills) is to use the rather naff method whereby I detect that an epg update is being done via the presence of a file (like I do to detect whether the script should be in active or maintanence mode).

epg update script:
echo >> c:\temp\epgupdate.txt
[update epg]
del c:\temp\epgupdate.txt

in monitor script

Func Check_GBPVR ()

If WinExists ( $GBPVR_Window ) then
WinActivate ( $GBPVR_Window )
Else
If NOT FileExists( c:\temp\epgupdate.txt ) Then
; No gbpvr window so if process exists, we must have a VMR9 error so kill gbpvr app.
$PID = ProcessExists($GBPVR_app)
If $PID Then
ProcessClose($PID)
Writetolog ("GBPVR killed due to no active window")
EndIf
Endif

Run ($GBPVR_Path & $GBPVR_launch, "",@SW_MAXIMIZE )
Writetolog ("GBPVR restarted")
If WinWaitActive ( $GBPVR_Window ) Then
WinActivate ( $GBPVR_Window ) ; ensure GB-PVR has focus
Else
; GBPVR failed to start
Writetolog ("Failed to start GBPVR")
MsgBox (0, "FATAL ERROR STARTING GBPVR", "Problem trying to restart GBPVR!!" )
EndIf
EndIf
EndFunc
“If this is the way Queen Victoria treats her prisoners, she doesn't deserve to have any.”
frankmcg
Offline

Senior Member

Posts: 312
Threads: 23
Joined: Sep 2006
#58
2008-04-21, 07:50 AM
Great idea! I can see how that could work. I’ve got a batch file which turns the box on then runs the XMLTV grab so I could combine creation of the epgupdate.txt file in that, then delete it again in the postepgupdate.bat file. Will give it a whirl tonight and report back.

Thanks again for looking into this - it's no hassle, just another small step in the endless quest for the perfectly functioning PVR system!
McBainUK
Offline

Posting Freak

Posts: 4,711
Threads: 429
Joined: Sep 2005
#59
2008-04-21, 07:54 AM
frankmcg Wrote:Thanks again for looking into this - it's no hassle, just another small step in the endless quest for the perfectly functioning PVR system!
lol, you and 18056 others Big Grin
Wiki profile
My Projects
Programs Plugin [SIZE=2](retired)
| Volume OSD Plugin (retired) | Documentation Wiki (retired)
[/SIZE]
frankmcg
Offline

Senior Member

Posts: 312
Threads: 23
Joined: Sep 2006
#60
2008-04-22, 07:32 AM
Sad Didn't work

Getting exactly the same messages in the script log as before ie a whole series of "GBPVR killed due to no active window" and GBPVR restarted" messages until just after 6am. Doesn't make any sense really as I've tested the epgupdate.txt lock file is being created fine with my wakeup.bat, so this should be freezing the func check_gbpvr but it's not.

I also can't see how the epgupdate.txt file could be being deleted too early as it is only supposed to kick in once postupdateepg.bat is run at which point the update is obviously finished anyway?

Could it be that the first check_gbpvr is running before the batch file gets a chance to create the epgupdate.txt file, then the cycle is somehow being broken, the epgupdate is failing, deleting the lock file and then setting off the loop described above?
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (8): « Previous 1 … 4 5 6 7 8 Next »
Jump to page 


Possibly Related Threads…
Thread Author Replies Views Last Post
  Auto loader for DirectVobSub (Blu-ray Forced subtitles) whurlston 63 29,661 2015-05-14, 08:41 AM
Last Post: Lao Pan
  NextPVR UI Web Service bgowland 2 2,846 2012-02-01, 07:12 PM
Last Post: pBS
  Windows Desktop/Sidebar Gadget with Recording Schedule cncb 0 1,841 2011-09-29, 12:49 PM
Last Post: cncb
  MpegImport utility added to wiki sixgun 66 23,220 2010-05-25, 01:48 PM
Last Post: carpeVideo
  Enhanced Web Admin (EWA) Build 81 BETA Web Service Release UncleJohnsBand 0 1,384 2009-05-22, 09:05 PM
Last Post: UncleJohnsBand
  Showname - Rename utility for GBPVR recordings Anthony 0 1,476 2009-03-05, 05:40 PM
Last Post: Anthony
  Utility to help with Channel Scanning timh 8 3,941 2009-02-09, 12:49 PM
Last Post: timh
  HVR 1300 Recording Quality Improvement garymeds 4 2,255 2008-07-02, 11:24 PM
Last Post: bunegg
  I-xmltv: TV Guide customization & Zap2It EPG utility. Jim_ 304 97,518 2007-09-18, 02:20 PM
Last Post: lrf2005
  File Renaming Utility: AddEpisode turkey 11 3,941 2007-04-30, 10:48 PM
Last Post: David

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

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

Linear Mode
Threaded Mode