SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Customizations > SageMC Custom Interface
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageMC Custom Interface This forum is for discussing the user-created SageMC custom interface for SageTV.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-21-2009, 11:54 AM
Jason's Avatar
Jason Jason is offline
Sage Expert
 
Join Date: Nov 2003
Location: Texas
Posts: 598
Timed Recording(s) Autodelete?

While this is not specifically a SageMC question, I was hoping that it would be possible...

I have UVerse as my provider and record it via a HAVA unit via the exetuner plugin. The UVerse STB's auto power down after 8 hours of inactivity and due to the exetuner/HAVAChannelChanger limitations of not being able to prefix any sort of ir command, I am forced to create some timed(manual) recordings to keep the STB alive.

Is there a way to autodelete these recordings (1 minute long...) or better yet, set up a 'favorite' timed recording within SageMC (or any other STV) that I could use the 'Keep at Most' functions and set it to '1'?

Sounds trivial, but with all the various STB keep alive utilities out there being designed for use with an ir command, I have not found a way yet. SageMC does not play very nice with timed recording as it is...

-Jason
__________________
True standalone tuner functionality with the --> HAVA Channel Changer<--
Reply With Quote
  #2  
Old 01-21-2009, 01:01 PM
CollinR CollinR is offline
Sage Icon
 
Join Date: Dec 2004
Location: Tulsa, OK
Posts: 1,305
2 options I can think if off hand.

1. Use EventGhost or Girder to simply fix the problem by sending stuff to the box <8 hours or prepending your commands to wake the box.

2. Use Sage Job Queue to find and automatically delete the short recordings based on their small filesize.

Since you already have exemultituner setup I'm thinking option #1 is probably the easiest. There are a couple few threads here about setting it up you will need a script to seperate the IR codes as multituner just sends a single command. For EventGhost you can copy/paste this directly into your macro.

You would use the Network reciever plugin in EventGhost
You would configure your multituner to use it like so
EventGhost.exe -n 127.0.0.1:1024 1234 STB.%CHANNEL%

Code:
# get the event
event = eg.EventString

parts = event.split(".")
if len(parts) == 4 and parts[-3] == 'STB':
    tuner = parts[-2]
    channel = parts[-1]
    print tuner
    if channel.isdigit():
        channel = channel.zfill(3)
        # iterate over every digit 
        for digit in channel:

            # send an event for the digit
            eg.TriggerEvent(tuner + '-' + digit,prefix="ChangeChannel")
Read this thread:
http://forums.sagetv.com/forums/showthread.php?t=32787

You can then make a macro based on TCP.STB.* that sends OK and halts for x seconds to wake the box before firing off the channel request.
Reply With Quote
  #3  
Old 01-21-2009, 05:21 PM
Jason's Avatar
Jason Jason is offline
Sage Expert
 
Join Date: Nov 2003
Location: Texas
Posts: 598
Quote:
Originally Posted by CollinR View Post
You can then make a macro based on TCP.STB.* that sends OK and halts for x seconds to wake the box before firing off the channel request.
Thanks for the quick suggestions!

Since the HAVA channel changer will only accept simple integers (the openRTSP .exe is simply an RTSP: UPD stream selector...) and will not allow me to 'send' any non-numeric commands, eventghost is out of the question...

However, it appears that SJQ IS what I need to do...

I've been out of the loop for over a year, so this is quite the addon!

-Jason
__________________
True standalone tuner functionality with the --> HAVA Channel Changer<--
Reply With Quote
  #4  
Old 01-21-2009, 05:39 PM
CollinR CollinR is offline
Sage Icon
 
Join Date: Dec 2004
Location: Tulsa, OK
Posts: 1,305
I guess I am somewhat confused as to whats going on.

Is HAVA controlling the STB or are you controlling it directly?

Why do you have a HAVA box in the first place?

How many of them do you have?

You could also put the HAVA blaster infront of a USBUIRT and have EventGhost control it by relaying normal commands as you have it now and it if doesn't recieve any IR for 7 hours send a vol+ or whatever IR code to keep the box awake.

SJQ is quite a setup for something this simple, especially if you have an IR blaster.
Reply With Quote
  #5  
Old 01-21-2009, 11:39 PM
Jason's Avatar
Jason Jason is offline
Sage Expert
 
Join Date: Nov 2003
Location: Texas
Posts: 598
Quote:
Originally Posted by CollinR View Post
I guess I am somewhat confused as to whats going on.

Is HAVA controlling the STB or are you controlling it directly?

Why do you have a HAVA box in the first place?

How many of them do you have?

You could also put the HAVA blaster infront of a USBUIRT and have EventGhost control it by relaying normal commands as you have it now and it if doesn't recieve any IR for 7 hours send a vol+ or whatever IR code to keep the box awake.

SJQ is quite a setup for something this simple, especially if you have an IR blaster.


I started it as purely an experiment...

In any case, the HAVA, I only have one... (there can only be one on any network...) is setup as a true standalone network tuner. It tunes my UVerse STB via it's own blaster and then sends the recording to my PC vi the network. It has a virtual tuner that allows this. As to why, aside from the challenge, is that it gives one some of the best picture quality I have seen for an SD tuner. It also accepts the HD (component 1080i) signal that my UVerse box gives out.

In any case, as it is set up, it cannot accept any sort of ir command to control it. It is controlled by it's virtual tuner and channel changes are sent via RTSP UDP commands... weird, huh?

So, I am learning about SJQ right now... It looks like EXACTLY what I need! I have it set up, but am a little stumped on the format of the rules. After wading through the 8+ pages of the forum on it, I see some screenshots that appear to list a gui for setting up the rules. With SJQ 2.1 is this still the case? I see the client but when selecting the client, I get no rules nor a gui setup...

-Jason
__________________
True standalone tuner functionality with the --> HAVA Channel Changer<--
Reply With Quote
  #6  
Old 01-22-2009, 08:27 AM
CollinR CollinR is offline
Sage Icon
 
Join Date: Dec 2004
Location: Tulsa, OK
Posts: 1,305
Okay I think I have it now.

SJQ has both server and client and in your case you really only need the server. Howeve installing both where SageTV is installed isn't a bad idea. The server has "rules" and the client has "tasks".

Try this for your rules on the server.
Code:
//KillMiniRecs
if [IsTV == "true" && IsHD == "false" && Filename =$ ".mpg" && IsActivelyRecording == "false" && MediaSize <= 50M]
{
_DELETE
}
_Delete is a task internal to the server so you don't really need a client running for this to work.

However since you are using a cannon for a fly swatter you might as well add in these rules too.

Code:
//ComSkipSD
if [IsTV == "true" && IsHD == "false" && FileExists != "%d%\\%p%.edl" && Filename =$ ".mpg" && IsActivelyRecording == "false" && ChannelNumber != "0|1|1400" && IsScheduledRecording == "true"]
{
COMSKIPSD
}
//CompressSD
if [IsTV == "true" && IsHD == "false" && FileExists == "%d%\\%p%.edl" && Filename =$ ".mpg" && IsArchived == "true" && TranscodeQueueSize <= "5" && TimeOfDay <= "02:00"]
{
:TRANSCODEOPTS "MPEG4-High Quality Deinterlaced AVI" "false"
_TRANSCODE
}
if [IsTV == "true" && IsHD == "false" && FileExists == "%d%\\%p%.edl" && Filename =$ ".mpg" && MediaAge >= "30D" && TranscodeQueueSize <= "5" && TimeOfDay <= "02:00"]
{
:TRANSCODEOPTS "MPEG4-High Quality Deinterlaced AVI" "false"
_TRANSCODE
}
That will handle Comskip and compress anything in archives or anything older then 30 days to xvid to save ya some HDD space.


On to the client...

Then on your client you will have 1 task for running comskip.

Code:
//Client options
:MAXPROCS 1
// TASK definition
COMSKIPSD {  
:CPU LOW
:MAX 1    
"C:\\MediaServer\\Comskip\\comskip79_76\\comskip.exe -n \"%c%\""
}
Modify the MAXPROCS (all tasks on this client) and MAX (comskip tasks specifically) and the path to comskip.

Last edited by CollinR; 01-22-2009 at 08:30 AM.
Reply With Quote
  #7  
Old 01-22-2009, 10:59 AM
Jason's Avatar
Jason Jason is offline
Sage Expert
 
Join Date: Nov 2003
Location: Texas
Posts: 598
Thumbs up

Quote:
Originally Posted by CollinR View Post
However since you are using a cannon for a fly swatter you might as well add in these rules too.
...

if [IsTV == "true" && IsHD == "false" && Filename =$ ".mpg" && IsActivelyRecording == "false" && MediaSize <= 50M]
Yes... It is truly a cannon! However, it does allow me to also get rid of DirMon and I get the added benefit of your transcode...

The MediaSize variable needed quotes, otherwise an expected ']' was missing. The corrected line now reads:

if [IsTV == "true" && IsHD == "false" && Filename =$ ".mpg" && IsActivelyRecording == "false" && MediaSize <= "50M"]

You are a saint and a scholar! It's too bad that a sample ruleset does not come 'included' (possibly '//' commented out...) so that it is not so darn hard to figure out the possibilities...

The GUI approach of pre2.1 SJQ seemed 'stupid' proof... are there plans to go back to that?

Again... your help in this was VERY much appreciated!

-Jason
__________________
True standalone tuner functionality with the --> HAVA Channel Changer<--
Reply With Quote
  #8  
Old 01-24-2009, 10:55 AM
CollinR CollinR is offline
Sage Icon
 
Join Date: Dec 2004
Location: Tulsa, OK
Posts: 1,305
Anytime man, hope it works well for you.

Add this link as one of your favorites/bookmarks whatever.
http://code.google.com/p/sagetv-addons/w/list

I don't think the GUI is coming back and I can see why, it's alot of additional work for Slugger when we as users only change this stuff rarely.
Reply With Quote
  #9  
Old 01-24-2009, 07:41 PM
Jason's Avatar
Jason Jason is offline
Sage Expert
 
Join Date: Nov 2003
Location: Texas
Posts: 598
So, I think I get it...

So to just close out this thread would these work to autorun the metadata importer for Videos if I change the settings to scanvideos to True?

Server:

Quote:
//Metadata
if [IsVideo == "true" && FileExists != "%d%\\%p%.my" && Filename =$ ".avi"]
{
metadata
}
Client:

Quote:
// Get Video Metadata-Fanart/Banners/Covers
metadata {
"C:\\Path to program file\\MediaScraper\\mediaScraper.exe \"%c%\""
}
-Jason
__________________
True standalone tuner functionality with the --> HAVA Channel Changer<--
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
Timed Record Recordings - Where Are They Coming From floyd_2 SageTV Australia/New Zealand 3 12-15-2008 06:59 AM
Timed Recordings bug in SageTV ssalah SageTV Software 2 03-01-2008 02:05 PM
Deleting Timed Recordings moedes SageTV Software 0 02-27-2007 11:46 PM
Auto delete with timed recordings klunde SageTV Software 20 06-14-2006 03:49 AM
Timed Recordings don't always record WuphonsReach SageTV Software 0 12-19-2005 11:54 AM


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


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