SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV v7 Customizations
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV v7 Customizations This forums is for discussing and sharing user-created modifications for the SageTV version 7 application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss plugins for SageTV version 7 and newer.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-13-2010, 08:13 AM
tedson tedson is offline
Sage Advanced User
 
Join Date: Aug 2008
Posts: 88
Plugin Request: Run external command on error

Could one of the master plug-in builders, build a plug-in that would run a command line application when there is a sage error message (or if there is a plug-in that does this already could you point me at it.) It would need to pass in the message and if possible the error level. If someone will write that I could build an app that will go out and reboot an HDPVR when it fails (assuming you have one of these http://www.digital-loggers.com/lpc.html.)
Reply With Quote
  #2  
Old 06-13-2010, 08:30 AM
Invent Invent is offline
Sage User
 
Join Date: Apr 2004
Posts: 11
I could also use this, and for the EXACT same reason.

I have wondered if the SageAlert plugin could be used to do this, or be modified to do it.

I use Girder in my PC, so once some trigger exists that I can interpret as "time to power cycle the HD-PVR" - I can do that, log it, note what show was recording or that it was coincident with a channel change, email myself, etc....

Running an external program is a great way to get that trigger easily.

Hence massively increasing WAF. HD-PVR is annoying.
Reply With Quote
  #3  
Old 06-13-2010, 08:58 AM
toricred's Avatar
toricred toricred is offline
Sage Icon
 
Join Date: Jan 2006
Location: Northern New Mexico
Posts: 1,729
Sage Job Queue (SJQ) can do this. I'm doing exactly this with it.
Reply With Quote
  #4  
Old 06-13-2010, 10:52 AM
tedson tedson is offline
Sage Advanced User
 
Join Date: Aug 2008
Posts: 88
toricred could you post your rule for SJQ so I could take a look at how your doing it.
Reply With Quote
  #5  
Old 06-13-2010, 02:08 PM
toricred's Avatar
toricred toricred is offline
Sage Icon
 
Join Date: Jan 2006
Location: Northern New Mexico
Posts: 1,729
Here's my client ruleset:

Code:
REBOOTHDPVR4 {

  "C:/Reboot/HDPVRCycle4.bat"  
}

REBOOTHDPVR3 {

  "C:/Reboot/HDPVRCycle3.bat"
}

REBOOTHDPVR2 {

  "C:/Reboot/HDPVRCycle2.bat"
}

REBOOTHDPVR1 {

  "C:/Reboot/HDPVRCycle1.bat"
}
And my SJQ ruleset:

Code:
if [IsObjSysMsg == true && $.GetSystemMessageString{} =* "Hauppauge HD PVR Capture Device #4"] {
   REBOOTHDPVR4
}

if [IsObjSysMsg == true && $.GetSystemMessageString{} =* "Hauppauge HD PVR Capture Device #3"] {
   REBOOTHDPVR3
}

if [IsObjSysMsg == true && $.GetSystemMessageString{} =* "Hauppauge HD PVR Capture Device #2"] {
   REBOOTHDPVR2
}

if [IsObjSysMsg == true && $.GetSystemMessageString{} =* "Hauppauge HD PVR Capture Device Component"] {
   REBOOTHDPVR1
}
Reply With Quote
  #6  
Old 06-13-2010, 04:43 PM
Invent Invent is offline
Sage User
 
Join Date: Apr 2004
Posts: 11
Hi toricred,

Very helpful and appreciated posting! I'm running SJQ already for comskip so this should be a perfect solution.

How did you determine the system message strings such as

"Hauppauge HD PVR Capture Device #2"

and

"Hauppauge HD PVR Capture Device Component"

?? I'd like to know how to do that / check it is correct on my system / respond to other events etc.

Thanks in advance...!
Reply With Quote
  #7  
Old 06-13-2010, 07:03 PM
bikesquid's Avatar
bikesquid bikesquid is offline
Sage Aficionado
 
Join Date: Jan 2010
Location: California's North Coast
Posts: 392
Quote:
Originally Posted by toricred View Post
Here's my client ruleset:

Code:
REBOOTHDPVR4 {

  "C:/Reboot/HDPVRCycle4.bat"  
}


}
This is great, helpful stuff, but I wonder what the contents of the referenced batch file is... am I missing something?
Reply With Quote
  #8  
Old 06-13-2010, 08:10 PM
toricred's Avatar
toricred toricred is offline
Sage Icon
 
Join Date: Jan 2006
Location: Northern New Mexico
Posts: 1,729
The contents of the batch file depend on what command is used to cycle the power on your power strip. You need an IP controlled power strip for this to work. In my case it is:

Code:
"C:\Program Files\Growl for Windows\Displays\Scripty\UU.W32.exe" 192.168.1.3:80 user:password 4pulse
I got the text by setting up Sage Alert (I had been using it before) and looking at the text in the e-mail I receive. You could also just look at the text in the system message area.
Reply With Quote
  #9  
Old 06-14-2010, 01:40 PM
bikesquid's Avatar
bikesquid bikesquid is offline
Sage Aficionado
 
Join Date: Jan 2010
Location: California's North Coast
Posts: 392
Got it, makes sense except I usually have to restart sage and the sage service to get the %$#* HDPVR to be working w/sage again. Are you just power cycling the hdpvr and letting sage reconnect on it's own?
Reply With Quote
  #10  
Old 06-14-2010, 07:09 PM
toricred's Avatar
toricred toricred is offline
Sage Icon
 
Join Date: Jan 2006
Location: Northern New Mexico
Posts: 1,729
All I'm doing is cycling the power on the hdpvr. It clears the problem over 99.99% of the time. I've also had no lockups at all since installing the 1.5.6.2 drivers, but that's only been a couple of days.
Reply With Quote
  #11  
Old 06-14-2010, 07:32 PM
bikesquid's Avatar
bikesquid bikesquid is offline
Sage Aficionado
 
Join Date: Jan 2010
Location: California's North Coast
Posts: 392
Where'd you get the 1.5.6.2 driver... and more importantly (to me) how can I get it?
I'm still seeing 1.5.6.1 on the hdpvr support page....

EDIT: nevermind, found this thread http://forums.sagetv.com/forums/showthread.php?t=49103

Last edited by bikesquid; 06-14-2010 at 07:37 PM.
Reply With Quote
Reply


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

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
External Command Tuner Plugin for Linux stuckless SageTV Linux 36 05-16-2017 03:11 PM
Adding custom command for launching external program dinki SageMC Custom Interface 14 01-22-2010 08:16 AM
Run command on sagetv server from extender bigbeav SageTV Customizations 0 09-30-2009 04:01 PM
Getting the status after running an external command pedz25 SageMC Custom Interface 0 04-05-2009 06:55 AM
Fail to launch PowerDVD Ultra as external command basset SageTV Customizations 4 12-20-2007 11:59 AM


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


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