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
  #141  
Old 09-12-2010, 12:49 PM
lenkost lenkost is offline
Sage User
 
Join Date: Sep 2008
Posts: 65
Exact command is "sa.exe". No command line parameters. sa.exe is located in default SageTV directory. I have simplified code for testing. Here it is:

Code:
Sub Main()
    Dim Match As String
    Dim Env As String
    
    Match = "Hauppauge HD PVR Capture Device"
    Env = Trim(Environ("SA_LONG"))
    If LCase(Trim(Command)) = "test" Then Env = "The capture device input Hauppauge HD PVR Capture Device Component had a failure while trying to start the recording of ""Aeon Flux"" on TNTHD on physical channel 825 at Sun 9/12 3:30."
    
    If Env <> "" Then
        If InStr(1, Env, Match, vbTextCompare) > 0 Then
            Shell (App.Path & "\UU.W32.exe 192.168.0.200:80 admin:1234 3off")
            Call Pause(5)
            Shell (App.Path & "\UU.W32.exe 192.168.0.200:80 admin:1234 3on")
        End If
    End If
End Sub
sagealert.log:
Code:
2010-09-12 14:13:42,242 INFO  [z]: Event received: SystemMessagePosted :: {SystemMessage=The capture device input Hauppauge HD PVR Capture Device Component had a failure while trying to start the recording of "Groundhog Day" on UHD on physical channel 822 at Sun 9/12 13:00.}
2010-09-12 14:13:42,242 INFO  [k]: Processing event 'New ERROR system message generated' with exe 'C:\Program Files\SageTV\SageTV\sa.exe' and env {SA_MED=New system message generated: Capture Device Failure while Starting Recording; see SageTV server for details., SA_LONG=The capture device input Hauppauge HD PVR Capture Device Component had a failure while trying to start the recording of "Groundhog Day" on UHD on physical channel 822 at Sun 9/12 13:00., SA_SUBJ=New ERROR system message generated, SA_SHORT=New system message generated: Capture Device Failure while Starting Recording; see SageTV server for details., SA_SOURCE=ErrorSysMsgPosted}
2010-09-12 14:13:42,242 INFO  [z]: Event received: SystemMessagePosted :: {SystemMessage=The device input "Hauppauge HD PVR Capture Device Component" stopped producing data while recording "Groundhog Day" on UHD on physical channel 822. SageTV will try to reset the device. This may be caused by a channel that is no longer available.}
2010-09-12 14:13:42,242 INFO  [k]: Processing event 'New ERROR system message generated' with exe 'C:\Program Files\SageTV\SageTV\sa.exe' and env {SA_MED=New system message generated: Halt Detected in Recording; see SageTV server for details., SA_LONG=The device input "Hauppauge HD PVR Capture Device Component" stopped producing data while recording "Groundhog Day" on UHD on physical channel 822. SageTV will try to reset the device. This may be caused by a channel that is no longer available., SA_SUBJ=New ERROR system message generated, SA_SHORT=New system message generated: Halt Detected in Recording; see SageTV server for details., SA_SOURCE=ErrorSysMsgPosted}
2010-09-12 14:13:47,977 WARN  [k]: Running 'C:\Program Files\SageTV\SageTV\sa.exe' (no output captured from successful execution)
2010-09-12 14:13:47,977 WARN  [k]: Running 'C:\Program Files\SageTV\SageTV\sa.exe' (no output captured from successful execution)
If I run exe manually with command line parameter "test" it sucsesfully execute UU.W32.exe to cycle power on HD-PVR. Nothing happens if started from SageAlert.
__________________
Vostro 200, Intel Core 2 Duo 2.53Ghz, Windows XP Pro as a Server and Client
Quad Core 2.66 PC on 1000 MHz network for Comskip and AirVideo
4 x Comcast RNG110 tuners, 3 x Firewire + 1 USB-Uirt Channel control
4 x HD-PVR, 1 WinTV 1850 Composite and TS
SageTV V7.0.23

Last edited by lenkost; 09-12-2010 at 04:31 PM.
Reply With Quote
  #142  
Old 09-12-2010, 01:18 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Add some print statements to the code to ensure it's actually getting inside the If statement when triggered by SageAlert (I suspect it's not). As far as what SageAlert is doing, it looks fine. SageAlert is launching the sa.exe and it's running and returning a status code of 0, which means it ran successfully (not that it did what you expected, but that the JVM launched the exe, the exe ran, and the exe didn't crash/fail to execute).

Additionally, I'd dump all the env vars in your VB code to ensure the SageAlert ones are showing up as expected. They should be - they do for me, but I only tested using shell scripts (Linux) and batch files (Windows).

EDIT: Please surround code and log output with code tags - makes it soooo much easier to read.
__________________
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...
Reply With Quote
  #143  
Old 09-12-2010, 04:29 PM
lenkost lenkost is offline
Sage User
 
Join Date: Sep 2008
Posts: 65
The full version of exe includes log file creation.
Here is the log:

Code:
09/12/2010 06:04:24 PM Start
SageAlert text:
The device input "Hauppauge HD PVR Capture Device #2 Component" stopped producing data while recording "Fox News Sunday With Chris Wallace" on FNCHD on physical channel 820. SageTV will try to reset the device. This may be caused by a channel that is no longer available.
09/12/2010 06:04:24 PM Sending "Off" command to Outlet #4
Command: c:\program files\sagetv\sagetv\uu.w32.exe 192.168.0.200:80 admin:1234  4off
Return code: 6336
09/12/2010 06:04:24 PM Waiting 5 sec.
09/12/2010 06:04:29 PM Sending "On" command to Outlet #4
Command: c:\program files\sagetv\sagetv\uu.w32.exe 192.168.0.200:80 admin:1234  4on
Return code: 7400
09/12/2010 06:04:29 PM Waiting 180 sec.
Shell Command returns processID or 0 if error.
As you can see, the message is received successfully and shell command is executed but does not work.

I have attached the source and compiled exe if it helps.
Conditions and Commands are set in sa.properties which must be in the same folder as sa.exe
Attached Files
File Type: zip sa.zip (10.0 KB, 128 views)
__________________
Vostro 200, Intel Core 2 Duo 2.53Ghz, Windows XP Pro as a Server and Client
Quad Core 2.66 PC on 1000 MHz network for Comskip and AirVideo
4 x Comcast RNG110 tuners, 3 x Firewire + 1 USB-Uirt Channel control
4 x HD-PVR, 1 WinTV 1850 Composite and TS
SageTV V7.0.23
Reply With Quote
  #144  
Old 09-12-2010, 04:54 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Replace the call to uu.w32.exe with a simple batch file that just echoes something to the console. Does that work? Is uu.w32.exe a GUI app or is it interactive (i.e. it expects input to function)? If so, calling it via java.lang.Process just may not work (as warned about in the javadoc link above). If replacing the call to uu.w32.exe with a simple batch file does work then that's the problem and you will not be able to call that exe via Java.
__________________
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...
Reply With Quote
  #145  
Old 09-12-2010, 08:04 PM
lenkost lenkost is offline
Sage User
 
Join Date: Sep 2008
Posts: 65
Replaced the call to uu.w32.exe with a simple exe file with a command line parameter. Like:
Shell(app.path & "\Test1.exe abcdef" where test1.exe saves "abcdef" in a text file. This works OK.

The uu.w32.exe is not a GUI app and not interactive. It only uses command line parameters and apparently controls Web Power Switch sending requests to its built in Web Server.
__________________
Vostro 200, Intel Core 2 Duo 2.53Ghz, Windows XP Pro as a Server and Client
Quad Core 2.66 PC on 1000 MHz network for Comskip and AirVideo
4 x Comcast RNG110 tuners, 3 x Firewire + 1 USB-Uirt Channel control
4 x HD-PVR, 1 WinTV 1850 Composite and TS
SageTV V7.0.23
Reply With Quote
  #146  
Old 09-12-2010, 08:33 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
There's something weird going on then... when you call uu.w32.exe, do the processes actually finish or do they appear to hang (i.e. do a bunch of uu.w32.exe processes end up hanging around in task manager even though they appear to have already completed)?

My guess is there's something funky going on with Java calling sa.exe which calls uu.w32.exe. Something is not cooperating in the middle of that (probably uu.w32.exe). Let's try it this way now:

Register uu.w32.exe directly with SageAlert (the latest build I posted a couple hours ago adds the ability to specify [static] command line args). Does it work properly when called directly by SageAlert? If so, then my guess is you need to change the way you execute the command in your VB code - you must consume the I/O from any process you trigger (because of the way Java triggers subprocesses). If you don't eat the I/O then the OS buffer will fill and deadlock the process. SageAlert handles this for any process it triggers, which is why it'll be interesting to see if registering uu.w32.exe directly with SageAlert actually works. I'm not 100% sure that's the problem, but I'm starting to lean towards that. It's been years since I've written any VB code and the experience I had back then was minimal, at best, so I'm not the one to provide anymore feedback on the VB code.
__________________
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...
Reply With Quote
  #147  
Old 09-12-2010, 08:47 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
You might also want to change your call to Shell() to something like:

Shell("uu.w32.exe", AppWinStyle.Hide, True, 15000)

The most important of those being specifying the wait arg as true so as to ensure the caller waits for the subprocess to complete. Hiding the window may make Java happy, too. Not sure, just taking a stab at it. But using the wait arg means you can also skip the sleep call since the first call won't return until it's done. This may also make your PVR power up a little faster (assuming the first command finishes in much less than 5 seconds).

If none of this works then you might have to skip the middle man and just write a script/program that directly interacts with the power bar's web server - assuming that the API to talk to that web server is publicly available.
__________________
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...
Reply With Quote
  #148  
Old 09-12-2010, 10:22 PM
lenkost lenkost is offline
Sage User
 
Join Date: Sep 2008
Posts: 65
Registered uu.w32.exe directly with SageAlert
Command line: 192.168.0.200:80 admin:1234 4off
Did not work
SageAlert Log:

Code:
2010-09-13 00:16:21,259 INFO  [v]: Received event: RecordingStarted :: {MediaFile=MediaFile[id=11770270 A[11675265,11675212,"Matlock",46710@0913.00:00,120] mask=TV host=lentv encodedBy=Hauppauge HD PVR Capture Device #2 Great-H.264 format=MPEG2-TS 0:00:00 0 kbps [] E:\SageTV2\Matlock-TheFinalAffair-11675265-0.ts, Seg0[Mon 9/13 0:16:15.594-Wed 12/31 19:00:00.000]]}
2010-09-13 00:16:21,275 INFO  [k]: Processing event 'A new recording has started' with exe 'C:\Program Files\SageTV\SageTV\UU.W32.exe' and env {SA_MED=A new recording has started: 'Matlock', SA_LONG=A new recording has started: 'Matlock: The Final Affair', SA_SUBJ=A new recording has started, SA_SHORT=A new recording has started: 'Matlock', SA_SOURCE=RecordingStarted}
2010-09-13 00:16:21,400 WARN  [k]: Running '"C:\Program Files\SageTV\SageTV\UU.W32.exe" 192.168.0.200:80 admin:1234 4off' (error during execution [rc = 11004]; output below)

UserUtil 4.1 (c) DLI 2008

500 Can't connect to 192.168.0.200:80 (Bad protocol 'tcp') at UU line 152.
__________________
Vostro 200, Intel Core 2 Duo 2.53Ghz, Windows XP Pro as a Server and Client
Quad Core 2.66 PC on 1000 MHz network for Comskip and AirVideo
4 x Comcast RNG110 tuners, 3 x Firewire + 1 USB-Uirt Channel control
4 x HD-PVR, 1 WinTV 1850 Composite and TS
SageTV V7.0.23
Reply With Quote
  #149  
Old 09-13-2010, 05:32 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
The command is failing for whatever reason (the error means nothing to me). I don't think there's much else I can do from SageAlert. SageAlert is launching the exe with the expected env vars and command line. Why the command fails when launched from Java and not from the command prompt nor Growl is unknown to me. I'm sure it has something to do with how Java launches processes, but I really can't do much else.

I'd play around with how you invoke the Shell() function in your VB code to see if that helps. Keep me updated. I'm curious to know what the answer is, if one is discovered.
__________________
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...
Reply With Quote
  #150  
Old 09-13-2010, 09:15 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
@lenkost Please upgrade to SageAlert 2.0.0.1013 and try again with uu.w32.exe registered with SageAlert. I found a bug in my code where I was replacing the child process environment with the SageAlert env vars instead of copying the parent's env and injecting the SageAlert vars into it.
__________________
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...
Reply With Quote
  #151  
Old 09-13-2010, 01:05 PM
lenkost lenkost is offline
Sage User
 
Join Date: Sep 2008
Posts: 65
This update fixed everything. Both uu.w32.exe directly and the full code from zip above work as they should. Thanks.
__________________
Vostro 200, Intel Core 2 Duo 2.53Ghz, Windows XP Pro as a Server and Client
Quad Core 2.66 PC on 1000 MHz network for Comskip and AirVideo
4 x Comcast RNG110 tuners, 3 x Firewire + 1 USB-Uirt Channel control
4 x HD-PVR, 1 WinTV 1850 Composite and TS
SageTV V7.0.23
Reply With Quote
  #152  
Old 09-14-2010, 07:19 PM
lenkost lenkost is offline
Sage User
 
Join Date: Sep 2008
Posts: 65
Thanks for the last update.

I have another request.

I am using a dedicated quad core computer to run Comskip and AirVideo Server. Even with the quad core having 4 instances of Comskip consume almost 100% CPU. And the is no space for AirVideo which is also CPU hungry process.
I would go to SageAlert WEB UI via my iPhone, change the client Resources to 50 (2 Comskips running). Then I can use AirVideo Live Conversion.

I would like to request an additional option for Client: Disable/Enable.
Disabling client should kill all current jobs. Enabling client should run MediaFileQueueLoader to add them back.

Or if possible to add drop-down to quickly specify number of processes for this client killing extra jobs if any.

Editing Resources on a tiny iPhone screen is very inconvinient.

Thanks again.
__________________
Vostro 200, Intel Core 2 Duo 2.53Ghz, Windows XP Pro as a Server and Client
Quad Core 2.66 PC on 1000 MHz network for Comskip and AirVideo
4 x Comcast RNG110 tuners, 3 x Firewire + 1 USB-Uirt Channel control
4 x HD-PVR, 1 WinTV 1850 Composite and TS
SageTV V7.0.23
Reply With Quote
  #153  
Old 09-14-2010, 08:16 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by lenkost View Post
Thanks for the last update.

I have another request.

I am using a dedicated quad core computer to run Comskip and AirVideo Server. Even with the quad core having 4 instances of Comskip consume almost 100% CPU. And the is no space for AirVideo which is also CPU hungry process.
I would go to SageAlert WEB UI via my iPhone, change the client Resources to 50 (2 Comskips running). Then I can use AirVideo Live Conversion.

I would like to request an additional option for Client: Disable/Enable.
Disabling client should kill all current jobs. Enabling client should run MediaFileQueueLoader to add them back.

Or if possible to add drop-down to quickly specify number of processes for this client killing extra jobs if any.

Editing Resources on a tiny iPhone screen is very inconvinient.

Thanks again.
Seems like this post should be in the SJQv3 thread. Feel free to post there if you want to discuss this further, but SJQ is in a holding pattern while I ponder its future. Feature requests are not likely to be addressed anytime soon. Your best bet is to open a feature request ticket at the project site.
__________________
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...
Reply With Quote
  #154  
Old 09-14-2010, 08:29 PM
lenkost lenkost is offline
Sage User
 
Join Date: Sep 2008
Posts: 65
Sorry, will move it there
__________________
Vostro 200, Intel Core 2 Duo 2.53Ghz, Windows XP Pro as a Server and Client
Quad Core 2.66 PC on 1000 MHz network for Comskip and AirVideo
4 x Comcast RNG110 tuners, 3 x Firewire + 1 USB-Uirt Channel control
4 x HD-PVR, 1 WinTV 1850 Composite and TS
SageTV V7.0.23
Reply With Quote
  #155  
Old 09-16-2010, 08:01 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
WARNING: Next build will disable process executor server type!

This is a warning that the next build will disable the process executor server type for the non-licensed version. If you like the feature, do not want to donate and you do not want to build your own version of SageAlert then you do not want to update to the next version.
__________________
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...
Reply With Quote
  #156  
Old 09-18-2010, 02:50 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Snapshot 1017 ready!

Snapshot 1017 is now available and provides two key changes:
  • The process executor server type now requires a license file
  • All alert messages for core events are customizable!
Now when you configure your events you will see a series of text boxes allowing you to specify custom messages for each and every (core) event supported by SageAlert. Formal docs on how to use this feature are a work in progress, but those familiar with SJQ should be comfortable with this feature in SageAlert, though there are some subtle differences.

For users who don't care about this feature and are quite happy with the way messages are presented in alerts now then you don't have to change anything. The default values for the custom messages were kept exactly the same, where possible. Please note, however, that some alert messages were forced to change slightly. A future build will attempt to address those cases. If you fit into this category, I ask that you upgrade and report any problems (regression bugs) that you see with this new build.

For those who want to take advantage of this new feature, please read this intro/primer carefully.

First, unfiltered access to the underlying SageTV API is being provided via these custom messages. This can be very dangerous! You can unknowingly cause some serious damage to your system through the use of this feature. Please don't come whining to me when you foobar your system through use of this feature (either through user error or possible bugs in the code). This is an advanced feature. If you're not comfortable with it then DO NOT MODIFY THE CUSTOM ALERT MESSAGES. You've been warned! With that out of the way, I feel like some very interesting use cases can come from this new feature so let's dive into it!

When you configure the custom message for alerts you have access to special API objects. The number and types of these objects will vary based on the type of alert you're configuring. These objects are referenced in your message text via the $n object, where n is a number starting at 0. What objects do these refer to? That's dependent on the alert being configured. On each alert config screen there is now a "View Arguments" button. Clicking this button will show a popup listing the objects available for the alert you're configuring. The popup also shows the type of each object. You may call any instance method against that object, including state modification methods! (i.e. MediaFile.DeleteFile()) This is very dangerous, but very powerful. Be careful when you start experimenting with this feature - you can foobar your system rather easily if you are not careful!

Now, most arguments are going to be of type gkusnick.sagetv.api.*, which are all wrappers for the SageTV API. The javadocs are already installed in your SageTV server at /SageTV/SageTV/GKusnick/ToolsLib/doc/. If the popup tells you $0 is of type gkusnick.sagetv.api.MediaFileAPI$MediaFile then load the javadocs for that type and in your message text you can reference $0.GetMediaTitle(), for example, and that string will be replaced by the object call's result. Looking at the default values for all the various alerts will show examples of how to use the various types.

The other common types are
com.google.code.sagetvaddons.sagealert.shared.Client, which provides two public methods:

getAlias(): The client's configured alias mapping
getId(): The client's ID (IP address for PC clients or MAC address for extender/placeshifter)

Global objects:

In addition to event specific objects, which are numbered 0:n, there are also global objects, which provide access to global info and functions of interest. In this initial release, there is just one global object:

$date of type com.google.code.sagetvaddons.sagealert.server.globals.Date extends java.util.Date, which always references the current date/time and is a java.util.Date that provides one extra method: format(String): Format the date given the SimpleDateFormat pattern

Global objects can be used in any custom message.

$date.format("H:mm z") becomes 16:39 EDT

Other global objects will be added as I need them, but I encourage you to request additional global objects as well. If there is global data you need access to then suggest additional global objects.

This was a rather large delivery (update) to the code base so regression bugs are likely. Please report any weirdness to me. Also, feedback on this feature is welcomed.
__________________
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-18-2010 at 03:06 PM.
Reply With Quote
  #157  
Old 09-18-2010, 06:15 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Snapshot 1020 ready

Didn't take long to find some things worth fixing!

1020 has some important fixes. Nothing's horribly broken in 1017, but these were just important enough for me to make another build before I head out for the evening:
  • Fix default message strings for playback events
  • Add new global: $utils (com.google.code.sagetvaddons.sagealert.server.globals.Utilities)
  • Javadocs for SageAlert now available online so you can lookup what you can do with all of these objects. View the javadocs here.
  • Include the Airing and Show arguments with the MediaDeleted events
  • A few other minor tweaks and fixes

With the addition of the new $utils global, you can print the episode name of a Show or the empty string if the episode is empty. The default long message for the client media playback now looks like this:

Code:
Media playback of '$0.GetMediaTitle()$utils.concatIfNotEmpty(": ", $2.GetShowEpisode())' has started on client '$3.getAlias()'
For a show with a blank episode, the above would evaluate to:

Media playback of 'Cops' has started on client 'HD200'

And a show with episode data would evaluate as:

Media playback of 'NFL Football: Miami Dolphins at Minnesota Vikings' has started on client 'HD200'
__________________
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...
Reply With Quote
  #158  
Old 09-19-2010, 07:33 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Thanks - I have have added the Episdoe to my recording messages and it works great so far. Have you created a variable for Server Name yet? For the Short, Medium and Long Messages, how do you differentiate what message gets sent?
__________________
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
Reply With Quote
  #159  
Old 09-19-2010, 08:03 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by wayner View Post
Thanks - I have have added the Episdoe to my recording messages and it works great so far. Have you created a variable for Server Name yet? For the Short, Medium and Long Messages, how do you differentiate what message gets sent?
Just finished some updates that I'm building now...

The new build (uploading now) contains the $srv global. See the javadocs (link above) for what's available via that object ($srv.getAddress() seems to be what you want, OS info is also available - see javadocs).

The type of message sent is a choice of each notification platform. Twitter always uses short, CSV file always uses long, each email address configured can choose what it receives, Growl uses medium (I believe, can't remember, but its choice is hardcoded), and the process executor uses them all (by injecting all message formats into the process env it creates). Twitter isn't configurable (since there's a 140 character limit on the message so it always works off the short format). CSV file could be configurable, I just didn't make it that way. Same with Growl. Email is configurable and process executor doesn't need to be since it provides them all.

New build contains other enhancements and fixes - see release notes for plugin for all the details. Of interest, $n objects can now be used as arguments to other API calls (e.g. $0.doSomething($1) is now valid; used to be $1 had to have a method call on it to be parsed properly).

The updated builds are going to be coming fast and furious as I enhance this feature. This new "scripting language" (term used loosely here), of sorts, I'm introducing here is also becoming the basis of my next project so I expect lots of changes, updates, enhancements, fixes, etc. over the next few weeks. I definitely ask that everyone keep updating and providing feed back/bug reports/etc.
__________________
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...
Reply With Quote
  #160  
Old 09-21-2010, 10:26 AM
kevine kevine is offline
Sage Expert
 
Join Date: Aug 2007
Posts: 514
Latest release: 1040

From the log regarding license file:

2010-09-21 10:17:31,046 INFO [AppInitializer]: Checking license...
2010-09-21 10:17:31,156 ERROR [u]: LicenseReadError
java.lang.NullPointerException
at com.google.code.sagetvaddons.sagealert.server.u.<init>(SourceFile:83)
at com.google.code.sagetvaddons.sagealert.server.u.<clinit>(SourceFile:64)
at com.google.code.sagetvaddons.sagealert.server.AppInitializer.contextInitialized(SourceFile:66)
at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1239)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:466)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.deployer.ContextDeployer.deploy(ContextDeployer.java:268)
at org.mortbay.jetty.deployer.ContextDeployer.access$000(ContextDeployer.java:67)
at org.mortbay.jetty.deployer.ContextDeployer$ScannerListener.fileAdded(ContextDeployer.java:89)
at org.mortbay.util.Scanner.reportAddition(Scanner.java:410)
at org.mortbay.util.Scanner.reportDifferences(Scanner.java:324)
at org.mortbay.util.Scanner.scan(Scanner.java:280)
at org.mortbay.util.Scanner$1.run(Scanner.java:232)
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)
2010-09-21 10:17:31,156 INFO [u]: License file is invalid or not found; some features of this software have been disabled:
SMTP server support disabled.
Only one notification sent per event.

License file placed in SageTV\plugins\
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
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
Plugin: SageAlert Slugger SageTV Customizations 201 06-28-2010 07:47 PM
SageAlert new release notifications Slugger Customization Announcements 2 03-06-2010 09:53 AM
Hulu: Possible to Use XBMC Hulu Plugin to create SageTV Plugin? Brent SageTV Customizations 8 02-24-2009 04:16 PM


All times are GMT -6. The time now is 10:23 AM.


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