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
  #1  
Old 09-08-2009, 02:02 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Arrow Plugin: SageAlert

SageAlert is a SageTV plugin that allows you to send notifications of significant SageTV events to any number of accounts on any number of notification systems. Download from the project web site (visit the downloads tab).

For those of you who have been using SageTweet, this plugin is its replacement. Development of SageTweet (by me, anyways, the source code will remain in Google Code for anyone who may want to run with it) has ceased.

With SageAlert, you can register multiple accounts on any of the supported notification systems and send notification of any event to as many accounts as you like. In the current version (0.0.3.526), the following notification services are supported:

* Twitter
* Growl MacOS X/Windows

By v1.0.0 I also plan to add support for email based notifications. These are the only three types of notification systems I plan to support. Feel free to try and convince me to add others, but I'll probably just end up sending you to this wiki doc. The reason SageAlert came to be and SageTweet ceased development is because I spent a great amount of effort redesigning the application architecture to make adding new notification systems a (relatively, depending on your coding skills) simple process. I'm not saying I won't add new notification systems, but I encourage people to implement systems they want themselves and submit a patch for inclusion into the project.

In the current version, SageAlert will fire the following alerts (a.k.a. events):

* Alert when a new system message is generated by SageTV
* Alert when a recording starts
* Alert when a recording has completed
* Alert when recording conflicts are detected
* Alert when recording space is low
* Alert when a local client, extender or placeshifter is playing back a media file
* Alert when a UI (client, extender, placeshifter) connects to the SageTV server
* Alert when a UI (client, extender, placeshifter) disconnects from the SageTV server

Again, these are the only events I plan on supporting, but, again, I've also taken great effort to redesign the app architecture to make adding new event types pain free. If you're not Java literate then feel free to suggest new event types (or modifications to the existing ones). Event mods/additions are much more likely to be done by me than adding a new notification system.

The current version is beta, but is based on the SageTweet code base, which was production ready at the time I abandoned ship, so to speak. There are some bugs and some rough edges, but the core is rather solid. Of course, the more who test the quicker bugs will be found and squashed.

Todo/Known Issues
  • Add email notification support
  • Add ability to label (alias) clients/extenders/placeshifters (regression from SageTweet)
  • Add ability to disable media viewing notifications for specific clients (regression from SageTweet)
  • UI cleanups
  • Any other issues brought up by testers

SageAlert runs in the Jetty environment and therefore you need Jetty installed and running to install SageAlert. Once Jetty is running, download the zip and unzip it from the base installation directory of SageTV (typically C:\Program Files\SageTV\SageTV\). Remember to maintain directory structure when unzipping! Once that's done, the app is running. The app is deployed to the /sagealert context so visit:

http://your_jetty_srv/sagealert/

Create one or more notification accounts, attach them to the various alert types, then sit back and await your notifications.

More formal install docs are coming; feel free to post questions here in the mean time, if necessary.
__________________
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...
  #2  
Old 09-08-2009, 03:54 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Can I just install this on top of SageTweet and SageTweet will cease to be? Or should I be deleting all of the SageTweet files -if so in what folders? contexts and webapps?
__________________
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
  #3  
Old 09-08-2009, 03:58 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by wayner View Post
Can I just install this on top of SageTweet and SageTweet will cease to be? Or should I be deleting all of the SageTweet files -if so in what folders? contexts and webapps?
Nope, they're two separate apps, but they'll happily run alongside each other. So go ahead and install SageAlert and you access it at /sagealert on your Jetty server.

To remove SageTweet, simply got to SageTV/jetty/contexts/ and delete the SageTweet.context.xml file. This will undeploy the application. Then you can safely delete the SageTweet.war file from SageTV/jetty/webapps/ and that's all the files you need to cleanup.
__________________
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...
  #4  
Old 09-08-2009, 04:06 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Slugger - you need to update your sig to add SageAlert
__________________
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
  #5  
Old 09-08-2009, 04:27 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by Slugger View Post
By v1.0.0 I also plan to add support for email based notifications. These are the only three types of notification systems I plan to support. Feel free to try and convince me to add others, but I'll probably just end up sending you to this wiki doc.
SMS seems like an obvious candidate for a fourth system. I'd personally rank it above email (and Twitter and whatnot), since my phone already supports it without having to go out and sign up for some third-party messaging service.

That said, most mobile phone carriers (including mine) have an email-to-SMS gateway that lets you email text messages to any phone number in their system. So once you have email support working, adding SMS support may just involve a thin wrapper on top of the email support module.
__________________
-- Greg
  #6  
Old 09-08-2009, 04:29 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Greg we had this discussion in the SageTweet thread - Twitter can be sent to SMS but I argued that email makes more sense. If you have a Blackberry or iPhone (or other smartphone) then email is likely cheaper than SMS, at least in North America. And if you are geeky enough to be a Sage user on these forums and want one of these apps then you likely have a smartphone.
__________________
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
  #7  
Old 09-08-2009, 04:58 PM
ToxMox's Avatar
ToxMox ToxMox is offline
Sage Icon
 
Join Date: Oct 2003
Location: NJ
Posts: 1,980
It would be cool if you could configure command lines or batch files to run when events trigger. Like if a system event is triggered and it is a bad one you could make the server reboot.
  #8  
Old 09-08-2009, 05:05 PM
farfromuman farfromuman is offline
Sage Advanced User
 
Join Date: Apr 2004
Location: Knoxville, TN
Posts: 128
Slugger thanks for the hard work and coding the Growl support so far this beta it is working perfectly for me.
__________________
Server: Sage 9; 8TB, i5 4690k 16GB DDR3 2XHDHR3, Windows 10 PRO 64BIT

Client 1: HD300; Panasonic TC-P65S64;
Client 2: HD300; Samsung 46" LCD;
Client 3: HD300; 60" LCD;
  #9  
Old 09-08-2009, 05:18 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by wayner View Post
Slugger - you need to update your sig to add SageAlert
Done.
__________________
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...
  #10  
Old 09-08-2009, 05:21 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by ToxMox View Post
It would be cool if you could configure command lines or batch files to run when events trigger. Like if a system event is triggered and it is a bad one you could make the server reboot.
Wrong plugin. Someone (was it you?) asked for this feature in SJQ. Big undertaking to make it happen, but if it's going to happen, that's the plugin where it will happen, not here so keep an eye on this ticket (star it if you want updates on the fate of that feature request).
__________________
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...
  #11  
Old 09-08-2009, 05:50 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by wayner View Post
Greg we had this discussion in the SageTweet thread - Twitter can be sent to SMS but I argued that email makes more sense. If you have a Blackberry or iPhone (or other smartphone) then email is likely cheaper than SMS, at least in North America. And if you are geeky enough to be a Sage user on these forums and want one of these apps then you likely have a smartphone.
I took a quick look at the other thread (which I have not been following since I have zero interest in Twitter and do not intend to get a Twitter account just for this). For me, email is acceptable but SMS still makes more sense for a couple of reasons: (1) I get a fair amount of email spam, and essentially zero SMS spam, and (2) SMS is pretty near instantaneous, whereas email to my phone has a polling delay of 15-30 minutes. I could increase the polling frequency, but that's a tradeoff against battery life. Anyway the upshot is that SMS is much more likely to get my attention immediately. As far as cost goes, I have a comfortable amount of headroom in my current SMS plan, so the incremental cost of a few Sage-related SMS messages is essentially zero.

Note that I'm not arguing against email support; I think it's a good idea. I'm just advocating going the extra step and providing a simple SMS wrapper as well, so that people can just enter their phone number and carrier and the plugin knows where to find that carrier's email-to-SMS gateway.
__________________
-- Greg
  #12  
Old 09-08-2009, 05:53 PM
ToxMox's Avatar
ToxMox ToxMox is offline
Sage Icon
 
Join Date: Oct 2003
Location: NJ
Posts: 1,980
Ok so I've installed Sage alert and can connect and configure it. I am running growl for windows and am unclear exactly what steps need to be taken to get my machine with growl to communicate with the sagealert plugin.
  #13  
Old 09-08-2009, 06:07 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by ToxMox View Post
Ok so I've installed Sage alert and can connect and configure it. I am running growl for windows and am unclear exactly what steps need to be taken to get my machine with growl to communicate with the sagealert plugin.
So you register your Growl server on the Growl settings tab first. Then you go to the Alerts tab and for each alert you want to send to Growl you click on the configure link and then attach the Growl server to that alert and save it. That's all you should have to do. If that's not working then look in sagealert.log (in SageTV root install dir). Is it telling you that it's trying to send the message to Growl? If so, is it saying that it failed?
__________________
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...
  #14  
Old 09-08-2009, 06:10 PM
ToxMox's Avatar
ToxMox ToxMox is offline
Sage Icon
 
Join Date: Oct 2003
Location: NJ
Posts: 1,980
Quote:
Originally Posted by Slugger View Post
Wrong plugin. Someone (was it you?) asked for this feature in SJQ. Big undertaking to make it happen, but if it's going to happen, that's the plugin where it will happen, not here so keep an eye on this ticket (star it if you want updates on the fate of that feature request).
Ok I voted. Not sure if it was me
Nothing wrong with also wanting that functionality in this plugin. The nice thing about it is people could get alerts to work with many things that have command line utilities. Like I'm sure SMS alerts could easily be generated via a command line if for some reason SMS functionality doesn't get put in. This would allow for people to easily use their own alert system without getting heavy into the coding or having to ask for it to be added to the plugin. Just need to be able to pass variables to the batch/command line.
  #15  
Old 09-08-2009, 06:20 PM
ToxMox's Avatar
ToxMox ToxMox is offline
Sage Icon
 
Join Date: Oct 2003
Location: NJ
Posts: 1,980
Quote:
Originally Posted by Slugger View Post
So you register your Growl server on the Growl settings tab first. Then you go to the Alerts tab and for each alert you want to send to Growl you click on the configure link and then attach the Growl server to that alert and save it. That's all you should have to do. If that's not working then look in sagealert.log (in SageTV root install dir). Is it telling you that it's trying to send the message to Growl? If so, is it saying that it failed?
Is running the windows Growl client considered the "Growl server"? It asks for a password in the SageAlert config but I'm unclear on where to set that up on the Growl client. If anyone has the working with Growl for Windows what exact steps did you do to get the alerts to show up in Growl?
Code:
2009-09-08 20:17:09,272 ERROR [GrowlServer]: Failed to connect with 'Growl @ zippy'; will try again on next use of object
2009-09-08 20:17:09,272 ERROR [GrowlServer]: 'New recording started...' notification FAILED to 'Growl @ zippy'
2009-09-08 20:17:09,272 INFO  [RecordingMonitor]: Firing recording started event for 'Shark Tank'
2009-09-08 20:17:09,272 INFO  [RecordingMonitor]: Thread sleeping...
  #16  
Old 09-08-2009, 06:28 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by GKusnick View Post
I took a quick look at the other thread (which I have not been following since I have zero interest in Twitter and do not intend to get a Twitter account just for this). For me, email is acceptable but SMS still makes more sense for a couple of reasons: (1) I get a fair amount of email spam, and essentially zero SMS spam, and (2) SMS is pretty near instantaneous, whereas email to my phone has a polling delay of 15-30 minutes. I could increase the polling frequency, but that's a tradeoff against battery life. Anyway the upshot is that SMS is much more likely to get my attention immediately. As far as cost goes, I have a comfortable amount of headroom in my current SMS plan, so the incremental cost of a few Sage-related SMS messages is essentially zero.

Note that I'm not arguing against email support; I think it's a good idea. I'm just advocating going the extra step and providing a simple SMS wrapper as well, so that people can just enter their phone number and carrier and the plugin knows where to find that carrier's email-to-SMS gateway.
Hmm... I think users are going to have to do the research and figure out their cell phone's email to sms address. I like the idea of an SMS wrapper that just takes the phone number and provider then does the rest, but undoubtedly I'll be missing someone's provider and will have to rebuild, whereas if people find their address themselves and just plug it into the (soon to be written) email notification system then that's way less maintenance for me. I suspect there will be enough bugs in the app to keep me busy without having to maintain an SMS provider to email gateway mapping.

On the other hand, if you're volunteering to convert that wikipedia page to a JSON structure and maintain it for me, then I'll do the rest. But I'm not doing the mapping.
__________________
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...
  #17  
Old 09-08-2009, 06:36 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by ToxMox View Post
Is running the windows Growl client considered the "Growl server"? It asks for a password in the SageAlert config but I'm unclear on where to set that up on the Growl client. If anyone has the working with Growl for Windows what exact steps did you do to get the alerts to show up in Growl?
Code:
2009-09-08 20:17:09,272 ERROR [GrowlServer]: Failed to connect with 'Growl @ zippy'; will try again on next use of object
2009-09-08 20:17:09,272 ERROR [GrowlServer]: 'New recording started...' notification FAILED to 'Growl @ zippy'
2009-09-08 20:17:09,272 INFO  [RecordingMonitor]: Firing recording started event for 'Shark Tank'
2009-09-08 20:17:09,272 INFO  [RecordingMonitor]: Thread sleeping...
Is SageAlert also installed on host 'zippy'? If so, change the host name to 127.0.0.1 (in SageAlert) and leave the password blank. Or load Growl and go to Security and register a password there. Add that password to SageAlert Growl settings - all should be good.

EDIT: You can only post to the localhost (127.0.0.1) without a password. If you try to connect to Growl via any other IP address then you must use a password. You can also force the use of a password on 127.0.0.1 by changing the Security settings in Growl to "require a password for local apps".
__________________
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...

Last edited by Slugger; 09-08-2009 at 06:39 PM. Reason: Explain why you have to use localhost...
  #18  
Old 09-08-2009, 06:45 PM
ToxMox's Avatar
ToxMox ToxMox is offline
Sage Icon
 
Join Date: Oct 2003
Location: NJ
Posts: 1,980
Quote:
Originally Posted by Slugger View Post
Is SageAlert also installed on host 'zippy'? If so, change the host name to 127.0.0.1 (in SageAlert) and leave the password blank. Or load Growl and go to Security and register a password there. Add that password to SageAlert Growl settings - all should be good.

EDIT: You can only post to the localhost (127.0.0.1) without a password. If you try to connect to Growl via any other IP address then you must use a password. You can also force the use of a password on 127.0.0.1 by changing the Security settings in Growl to "require a password for local apps".
SageAlert is not installed on Zippy. I am trying to send alerts from my Sage server hostname TITAN where SageAlert is installed to another machine hostname Zippy running Growl. Still not working. Do I need to specify IPs instead of a hostname?
  #19  
Old 09-08-2009, 06:53 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by ToxMox View Post
SageAlert is not installed on Zippy. I am trying to send alerts from my Sage server hostname TITAN where SageAlert is installed to another machine hostname Zippy running Growl. Still not working. Do I need to specify IPs instead of a hostname?
Try IP addresses. Also, when you deleted the Growl id with no password to replace it with the one with a password (since you're trying to access a remote Growl you must setup a password) you removed all the alert registrations so you would have to go back to alerts and and the new Growl server to all the alerts again. If it still doesn't work, then are the logs still showing the attempt to connect and it says failed?
__________________
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...
  #20  
Old 09-08-2009, 07:02 PM
ToxMox's Avatar
ToxMox ToxMox is offline
Sage Icon
 
Join Date: Oct 2003
Location: NJ
Posts: 1,980
Quote:
Originally Posted by Slugger View Post
Try IP addresses. Also, when you deleted the Growl id with no password to replace it with the one with a password (since you're trying to access a remote Growl you must setup a password) you removed all the alert registrations so you would have to go back to alerts and and the new Growl server to all the alerts again. If it still doesn't work, then are the logs still showing the attempt to connect and it says failed?
Thanks for all the help. Figured it out. Two things were going on.
1) I had static DHCP on my Tomato router set to the MAC address of the other NIC on Zippy so it wasn't pulling the IP that TITAN would try to connect to when connecting via hostname.
2) Looks like SageAlert needs the complete hostname to work in my environment. I have my network dns suffix as dandyfine.local so I needed to specify zippy.dandyfine.local in the SageAlert Plugin. If I just tried zippy even though I can ping zippy from TITAN it wouldn't work.

Thanks for the great plugin!
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 01:04 PM.


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