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
  #401  
Old 02-03-2011, 10:59 AM
Spectrum Spectrum is offline
Sage Expert
 
Join Date: Aug 2006
Posts: 720
Quote:
Originally Posted by Slugger View Post
You're queuing up tasks named 'MVMEDIA' from the queue up script, but your sjqagent.properties file references a task named 'MVMEDIAFILE'. As far as I can tell, you have no task client capable of running tasks named 'MVMEDIA'. I'd probably change the queue up script to queue up 'MVMEDIAFILE' tasks instead of 'MVMEDIA' tasks.
It's always the little things! It's queued up and working now. Thanks for the fresh set of eyes
Reply With Quote
  #402  
Old 02-03-2011, 05:09 PM
lenkost lenkost is offline
Sage User
 
Join Date: Sep 2008
Posts: 65
Still cannot make it work
It does not convert to network path.
Attached log, config and script.

Thank you.
Attached Files
File Type: zip Files.zip (9.0 KB, 151 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
  #403  
Old 02-03-2011, 05:31 PM
K O K O is offline
Sage User
 
Join Date: Sep 2009
Location: Austin, TX
Posts: 68
SJQ4 throwing a lot of errors and crashing my server

I've got hundreds of logs that are full of nothing but this:


==============================

===== Thu Feb 03 16:25:33 CST 2011 =====

LOG4J: Configured Logging for: sagex-api using file: sagex-api.log4j.properties
javax.script.ScriptException: java.lang.NumberFormatException: null


==============================

===== Thu Feb 03 16:26:03 CST 2011 =====

LOG4J: Configured Logging for: sagex-api using file: sagex-api.log4j.properties
javax.script.ScriptException: java.lang.NumberFormatException: null


==============================

===== Thu Feb 03 16:26:3 P3 CST 2011 =====

LOG4J: Configured Logging for: sagex-api using file: sagex-api.log4j.properties
javax.script.ScriptException: java.lang.NumberFormatException: null


==============================

===== Thu Feb 03 16:27:03 CST 2011 =====

LOG4J: Configured Logging for: sagex-api using file: sagex-api.log4j.properties
javax.script.ScriptException: java.lang.NumberFormatException: null


==============================

===== Thu Feb 03 16:27:33 CST 2011 =====

LOG4J: Configured Logging for: sagex-api using file: sagex-api.log4j.properties
javax.script.ScriptException: java.lang.NumberFormatException: null


==============================

===== Thu Feb 03 16:28:03 CST 2011 =====

LOG4J: Configured Logging for: sagex-api using file: sagex-api.log4j.properties
javax.script.ScriptException: java.lang.NumberFormatException: null


==============================

===== Thu Feb 03 16:28:33 CST 2011 =====

LOG4J: Configured Logging for: sagex-api using file: sagex-api.log4j.properties
javax.script.ScriptException: java.lang.NumberFormatException: null


The error occurs every single minute, and there are so many of these that my server has thrown out of memory errors twice and frozen sage server. I increaed the JVM heap from 768mb to 1280mb, but all I've done is increased the amount of time it will take for SJQ4 to crash my system. Any idea why this is happening? When I disable SJQ4, everything works, except no Comskip.

I'm kicking myself for accidentally clicking the 'update all plugins' button, and spacing on the fact that it would destroy my perfectly working SJQ3 setup. SJQ4 has been nothing but a disaster so far for me. I appreciate the development effort, but it did not take into account the fact that some people don't like to poke bees nests and actually like when things just work.

A little help will go a long way. Thank you!
Reply With Quote
  #404  
Old 02-03-2011, 05:53 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by K O View Post
I've got hundreds of logs that are full of nothing but this:


==============================

===== Thu Feb 03 16:25:33 CST 2011 =====

LOG4J: Configured Logging for: sagex-api using file: sagex-api.log4j.properties
javax.script.ScriptException: java.lang.NumberFormatException: null


==============================

===== Thu Feb 03 16:26:03 CST 2011 =====

LOG4J: Configured Logging for: sagex-api using file: sagex-api.log4j.properties
javax.script.ScriptException: java.lang.NumberFormatException: null


==============================

===== Thu Feb 03 16:26:3 P3 CST 2011 =====

LOG4J: Configured Logging for: sagex-api using file: sagex-api.log4j.properties
javax.script.ScriptException: java.lang.NumberFormatException: null


==============================

===== Thu Feb 03 16:27:03 CST 2011 =====

LOG4J: Configured Logging for: sagex-api using file: sagex-api.log4j.properties
javax.script.ScriptException: java.lang.NumberFormatException: null


==============================

===== Thu Feb 03 16:27:33 CST 2011 =====

LOG4J: Configured Logging for: sagex-api using file: sagex-api.log4j.properties
javax.script.ScriptException: java.lang.NumberFormatException: null


==============================

===== Thu Feb 03 16:28:03 CST 2011 =====

LOG4J: Configured Logging for: sagex-api using file: sagex-api.log4j.properties
javax.script.ScriptException: java.lang.NumberFormatException: null


==============================

===== Thu Feb 03 16:28:33 CST 2011 =====

LOG4J: Configured Logging for: sagex-api using file: sagex-api.log4j.properties
javax.script.ScriptException: java.lang.NumberFormatException: null
Where are you finding these files?

Quote:
The error occurs every single minute, and there are so many of these that my server has thrown out of memory errors twice and frozen sage server. I increaed the JVM heap from 768mb to 1280mb, but all I've done is increased the amount of time it will take for SJQ4 to crash my system. Any idea why this is happening? When I disable SJQ4, everything works, except no Comskip.
Presumably, you've got so many tasks queued up and constantly being returned that you've run out of memory. Neglecting something that isn't working certainly won't magically fix itself. The error looks like the comskip tasks aren't being queued properly with metadata. But I'm going to need a lot more info than this to diagnose the problem. What task(s) have you configured? Plugin client task? Windows service client task? How are you queuing up your comskip tasks? Recording event(s)? Crontab? Both? Something else?

Quote:
I'm kicking myself for accidentally clicking the 'update all plugins' button, and spacing on the fact that it would destroy my perfectly working SJQ3 setup. SJQ4 has been nothing but a disaster so far for me. I appreciate the development effort, but it did not take into account the fact that some people don't like to poke bees nests and actually like when things just work.
You should really kick yourself for not reading the release notes before upgrading to notice that it was a major version upgrade (v3 to v4). Further more, there was weeks (months, actually) of discussion in the forums about the major changes that v4 was going to introduce. Then I gave a two (maybe three??) week heads up in the SJQv3 forum that SJQv4 was coming to the plugin repository and it didn't function at all like v3 and would require a complete reconfiguration.

Quote:
A little help will go a long way. Thank you!
I'm more than willing to help, but you've got to provide more details for me. Start with telling me how many tasks are in your active queue? This, I suspect, is the cause of the OOM errors. The script errors are moot because all scripts that SJQv4 runs are run in a separate JVM, so a script itself can never cause SageTV to crash.
__________________
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
  #405  
Old 02-03-2011, 07:12 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
@lenkost Think I got it figured out this time.

Change line 37 of the Groovy script from this:

Code:
File path = Tools.mapDir(new File(SJQ4_METADATA.get("SJQ4_PATH") + File.separator)) // Remap it based on client settings
To this:

Code:
File path = new File(Tools.mapDir(SJQ4_METADATA.get("SJQ4_PATH") + File.separator)) // Remap it based on client settings
I tested this change a few different ways (and multiple times) and I finally got the expected result. Hopefully you do, too.
__________________
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
  #406  
Old 02-03-2011, 08:39 PM
lenkost lenkost is offline
Sage User
 
Join Date: Sep 2008
Posts: 65
After this change everything works perfect. Great job Thank you.

I am trying to learn Groovy scripts. When I run a test script in IDE environment I get this error:

Code:
Exception thrown
groovy.lang.MissingPropertyException: No such property: SJQ4_METADATA for class: comskip_test_old
	at comskip_test_old.run(comskip_test_old.groovy:31)
What is missing? IDE is running on a desktop on SageTV 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
  #407  
Old 02-03-2011, 08:54 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by lenkost View Post
After this change everything works perfect. Great job Thank you.

I am trying to learn Groovy scripts. When I run a test script in IDE environment I get this error:

Code:
Exception thrown
groovy.lang.MissingPropertyException: No such property: SJQ4_METADATA for class: comskip_test_old
	at comskip_test_old.run(comskip_test_old.groovy:31)
What is missing? IDE is running on a desktop on SageTV server.
http://code.google.com/p/sagetv-addo.../Sjq4GroovyIde

Specifically, bullet #3. There is no way for me to provide the SJQ4_METADATA map to a script running outside of SJQ. Well, I could, and actually, I have a way, but you basically have to define it on the command line to SageGroovy. I haven't implemented that yet, so in the meantime, what I do for scripts that need SJQ4_METADATA is I just define it at the top of the script to simulate what SJQ would be providing:

Code:
def SJQ4_METADATA = ["SJQ4_PATH":"D:\\tv", "SJQ4_ID":"123456"]
Then before I put the script in production in my SJQ env, I'd just comment that line out. Then I can uncomment it anytime I need to debug the script in SageGroovy.

Also note that you will always want to check for updates to SageGroovy (the latest being 0.0.3.1372). The last number in the version corresponds to the task client version it will simulate. i.e. the latest version acts like task client 4.0.0.1372 (minus the noted exceptions in the wiki doc above).
__________________
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
  #408  
Old 02-03-2011, 10:10 PM
lenkost lenkost is offline
Sage User
 
Join Date: Sep 2008
Posts: 65
METADATA issue is resolved but now when running test script I get this:

Code:
1 compilation error:
unable to resolve class org.apache.commons.io.FilenameUtils
 at line: 35, column: 1
__________________
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
  #409  
Old 02-03-2011, 11:24 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by lenkost View Post
METADATA issue is resolved but now when running test script I get this:

Code:
1 compilation error:
unable to resolve class org.apache.commons.io.FilenameUtils
 at line: 35, column: 1
You need to exit SageGroovy, copy the commons-io-1.4.jar from your SageTV\JARs\ folder into sagegroovy\lib\ and restart SageGroovy.

More importantly, as you start to get into Groovy scripting, you're going to need to recognize these kinds of errors and how to deal with them. Basically, that exception is telling you that it can't find the FilenameUtils class referenced in your script and based on the full package name, you can deduce that it comes from the Apache Commons IO jar file. Usually, you'd then google that package name and download it off the web. But I already know it's packaged up as part of the SJQ task client plugin and I just forget to package it in SageGroovy, which is why I told you to just grab the jar from SageTV\JARs\.

However, I won't be providing everything prepackaged with SageGroovy. If you introduce your own dependencies then you'll have to add them yourself. All jars found in sagegroovy\lib\ at startup are loaded into the SageGroovy environment (classpath).
__________________
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
  #410  
Old 02-03-2011, 11:28 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Script away tedium!!

So I have a few minutes here and thought I'd share some of my tips on how I use Groovy on a daily basis to do things that would otherwise take me hours...

The most important thing to remember about Groovy scripts with SJQ, is that you can write and run Groovy scripts outside the context of SJQv4 AND you can use the handy SageGroovy IDE to edit and run them!! As a matter of fact, you can run any Groovy script at all from this environment. SageGroovy is just the standard Groovy IDE with additional setup to simulate the SJQ scripting environment. If you wanted to find the lowest common multiple of a list of integers, you could do that in SageGroovy:

Code:
def nums = [32, 84, 821, 33]
print "LCM of ${nums} is "
println lcmm(nums).toString()

// Determine greatest common divisor of two ints
def gcd(a, b){
    // Euclidean algorithm
    while (b != 0) {
        t = b
        b = a % b
        a = t
    }
    return a
}

// Determin lowest common multiple of two ints
def lcm(a, b) {
    return (a * b).intdiv(gcd(a, b))
}

// Find LCM of an arbitrary list of numbers
def lcmm(List args) {
    if(args.size() == 2) {
        return lcm(args[0], args[1])
    } else {
        def arg0 = args.pop()
        return lcm(arg0, lcmm(args))
    }
}
This script will, of course, output 6068832 for the list of numbers specified. You might find SageGroovy is a quick and easy way to get a scripting environment to do all sorts of things.

But... most importantly, SageGroovy is automatically configured to work with the SageTV API.

So let's say you're just installing SJQv4 for the first time and now it's time to attach COMSKIP to all your favourites. Let's say you have 75 favourites. Boy, this doesn't seem fun. Trust me, I didn't think so either. Also trust me when I say that I did not manually attach comskip to all my favs the first time I configured SJQv4 (and I have closer to 100 favs). What I did was load up SageGroovy (Eclipse at the time, but now I'd use SageGroovy) IDE and put the following script in the window and run it:

Code:
for(Object fav : FavoriteAPI.GetFavorites())
   FavoriteAPI.SetFavoriteProperty(fav, "SJQ4_RecordingStarted", "COMSKIP")
And just like that, all my favourites had the COMSKIP task attached to them. Then I just had to go and manually remove the task from my HBO favs, etc. I could have been a little more fancy with the script and filtered out those favs I didn't want attached. Not really that difficult; an exercise for the reader.

But notice how that script doesn't do anything with SJQv4. Doesn't look at any variables from SJQ, etc. This is very important to understand. You can run any Groovy script at all that interacts with the Sage API and does nothing with SJQv4 objects.

A few weeks after doing this I implemented the ability to run tasks after the RecordingStopped event. Well now I wanted all my comskips to happen after the recording instead of queuing up when the recording started. Again, I wasn't going through the GUI to manually make all those changes. Load up SageGroovy and run this script:

Code:
for(Object fav : FavoriteAPI.GetFavorites()) {
   String task = FavoriteAPI.GetFavoriteProperty(fav, "SJQ4_RecordingStarted")
   if(task != null && task.equals("COMSKIP")) {
      FavoriteAPI.SetFavoriteProperty(fav, "SJQ4_RecordingStopped", "COMSKIP")
      FavoriteAPI.SetFavoriteProperty(fav, "SJQ4_RecordingStarted", null)
   }
}
And run this script and it'll convert the COMSKIP task to run on RecordingStopped instead of RecordingStarted. This script is simplistic in that it assumes that only one task would ever be attached to a fav. Obviously a little more care has to be taken when that's not the case. Again, an exercise for the reader.

While in the STV you noticed that one of your recordings of Seinfeld was not archived, as expected. Perhaps someone cleared the flag or maybe you forgot to archive it, etc. Anyway, you've got 150 episodes and you don't really want to manually review each one in the STV to make sure they're archived. Instead, write a quick Groovy script to answer the question for you:


Code:
Object[] eps = Database.FilterByBoolMethod(Database.FilterByMethod(MediaFileAPI.GetMediaFiles("T"), "GetMediaTitle", "Seinfeld", true), "IsLibraryFile", false)
for(Object e : eps) {
    println ShowAPI.GetShowEpisode(e)
}
Run that simple script and it'll output all the episodes that aren't archived. Even better, add MediaFileAPI.MoveFileToLibrary(e) right below the println call and the script will not only find and print those recordings of Seinfeld that aren't archived, but will go ahead and archive them for you.

Studio Expression Evaluator replacement...

I use SageGroovy to replace Studio's expression evaluator. When I'm experimenting with the Sage API I can just use SageGroovy to run arbitrary API calls. Even better, I can run much more complicated API calls as part of my testing.

Hopefully, this post has given you a little taste of what the SageGroovy IDE brings to the table. Not only is it great for writing/debugging/testing SJQv4 Groovy scripts, but it's also great for tackling daily Sage scripting needs. SageGroovy does not need SJQ installed anywhere to be used. You can use it as a standalone SageTV scripting environment and never have to install SJQ to use it. If that's all you ever used SageGroovy for then I think you'd still find major benefits to it!!

Happy scripting!!
__________________
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
  #411  
Old 02-04-2011, 09:53 PM
K O K O is offline
Sage User
 
Join Date: Sep 2009
Location: Austin, TX
Posts: 68
Quote:
Originally Posted by Slugger View Post
Where are you finding these files?
C:\Program Files\SageTV\SageTV\.lobs.db - there are 17 folders with 256x 200kb files each all with the same error repeated at 1 minute intervals. The dates and times match when I toggle on and off the SJQ4 plugin.



Quote:
Originally Posted by Slugger View Post
Presumably, you've got so many tasks queued up and constantly being returned that you've run out of memory. Neglecting something that isn't working certainly won't magically fix itself. The error looks like the comskip tasks aren't being queued properly with metadata. But I'm going to need a lot more info than this to diagnose the problem. What task(s) have you configured? Plugin client task? Windows service client task? How are you queuing up your comskip tasks? Recording event(s)? Crontab? Both? Something else?
I understand fully that I've got an issue and probably set it up wrong. I setup a single task for Comskip, and yes I see a lot of items in the queue - 154 to be exact, which might actually be more than the total number of recordings I have. Some are orange icons, and some are yellow icons. I'm using the windows service client exclusively and have mapped my event trigger to the generic Recording Started event - I like Comskip to start running instantly on all manual and favorite events, but not on liveTV. Comskip runs well for me with the proper live TV settings, and it can keep up with realtime which makes the wife happy.

The Comskips were being assigned and executing successfully from SJQ4 until the server would crash, so it's not completely borked. I have also updated to the 1372 patch since I saw that was available this week, although I have not tested it. Crashing the server 3 times on the 3 nights I worked late this week tested my family's patience with SageTV enough that I wasn't prepared to experiment on them again!

My sjqagent.conf file contains the following:
task.comskip1.resources=50
task.comskip1.exe=c\:/comskip/comskip.exe
task.comskip1.maxtime=28800
agent.mapdir=
task.comskip1.rcmin=0
agent.schedule=ON
task.comskip1.args="$SJQ4_PATH\\$SJQ4_LAST_SEGMENT"
task.comskip1.test=c\:/sjqagent/comskip_test.groovy
task.comskip1.rcmax=0
task.comskip1.schedule=ON
task.comskip1.testargs=mpg
agent.resources=100
agent.port=23344
task.comskip1.maxtimeratio=1.0
task.comskip1.maxprocs=2


And the editable section of my comskip_test.groovy file contains:
(I allow it to run on anything, I only use EDLs, and I like allowing Comskip to run on live recordings)

boolean checkRecordingType = false;
boolean checkForEdl = true;
String edlType = "edl";
boolean comskipLive = true;


Quote:
Originally Posted by Slugger View Post
You should really kick yourself for not reading the release notes before upgrading to notice that it was a major version upgrade (v3 to v4). Further more, there was weeks (months, actually) of discussion in the forums about the major changes that v4 was going to introduce. Then I gave a two (maybe three??) week heads up in the SJQv3 forum that SJQv4 was coming to the plugin repository and it didn't function at all like v3 and would require a complete reconfiguration.
I agree 100%, and I apologize for coming off brash. I was/am frustrated that I had everything working and now I don't. I have nobody to blame but myself, but I'm entitled to be displeased with the net result even if it's self-defeative!

Last edited by K O; 02-04-2011 at 09:57 PM.
Reply With Quote
  #412  
Old 02-04-2011, 11:01 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by K O View Post
C:\Program Files\SageTV\SageTV\.lobs.db - there are 17 folders with 256x 200kb files each all with the same error repeated at 1 minute intervals. The dates and times match when I toggle on and off the SJQ4 plugin.
Ok, this issue is discussed further up in this thread. It's an issue with the H2 JDBC client. Basically, stop Sage and delete everything in SageTV\.lobs.db\ but do not delete anything in SageTV\plugins\sjq.lobs.db\ - ever. The former will not be cleaned up by SJQ, the latter is cleaned regularly by SJQ. You will need to periodically wipe the SageTV\.lobs.db\ directory.

Quote:
I understand fully that I've got an issue and probably set it up wrong. I setup a single task for Comskip, and yes I see a lot of items in the queue - 154 to be exact, which might actually be more than the total number of recordings I have. Some are orange icons, and some are yellow icons. I'm using the windows service client exclusively and have mapped my event trigger to the generic Recording Started event - I like Comskip to start running instantly on all manual and favorite events, but not on liveTV. Comskip runs well for me with the proper live TV settings, and it can keep up with realtime which makes the wife happy.

The Comskips were being assigned and executing successfully from SJQ4 until the server would crash, so it's not completely borked. I have also updated to the 1372 patch since I saw that was available this week, although I have not tested it. Crashing the server 3 times on the 3 nights I worked late this week tested my family's patience with SageTV enough that I wasn't prepared to experiment on them again!

My sjqagent.conf file contains the following:
task.comskip1.resources=50
task.comskip1.exe=c\:/comskip/comskip.exe
task.comskip1.maxtime=28800
agent.mapdir=
task.comskip1.rcmin=0
agent.schedule=ON
task.comskip1.args="$SJQ4_PATH\\$SJQ4_LAST_SEGMENT"
task.comskip1.test=c\:/sjqagent/comskip_test.groovy
task.comskip1.rcmax=0
task.comskip1.schedule=ON
task.comskip1.testargs=mpg
agent.resources=100
agent.port=23344
task.comskip1.maxtimeratio=1.0
task.comskip1.maxprocs=2


And the editable section of my comskip_test.groovy file contains:
(I allow it to run on anything, I only use EDLs, and I like allowing Comskip to run on live recordings)

boolean checkRecordingType = false;
boolean checkForEdl = true;
String edlType = "edl";
boolean comskipLive = true;
Have you updated your comskip_test.groovy file to the latest version? Compare what you have to what's here:

http://sagetv-addons.googlecode.com/...ip_test.groovy

If they aren't the same then you're missing a key change that will prevent the multiple requeuing of tasks. Since you trigger on RecordingStarted, you're probably hitting the issue where if a recording is deleted before it is assigned to a task client then it will be stuck in the queue for ever. Updating comskip_test.groovy should start to clear those tasks from the queue. You may have too many in there for it to completely fix itself, if so, then we may have to go into H2 and manually cleanup the queue, but try the updated groovy test script first.

I think it's worth mentioning here for everyone that SJQv4 is a living and breathing entity, especially during this beta phase. You can't just set it up and leave it. During beta (at least), users will need to keep an eye out for updates to groovy scripts, especially if you're using ones I've written. There's going to be changes and in the case of bug/logic fixes, it can be quite imperative that users upgrade these groovy scripts to address issues (such as the one you're seeing).

Quote:
I agree 100%, and I apologize for coming off brash. I was/am frustrated that I had everything working and now I don't. I have nobody to blame but myself, but I'm entitled to be displeased with the net result even if it's self-defeative!
You need to treat your production server like a baby - be very careful what you do to it and read the labels before feeding it new things. Not that I have kids of my own, but it seems like sound advice. A blind "update everything that can be updated" is never a good idea and especially with something as (relatively) complex as SJQ. But when you do foobar your system, ranting in the forums about it doesn't really help anyone, it just makes me want to rant back. Especially having read the post shortly after a work day spent entirely in meetings and phone conferences reworking an app design previously approved and development started on then abruptly halted and told to go back to the drawing board to handle new, "last minute" requirements. But now it's Friday, and it's Super Bowl weekend so let's just move on.
__________________
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
  #413  
Old 02-05-2011, 08:53 AM
Spectrum Spectrum is offline
Sage Expert
 
Join Date: Aug 2006
Posts: 720
Errors on new install

Due to some hard drive shuffling I re-installed Sage in a new location. I was going through and setting up plugins and when I installed SJQ, the task agent, and the UI and from the UI standpoint there are no clients connected. In the SJQ logs I'm seeing
Code:
2011-02-05 09:37:03,776 ERROR [License]: Registered email is invalid! You must register your email address via the SJQv4 plugin configuration screen.
2011-02-05 09:37:03,776 INFO  [License]: License file is invalid or not found; some features of this software have been disabled:
	Only one task client can be registered.
	Only one registered task per task client.

2011-02-05 09:37:03,779 INFO  [Plugin]: SJQ timer thread has been started!
2011-02-05 09:37:03,779 INFO  [Plugin]: Server agent has started!
2011-02-05 09:37:03,779 INFO  [Plugin]: Server crontab has started!
2011-02-05 09:37:03,786 INFO  [Plugin]: Event received: SystemMessagePosted
2011-02-05 09:37:18,781 INFO  [TaskQueue]: Scheduling queue processor for ~8 seconds from now!
2011-02-05 09:37:26,783 INFO  [TaskQueue]: Running queue processor now!
2011-02-05 09:37:32,117 INFO  [DataStore]: Found these registered IPs: []
2011-02-05 09:37:32,117 INFO  [DataStore]: Testing: HTPC/192.168.1.101
2011-02-05 09:37:32,120 ERROR [DataStore]: SQL Error
org.h2.jdbc.JdbcSQLException: NULL not allowed for column "MAPDIR"; SQL statement:
INSERT INTO client (host, port, state, schedule, last_update, total_resources, version, mapdir) VALUES (?, ?, ?, ?, ?, ?, ?, ?) [90006-145]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
	at org.h2.message.DbException.get(DbException.java:167)
	at org.h2.message.DbException.get(DbException.java:144)
	at org.h2.table.Column.validateConvertUpdateSequence(Column.java:294)
	at org.h2.table.Table.validateConvertUpdateSequence(Table.java:621)
	at org.h2.command.dml.Insert.insertRows(Insert.java:122)
	at org.h2.command.dml.Insert.update(Insert.java:86)
	at org.h2.command.CommandContainer.update(CommandContainer.java:69)
	at org.h2.command.Command.executeUpdate(Command.java:201)
	at org.h2.server.TcpServerThread.process(TcpServerThread.java:300)
	at org.h2.server.TcpServerThread.run(TcpServerThread.java:137)
	at java.lang.Thread.run(Unknown Source)

	at org.h2.engine.SessionRemote.done(SessionRemote.java:543)
	at org.h2.command.CommandRemote.executeUpdate(CommandRemote.java:184)
	at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:143)
	at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:129)
	at com.google.code.sagetvaddons.sjq.server.DataStore.saveClient(DataStore.java:833)
	at com.google.code.sagetvaddons.sjq.agent.Plugin.start(Plugin.java:198)
	at sage.plugin.a.a(Unknown Source)
	at sage.e.v$39.void(Unknown Source)
	at sage.ay.a(Unknown Source)
	at sage.e.a(Unknown Source)
	at sage.x.g(Unknown Source)
	at sage.x.f(Unknown Source)
	at sage.x.access$200(Unknown Source)
	at sage.x$3.run(Unknown Source)
	at sage.cv$a.run(Unknown Source)
2011-02-05 09:37:48,780 INFO  [TaskQueue]: Scheduling queue processor for ~8 seconds from now!
2011-02-05 09:38:35,076 INFO[Listener]: Received connection from: /127.0.0.1
and the sjqagent.log
Code:
2011-02-05 09:37:32,107 INFO  [Plugin]: Checking if hostname 'HTPC' is registered...
2011-02-05 09:37:32,108 WARN  [Config]: Unable to find specified props file! [C:\SageTV\SageTV\plugins\sjq-agent\conf\sjqagent.properties]
2011-02-05 09:37:32,109 WARN  [Config]: Unable to find specified props file! [C:\SageTV\SageTV\plugins\sjq-agent\conf\sjqagent.properties]
2011-02-05 09:37:32,109 WARN  [Config]: Checking for default props file...
2011-02-05 09:37:32,109 WARN  [Config]: Checking for default props file...
2011-02-05 09:37:32,109 WARN  [Config]: Unable to find default props file! [C:\SageTV\SageTV\plugins\sjq-agent\conf\sjqagent.properties]
2011-02-05 09:37:32,109 WARN  [Config]: Unable to find default props file! [C:\SageTV\SageTV\plugins\sjq-agent\conf\sjqagent.properties]
2011-02-05 09:37:32,109 WARN  [Config]: Creating default props file...
2011-02-05 09:37:32,109 WARN  [Config]: Creating default props file...
2011-02-05 09:37:32,116 INFO  [Config]: Watching 'C:\SageTV\SageTV\plugins\sjq-agent\conf'
2011-02-05 09:37:32,116 INFO  [Config]: Watching 'C:\SageTV\SageTV\plugins\sjq-agent\conf'
2011-02-05 09:37:32,121 INFO  [Plugin]: Registered 'HTPC' as plugin agent with server! Client[host=HTPC:23344,state=OFFLINE,lastUpdate=Sat Feb 05 09:37:32 EST 2011]
I've tried reinstalling all the SJQ plugins and I tried disabling all other plugins except SJQ, the agent, the UI, and dependencies and it's still throwing those same errors. This is a vanilla install with tuners added and the guide configured; I haven't even pulled in my wiz.bin yet. Any idea on why it's complaining about DB inserts?
Reply With Quote
  #414  
Old 02-05-2011, 09:18 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
It's a bug with the Client class in sjq-common jar. It's fixed, but I will not have time to thoroughly test it before leaving for the day. Here's every software engineer's favourite Friday, 5pm email:

"I don't have time to test this before end of day. I went ahead and committed the code change because it was just a two line change. I'm sure it'll work, but if something breaks in the build I'd be shocked and I'll tackle it first thing Monday morning."

I used to send these emails and was shocked to have a QA and/or build manager eagerly awaiting my arrival on Monday morning. I like to think I've learned since then (and at work, I promise I have ), however, I don't answer to QA and build managers in this realm so I'm going to publish the new build with the fix since if it works then you'll be happy and if it doesn't then you're no worse off than you are right now. And, it really was just a two line change in the code!

Anyway, I'll get a build in the plugin repository before I leave for the day. It will require an SJQ server upgrade and task client upgrade.
__________________
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
  #415  
Old 02-05-2011, 09:42 AM
Spectrum Spectrum is offline
Sage Expert
 
Join Date: Aug 2006
Posts: 720
Quote:
Originally Posted by Slugger View Post
It's a bug with the Client class in sjq-common jar. It's fixed, but I will not have time to thoroughly test it before leaving for the day. Here's every software engineer's favourite Friday, 5pm email:

"I don't have time to test this before end of day. I went ahead and committed the code change because it was just a two line change. I'm sure it'll work, but if something breaks in the build I'd be shocked and I'll tackle it first thing Monday morning."

I used to send these emails and was shocked to have a QA and/or build manager eagerly awaiting my arrival on Monday morning. I like to think I've learned since then (and at work, I promise I have ), however, I don't answer to QA and build managers in this realm so I'm going to publish the new build with the fix since if it works then you'll be happy and if it doesn't then you're no worse off than you are right now. And, it really was just a two line change in the code!

Anyway, I'll get a build in the plugin repository before I leave for the day. It will require an SJQ server upgrade and task client upgrade.
Hah, don't let it ruin your weekend! If 2 lines fixes it, great, and if not go have fun It's odd that it was working before and it decided to choke on a reinstall. I'm sure I installed the last update because I was using the spiffy new dynamic resource allocation and command line args. Those are working really nice by the way
Reply With Quote
  #416  
Old 02-05-2011, 10:08 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Your task client was already registered prior to the upgrade, which is why you didn't hit this bug (nor did I during original testing).

I just submitted the new builds to the repository, let me know if it fixes 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...
Reply With Quote
  #417  
Old 02-05-2011, 10:57 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Groovy script addition: Disable IR tuning for specific channels

Thought I'd casually mention this new Groovy script that I just added to svn: no_ir_for_ppv.groovy

This script will disable infrared tuning for specific channels. I use it for PPV channels because when I want to record a PPV movie I have to order it from my STB manually ahead of time, which is fine. But when I do that, the STB sets an auto tune for that PPV channel for the start of the movie. When Sage tries to tune the channel via IR while the STB is doing its auto tune thing they always seem to interfere and the tuning of the STB seems to get screwed up. The channel doesn't change and I end up wasting $5.99.

This Groovy script remaps the physical channel(s) identified to a meaningless string of letters, which Sage ignores when tuning resulting in no IR signals being sent to the STB. This allows the STB auto tune to do its thing. The channels to remap can be specified by regex or explicitly, see the script for details on how to configure it.

You can run the script periodically via SJQv4 or you can just run it once/on demand/as necessary from SageGroovy.

This is the first in a series of up coming releases where I'll start to share all the various Groovy scripts I'm using to accomplish all sorts of Sage tasks. Most of my scripts that aren't in subversion already are in need of some serious cleanup before I post them. All of my scripts that I've released are available here:

http://sagetv-addons.googlecode.com/...nk/SJQScripts/

Happy scripting!
__________________
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
  #418  
Old 02-05-2011, 01:57 PM
Spectrum Spectrum is offline
Sage Expert
 
Join Date: Aug 2006
Posts: 720
Quote:
Originally Posted by Slugger View Post
Your task client was already registered prior to the upgrade, which is why you didn't hit this bug (nor did I during original testing).

I just submitted the new builds to the repository, let me know if it fixes the problem.
Makes sense. After updating it fired right up and other than accidentally assigning comskip to 'media imported' instead of 'recording started' and not catching it until it had queued up 200 tasks on music, all is well I haven't run my scripts through regression testing yet (had to make some path changes) so hopefully nothing goes haywire before I get them tested again Thanks for the update, now pry yourself away from the computer and enjoy the weekend!
Reply With Quote
  #419  
Old 02-06-2011, 01:59 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
SJQv3 file cleaner now ported to SJQv4 Groovy script

My latest Groovy script release is the port of the old SJQv3 file cleaner to a Groovy script suitable for periodic execution from the SJQv4 crontab. You can download the script from here:

http://sagetv-addons.googlecode.com/...cleaner.groovy

Simply edit the list of file extensions you wish to have cleaned up by the script and then schedule it for periodic execution from the SJQv4 crontab. You could also run it on demand through an SJQv4 task client or manually via SageGroovy.

After some thought, I think this is a better approach than my Sage Artifact Delete plugin (SAD), which reacts to media file deletion events. Periodically running this Groovy script will not only handle new media deletions, but will also find orphaned artifacts left prior to a SAD plugin installation. However, both solutions work and can even work together. Either way, this Groovy script provides the port of the old SJQv3 file cleaner, as promised.

Happy scripting!
__________________
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
  #420  
Old 02-06-2011, 04:23 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
More Groovy examples...

Two more examples added:

link_import_to_show.groovy: Imports a new video into your library and links it to the given Show ID. This script is designed to be run manually from the command line when needed (via the SageGroovy CLP script runner).

united_comskip_test.groovy: The unified comskip test script that determines the type of content and adjusts resource usage at runtime. It also shows how to modify a task's exe arguments within the test script. It also shows the use of the mapDir() function. This example shows how one can reduce the use of multiple comskip tasks into one by dynamically modifying resource usage and exe arguments at runtime.
__________________
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
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
SJQv4: Technology Preview Slugger SageTV v7 Customizations 39 12-17-2010 01:17 PM
SageTV Plugin Developers: Any way to see stats for your plugin? mkanet SageTV Software 4 12-12-2010 10:33 PM
MediaPlayer Plugin/STV Import: Winamp Media Player Plugin deria SageTV Customizations 447 12-11-2010 07:38 PM
SJQv4: Design Discussion Slugger SageTV v7 Customizations 26 10-18-2010 08:22 AM


All times are GMT -6. The time now is 07:11 PM.


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