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
  #161  
Old 01-28-2010, 03:38 PM
eric3a eric3a is offline
Sage Advanced User
 
Join Date: Jul 2009
Location: Houston by the Sea
Posts: 226
Quote:
I got everything running (not tested completely).

I had to add
"CD C:\Program Files\Growl for Windows\Displays\Scripty"
as the fiirst line in "Rename.bat"

I broke the five minute wait somehow? I edited out "300" and it renames back in like a second.

Where do I put the 300 again?
Good news on the first part.

The wait 300 goes after the bat renamed from regular name to "recentreset" or however I called it. (Still not in front of my machine). And before the second rename which renames it back to the regular name.

As soon as I can I'll PM you the current files I have on my machine.
Eric
  #162  
Old 01-28-2010, 07:03 PM
jerryt jerryt is offline
Sage Fanatic
 
Join Date: Oct 2007
Posts: 832
Quote:
Originally Posted by eric3a View Post
Good news on the first part.

The wait 300 goes after the bat renamed from regular name to "recentreset" or however I called it. (Still not in front of my machine). And before the second rename which renames it back to the regular name.

As soon as I can I'll PM you the current files I have on my machine.
Eric
Eric3a

Thanks for helping understand these batch files.
I have two additional questions;
1) What is the logic of this script;
"@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"

and 2) What is the logic of this script;
"@ping 127.0.0.1 -n 2 -w 1000 > nul
@ping 127.0.0.1 -n %1% -w 1000> nul"
  #163  
Old 01-28-2010, 08:07 PM
eric3a eric3a is offline
Sage Advanced User
 
Join Date: Jul 2009
Location: Houston by the Sea
Posts: 226
The first part simply reads each output of the controllable power strip in turn before moving on to the next one:
:: app
echo %1 %2
shift
shift
::id
echo %1 %2
shift
shift
Read the app value and output it to screen, move on to the id value, output it to screen, etc...

until you reach the description field (commented as ::desc) which is then tested to see if it contains the string "#2".

----

The second part is a classic wait function done by pinging your own machine.

Take care;
Eric
  #164  
Old 03-18-2010, 10:42 PM
davephan's Avatar
davephan davephan is offline
Sage Icon
 
Join Date: Mar 2004
Location: Minnesota
Posts: 1,911
I installed the current Jetty, SageAlert, and Common Logging Upgrade. I have all the e-mail categories checked for both e-mail addresses. I am getting some e-mail alerts, but only for one of the two e-mail accounts configured. Only two 'recordings started' e-mail alerts were received at one e-mail address and zero alerts at the other re-mail address. About six recordings actually started at various times. The e-mail test buttons do not work.

The e-mail configuration area greys out when I click on "save", which is an indicator to me the e-mail addresses actually saved. However, the SMTP configuration did not grey out when it's save button was pressed.

I'm not sure what might be causing the e-mail to be unreliable. I use Acronis on the same system, which has a SMTP configuration area for it's e-mail alerting. The Acronis e-mail alerting is consistently reliable. I'm not sure why the e-mails are not reliable using SageAlert.

Dave
  #165  
Old 03-19-2010, 08:35 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
In the sagetv root install dir should be a file called sagealert.log. What does it have to say? It should record each time it tried to send an email along with any errors it encountered.
__________________
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...
  #166  
Old 03-19-2010, 11:11 PM
davephan's Avatar
davephan davephan is offline
Sage Icon
 
Join Date: Mar 2004
Location: Minnesota
Posts: 1,911
After using SageAlert for a couple days, I've found the e-mail is just not dependable. I get some messages and miss other messages.

I checked the sagealert.log file. I was able to match up some of the e-mails received with the logged events. I sometimes don't receive messages the recording is starting, and sometimes don't receive messages that the program is stopping recording.

I did see some errors like this one in the sagealert.log file:

2010-03-19 22:00:51,843 ERROR [EmailServer]: Error sending email
javax.mail.MessagingException: Could not connect to SMTP host: smtp.comcast.net, port: 25, response: 421

Maybe this is a problem with the Comcast e-mail system.

The Comcast e-mail seems to be reliable for the Acronis backup software notifications. However, there are very few e-mails sent with Acronis compared to SageAlert.

Dave
  #167  
Old 03-19-2010, 11:53 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by davephan View Post
2010-03-19 22:00:51,843 ERROR [EmailServer]: Error sending email
javax.mail.MessagingException: Could not connect to SMTP host: smtp.comcast.net, port: 25, response: 421
421 means "service not available". It could mean the mail server is down for maintenance and refusing connections, but my guess is that there's probably a spam filter in place using this error code to reject messages it doesn't like. Make sure you're using a well-formed sender name in the From address, and try adding that address to your spam filter's whitelist (if there is one).
__________________
-- Greg
  #168  
Old 03-20-2010, 07:44 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Most ISPs require that the from address is at least from the domain of the ISP (@comcast.net in this case), and in some cases it might even have to be a valid, registered email address in that domain. And in more extreme cases, it might have to be the email address registered to the MAC address associated with the cable modem from which the email is coming from. As GKusnick said, ensure the from address is set appropriately in the SageAlert SMTP settings. If you still have problems, I'd suggest using Google's SMTP server with a Gmail account to send your emails. I use Gmail, as a way to keep my SMTP server ISP agnostic, and I've never had a missed email (knock on wood).

In either case, the SageAlert logs you've provided are showing that your ISP SMTP server is rejecting emails and that's why you're not getting all email alerts from SageAlert. Based on what you've provided, there is no bug with SageAlert.
__________________
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...
  #169  
Old 03-20-2010, 08:18 AM
davephan's Avatar
davephan davephan is offline
Sage Icon
 
Join Date: Mar 2004
Location: Minnesota
Posts: 1,911
Quote:
Originally Posted by Slugger View Post
Most ISPs require that the from address is at least from the domain of the ISP (@comcast.net in this case), and in some cases it might even have to be a valid, registered email address in that domain. And in more extreme cases, it might have to be the email address registered to the MAC address associated with the cable modem from which the email is coming from. As GKusnick said, ensure the from address is set appropriately in the SageAlert SMTP settings. If you still have problems, I'd suggest using Google's SMTP server with a Gmail account to send your emails. I use Gmail, as a way to keep my SMTP server ISP agnostic, and I've never had a missed email (knock on wood).

In either case, the SageAlert logs you've provided are showing that your ISP SMTP server is rejecting emails and that's why you're not getting all email alerts from SageAlert. Based on what you've provided, there is no bug with SageAlert.
I would like to trying using Google e-mail. What is the smtp address and port number for gmail?

Dave
  #170  
Old 03-20-2010, 11:36 AM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
just an fyi - i use the comcast smtp server to send my sagealert emails (using my @gmail address as the from address) and i've never noticed missing any alerts... I do the same thing with my raid controller and also receive all the alerts i should be...


and here is Google's smtp settings
__________________
Server 2003 r2 32bit, SageTV9 (finally!)
2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast)
2x HD300, 1x SageClient (Win10 Test/Development)
Check out TVExplorer
  #171  
Old 03-20-2010, 01:35 PM
davephan's Avatar
davephan davephan is offline
Sage Icon
 
Join Date: Mar 2004
Location: Minnesota
Posts: 1,911
Razrsharpe,

Thanks for the link. I setup my Google e-mail, and it is reliable so far.

I did notice a little inconsistency of the messages when I tested it with starting and stopping a timed recording, which has nothing to do with the unreliable e-mail problem I was having with Comcast e-mail.

When I start a timed recording the message is:
'Timed Record' started recording at 14:10 CDT

When the timed recording ends, the message is a bit different.
'Channel 2-1' finished recording at 14:15 CDT

It might be nicer if the first message, when starting a manual timed recording also included the channel number. It would be easier to relate the separate e-mails to each other if they both had the channel number included in the messages in this example.

Dave
  #172  
Old 03-20-2010, 11:30 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
That's a result of Sage changing the title of the timed recording after it's done. Since there's no way to know it's a timed recording (via an API call) then there's no way I can do this (other than to add the channel for all recordings, which, in general, I don't think we'd want).
__________________
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...
  #173  
Old 04-30-2010, 05:03 PM
toricred's Avatar
toricred toricred is offline
Sage Icon
 
Join Date: Jan 2006
Location: Northern New Mexico
Posts: 1,729
Quote:
Originally Posted by eric3a View Post
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:



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.



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.



Wait is a classic one:


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
I see this works great for setups with 2 HD-PVRs. I happen to have 4 HD-PVRs and am trying to use a modified version of the script. I think I'm going to have a problem since I need to run find for #4, #3, and #2. Since the errorlevel that shows it isn't found, I believe I need to be able to reset the errorlevel after each find command. Anybody have any ideas how to make this modification?
  #174  
Old 04-30-2010, 07:28 PM
jerryt jerryt is offline
Sage Fanatic
 
Join Date: Oct 2007
Posts: 832
Quote:
Originally Posted by toricred View Post
I see this works great for setups with 2 HD-PVRs. I happen to have 4 HD-PVRs and am trying to use a modified version of the script. I think I'm going to have a problem since I need to run find for #4, #3, and #2. Since the errorlevel that shows it isn't found, I believe I need to be able to reset the errorlevel after each find command. Anybody have any ideas how to make this modification?
If the error messages are each unique, then you can have the error messages writen to a txt file and use; (File compare) in a bat file to compare the current error file with your previously saved known four error messages. Then build a logic tree in the bat file where it checks the current error against the four saved errors until it finds a match, then you trigger the recycle of power on that HDPVR.

It would look like this,

:Compare1
fc currenterror.txt SavedHDPVR1error.txt
if errorlevel 1 goto Compare2
if errorlevel 0 goto task1

:Compare2
fc currenterror.txt SavedHDPVR2error.txt
if errorlevel 1 goto Compare3
if errorlevel 0 goto task2

:Compare3
fc currenterror.txt SavedHDPVR3error.txt
if errorlevel 1 goto Compare4
if errorlevel 0 goto task3

:Compare4
fc currenterror.txt SavedHDPVR4error.txt
if errorlevel 1 goto Trouble
if errorlevel 0 goto task4

:task1
recycle HDPVR1
goto end

:task2
recycle HDPVR2
goto end

:task3
recycle HDPVR3
goto end

:task4
recycle HDPVR4
goto end

:Trouble
@ehco UNKNOWN ERROR

:end

pause

Last edited by jerryt; 04-30-2010 at 07:48 PM.
  #175  
Old 05-01-2010, 11:21 AM
toricred's Avatar
toricred toricred is offline
Sage Icon
 
Join Date: Jan 2006
Location: Northern New Mexico
Posts: 1,729
That looks great, but don't you need to reset the errorlevel before each check?
  #176  
Old 05-01-2010, 01:10 PM
jerryt jerryt is offline
Sage Fanatic
 
Join Date: Oct 2007
Posts: 832
Quote:
Originally Posted by toricred View Post
That looks great, but don't you need to reset the errorlevel before each check?
I have not tried it with tiers of errorlevel's but it does work fine with one tier. You will have to try.

I have my server set to sleep (S3) and I have my HDPVR's recycling the power everytime the computer wakes from sleep. So HDPVR errors are non existent for me at the moment.

Reset errorlevel
C:\>verify >nul
http://consultingblogs.emc.com/merri...ogramming.aspx

Last edited by jerryt; 05-01-2010 at 03:34 PM.
  #177  
Old 05-04-2010, 08:39 PM
toricred's Avatar
toricred toricred is offline
Sage Icon
 
Join Date: Jan 2006
Location: Northern New Mexico
Posts: 1,729
I finally got a chance to try to run this with some real errors (it actually took a long time to force errors) and it's running into a problem. It appears that the issue is the fact that the title of the show is appearing inside of quotation marks and it thinks that's the end of the error. Any suggestions?
  #178  
Old 05-04-2010, 09:17 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Who thinks that's the end of the error message? SageAlert? An external processor? Which alert type is it that's putting titles inside single quotes (though I think all of them might do that)?
__________________
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...
  #179  
Old 05-04-2010, 09:21 PM
toricred's Avatar
toricred toricred is offline
Sage Icon
 
Join Date: Jan 2006
Location: Northern New Mexico
Posts: 1,729
It's an outside batch file triggered by growler. It probably is done by all the messages (this is a system message error), but I never noticed it before because I generally don't use the actual text for anything external. This is just my first attempt to help automate recovery from HD-PVR errors.
  #180  
Old 05-05-2010, 04:41 AM
jerryt jerryt is offline
Sage Fanatic
 
Join Date: Oct 2007
Posts: 832
Quote:
Originally Posted by toricred View Post
It appears that the issue is the fact that the title of the show is appearing inside of quotation marks and it thinks that's the end of the error. Any suggestions?
"It thinks", "It" is the cmd window or growl?
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.