SageTV Community

SageTV Community (http://forums.sagetv.com/forums/index.php)
-   SageTV v7 Customizations (http://forums.sagetv.com/forums/forumdisplay.php?f=47)
-   -   Plugin: Sage Recording Extender 4 (SREv4) (http://forums.sagetv.com/forums/showthread.php?t=57364)

tmiranda 01-14-2012 06:57 AM

Got my overrides setup for the weekend's playoff games :corn:

voorhees 01-14-2012 09:59 AM

Quote:

Originally Posted by tmiranda (Post 524765)
Got my overrides setup for the weekend's playoff games :corn:

+1 Green checks all around.

wayner 01-14-2012 11:25 AM

How can I determine in Groovy if SRE is monitoring an Airing? I am adapting Slugger's Late Night Talk show email script to send a daily Sage Recordings email and I would like to include an indication as to whether or not SRE is monitoring a recording.

Slugger 01-14-2012 11:46 AM

Quote:

Originally Posted by wayner (Post 524781)
How can I determine in Groovy if SRE is monitoring an Airing? I am adapting Slugger's Late Night Talk show email script to send a daily Sage Recordings email and I would like to include an indication as to whether or not SRE is monitoring a recording.

You can use SREv4's DataStore API to query details about airings. You'll have to excuse the lack of docs in the code - I really didn't expect any external users to ever actually consume the API. :)

http://code.google.com/p/sagetv-addo...taStore.groovy

To get the monitoring status of an airing (scheduled to record), use the getMonitorStatusByObj() method. If you pass an airing not scheduled to record then this method will always return a status of UNKNOWN.

wayner 01-14-2012 12:17 PM

Sorry Slugger but I am slow on figuring all of this stuff out. I tried the line:
Code:

msg << "${getMonitorStatusbyObj(it)}\n"
but that is causing an error.

I am ripping off your code from here:
Code:

airings.each {
    msg << "${ShowAPI.GetShowTitle(it)}\n"
    msg << "${ShowAPI.GetShowDescription(it)}\n"
    msg << "${BASE_URL}/DetailedInfo?AiringId=${AiringAPI.GetAiringID(it)}\n\n"
}

How would I add another line that would give me the SRE status using the getMonitorStatusbyObj?

Slugger 01-14-2012 01:52 PM

Quote:

Originally Posted by wayner (Post 524789)
Sorry Slugger but I am slow on figuring all of this stuff out. I tried the line:
Code:

msg << "${getMonitorStatusbyObj(it)}\n"
but that is causing an error.

I am ripping off your code from here:
Code:

airings.each {
    msg << "${ShowAPI.GetShowTitle(it)}\n"
    msg << "${ShowAPI.GetShowDescription(it)}\n"
    msg << "${BASE_URL}/DetailedInfo?AiringId=${AiringAPI.GetAiringID(it)}\n\n"
}

How would I add another line that would give me the SRE status using the getMonitorStatusbyObj?

There's lots going on here... I'm going to toss around some programming jargon, I'll leave you and Google to sort it out. :)

The sagex APIs, which is what's being used above, presents the Sage APIs as a series of static methods. The SREv4 API is an object based API. In short, you have to invoke the SRE API against objects (instead of passing objects to the static method based sagex API).

Here's an SJQ script that will simply dump the monitoring status of each scheduled recording. Hopefully you can massage it as necessary.

Code:

import com.google.code.sagetvaddons.sre.engine.DataStore

def datastore = DataStore.getInstance()
Global.GetScheduledRecordings().each {
  println "${AiringAPI.PrintAiringShort(it)}: ${datastore.getMonitorStatusByObj(it)}"
}
return 0

Output on my system:

Code:

"Cops" at 8:00PM on 287 WUHFDT: NO_MONITOR

"Cops" at 8:30PM on 287 WUHFDT: NO_MONITOR

"Saturday Night Live" at 11:29PM on 256 CIIIDT: NO_MONITOR

"The Simpsons" at Sun, Jan 15 8:00PM on 256 CIIIDT: NO_MONITOR

"NHL Hockey" at Sun, Jan 15 8:00PM on 485 SNHL4HD: VALID

"Family Guy" at Sun, Jan 15 9:00PM on 256 CIIIDT: NO_MONITOR


wayner 01-14-2012 04:01 PM

Got it now, thanks. I was running this in the SageGroovy Console and was getting errors on the line for import com.google.code.sagetvaddons.sre.engine.DataStore.

I was able to fix this by copying sre.jar and sre-common.jar to the lib folder of Sagegroovy. Should I copy all jar files from my SageTV JARs folder to the SageGroovy lib folder?

Slugger 01-14-2012 04:44 PM

Quote:

Originally Posted by wayner (Post 524818)
I was able to fix this by copying sre.jar and sre-common.jar to the lib folder of Sagegroovy. Should I copy all jar files from my SageTV JARs folder to the SageGroovy lib folder?

You can, it would do no harm. Ideally, you keep the two in sync and by doing so you know a script that runs in SageGroovy should run unmodified on your Sage server (but not any Sage server).

rlvogel322 01-15-2012 10:50 AM

I'm sure it's a silly question, but how do you do an override? I go out to liveprdata and see the NY Giants vs. Green Bay but how do I get that into an override?

In the web browser if I put that in as the Title is still shows Monitor status unknown. I must be doing something silly so any help would be appreciated.

I wish my EPG would show the teams instead of TBA.

Edit: Never mind, I figured it out. Need to change Team 1 from Teams TBA to NY Giants and Team 2 from Teams TBA to Green Bay.

spacecadet 01-15-2012 06:59 PM

Quote:

Originally Posted by spacecadet (Post 524164)
These were definitely not matching a favorite and were not a manual recording. I logged Issue 331 with the details.

Thanks!

Using the latest SRE, everything worked great for this weekend's games.

Thanks, Slugger!

tmiranda 01-16-2012 06:59 AM

Quote:

Originally Posted by spacecadet (Post 524889)
Using the latest SRE, everything worked great for this weekend's games.

Thanks, Slugger!

+1. Thanks again Slugger for creating and supporting this plugin, it's one of the things that makes Sage so irreplaceable.

wayner 01-16-2012 12:43 PM

This plugin truly is genius - and it keeps getting better scuh as with the hide timeline feature.

tmiranda 02-20-2012 12:08 PM

NASCAR
 
Slugger,

I missed the end of the Bud Shootout and it reminded me that SRE does not support NASCAR. How difficult is it to create a monitor? Can you point me at some info on how they work and how they are written? (Unless you have the burning desire to write it :) )

Tom

Slugger 02-20-2012 03:18 PM

Quote:

Originally Posted by tmiranda (Post 527327)
Slugger,

I missed the end of the Bud Shootout and it reminded me that SRE does not support NASCAR. How difficult is it to create a monitor? Can you point me at some info on how they work and how they are written? (Unless you have the burning desire to write it :) )

Tom

Not difficult to write it, the difficulty for NASCAR has always been finding a reliable, near real time data source to use to track when a race is actually over. Few have tried, no one's succeeded in actually finding a source.

My policy has always been, and remains, that if you find the data source, I'll write the monitor. The data source must be:
  • Near real time; this means the data source is within 5 mins of real time, preferably within two minutes.
  • The data source is (relatively) easily parsable (i.e. HTML, JSON, XML, etc.); this means not flash based
  • For NASCAR, the source data must include unique details to identify the specific race being monitored and that race name should match the details in the EPG data (or be easily mappable).
  • For NASCAR (or any non-team based event, really), the data source must provide specific, unambiguous data that can be used to easily determine the race (event) is either definitely over/complete/halted/cancelled/etc. or it is definitely still in progress. For team sports, I am always able to find a status of the game ("14:43, 3rd period", "5:05, 2nd half", "Half time", "Overtime", "Final", "Final -OT", "Postponed", "Cancelled", "Delayed", "Intermission", etc.). I know I'm looking for specific key words in these status fields to tell me when a game is over, this is why SRE works so well for team based sports. Whatever data source you come up with must have something similar - there can't be any guessing involved in determining the race's live status.

Find the source with the above requirements detailed, I'll write the monitor.

cat6man 03-01-2012 10:45 AM

35 days, 21 minutes to go
 
it's almost SRE season!
(first red sox game is 35 days away)

SageTV showed my first spring training game in upcoming recordings yesterday, remembering my fave list, after this particular set of favorites had
gone unsatisfied since october.

once again, a shout out for my all time favorite sageTV customization

:clap:

Slugger 03-05-2012 10:58 PM

Plugin EOL notice; project donation to Canadian Cancer Society
 
Effective immediately, official support for this plugin has ended. More details available here.

A special thank you to all who have donated to this project. Because of your support, a donation for a little over $500 has been made to the Canadian Cancer Society. Again, thank you for your support!

wayner 06-01-2012 09:12 AM

Stnaley Cup Finals
 
It appears that both CBC and NBC use the title "Stanley Cup Finals" rather than "NHL Hockey". It appears that SRE is smart enough to catch this - is that correct?

Slugger 06-01-2012 09:41 AM

Quote:

Originally Posted by wayner (Post 532081)
It appears that both CBC and NBC use the title "Stanley Cup Finals" rather than "NHL Hockey". It appears that SRE is smart enough to catch this - is that correct?

Indeed, well, actually, it's livepvrdata.com that's "smart" enough. SRE just blindly passes the show details to livepvrdata and awaits a response. I've done some work on livepvrdata such that it will identify some "one off" titles, such as this one for the Cup finals. You still have to provide the teams - if your EPG says "Teams TBA" or some variation thereof, then you would have to create an override. I've done some work on livepvrdata to try and deduce the teams and though it sort of works, it doesn't work well enough for me to put it into production on the livepvrdata.com site. Will probably pick that up in the fall. Until then, you must provide both teams that are playing in the game in order for it to be properly monitored.

wayner 06-01-2012 09:51 AM

I've added the teams manually. The EPG for CBC currently shows for Game 2: Los Angeles Kings at TBA, Game 3: Teams TBA, Game 4 TBA at Los Angeles Kings. NBC is the same for Game 2 but they don't appear to be carrying games 3&4.

I don't know why the guide doesn't know that the Kings will be in Game 3???

But the guide will likely refresh with the correct teams within the next few days - I think that is what happened for the semis.

darcilicious 06-01-2012 10:35 AM

Quote:

Originally Posted by Slugger (Post 522818)
The first release of SREv4 is expected this coming week.

Is this pretty much a one for one replacement of SREv3? And I just uninstall v3 plug-in and install v4?

(I'm still using SREv3 and we missed recording OT of the first NHL playoff game and I got a cranky look from the hubby -- oops! Currently when I look at my guide via the web gui, and after updating the epg, I see all the games/teams listed correctly but the next few games have ! instead the green check mark :( )

Slugger 06-01-2012 11:10 AM

Quote:

Originally Posted by darcilicious (Post 532091)
Is this pretty much a one for one replacement of SREv3? And I just uninstall v3 plug-in and install v4?

(I'm still using SREv3 and we missed recording OT of the first NHL playoff game and I got a cranky look from the hubby -- oops! Currently when I look at my guide via the web gui, and after updating the epg, I see all the games/teams listed correctly but the next few games have ! instead the green check mark :( )

Some versions of SREv3 won't work, some might (most probably won't, but I don't have a definitive list of which ones might and might not work). To guarantee support, you'll want to upgrade to SREv4. Should just be able to upgrade the plugin in the Sage plugin manager.

darcilicious 06-01-2012 11:11 AM

Quote:

Originally Posted by Slugger (Post 532095)
Should just be able to upgrade the plugin in the Sage plugin manager.

Thanks much!

darcilicious 06-01-2012 12:03 PM

Hrmm.... I had v4 installed as it turns out. However, I don't see SRE listed here: http://webserver:ipaddress/apps/ though I can reach BMT and SageAlert fine. I've enabled debug logging on the SREv4 plugin, what should I look for?

(I was able to update the plugin config with my email address and have uinstalled and reinstalled the plugin)

wayner 06-01-2012 12:08 PM

SREv4 doesn't have a web based UI but it is now somewhat integrated into the main Sage UI. When you look at upcoming recordings you should see a spot where SRE is listed.

Here is an example: (note the SRE status and override near the bottom)
Code:

2012 Stanley Cup Final
Episode: Los Angeles Kings at TBA



Airing: Jun 2, 2012 8:00 PM - 11:00 PM

Duration: 3h 0m

Channel: 5-1-CBLTDT

Description: Game 2.

Category: Sports event/Hockey - First Run

Original Air Date: Saturday, June 2, 2012

Closed Captioned, Stereo, HDTV, Live

Show ID: EP015163990002

SRE Status: Recording will be monitored. <Edit | Delete>

SRE Override:

Title: 2012 Stanley Cup Final
Episode: Los Angeles Kings vs. New Jersey Devils

Scheduled Encoder: Silicondust HDHomeRun Tuner 1011F5EA-1

Internal details: AiringID=9602544

And don't forget that with Tmiranda's plugin you can disable the timeline for SRE monitored recordings - that way the timeline won't give away the fact that the game is (or isn't) going into overtime.

darcilicious 06-01-2012 12:21 PM

Thank you, I think I missed that bit :) (the docs page still shows the web interface)

So, where you have:

SRE Status: Recording will be monitored. <Edit | Delete>

I have:

SRE Status: Monitor status is invalid. <Edit | Delete>

(though interestingly, since this morning's EPG update, the teams are listed fine: "Episode: Los Angeles Kings at New Jersey Devils")

I click on Edit and I'm not sure what to change since everything looks right as far as title and teams...

So I click on update without changing anything and I get:

Quote:

HTTP ERROR 500

Problem accessing /sage/sre4.groovy. Reason:

Internal Server Error
followed by the full error message.

I checked the plugin manager, and groovy by slugger is installed.

Not sure what I can do to 1) make sure that I don't get errors like this and 2) make sure the games get monitored...

wayner 06-01-2012 12:31 PM

I think we will need Slugger to check that. But you seem to have all of the correct info other than "at" rather than "vs", but I would think it can handle that. What is your show title, is it "2012 Stanley Cup Final"?

darcilicious 06-01-2012 12:39 PM

Here's the full description:

Quote:

2012 Stanley Cup Final

Episode: Los Angeles Kings at New Jersey Devils

Airing: Jun 2, 2012 5:00 PM - 8:00 PM

Duration: 3h 0m

Channel: 508-KGWDT

Description: Game 2. From Prudential Center in Newark, N.J.

Category: Sports event/Hockey - First Run

Original Air Date: Saturday, June 2, 2012

Closed Captioned, Stereo, HDTV, DD5.1, Live

Show ID: EP015163990002

SRE Status: Monitor status is invalid. <Edit | Delete>

Scheduled Encoder: Hauppauge HD PVR Capture Device

Internal details: AiringID=16548514

darcilicious 06-01-2012 12:59 PM

So I thought to myself, what the heck happens if I click on "delete"?

And that worked! All five upcoming games are now in a "monitored" status (only had to use "delete" on two or three of them).

Slugger 06-01-2012 02:34 PM

Quote:

Originally Posted by darcilicious (Post 532111)
So I thought to myself, what the heck happens if I click on "delete"?

And that worked! All five upcoming games are now in a "monitored" status (only had to use "delete" on two or three of them).

Hmm... the sre.log file from SageTV\plugins\sre4\ would help me determine the issue you have/had. In the web UI, go to your upcoming recordings. All the hockey games should have green checkmarks, if not you need an override or there's a problem (which the log file would help me diagnose).

tmiranda 06-03-2012 06:08 AM

Two Stanley Cup finals games, both games go into overtime, no cutoff recordings :)

This is just another example of why there is still nothing else out there can replace my Sage setup.

darcilicious 06-03-2012 11:11 AM

Must agree, no cranky looks from the hubby last night! :clap: :goodjob:

tmiranda 06-03-2012 11:51 AM

Quote:

Originally Posted by darcilicious (Post 532159)
Must agree, no cranky looks from the hubby last night! :clap: :goodjob:

So can I assume husbands on Venus are the same as on Earth? :D

darcilicious 06-03-2012 11:58 AM

Pretty much, though I'm definitely the gadget hound in this house :)

Slugger 06-04-2012 07:02 PM

WARNING: livepvrdata.com may stop responding later this evening
 
Due to ongoing issues with Google App Engine, it is very likely that the livepvrdata.com web service will exhaust its CPU quota for the day between 23:30-00:15 (EDT) this evening. Any monitor requests after the quota is exhausted will result in HTTP 500 errors until the daily quotas are reset, which happens at 03:00 (EDT). This is a defect with GAE and not the web service code, which hasn't been touched in weeks (possibly months now that I think about it). Investigation shows other GAE users are in the same boat, with the same issues.

SRE will respond by adding a default end padding to the recording. If you haven't changed the defaults then that should be 60 minutes. Here's hoping the Stanley Cup game doesn't go to OT or users see this in time and act accordingly.

I could activate billing for the app to avoid this, but it generates no income to warrant such action and I doubt people want to start paying for the service. Plus I really hate to reward Google for their issues, especially when this app comes no where near exhausting the free quotas when GAE is acting properly.

Anyway, this is your warning. :(

voorhees 08-27-2012 12:37 PM

Slugger, I noticed on my setup with college football coming up that the game that my favorite picked up to record is not being monitored. I looked at www.livepvrdata.com and noticed that it looks like NCAA football is not listed as a monitored event. Is NCAA football going to be monitored this season? Thanks.

Slugger 08-27-2012 01:50 PM

Quote:

Originally Posted by voorhees (Post 536783)
Slugger, I noticed on my setup with college football coming up that the game that my favorite picked up to record is not being monitored. I looked at www.livepvrdata.com and noticed that it looks like NCAA football is not listed as a monitored event. Is NCAA football going to be monitored this season? Thanks.

Thanks for the reminder. I've enabled the NCAA football monitor so it should be good to go now. May take SRE up to 24 hours to notice the monitor has been enabled again. livepvrdata.com is showing some 200 college football games now for this week (from USC v. Hawaii all the way to the Div III matchup of Thomas More vs. St. John Fisher) so we should be good to go for another season! :D

voorhees 08-27-2012 09:19 PM

Quote:

Originally Posted by Slugger (Post 536786)
Thanks for the reminder. I've enabled the NCAA football monitor so it should be good to go now. May take SRE up to 24 hours to notice the monitor has been enabled again. livepvrdata.com is showing some 200 college football games now for this week (from USC v. Hawaii all the way to the Div III matchup of Thomas More vs. St. John Fisher) so we should be good to go for another season! :D

Slugger, thanks so much. I had to add an override since the Auburn/Clemson game is showing up as Auburn vs Clemson on my schedule and Clemson vs Auburn at livepvrdata, but I am good to go now with a green check. :thumb: Thanks again.

voorhees 09-08-2012 10:57 AM

I recently started fresh with my SageTV install and reinstalled SRE. I noticed in my recording directory a new <file name>.properties files that is created with each recording that includes only the one line it that sates "SREv4_Monitored=false" if the recording is not being monitored, and multiple lines in it of "SREv4_Monitored=true" if it is being monitored. I did have those files created previously. Is there a setting that I am missing somewhere to turn them off or have them deleted? I just cannot figure out why I am getting them now and was not for the many previous years of using SRE. Thanks.

Slugger 09-08-2012 06:15 PM

Quote:

Originally Posted by voorhees (Post 537485)
I recently started fresh with my SageTV install and reinstalled SRE. I noticed in my recording directory a new <file name>.properties files that is created with each recording that includes only the one line it that sates "SREv4_Monitored=false" if the recording is not being monitored, and multiple lines in it of "SREv4_Monitored=true" if it is being monitored. I did have those files created previously. Is there a setting that I am missing somewhere to turn them off or have them deleted? I just cannot figure out why I am getting them now and was not for the many previous years of using SRE. Thanks.

SRE modifies the properties of your recordings to keep track of metadata for monitoring. There is a setting in SageTV to tell it not to create the .properties files, you will need to disable that otherwise Sage will create/update the .properties file each time SRE modifies its metadata.

Sparhawk6 09-18-2012 09:42 AM

Is www.livepvrdata.com down?


All times are GMT -6. The time now is 07:20 AM.

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