SageTV Community  

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

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.

Closed Thread
 
Thread Tools Search this Thread Display Modes
  #81  
Old 09-16-2009, 10:29 AM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by Slugger View Post
The email tab, not so much. The smtp settings are hidden away b/c it is a completely different section and once you configure that once you're very unlikely to ever have to touch it again. But if you do, then I want to keep it separate from configuring notification email addresses so it will probably stay as two separate save buttons.
I agree the SMTP settings should stay hidden most of the time. (Although it might be nice to open that section automatically if it hasn't been filled in yet.) I don't quite see why that entails a separate Save button though. If you're concerned about overwriting good SMTP settings with potentially bad ones, then maybe the thing to do is compare the form contents against the last-known-good settings and prompt for confirmation if they're different. (E.g. "SMTP settings have changed. Would you like to send a test message before saving?")
__________________
-- Greg
  #82  
Old 09-16-2009, 09:19 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
I can confirm that my emails have stopped since I upgraded to the latest version.

By the way - not a lot of folks using this yet, or at least not many folks that are visible when searching on #sagealert - only about 3-4 it appears.
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server

Last edited by wayner; 09-16-2009 at 09:21 PM.
  #83  
Old 09-16-2009, 09:53 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by wayner View Post
By the way - not a lot of folks using this yet, or at least not many folks that are visible when searching on #sagealert - only about 3-4 it appears.
Don't think there were many users of SageTweet (a dozen+ unique installs, maybe). But now you can't really rely on the Twitter search b/c protected tweets won't show up (my install, for example, posts to a protected Twitter account) and now SageAlert allows posting to different servers - some people may have been using Twitter, but now use email only, etc. The best bet if you want to know how many are using it is to look at the download count on Google Code. Snapshot 535 has had 11 downloads, the most downloaded snapshot was 533 with 12 downloads and no one (other than me) has downloaded the 537 snapshot.

I didn't post about 537 and I probably won't post about the details of each snapshot from here on out. Everyone can just check the download page to see when new snapshots are available or you can subscribe to any of the various RSS feeds at the project site. The subversion RSS feed will tell you any time I commit code changes to the project, the downloads RSS feed will tell you when new packages (snapshots, official releases) are uploaded to the project, and the main project RSS feed reports on all changes and updates to the project (basically all the other RSS feeds combined). Now all of my plugins are in the same Google Code project so not every post in the RSS feed will be about SageAlert, but if you just followed the downloads feed then it's not too bad.
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
  #84  
Old 09-19-2009, 05:05 PM
eric3a eric3a is offline
Sage Advanced User
 
Join Date: Jul 2009
Location: Houston by the Sea
Posts: 226
Thanks Slugger: SageAlert is the bees' knees!!

I had been hoping for something like that ever since I got my HDPVRs (which lock up once in a while).

So, after an afternoon's work (I'm not the fatest with these things!), this is what I do now:
-SageAlert detects Errors, and shoots an email to my private account, readable on my blackberry or any other email capable machine.
-Also shoots over a Growler alert to the Growler server on my SageTV machine, which then
-"Displays" it via Scripty, which alllows me to run a bat script.
-The bat script gets the error description from SageAlert and tests it to find out which HDPVR failed.
-Then resets that HDPVR
-Last, the bat file is renamed for 5 minutes so I don't enter into an infinite loop of reset creates an error, which resets, which creates an error, etc...
-5 minutes later the bat file is renamed to it's original name so it is again accessible to SageAlert/Growler/Scripty.

So now I have self-correcting HDPVRs!!
Thank you, thank you thank you!

Just a question/remark though:
On ERRORS, the description is passed entirely to Scripty.
On WARNINGS, the description is truncated when it reaches Scripty.

Below is extract of the log file I create from the bat file that checks description, analyzes it to see which unit to reboot:

Quote:
Sat 09/19/2009 17:04:53.31 test
Sat 09/19/2009 17:05:34.76 test
Sat 09/19/2009 17:05:41.02 test
-desc "ERROR: Failed to load the video capture device Hauppauge HD PVR Capture Device #2. Please check to make sure the device is properly connected and the proper drivers are installed. You may need to restart the device or reboot your machine to correct the problem."
Sat 09/19/2009 17:11:06.91 Recycling HDPVR2
-desc "WARNING: The device input "Hauppauge
Sat 09/19/2009 17:11:07.87 Recycling HDPVR1
-desc "WARNING: The device input "Hauppauge
Sat 09/19/2009 17:19:11.15 Recycling HDPVR1
-desc "WARNING: The device input "Hauppauge
Sat 09/19/2009 17:33:12.38 Recycling HDPVR1
-desc "ERROR: Failed to load the video capture device Hauppauge HD PVR Capture Device #2. Please check to make sure the device is properly connected and the proper drivers are installed. You may need to restart the device or reboot your machine to correct the problem."
Sat 09/19/2009 17:41:13.00 Recycling HDPVR2
As you can see all WARNINGS are truncated. Every line on the above is generated by the same bat file line so I don't think it's an variable size problem or a syntax problem. ERRORS are passed on in full. Although the above is HDPVR1 Warnings and HDPVRs ERRORS, I had similar results with WARNINGS on HDPVR2. I just hadn't coded the log file yet.

Because my HDPVRS have the same descriptive name (unfortunately) except for a "#2" at the end, the only way to analyze which is which is to have the full description, at least all the way to where the "#2" is.

The SageAlert WARNING email does contain the full description, but the growler/scripty description gets truncated. I don't know why. Can you check your end?

In any case, I may have discovered by pure accident that resetting the wrong HDPVR -even while it's recording- isn't a big deal as the down time appears to be short enough not to affect the recording (!!). So I may change the whole resetting logic and reset both HDPVRS whenever an error is detected...

Still, intellectually it would be nice to positively identify each tuner and reset that one only. I'm 100% there on ERRORS, but not on warnings...

Thanks again.
Eric

Last edited by eric3a; 09-19-2009 at 05:09 PM.
  #85  
Old 09-19-2009, 05:37 PM
sleonard's Avatar
sleonard sleonard is offline
Sage Icon
 
Join Date: Nov 2003
Posts: 1,506
Very nice. Perhaps you could share your scripts and setup?

S
  #86  
Old 09-19-2009, 06:07 PM
eric3a eric3a is offline
Sage Advanced User
 
Join Date: Jul 2009
Location: Houston by the Sea
Posts: 226
Sure.

The main part is a remotely controllable power strip. I have one of these.
It can be controlled via a web interface or a command line program.

Run SageAlert (no fiuher intro needed!).
Run Growler for Windows. See here.
I run Growler on the same machine as SageTV and SageAlert so SageAlert connects to growler on 127.0.0.1

Get Scripty, a display method for Growler here. (bottom of the page).

Now set up SageAlert to send the ERRORS you want to Growler, and setup Growler to display them using Scripty as the display.
Scripty comes with a sample bat file which will extract the type of message, title, description of the error and a few other bits of info.
I was only concerned with the description so my bat file is:

Quote:
@echo off
:: app
echo %1 %2
shift
shift
::id
echo %1 %2
shift
shift
:: type
echo %1 %2
shift
shift
:: title
echo %1 %2
shift
shift
:: desc
echo %1 %2
echo %1 %2 | find "#2"
echo %1 %2>> growler.log

if errorlevel 1 goto :not-found

:found
::#2 found so it's HDPVR2 needs recycling
echo %date% %time% Recycling HDPVR2>> growler.log
call HDPVR2CYCLE.bat
goto :end

:not-found
:: #2 not found so it's HDPVR1 that needs recylcing
echo %date% %time% Recycling HDPVR1>> growler.log
call HDPVR1CYCLE.bat
:end

:: bat file renamer renames bat so it can't run for a while
:: then waits for 5 minutes before renaming bat back so it can be run again

call renamer
As you see fairly simple.
HDPVR1.bat and HDPVR2.bat are 1 liner bat files that cycle each unit, using the command line interface from my remotely controllable power strip.
Quote:
UU.W32.exe IPOFUNIT:PORT LOGON:PASSWORD PLUGNUMBERpulse

Renamer.bat is also very simple file which renames the Scripty bat file for 5 minutes so it becomes inaccessible to SageAlert/Growler for that period of time to avoid an infinite loop.

Quote:
ren scripty_sample.bat ScriptyRecentReset.bat
call wait 300
ren ScriptyRecentReset.bat scripty_sample.bat
Wait is a classic one:
Quote:
@ping 127.0.0.1 -n 2 -w 1000 > nul
@ping 127.0.0.1 -n %1% -w 1000> nul
That's it!
The sad part is it took me the best part of an afternoon to get it going. In my defense the testing is slow once you get to actual testing as it takes minutes every time you crash an HDPVR on purpose.

I hope this helps.
If any one sees way to make this cleaner/faster/better, I'm game!

In particular a way to positively identify each tuner when one is called:
"Hauppauge HD PVR Capture Device Component"
and the other one:
"Hauppauge HD PVR Capture Device #2 Component"
I can only figure a way to negatively recognize the first, as not being the second.
Maybe counting the number of characters between quotes?

Eric
  #87  
Old 09-19-2009, 07:14 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by eric3a View Post
The SageAlert WARNING email does contain the full description, but the growler/scripty description gets truncated. I don't know why. Can you check your end?
All good on my end. It appears the error alerts have no double quotes in them but the warning alerts do appear to have double quotes in them. I'd be double quoting the msg txt in your bat, I'm pretty sure that's the problem.
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
  #88  
Old 09-19-2009, 08:58 PM
eric3a eric3a is offline
Sage Advanced User
 
Join Date: Jul 2009
Location: Houston by the Sea
Posts: 226
Thanks Slugger; Much appreciated.

At least I know it's my side!

It could be the quotes, but even double-quoting I'm still getting a truncated description.
I suspect there is a special character after the word "Hauppauge" and the quotes aren't the problem. The truncation does not happen at a quote mark (just before the word "Hauppauge"). There is no quotation mark that I could see after that word, yet that's where the troubles happen.

I'm stumped, and it's likely because I'm not good at string manipulation in bat files.

Amazingly, cycling a perfectly working HDPVR throws in a WARNING but doesn't hurt the resulting video, which must be buffered on the server enough to withstand about 5 to 10 seconds with no power. I was pleasantly surprised when I watched the news I recorded this afternoon while I mistakenly reset the tuner recording them to find out there were no blips in the recording!

So for the time being, if I can positively identify #2 tuner, I only reset that one.
If I can't positively identify the tuner (truncated description), I reset both.

Eric
  #89  
Old 09-19-2009, 09:18 PM
eric3a eric3a is offline
Sage Advanced User
 
Join Date: Jul 2009
Location: Houston by the Sea
Posts: 226
So now that I have automated the error correction process anyone know how to disable the popup screens telling me about errors?

I still need the system messages of course. Just want to get rid of th big splash screen in the middle of the interface that popups on severe errors.

Eric
  #90  
Old 09-23-2009, 07:33 AM
jsonnabend jsonnabend is offline
Sage Aficionado
 
Join Date: Sep 2006
Posts: 301
I just got an email from Sage that my cable company added a new channel. The channel is nothing I'm excited about, but the email from SageAlert was tre cool. Thanks again, Slugger, for this excellent plug-in.

- Jeff
  #91  
Old 09-23-2009, 08:18 AM
eric3a eric3a is offline
Sage Advanced User
 
Join Date: Jul 2009
Location: Houston by the Sea
Posts: 226
I got a similar email after Dish added 2 channels also, although I didn't think I would. I thought I had configured SageAlert for Errors only. I'll need to check that.

The great part though was seeing that the alert did not trigger Growler/Scripty and did not reset my HDPVRs, so that part is screening HDPVR errors only.

It's really nice to know my HDPVRs will just "take care of themselves".
I love SageAlert!

Eric
  #92  
Old 09-23-2009, 12:11 PM
Brent Brent is offline
SageTVaholic
 
Join Date: May 2006
Location: KC, Missouri
Posts: 3,695
Finally got around to installing this - very cool concept by the way.

I have Growler alerts working and e-mail alerts working, but can't seem to get the twitter part to work. I tried test and it doesn't even work there. SageTweet worked fine although I removed it so I could more easily test this app.

Any suggestions on what to look for in the logs or some settings thing I missed?

UPDATE: It appears that "end recordings" alerts do work for twitter alerts, but start recordings only work with e-mail. Strange

Last edited by Brent; 09-23-2009 at 01:22 PM.
  #93  
Old 09-23-2009, 03:49 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by Brent View Post
Finally got around to installing this - very cool concept by the way.

I have Growler alerts working and e-mail alerts working, but can't seem to get the twitter part to work. I tried test and it doesn't even work there. SageTweet worked fine although I removed it so I could more easily test this app.

Any suggestions on what to look for in the logs or some settings thing I missed?

UPDATE: It appears that "end recordings" alerts do work for twitter alerts, but start recordings only work with e-mail. Strange
Check sagealert.log (in the SageTV root dir). It should show the result of each attempt to post a tweet. Is it giving an error there? If so, then you will have to increase the log level in order for the exceptions to be logged. In sagealert.log4j.properties change the first INFO to TRACE (don't bother increasing the SQL logging level), save the file then restart SageAlert.

I was having problems with Twitter in that it would reject some updates with a "408 error" (you'll see 408 in the exception). If that's the error you're seeing then it's on Twitter's end - they are throttling updates. I saw the same thing during testing when I had recording started and recording finished alerts turned on for Twitter - the second one would always fail. I opened a ticket with Twitter - they haven't responded yet. After my initial testing I've just been tweeting recording finished posts and haven't had any problems since. Twitter is doing something weird that is causing the start/end tweets from working properly (assuming you're also seeing the "408" exception errors).
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
  #94  
Old 09-23-2009, 04:04 PM
Brent Brent is offline
SageTVaholic
 
Join Date: May 2006
Location: KC, Missouri
Posts: 3,695
Here's the error I'm getting:
Code:
2009-09-23 16:59:25,110 ERROR [TwitterServer]: 'New notification server test event...' notification FAILED to 'Twitter @geektonichtpc'
But the error numbers are across the board for "twitterserver": I'm also seeing a 437 error, 531 error, 375 error, 187 error, 921, 328,

Last edited by Brent; 09-23-2009 at 04:06 PM.
  #95  
Old 09-23-2009, 05:22 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by Brent View Post
Here's the error I'm getting:
Code:
2009-09-23 16:59:25,110 ERROR [TwitterServer]: 'New notification server test event...' notification FAILED to 'Twitter @geektonichtpc'
But the error numbers are across the board for "twitterserver": I'm also seeing a 437 error, 531 error, 375 error, 187 error, 921, 328,
Did you turn on trace level logging and get the exceptions? And those are the error numbers in the exception messages? If so, like I said, Twitter has been doing weird things with the throttling of accounts since their latest DoS attack. If the errors continue, I'd post a ticket with Twitter and have them investigate if they've throttled the account you're using for some reason.
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
  #96  
Old 09-29-2009, 08:35 PM
darcilicious's Avatar
darcilicious darcilicious is offline
Sage Icon
 
Join Date: Jul 2009
Location: Venus
Posts: 1,306
So I'm still having the disappearing file(s) issue but wasn't going to hassle with it any further but then I read this:

http://forums.sagetv.com/forums/show...7&postcount=57

Is this what I'm experiencing?
  #97  
Old 09-29-2009, 09:01 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by darcilicious View Post
So I'm still having the disappearing file(s) issue but wasn't going to hassle with it any further but then I read this:

http://forums.sagetv.com/forums/show...7&postcount=57

Is this what I'm experiencing?
No (or at least as far as I can tell). I do not specify the temp dir in any of my app's context files, which is why Jetty ends up exploding the war file into a dir in your temp folder. I'm still inclined to believe that something or someone is wiping your temp folder periodically. If you were experiencing this problem then I'd likely have similar reports from other users or I'd see the behaviour myself and I've got neither.
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
  #98  
Old 09-30-2009, 08:31 AM
darcilicious's Avatar
darcilicious darcilicious is offline
Sage Icon
 
Join Date: Jul 2009
Location: Venus
Posts: 1,306
Okay, thanks for the followup.

And just to clarify, nothing else in my temp folder is getting removed as far as I can tell, there's always tons of crap in there so I have to wonder why only the SageAlert stuff?

Anyhow, at some point I'll probably go with the non-standard way you described previously since updates to SageAlert aren't coming fast and furious now. Thanks again for all your work on this great app!
  #99  
Old 10-01-2009, 07:54 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Would it make sense to have SageAlert notify you that SRE is monitoring a given event - i.e.
Code:
'NHL Hockey' has just started recording and is being monitored by SRE.
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
  #100  
Old 10-01-2009, 09:42 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by wayner View Post
Would it make sense to have SageAlert notify you that SRE is monitoring a given event - i.e.
Code:
'NHL Hockey' has just started recording and is being monitored by SRE.
Hmm...

[10 mins later... after pondering the idea while reading my email]

Yes, I can't argue that the idea is logical and it actually seems like such info would be useful. The problem is that there's no way for SageAlert to know about SRE and what it's doing. All the current alerts work by communicating with the SageTV API. The API provides a well defined, consistent way to peek into the state of a SageTV system and generate events based on what I find. Now obviously I have the advantage in that I author both plugins in question and so I could create that "well defined, consistent" mechanism by which SageAlert can figure out what SRE is doing, but defining and implementing that system is a bit of a time consuming process and I can't envision any other use for a public SRE API. And on top of that, I'd have to create another monitor thread that would actually end up doing nothing but chewing up memory for no reason b/c based on download stats it's safe to assume/speculate that very few SageAlert users also have SRE installed.

With all that said, I personally would find that info useful so that means there's a slightly better chance that it could happen, but I wouldn't hold one's breath waiting for it (especially b/c I've got myself buried in SJQ v3, which is working, but has surfaced a possible need to rewrite some larger chunks of it and if I actually take that plunge then my SageTV play time is probably booked solid through the new year).
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
Closed Thread


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
Plugin: MizookLCD (Alternate SageTV LCDSmartie Plugin) cslatt SageTV Customizations 48 06-11-2012 10:44 AM
MediaPlayer Plugin/STV Import: Winamp Media Player Plugin deria SageTV Customizations 447 12-11-2010 07:38 PM
Hulu: Possible to Use XBMC Hulu Plugin to create SageTV Plugin? Brent SageTV Customizations 8 02-24-2009 04:16 PM
Netflix Plugin DwarF SageTV Customizations 8 01-23-2006 08:40 PM
REMOTE WONDER II Plugin? casperse Hardware Support 13 11-08-2004 05:17 PM


All times are GMT -6. The time now is 02:47 AM.


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