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
  #1081  
Old 01-09-2012, 11:46 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by wayner View Post
I do get at the logs through the STVi but I find it useful to have the logs for all of the tasks in one place. I have just set up a task that runs after any recording finishes at it is useful to see the relevant output from this task in one file for all processed files.
For this use case, yes, you'll want to implement a custom logging solution. You might be able to just get away with appending to a file. If you want timestamped log entries, etc. then I'd go with log4j.
__________________
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
  #1082  
Old 01-09-2012, 12:03 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Here is what I am using right now. This suits my needs but I was wondering if there was a better solution. (Note - this is a task that runs after each recording. If the task is from a "problem" encoder it then runs Comskip to get the AVerage Volume and Average Brightness for the recording. If the recording appears to be of a black screen then it sends an IR Power command to the STB. If it looks like video is OK but there is no volume then it changes the channel for 5 secs and changes it back - which often causes the audio to resync and fix this problem)

Code:
Sun Jan 08 23:10:50 EST 2012
Log File for MediaFile \\carnoustie\media2\tv\StrawberryShortcake-ACircleofFriends-5592939-0.mpg
Encoder for this file is: Hauppauge WinTV 885 Video Capture Great
Sun Jan 08 23:10:50 EST 2012 File is from problem encoder, running Comskip
Comskip command is: C:\comskip\comskip.exe --verbose=1 \\carnoustie\media2\tv\StrawberryShortcake-ACircleofFriends-5592939-0.mpg
Sun Jan 08 23:12:25 EST 2012 Comskip is finished, Parsing output
Average Volume is: 0
Average Brightness is: 428
Volume is low but Brightness looks OK - will try channel change.
===========================================================
Sun Jan 08 23:15:35 EST 2012
Log File for MediaFile \\carnoustie\media2\tv\Seinfeld-S09E10-TheStrike-6844469-0.ts
Encoder for this file is: Hauppauge HD PVR Capture Device #2 Great-H.264
File is not from Problem encoder.
===========================================================
Mon Jan 09 04:45:14 EST 2012
Log File for MediaFile \\carnoustie\media2\tv\Rugby-7053421-0.ts
Encoder for this file is: Hauppauge HD PVR Capture Device #2 Great-H.264
File is not from Problem encoder.
===========================================================
Mon Jan 09 08:30:11 EST 2012
Log File for MediaFile \\carnoustie\media2\tv\CuriousGeorge-S05E09-FollowThatBoatWindmillMonkey-7051333-0.mpg
Encoder for this file is: Silicondust HDHomeRun Tuner 1011F5EA-1 WNEDDT
File is not from Problem encoder.
===========================================================
Mon Jan 09 12:30:12 EST 2012
Log File for MediaFile \\carnoustie\media2\tv\NoddyinToyland-ABabysitterfortheSkittles-7048378-0.mpg
Encoder for this file is: Hauppauge WinTV 885 Video Capture 
Mon Jan 09 12:30:12 EST 2012 File is from problem encoder, running Comskip
Comskip command is: C:\comskip\comskip.exe --verbose=1 \\carnoustie\media2\tv\NoddyinToyland-ABabysitterfortheSkittles-7048378-0.mpg
Mon Jan 09 12:30:31 EST 2012 Comskip is finished, Parsing output
Average Volume is: 4
Average Brightness is: 0
Both Volume and Brightness are low on recording of Noddy in Toyland - it looks like STB is off!
Will send a Power Toggle Command to STB
===========================================================
Mon Jan 09 12:32:57 EST 2012
Log File for MediaFile \\carnoustie\media2\tv\JakeandtheNeverLandPirates-CaptainHooksParrotSkyBirdIslandisFalling-7052588-0.mpg
Encoder for this file is: Hauppauge WinTV 885 Video Capture Great
Mon Jan 09 12:32:57 EST 2012 File is from problem encoder, running Comskip
Comskip command is: C:\comskip\comskip.exe --verbose=1 \\carnoustie\media2\tv\JakeandtheNeverLandPirates-CaptainHooksParrotSkyBirdIslandisFalling-7052588-0.mpg
Mon Jan 09 12:33:02 EST 2012 Comskip is finished, Parsing output
Average Volume is: 103
Average Brightness is: 886
Volume and Brightness look fine - no issues.
__________________
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
  #1083  
Old 01-09-2012, 12:04 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Can you call BMT from SJQ to update metadata?

Pls see this post in the BMT forum to prevent cross-posting: http://forums.sagetv.com/forums/show...201#post524201
__________________
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
  #1084  
Old 01-09-2012, 12:07 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by wayner View Post
Here is what I am using right now. This suits my needs but I was wondering if there was a better solution. (Note - this is a task that runs after each recording. If the task is from a "problem" encoder it then runs Comskip to get the AVerage Volume and Average Brightness for the recording. If the recording appears to be of a black screen then it sends an IR Power command to the STB. If it looks like video is OK but there is no volume then it changes the channel for 5 secs and changes it back - which often causes the audio to resync and fix this problem)
This looks fine to me. If the log is just for review then I think it's fine. If you plan to run analysis tools against to extract info from it then you'll just want to make sure there are obvious patterns to the output to make it easy to extract. Assuming that's not the goal, but rather it's just for manual review then that's fine.
__________________
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
  #1085  
Old 01-10-2012, 10:18 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Quote:
Originally Posted by Slugger View Post
By request, here's a script that will calculate "scrapable" file names for all your recordings.
Slugger - this looks for media files that have the type T for TV show - but it doesn't look like it gets Files that are TV files that were not recorded from Sage.

How do I change the line:

MediaFileAPI.GetMediaFiles('T').each {

to grab files that are Imported video files that are TV recordings but were not recorded by Sage? I currently have these files showing up in TV in Sage via the Diamond UI.

This script doesn't appear to actually rename the files. If I want to rename then I would just add the line:

new File(SegFile).renameTo(new File(newName))

after the line that is:
output << "$segFile >> $newName\r\n"

Correct?

Is there any danger in doing this on a large group of files at once - currently this returns 1097 files in my system. Will the command above send 1097 rename commands at once and could this overwhelm the computer?
__________________
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
  #1086  
Old 01-10-2012, 10:31 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by wayner View Post
Slugger - this looks for media files that have the type T for TV show - but it doesn't look like it gets Files that are TV files that were not recorded from Sage.

How do I change the line:

MediaFileAPI.GetMediaFiles('T').each {

to grab files that are Imported video files that are TV recordings but were not recorded by Sage? I currently have these files showing up in TV in Sage via the Diamond UI.
Not sure how Diamond differentiates. You'll have to do some investigating. All I know is you can add a 'V' to the mask (so make it 'TV') and that will grab all tv recordings + all imported videos, but that includes every imported video. Not sure how Diamond is filtering, but whatever they do, you'd have to do the same.

Quote:
This script doesn't appear to actually rename the files. If I want to rename then I would just add the line:

new File(SegFile).renameTo(new File(newName))

after the line that is:
output << "$segFile >> $newName\r\n"

Correct?
Yes, I intentionally did not include any file rename calls in the script; see below.

Quote:
Is there any danger in doing this on a large group of files at once - currently this returns 1097 files in my system. Will the command above send 1097 rename commands at once and could this overwhelm the computer?
Overwhelm the system? Nah, not on today's modern hardware.

Cause yourself a massive headache if there's a bug in your script? Hell, yes! All I can say is be careful when you go performing such batch commands like this because there's no turning back. I'd restrict yourself to a very tiny subset of your files and verify things are doing what you want them to do before you unleash the script on every file. With that obligatory warning out of the way, doing 1000 renames isn't going to cause any problems (that I can think of).
__________________
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
  #1087  
Old 01-10-2012, 11:06 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Thanks Slugger. There is metadata, at least there is in BMT, that is called MediaType. This can be either TV or Movie and it can be TV for shows that were not recorded from Sage. But I don't know if this field is part of Sage or if it is a custom field that Sean added for BMT and is used by some of the UIs, like Diamond, to filter files.
__________________
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

Last edited by wayner; 01-10-2012 at 11:09 PM.
Reply With Quote
  #1088  
Old 01-10-2012, 11:11 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by wayner View Post
Thanks Slugger. There is metadata, at least there is in BMT, that is called MediaType. This can be either TV or Movie and it can be TV for shows that were not recorded from Sage. But I don't know if this field is part of Sage or if it is a custom field that Sean added for BMT and is used by some of the UIs, like Diamond, to filter files.
I assume the metadata value is accessible via MediaFileAPI.GetMediaFileMetadata(). If so, you can filter on it in your script. If not, they're storing it somewhere else, but either way it should be accessible one way or another in your script.
__________________
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
  #1089  
Old 01-10-2012, 11:22 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
OK, here is MediaFileAPI.GetMediaFileMetadataProperties(mf) for an imported TV show.

[Language:, PartNumber:0, ExternalID:MF7091111, Narrator:, EpisodeName:Curious George Sees Stars, SeasonNumber:1, Dolby:false, Host:, SeriesPremiere:false, SAP:false, ChannelPremiere:false, OriginalAirDate:1188100800000, TotalParts:0, EpisodeNumber:31, Guest:, Letterbox:false, Choreographer:, SeriesInfoID:846678, MediaType:TV, Taped:false, Surround:false, CC:false, RunningTime:1800000, Actor:Frank Welker;Jeff Bennett;William H. Macy, Team:, Dubbed:false, MediaProviderID:tvdb, Stereo:false, Judge:, Correspondent:, ScrapedBy:Phoenix, ScrapedDate:1325267906960, 3D:false, Musical Guest:, ExtendedRatings:, DD5.1:false, MediaProviderDataID:79429, Writer:, Rated:, Title:Curious George, Subtitled:false, MediaTitle:Curious George, Premiere:false, New:false, Live:false, HDTV:false, SeasonPremiere:false, Guest Voice:, Misc:, ParentalRating:TVY, Year:, Widescreen:false, Genre:Animation / Children, Producer:, Guest Star:, Director:, SeriesFinale:false, Contestant:, Composer:, Executive Producer:, Voice:, Anchor:, SeasonFinale:false, Description:George tries to count all the stars in the sky but finds it harder to do when he tries to count the stars in the city sky.]

So I just get the .MediaType property from this list and I am good to go to filter those items.
__________________
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
  #1090  
Old 01-11-2012, 08:53 AM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Quote:
Originally Posted by Slugger View Post
Cause yourself a massive headache if there's a bug in your script? Hell, yes! All I can say is be careful when you go performing such batch commands like this because there's no turning back. I'd restrict yourself to a very tiny subset of your files and verify things are doing what you want them to do before you unleash the script on every file. With that obligatory warning out of the way, doing 1000 renames isn't going to cause any problems (that I can think of).
I think I will adapt this to run it from SJQ so that it only works on a subset of files - a single MediaFile or all recordings of a particular show if you run SJQ on all episodes of a TV show.
__________________
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
  #1091  
Old 01-11-2012, 09:07 AM
ehfortin ehfortin is offline
Sage Advanced User
 
Join Date: Aug 2008
Posts: 132
Hi,

Quote:
Originally Posted by Slugger View Post
Tonight's Groovy addition is keep_stb_alive.groovy.

Inspired by shadeblue's STBKeepAlive plugin and the desire to do some IR testing on a Linux Sage server, this little Groovy script will allow you to issue an IR command to your SageTV configured STBs. Unlike the STBKeepAlive plugin, this script supports any IR device configured to work in Sage and will work on any Sage supported OS. In other words, if your IR commands are working in Sage then this script will happily issue the same IR commands (since it uses the Sage API to trigger the IR commands).
I tried this with the Hauppauge IR Blaster and I don't seems to have success. SageTV is perfectly able to change the channel on my Motorola VIP1200 but this script, even if it report success, doesn't seem to make SageTV to send the IR code. I've tried single digit (this make the bottom bar to display so it's my way of knowing if the STB received anything), full channel change and stuff like "enter", "ok", "select" with different variant of uppercase/lowercase. As the script instruct SageTV to ask for IR transmit, I assume this should work well with Hauppauge IR Blaster as well. However, right now, it does not.

Can SJQ interfere with my test? I have the trial version and already have a task registered in it. I'm running my script directly from Eclipse as my other 2-3 scripts that I'm now working on and they still work fine so I don't think it is the issue but I'm still asking in case.

How can I debug this? I don't see anything in the SageTV logs (neither in SJQ logs).

Thank you.

ehfortin
Reply With Quote
  #1092  
Old 01-11-2012, 09:40 AM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Are you sure you have the correct "remote name" - I use a USB-UIRT and my remote name is SA3200.

In terms of commands for the IR device you should have all of the numbers from 0-9 defined but you may not have anything else. What is in your IR file? My IR file is called 3200.ir and it is posted below. I had to manually add to the file anything other than the numbers. When you send commands it also appears to be Case Sensitive so chprev is not equal to ChPrev - the command will have to be exactly the same as the first field of the IR file.

Your IR file will be in a folder like: C:\Program Files\SageTV\Common\RemoteCodes\USB-UIRT Transceiver although the last folder will be different for you.

Code:
sa3200 0 0 3 600 800
0 Z20000 0048 0000 0018 00C0 00C1 0030 0092 0030 0092 0030 0031 0030 0092 0030 0092 0030 0092 0030 0031 0030 0031 0030 0092 0030 0092 0030 0031 0030 0031 0030 0031 0030 0092 0030 0031 0030 0031 0030 0031 0030 0092 0030 0092 0030 0031 0030 0031 0030 0092 0030 086C
1 Z20000 0048 0000 0018 00C0 00C1 0030 0092 0030 0092 0030 0031 0030 0092 0030 0092 0030 0031 0030 0031 0030 0031 0030 0031 0030 0092 0030 0031 0030 0031 0030 0031 0030 0092 0030 0031 0030 0031 0030 0092 0030 0092 0030 0092 0030 0092 0030 0031 0030 0092 0030 086B
2 Z20000 0048 0000 0018 00C0 00C1 0030 0092 0030 0092 0030 0030 0030 0092 0030 0092 0030 0092 0030 0030 0030 0031 0030 0031 0030 0092 0030 0031 0030 0031 0030 0031 0030 0092 0030 0031 0030 0030 0030 0030 0030 0092 0030 0092 0030 0092 0030 0031 0030 0092 0030 0866
3 Z20000 0048 0000 0018 00C0 00C1 0030 0092 0030 0092 0030 0031 0030 0092 0030 0092 0030 0031 0030 0092 0030 0031 0030 0031 0030 0092 0030 0031 0030 0031 0030 0031 0030 0092 0030 0031 0030 0031 0030 0092 0030 0031 0030 0092 0030 0092 0030 0031 0030 0092 0030 086A
4 Z20000 0048 0000 0018 00C0 00C1 0030 0092 0030 0092 0030 0031 0030 0092 0030 0092 0030 0092 0030 0092 0030 0031 0030 0031 0030 0092 0030 0031 0030 0031 0030 0031 0030 0092 0030 0031 0030 0031 0030 0031 0030 0031 0030 0092 0030 0092 0030 0031 0030 0092 0030 086A
5 Z20000 0048 0000 0018 00C0 00C1 0030 0092 0030 0092 0030 0031 0030 0092 0030 0092 0030 0031 0030 0031 0030 0092 0030 0031 0030 0092 0030 0031 0030 0031 0030 0031 0030 0092 0030 0031 0030 0031 0030 0092 0030 0092 0030 0031 0030 0092 0030 0031 0030 0092 0030 086A
6 Z20000 0048 0000 0018 00C0 00C1 0030 0092 0030 0092 0030 0031 0030 0092 0030 0092 0030 0092 0030 0031 0030 0092 0030 0031 0030 0092 0030 0031 0030 0031 0030 0031 0030 0092 0030 0031 0030 0031 0030 0031 0030 0092 0030 0031 0030 0092 0030 0031 0030 0092 0030 0869
7 Z20000 0048 0000 0018 00C0 00C1 0030 0092 0030 0092 0030 0031 0030 0092 0030 0092 0030 0031 0030 0092 0030 0092 0030 0031 0030 0092 0030 0031 0030 0031 0030 0031 0030 0092 0030 0031 0030 0031 0030 0092 0030 0031 0030 0031 0030 0092 0030 0031 0030 0092 0030 086A
8 Z20000 0048 0000 0018 00C0 00C1 0030 0092 0030 0092 0030 0031 0030 0092 0030 0092 0030 0092 0030 0092 0030 0092 0030 0031 0030 0092 0030 0031 0030 0031 0030 0031 0030 0092 0030 0031 0030 0031 0030 0031 0030 0031 0030 0031 0030 0092 0030 0031 0030 0092 0030 086A
9 Z20000 0048 0000 0018 00C0 00C1 0030 0092 0030 0092 0030 0031 0030 0092 0030 0092 0030 0031 0030 0031 0030 0031 0030 0092 0030 0092 0030 0031 0030 0031 0030 0031 0030 0092 0030 0031 0030 0031 0030 0092 0030 0092 0030 0092 0030 0031 0030 0031 0030 0092 0030 086A
guide Z20000 0048 0000 0018 00C0 00C1 0030 0092 0030 0092 0030 0031 0030 0092 0030 0092 0030 0031 0030 0092 0030 0092 0030 0031 0030 0031 0030 0031 0030 0031 0030 0031 0030 0092 0030 0031 0030 0031 0030 0092 0030 0031 0030 0031 0030 0092 0030 0092 0030 0092 0030 0868
ch+ Z20000 0048 0000 0018 00C0 00C1 0030 0092 0030 0092 0030 0031 0030 0092 0030 0092 0030 0092 0030 0031 0030 0092 0030 0092 0030 0092 0030 0031 0030 0031 0030 0031 0030 0092 0030 0031 0030 0031 0030 0031 0030 0092 0030 0031 0030 0031 0030 0031 0030 0092 0030 0868
Power Z20000 0048 0000 0018 00C0 00C1 0030 0092 0030 0092 0030 0031 0030 0092 0030 0092 0030 0092 0030 0092 0030 0092 0030 0031 0030 0031 0030 0031 0030 0031 0030 0031 0030 0092 0030 0031 0030 0031 0030 0031 0030 0031 0030 0031 0030 0092 0030 0092 0030 0092 0030 0868
ChPrev Z20000 0048 0000 0018 00C0 00C1 0030 0092 0030 0092 0030 0031 0030 0092 0030 0092 0030 0031 0030 0092 0030 0092 0030 0092 0030 0031 0030 0031 0030 0031 0030 0031 0030 0092 0030 0031 0030 0031 0030 0092 0030 0031 0030 0031 0030 0031 0030 0092 0030 0092 0030 0868
Do you have the SageGroovy envirnoment installed? That makes it easy to do troubleshooting as you can launch Groovy Scripts from a console rather than having to go through the Sage UI. And you can add debugging functions as well.
__________________
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
  #1093  
Old 01-11-2012, 11:02 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by ehfortin View Post
Hi,



I tried this with the Hauppauge IR Blaster and I don't seems to have success. SageTV is perfectly able to change the channel on my Motorola VIP1200 but this script, even if it report success, doesn't seem to make SageTV to send the IR code. I've tried single digit (this make the bottom bar to display so it's my way of knowing if the STB received anything), full channel change and stuff like "enter", "ok", "select" with different variant of uppercase/lowercase. As the script instruct SageTV to ask for IR transmit, I assume this should work well with Hauppauge IR Blaster as well. However, right now, it does not.

Can SJQ interfere with my test? I have the trial version and already have a task registered in it. I'm running my script directly from Eclipse as my other 2-3 scripts that I'm now working on and they still work fine so I don't think it is the issue but I'm still asking in case.

How can I debug this? I don't see anything in the SageTV logs (neither in SJQ logs).

Thank you.

ehfortin
Most likely, the remote name is not correct.

Run this script to get a list of valid remote names that you can use:

Code:
for(def plugin : Configuration.GetInfraredTuningPlugins())
    for(def remote : Configuration.GetRemotesForInfraredTuningPlugin(plugin, 0))
        println remote
If you're using a valid remote name (and the name isn't duplicated in that list) then the issue is probably with this line from the script:

Code:
Global.TransmitCommandUsingInfraredTuningPlugin(plugin, 0, remote, String.valueOf(c), 2)
Arguments 2 and 5 may need to be modified for blasters other than the USB-UIRT. Unfortunately, the Sage API docs aren't very clear as to what those values should be or how to compute them. I'd probably play around with arg 5 (increase it or decrease it) and see what happens. As for arg 2, there is no direction as to what that value should be other than zero.
__________________
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
  #1094  
Old 01-11-2012, 11:49 AM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
This is slightly OT of the above discussion but it would have been nice if you could have provided a zone argument for the USB-UIRT. That would have made things slightly simpler and you could work off of one IR file for multiple STBs connected to one USB-UIRT rather than having to apped Z1 or Z2 to the beginning of all of the lines in the IR file.
__________________
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
  #1095  
Old 01-11-2012, 11:51 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by wayner View Post
This is slightly OT of the above discussion but it would have been nice if you could have provided a zone argument for the USB-UIRT. That would have made things slightly simpler and you could work off of one IR file for multiple STBs connected to one USB-UIRT rather than having to apped Z1 or Z2 to the beginning of all of the lines in the IR file.
Even if I wanted to, I couldn't. I don't interact with the IR files at all. I simply call API calls to control the remote and the API calls don't provide such ability.
__________________
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
  #1096  
Old 01-11-2012, 11:58 AM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
That's what I thought - they should have provided this capability in the api. I think you somewhat have this in the exemultituner plugin as you can pass a parameter which is either the device number, like 1 or 2, or the uniqueid which is a longer hex number like bba23f34, assuming that you make a change to the registry entry to change the external command 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
  #1097  
Old 01-11-2012, 01:45 PM
ehfortin ehfortin is offline
Sage Advanced User
 
Join Date: Aug 2008
Posts: 132
Hi,

I'm sure I have the proper name as I did create a script similar to what Slugger suggested to find it. With the hauppauge IR blaster, I never had to create a .ir file so... the default name is "StubDevice" as per what I see in SageTV as well.


@Wayner:

I'm using a hauppauge IR blaster that is linked to my HDPVR. This work great without any .ir file. In sage.properties, there is an entry pointing to HCWIRBlast.dll and that's it. From there, SageTV seems to know what to do.

@Slugger:

I've tried values from 0 to 100 for args 5 without success.

Having to work with undocumented API from SageTV and particularly with it using the undocumented DLL from Hauppauge for channel changing, it seems that it may be complicate to figure how to make this work... Any idea other then buying a USB-UIRT device?

Thanks.


ehfortin
Reply With Quote
  #1098  
Old 01-11-2012, 04:09 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
My guess is there's a port that the Hauppauge blaster is listening on. Try to find out what port it is and use that for arg 2 of the API call.
__________________
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
  #1099  
Old 01-11-2012, 04:24 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by Slugger View Post
My guess is there's a port that the Hauppauge blaster is listening on. Try to find out what port it is and use that for arg 2 of the API call.
Check your sagetv_0.txt log file after Sage has changed the channel via the blaster. Look for a line like this:

Quote:
SUCCESSFULLY opened IRTuner on port
There should be a number at the end of that line. If you find that line in your log file then that's the port number you probably need to use in the API call to make the script work.

EDIT: This would be arg 2 of the API call.
__________________
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
  #1100  
Old 01-11-2012, 04:29 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
There are a couple of options to negate the need for this script. Do you know if your box has a setting to turn on when any number IR code is received? Two of my boxes can do this so there is no need for a keep alive script.

Do you know if there is a command line utility for the Hauppauge IR blaster? If there is then you could just call this from a Groovy script. There is a utility for the USB-UIRT called uutx.exe that you can run and pass an IR code.

Another potential option is FireWire.
__________________
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
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 01:25 PM.


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