|
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. |
|
Thread Tools | Search this Thread | Display Modes |
#201
|
|||
|
|||
One other question - how do you send events to SageAlert from SJQ?
__________________
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 |
#202
|
|||
|
|||
Download the sjq-common jar, add it to the classpath of the task client (if using the plugin task client then install the sjq-common plugin, restart Sage). Then you have to code the event signal as part of your groovy script. I'll whip up a quick example and add it to the end of this post tonight or tomorrow.
__________________
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... |
#203
|
|||
|
|||
I have sjq-common version 4.0.0.1236 installed - it must have come with one of the other plugins. This is the one you mean, right?
__________________
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 |
#204
|
|||
|
|||
Yup, that's it. Lots of hockey and NCAA bowl games to be watched tonight... will write an example script tomorrow.
__________________
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... |
#205
|
|||
|
|||
Sorry, you need sagealert-common plugin installed. If you have SageAlert already installed on the machine then it should already be installed, but you'll just want to confirm.
__________________
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... |
#206
|
|||
|
|||
SageAlert integration example (using system messages)
Here's an example of how to fire a system message via Groovy script. As long as you configure SageAlert to handle system messages then this is the easiest way to generate SageAlert alerts via SJQ/Groovy. I'm assuming this will be sufficient, wayner? If you want a full example of how to post custom events then let me know, but you're going to have to create a separate SageTV plugin to configure SageAlert to handle the custom event(s). SJQ itself will not be a provider of custom SageTV events nor register them with SageAlert. Honestly, I think the system message approach is the best way because 1) it's dead easy to implement via Groovy (one line API call) and 2) generated system messages also show up in the STV.
Note, the script itself is a single line (an API call to SystemMessageAPI.PostSystemMessage()). The rest is comments describing doc links, etc. for further reading. Code:
/* If you want to post a custom event that SageAlert will handle then you need to create a separate plugin and register the custom event with SageAlert; details on how to do that are described in the following wiki doc: http://code.google.com/p/sagetv-addons/wiki/SageAlertCustomEvents Now, if you just want to fire an event that SageAlert already knows about (i.e. a Sage system message) then you can just use the following (1 line) script. The advantage to using a system message is that you will also see the alert in the STV. If you think this is a disadvantage then you'll have to go with the custom event as described in the wiki link above. */ // Do whatever you want to do and let's assume that's done and you've // decided that you want to post a system message that will show up // in the STV and will also be handled by SageAlert. I'm assuming // you've already configured SageAlert to handle system messages as // desired SystemMessageAPI.PostSystemMessage(1204, 1, "This is the body of the message", null) // You can modify the MessageCode param (param #1) and set the message subject as described in the API docs: // http://download.sage.tv/api/sage/api/SystemMessageAPI.html // The second param specifies the level of the system message (1-3; info, warn, error) // The third param specifies the var subs for the txt; see API docs; null = no vars
__________________
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... |
#207
|
||||
|
||||
Something I'd like to do and for the life of me can't figure out... would love some help.
I've got the comskip task running reliably(ish) but would like to modify the process a bit to set the watched flag prior to running the comskip. In v3 I did the test for watched flag has been set, if not set it then run comskip. If it has been set just run comskip. I don't really think I care if the flag has been set or not as long as it gets set before running the comskip command. I'm pretty much running the comskip.groovy example script and ideally would like to drop this in at the top of that script..... |
#208
|
|||
|
|||
Quote:
AiringAPI.SetWatched(mf); Doing that will always set the recording to watched right before comskip is executed on the file.
__________________
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... |
#209
|
||||
|
||||
Thank you sir!
|
#210
|
||||
|
||||
Having troubles getting a comskip task installed. I am following this tutorial http://code.google.com/p/sagetv-addo...i/Sjq4Comskip1
However after I hit the Add Task, it says I must commit so I do but I do not see the new task. When I checked the sjq log I see this. 2010-12-31 15:51:52,218 INFO [Handler]: CMD: PINGC :: PEER: /127.0.0.1 2010-12-31 15:51:52,218 ERROR [CommandFactory]: Error java.lang.ClassNotFoundException: com.google.code.sagetvaddons.sjq.server.commands.Pingc at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at com.google.code.sagetvaddons.sjq.listener.CommandFactory.get(CommandFactory.java:30) at com.google.code.sagetvaddons.sjq.listener.Handler.run(Handler.java:64) at java.lang.Thread.run(Unknown Source) 2010-12-31 15:51:53,921 INFO [Handler]: CMD: PINGC :: PEER: /192.168.10.20 2010-12-31 15:51:53,921 ERROR [CommandFactory]: Error java.lang.ClassNotFoundException: com.google.code.sagetvaddons.sjq.server.commands.Pingc at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at com.google.code.sagetvaddons.sjq.listener.CommandFactory.get(CommandFactory.java:30) at com.google.code.sagetvaddons.sjq.listen |
#211
|
|||
|
|||
I am totally happy with this method. I guess it will cause your System Message icon to come up but that is fine with me. I also get this every few days as Leafs TV HD never actually carrries the team names when they have games - of course this causes SRE to throw up a system message.
__________________
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 |
#212
|
|||
|
|||
If you associate more than one SJQ task with a Favorite then how do you know the priority of the tasks - ie. which will be executed, first, second, etc?
__________________
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 |
#213
|
|||
|
|||
Quote:
__________________
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... |
#214
|
|||
|
|||
You don't. There is no more priority concept in the SJQ task queue. If two tasks depend on each other, they should be combined into one task and executed as a single entity, where you do each part of the task in its proper order explicitly within your groovy script/exe/batch file/shell script/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... |
#215
|
|||
|
|||
OK that makes sense. But then the UI should be changed so that when you are assigning a task to a Favorite, etc that you can only assign one task - currently you can assign more than one even though the selection is by radio button which implies only one selection is possible but currently you can select more than one.
__________________
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 |
#216
|
||||
|
||||
Ok restarting SageTV fixed the pingc error. Now when I try to run my comskip task I got the error that java.exe did not exist in the SageTV/SageTV/jre/bin/ when it tried to run the test script. Well java.exe does not exist there, so just to see what would happen if I put it there, I copied java.exe from my java bin to that location.
After that I get the error, Remote SageAPI is not functional. Can't user server: rmi://192.168.10.20:1098 I ran netstat -an to see if the server was listening on 1098 and it is not even though the sagex-services is configed for port 1098 |
#217
|
||||
|
||||
Quote:
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#218
|
|||
|
|||
Quote:
__________________
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 |
#219
|
||||
|
||||
Quote:
| jvm 1 | 2011/01/01 17:40:30 | log4j:ERROR Attempted to append to closed appender named [sjqAgentApp]. | jvm 1 | 2011/01/01 17:40:30 | log4j:ERROR Attempted to append to closed appender named [sjqAgentApp]. Ever figure this out? I'm getting 3 lines of this a second.
__________________
Server: AMD 9600 Phenom on XP, Gigabyte GA-MA78GPM, 2GB RAM, 320+250+500 GB SATA drives, HDHomeRun Prime, HD-PVR x.5.1, Paterson serial Client/Encoder:AMD 3800+ X2, 512 MB RAM, ATI X1650 XT, nMediaPC case, Hauppauge HD-PVR, Cyberlink/ArcSoft decoders, USB-UIRT Client/Encoder: AMD 3800+ X2, 512 MB RAM, 6150 graphics, nMediaPC case, ArcSoft decoders Client: HD300, Asus Pundit P1-AH1, AMD 3800+ X2 CPU, 1 GB RAM, 6150 graphics, ArcSoft decoders Backup: Synology SageTV version: FINAL |
#220
|
|||
|
|||
Quote:
__________________
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... |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
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 |