SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Customizations

Notices

SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-21-2009, 08:30 PM
WhiteWhisker WhiteWhisker is offline
Sage User
 
Join Date: Nov 2008
Posts: 16
Lightbulb Auto restart of hd-pvrs, best way to figure out a good time to recycle?

In an attempt to improve WAF, I want to improve hd-pvr stability...I have been pretty lucky so far, but every 4-5 days maybe 1 of my hd-pvrs becomes unavailable and has to be power cycled...I just RMAed it thinking my problems would be solved but the one I thought was good just did it!

Anyway on to the topic...reading through posts I saw somebody mention that its not necessary to power cycle the hd-pvr, but that this process works:

stop sagetv service > disable hd-pvr in device manager > enable hd-pvr > restart sagetv service.

Unfortunately I didnt see it until after I had already just powercycled my hd-pvr, have other people had success with this process? If so I was going to whip up a program to do that in sequence for my hd-pvrs, but I am not sure the best way to determine the optimal time to run this (hopefully 1x a day in a certain range). I was thinking about using SJQ to do this somehow but im not sure...

Basically I am trying to figure out the best way to determine when the sagetv service is totally idle: no recordings in the next x minutes, SJQ isnt processing anything (comskip), no clients connected, etc...Is this information easy to get through some of the APIs? Is there a crazy SJQ rule I could create?

thanks!
Reply With Quote
  #2  
Old 10-21-2009, 08:59 PM
Peter_h Peter_h is offline
Sage Fanatic
 
Join Date: May 2008
Location: Kailua, HI
Posts: 798
This functionality is not yet available in SJQ but slugger has started working on it and something similar to what you want to do should be available with SJQ 3.0.
Reply With Quote
  #3  
Old 10-21-2009, 09:59 PM
eric3a eric3a is offline
Sage Advanced User
 
Join Date: Jul 2009
Location: Houston by the Sea
Posts: 226
Have a look at my solution on the SageAlert thread if you want.
I have a web controlled power controller which can be reset via the web or using command line.

SageAlert detects HDPVR lock-ups, activates Growler which then triggers a .bat file that resets the power on the HDPVR.

Sounds complicated but it isn't as bad as it sounds. It works very well now. I only get about 1 lockup a week, but now they don't affect recrodings much.

Eric
Reply With Quote
  #4  
Old 10-22-2009, 03:13 AM
WhiteWhisker WhiteWhisker is offline
Sage User
 
Join Date: Nov 2008
Posts: 16
Quote:
Originally Posted by eric3a View Post
Have a look at my solution on the SageAlert thread if you want.
I have a web controlled power controller which can be reset via the web or using command line.

SageAlert detects HDPVR lock-ups, activates Growler which then triggers a .bat file that resets the power on the HDPVR.

Sounds complicated but it isn't as bad as it sounds. It works very well now. I only get about 1 lockup a week, but now they don't affect recrodings much.

Eric
Ya, I saw your solution which sort of inspired me to go do something about it lol. Unfortunately I seem to own the only UPS on the planet that doesnt allow you to control the power to ports in software (who knew they even made such a thing!). Im hoping to be able to do this without buying a new powerstrip, but thats a backup plan if I cant get this to work.
Reply With Quote
  #5  
Old 10-22-2009, 01:57 PM
dead_ferrets dead_ferrets is offline
Sage Advanced User
 
Join Date: Feb 2009
Location: Ottawa, Ontario, Canada
Posts: 145
I went through this as well and given my lack of programming skills I did it the low tech way. I bought a power outlet timer and plugged the HD-PVR into it and programmed it to power cycle the HD-PVR every day at 4AM (i.e., when I wasn't doing any recording). Then used Windows task scheduler to reboot the computer about 5 minutes after the HD-PVR had rebooted.

Low tech, but great results so far.
Reply With Quote
  #6  
Old 03-16-2010, 11:13 AM
davephan's Avatar
davephan davephan is offline
Sage Icon
 
Join Date: Mar 2004
Location: Minnesota
Posts: 1,911
Quote:
Originally Posted by dead_ferrets View Post
I went through this as well and given my lack of programming skills I did it the low tech way. I bought a power outlet timer and plugged the HD-PVR into it and programmed it to power cycle the HD-PVR every day at 4AM (i.e., when I wasn't doing any recording). Then used Windows task scheduler to reboot the computer about 5 minutes after the HD-PVR had rebooted.

Low tech, but great results so far.
It's been several months. Has power cycling the HD-PVR resolved the periodic problems with HD-PVR lockups?

I've been thinking about power cycling with a timer and/or installing a cooling fan in the HD-PVR.

I also may try the more complex method to determine when error messages occur and have them trigger a power cycle of the HD-PVR and/or reset the SageTV service. The most complicated part would be determining with a command line when the error messages occurs or when nothing is being recorded.

The power reset itself would be easy with a parallel printer port card. I have code that can turn on and off data lines on the parallel port. Those data lines could trigger a solid state relay to power cycle the HD-PVR.

Dave
__________________
SageTV: LIAN LI PC-K58, Gigabyte GA-EX580UD5, i-7 950 3.06 gig quad LGA 1366 CPU, Zalman CNPS9700 CPU cooler 1366 bracket, Memory 24 gigs GB, PNY NVIDIA GeoForce 9800 GT 1024 MB, Corsair 750w PSU, Samsung 500GB SSD boot, 3 SSD recording drives
Capture cards: 2 - HDHR Primes - Comcast Xfinity CableTV
Extenders: 1-HD-300, 2-HD-200
Software: Windows 7 Pro X64, Ghost 15, VideoReDo TVSuite 4 h.264, Playon (Netflix), OpenDCT
UnRAID File Server 4.7 Pro: Lian-Li PC-G70B, MBD-X8SIL-F-O, i3-540, 16 TB
Reply With Quote
  #7  
Old 03-16-2010, 12:24 PM
jerryt jerryt is offline
Sage Fanatic
 
Join Date: Oct 2007
Posts: 832
Quote:
Originally Posted by davephan View Post
It's been several months. Has power cycling the HD-PVR resolved the periodic problems with HD-PVR lockups?

I've been thinking about power cycling with a timer and/or installing a cooling fan in the HD-PVR.

I also may try the more complex method to determine when error messages occur and have them trigger a power cycle of the HD-PVR and/or reset the SageTV service. The most complicated part would be determining with a command line when the error messages occurs or when nothing is being recorded.

The power reset itself would be easy with a parallel printer port card. I have code that can turn on and off data lines on the parallel port. Those data lines could trigger a solid state relay to power cycle the HD-PVR.

Dave
I have been running Eric3a's recycle .bat on reboot and when sage sends a recording error it runnings all the scripts. With the drivers 1.0.5.301 and the scripts, I have not missed a single recording. And in the two months of running the scripts, they automatically recovered from the one (and only) lockup.

In testing the scripts I noticed that if you have two HD-PVR's, Sage is smart enough to start recording on the second HD-PVR as soon as the first one stops recording. So a daily recycle.bat run by the system scheduler may yield someone most of what the automatic recycle scripts do, without the cost of a IP power switch.

Last edited by jerryt; 03-16-2010 at 12:26 PM.
Reply With Quote
  #8  
Old 03-16-2010, 01:35 PM
aflat aflat is offline
Sage Aficionado
 
Join Date: Feb 2009
Posts: 302
From what I could see all of those scripts required a programmable power strip. I took the lower tech approach (mentioned by someone on the boards, forgot who, sorry) and plugged my HDPVR into the STB on the switched outlet. So if I get a recording error, I power cycle the STB. I have the STB power cycle scripted, but I haven't hooked it into sagealerts or anything like that.
Reply With Quote
  #9  
Old 03-16-2010, 02:17 PM
davephan's Avatar
davephan davephan is offline
Sage Icon
 
Join Date: Mar 2004
Location: Minnesota
Posts: 1,911
Quote:
Originally Posted by eric3a View Post
Have a look at my solution on the SageAlert thread if you want.
I have a web controlled power controller which can be reset via the web or using command line.

SageAlert detects HDPVR lock-ups, activates Growler which then triggers a .bat file that resets the power on the HDPVR.

Sounds complicated but it isn't as bad as it sounds. It works very well now. I only get about 1 lockup a week, but now they don't affect recrodings much.

Eric
Could you post a link for a web controlled power controller that can also be set with a command line?

What is "SageAlert"? Is this part of the Sage Job Queue?

I think the best way might be to detect when the failure occurs, then power cycle, with an automatic device. I need some more details on how you did it.

I think I will also install a cooling fan in the HD-PVR, which might prevent the HD-PVR lockups from occuring.

Dave
__________________
SageTV: LIAN LI PC-K58, Gigabyte GA-EX580UD5, i-7 950 3.06 gig quad LGA 1366 CPU, Zalman CNPS9700 CPU cooler 1366 bracket, Memory 24 gigs GB, PNY NVIDIA GeoForce 9800 GT 1024 MB, Corsair 750w PSU, Samsung 500GB SSD boot, 3 SSD recording drives
Capture cards: 2 - HDHR Primes - Comcast Xfinity CableTV
Extenders: 1-HD-300, 2-HD-200
Software: Windows 7 Pro X64, Ghost 15, VideoReDo TVSuite 4 h.264, Playon (Netflix), OpenDCT
UnRAID File Server 4.7 Pro: Lian-Li PC-G70B, MBD-X8SIL-F-O, i3-540, 16 TB
Reply With Quote
  #10  
Old 03-16-2010, 03:45 PM
jerryt jerryt is offline
Sage Fanatic
 
Join Date: Oct 2007
Posts: 832
Quote:
Originally Posted by davephan View Post
Could you post a link for a web controlled power controller that can also be set with a command line?

What is "SageAlert"? Is this part of the Sage Job Queue?

I think the best way might be to detect when the failure occurs, then power cycle, with an automatic device. I need some more details on how you did it.

I think I will also install a cooling fan in the HD-PVR, which might prevent the HD-PVR lockups from occuring.

Dave
http://forums.sagetv.com/forums/show...ert#post381520
Reply With Quote
Reply

Tags
api, hd-pvr


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
good time to defrag ? DoPeFiSh SageTV Software 5 09-30-2010 05:40 AM
HD200 Auto-Connect Time simonen SageTV HD Theater - Media Player 8 03-21-2009 09:05 PM
Scheduled Windows Restart / Reboot (Shutdown -r) and Sage doesn't restart dealsdyker SageTV Software 8 03-09-2007 04:24 PM
Auto-Standby at certain time CB_2005 SageTV Software 3 07-23-2006 03:19 PM
CPU usage triggered auto shutdown/restart/suspend/hibernate/loggoff mdmint SageTV Customizations 1 01-22-2005 09:12 AM


All times are GMT -6. The time now is 05:59 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.