SageTV Community  

Go Back   SageTV Community > Hardware Support > Hardware Support
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

Hardware Support Discussions related to using various hardware setups with SageTV products. Anything relating to capture cards, remotes, infrared receivers/transmitters, system compatibility or other hardware related problems or suggestions should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-12-2008, 09:52 AM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
SageTV Window Focus With USB-UIRT

Since I no longer needed it on my server I have my USB-UIRT set up on my client so I can use a remote control on it. It all works great while the SageTV window has focus. The problem I have is I have SageTV set to sleep to the system tray. If other windows have focus and I push the power button on the remote SageTV opens but without focus behind the programs that are already running. Even if I go fullscreen and nothing else is running the taskbar is still showing on the bottom.

How can I make it so that the SageTV window has the focus when it comes out of sleep from the system tray?
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #2  
Old 11-12-2008, 10:43 AM
CollinR CollinR is offline
Sage Icon
 
Join Date: Dec 2004
Location: Tulsa, OK
Posts: 1,305
Although there are probably other methods you might try downloading EventGhost it has plugins for both the USBUIRT and SageTVClient. It will use the sendmessage to control SageTV or SageTVClient regaurdless of focus in addition to other neat things in Windows like resizing and repositioning windows and changing the Always on top attribute from remote button presses.
Reply With Quote
  #3  
Old 11-12-2008, 10:52 AM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Yea, I was looking at EventGhost.

Separate issue but I have a feeling that EventGhost can help me fix a problem on my server. I have my cable box connected via FireWire to change channels. But leading zeros are stripped from the number. As a result two digit channels take longer to tune because the box waits a bit for a third digit. I've read that someone has EvenGhost set to send the numbers separately rather than in a single string. This might work around the problem I'm having.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #4  
Old 11-12-2008, 11:00 AM
CollinR CollinR is offline
Sage Icon
 
Join Date: Dec 2004
Location: Tulsa, OK
Posts: 1,305
Yes I do that to control a DVD changer, but I use a USBUIRT. Same principal though, channels 401-800 represent the 400 disks in my changer. The changer I have is kinda crappy so you have to jump through a bunch of hoops with somewhat specific command timing to make it work.

How do you send commands to the STB via Firewire? If it's something like stbfirewire.exe -t 1

Then you are golden, but really it'll depend on the capabilities of that aspect since it's Firewire.
Reply With Quote
  #5  
Old 11-14-2008, 01:00 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Ok, I got it all set up last night. I am rather proud of myself. My only real issue with the power button is that I can't have it also sleep SageTV to the system tray.

I need some kind of if/then to figure out whether or not the SageTV window is open. If it's not open it should open SageTV to fullscreen and if it is already open it should sleep it to the system tray. There's probably a way to do that with EventGhost but since I just started using it I don't know how.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #6  
Old 11-14-2008, 01:26 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Never mind. I got it figured out. I did some poking around in EventGhost and noticed that you can enable and disable macros. I already had separate macros for opening and closing SageTV using separate buttons. So what I did was assigned the same button events to both macros and then created two actions at the end of each macro. One that enables the other macro and another that disables itself. That way I can toggle between the two states.

I should make this smarter though. Because it could get stuck if SageTV isn't in the state that EventGhost is expecting. I'll have to think on that one.

The only other issue I've noticed is that EventGhost doesn't seem to respond when I hold down a button on the remote. It works fine for single button presses but doesn't do anything when the button is held down. Is there something I'm doing wrong for that not to work?
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #7  
Old 11-14-2008, 01:55 PM
CollinR CollinR is offline
Sage Icon
 
Join Date: Dec 2004
Location: Tulsa, OK
Posts: 1,305
Couple of things may help ya.

Okay put EventGhost in the startup for your system.

In EventGhost:

Add the tasks plugin. (Other>Task Create/Switch Events)
Add a macro to your Autostart folder (atop the config) use the trigger event command as the action, make the event name startuproutine.

Make a folder under context, inside this folder is where you place your enable\disable folders. Keep in mind when you enable\disable a folder you are doing the opposite to all other folders in that folder. So you will need to make serveral folders to keep things seperate as a result I usually make a folder called Globals on the same level as context, this way those actions cannot be disabled unless you disable everything.

You already have your enable/disable macros setup just change them to folders rather then specific macros. These would in my install live under globals.

Instead of triggering these macros with IR recieved use the Events from the tasks plugin, min/max SageTV and you will see those events logged as Task.Activated.SageTV and Task. Deactivated.SageTV. By doing this EventGhost knows if SageTV is in focus or not.

Another global folder item create a macro thats triggered by the event Main.startuproutine. In here you will place several actions to set the scene when the machine boots. So you can exec SageTV.exe and min/max it, then set the enable macro to whichever state you want it in.


By doing it this way you can create an entire series of folders that effect the remotes output depending on focus so you can also have the remote revert to a keyboard/mouse when nothing is in focus (Task.Activated.Desktop) using text messaging style number inputs for letters and the 5 way directional control for the mouse. Yeah why not have a mouse mode while SageTV isn't in focus?
Reply With Quote
  #8  
Old 11-14-2008, 03:03 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Sorry, I couldn't quite follow you. I did figure out how to include error checking in each macro though. Basically, if the window is already closed and the close command runs it first checks for the existence of the window. If it is there it continues on. If it isn't there it jumps to another macro which reverses the enable/disable toggle and then jumps to the open macro.

Conversely, if the window is already open and the open command runs it first checks to see if the window exists. If it doesn't exist it continues on. If it does exist it again jumps to a differnt macro which reverses the enable/disable toggle and then jumps to the close macro.

Once I found the conditional jump action I figured out how to include the error checking based on whether or not it could find the SageTV window.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #9  
Old 11-14-2008, 03:43 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
For the curious here is a screenshot of my macros from EventGhost to turn it on and off.
Attached Images
File Type: png EventGhost-SageTV-OnOff.png (40.4 KB, 226 views)
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #10  
Old 11-14-2008, 10:51 PM
btrcp2000 btrcp2000 is offline
Sage Fanatic
 
Join Date: Aug 2007
Posts: 888
taddeusz-

any chance of sweet talking you into posting the config file itself?

pretty please??
__________________
[size=1]Current Server:V9 UNRAID Docker, SuperMicro x9dri-LNF4+, 32 GB ECC, 2x Xeon e5-2660v2, storage array 6TB, 2 Dish r5000HD tuners, 1 HDHomerun Quatro, 1 HDHomerun Extend
4 Nvidia Shield TVs with Miniclient
Reply With Quote
  #11  
Old 11-15-2008, 11:16 AM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Ok, here's the code, the remote codes are from a Hauppauge remote, the paths are for Vista x64 so modify them if necessary:

Code:
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1485">
    <Folder Name="SageTV" Expanded="True">
        <Macro Name="Open SageTV" id="297" Expanded="True">
            <Event Name="USB_UIRT.170000870FC0" />
            <Event Name="USB_UIRT.150000273CFC" />
            <Action>
                Window.FindWindow(u'SageTVClient.exe', u'SageTV Client', u'SunAwtFrame', u'', u'SunAwtCanvas', 7, False, 0.0, 2)
            </Action>
            <Action>
                EventGhost.NewJumpIf(XmlIdLink(323), 0, False)
            </Action>
            <Action>
                System.Execute(u'C:\\Program Files (x86)\\SageTV\\SageTV\\SageTVClient.exe', u'', 0, False, 2, u'C:\\Program Files (x86)\\SageTV\\SageTV')
            </Action>
            <Action>
                Window.FindWindow(u'SageTVClient.exe', u'SageTV Client', u'SunAwtFrame', u'', u'SunAwtCanvas', 7, False, 15.0, 2)
            </Action>
            <Action>
                Window.BringToFront()
            </Action>
            <Action>
                SageTV.FullScreen()
            </Action>
            <Action>
                EventGhost.EnableItem(XmlIdLink(308))
            </Action>
            <Action>
                EventGhost.DisableItem(XmlIdLink(297))
            </Action>
        </Macro>
        <Macro Name="Close SageTV" id="308" Enabled="False" Expanded="True">
            <Event Name="USB_UIRT.170000870FC0" />
            <Event Name="USB_UIRT.150000273CFC" />
            <Action>
                Window.FindWindow(u'SageTVClient.exe', u'SageTV Client', u'SunAwtFrame', u'', u'SunAwtCanvas', 7, False, 0.0, 2)
            </Action>
            <Action>
                EventGhost.NewJumpIf(XmlIdLink(319), 1, False)
            </Action>
            <Action>
                SageTV.FullScreen()
            </Action>
            <Action>
                Window.FindWindow(u'SageTVClient.exe', u'SageTV Client', u'SunAwtFrame', u'', u'SunAwtCanvas', 7, False, 0.0, 0)
            </Action>
            <Action>
                Window.BringToFront()
            </Action>
            <Action>
                Window.Close()
            </Action>
            <Action>
                EventGhost.EnableItem(XmlIdLink(297))
            </Action>
            <Action>
                EventGhost.DisableItem(XmlIdLink(308))
            </Action>
        </Macro>
        <Macro Name="SageTV Close Error" id="319" Expanded="True">
            <Action>
                EventGhost.EnableItem(XmlIdLink(297))
            </Action>
            <Action>
                EventGhost.DisableItem(XmlIdLink(308))
            </Action>
            <Action>
                EventGhost.NewJumpIf(XmlIdLink(297), 2, False)
            </Action>
        </Macro>
        <Macro Name="SageTV Open Error" id="323" Expanded="True">
            <Action>
                EventGhost.EnableItem(XmlIdLink(308))
            </Action>
            <Action>
                EventGhost.DisableItem(XmlIdLink(297))
            </Action>
            <Action>
                EventGhost.NewJumpIf(XmlIdLink(308), 2, False)
            </Action>
        </Macro>
    </Folder>
</EventGhost>
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #12  
Old 11-25-2008, 03:15 PM
Skirge01's Avatar
Skirge01 Skirge01 is offline
SageTVaholic
 
Join Date: Jun 2007
Location: New Jersey
Posts: 2,599
I hope you don't mind me jumping in here, but this is the first thread that made any sense to me. I attempted to recreate this from the screenshot so I could "learn" EventGhost and I have a question: Why do you want to turn SageTV on and off?

I decided to try creating a similar one for PowerDVD and it worked pretty well in and of itself. If I want to call this event from SageTV how would I go about it? I thought I had read that I would need to change SageTV from the USB-UIRT option to an "external" setup or something, but that thread kinda lost me.

Then, once I'm inside PowerDVD, how do I get my remote to control PowerDVD using EventGhost? Obviously, when I close down PowerDVD, I'd then want to return to SageTV and control that again.
Reply With Quote
  #13  
Old 11-25-2008, 03:20 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Quote:
Originally Posted by Skirge01 View Post
Why do you want to turn SageTV on and off?
The computer I run my client on is my main gaming computer in my bedroom. It's not a dedicated client. With EventGhost setup as it is I can press the power on the remote and it can wake SageTV from the System Tray or load it if its not already. Since I have 4GB of RAM on this particular machine I prefer it to be in the System Tray so that it comes up faster. But I obviously don't want it windowed or full screen all the time.

Quote:
Originally Posted by Skirge01 View Post
Then, once I'm inside PowerDVD, how do I get my remote to control PowerDVD using EventGhost? Obviously, when I close down PowerDVD, I'd then want to return to SageTV and control that again.
For this to work you'd disable the entire SageTV command tree and then enable the entire PowerDVD command tree. Then reverse the process when you're ready to return to SageTV.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #14  
Old 11-25-2008, 04:13 PM
Skirge01's Avatar
Skirge01 Skirge01 is offline
SageTVaholic
 
Join Date: Jun 2007
Location: New Jersey
Posts: 2,599
Thanks for explaining your setup. That definitely helped me make sense of why you were doing it and realize that I don't need to do it that way.

Since I don't have an "entire Sage command tree", I guess that means I need to create one from scratch with every one of the remote's (Harmony 880) double IR commands? After that, I assume it'd control Sage fine, but wouldn't it be sending the same IR codes when PowerDVD was the active window, thereby still controlling Sage? I think I'm just missing a key understanding of how EventGhost works.
Reply With Quote
  #15  
Old 11-25-2008, 04:21 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Yea, basically what I did was instead of having SageTV control the USB-UIRT EventGhost has complete control over it. All remote control commands go through EventGhost first and then it passes the appropriate commands along to SageTV. To get the SageTV Plugin you need to install the beta version. It is not in the latest stable release.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #16  
Old 11-25-2008, 04:31 PM
Skirge01's Avatar
Skirge01 Skirge01 is offline
SageTVaholic
 
Join Date: Jun 2007
Location: New Jersey
Posts: 2,599
Awesome... thanks. Just installed the latest beta version and added the PowerDVD and SageTV plugins. Boy, did THAT save a lot of work! ;D Then, to get these commands to go through EventGhost and then to SageTV or PowerDVD, I change Sage's Remote Control setup to "None Selected or External Setup", right? Then, EventGhost will bring Sage (or PowerDVD) to the forefront, as I tell it to, and Sage will accept the commands? I'll go give that a shot. Let me know if I'm way off here. Thanks again!
Reply With Quote
  #17  
Old 11-25-2008, 04:34 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Quote:
Originally Posted by Skirge01 View Post
Awesome... thanks. Just installed the latest beta version and added the PowerDVD and SageTV plugins. Boy, did THAT save a lot of work! ;D Then, to get these commands to go through EventGhost and then to SageTV or PowerDVD, I change Sage's Remote Control setup to "None Selected or External Setup", right? Then, EventGhost will bring Sage (or PowerDVD) to the forefront, as I tell it to, and Sage will accept the commands? I'll go give that a shot. Let me know if I'm way off here. Thanks again!
Basically, what you'll have to do is go through and learn which IR commands go to which SageTV & PowerDVD commands and drag them to the appropriate location from the left side. Remember, Hauppauge remotes have a toggle so there are actually two different commands for each button. Also, it's easier to have it learn commands with the real remote. I've had very poor success trying to get SageTV to learn commands through my Harmony. It was so bad I had to dig out the Hauppauge remote or else I wouldn't have gotten it to work.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #18  
Old 11-25-2008, 05:52 PM
Skirge01's Avatar
Skirge01 Skirge01 is offline
SageTVaholic
 
Join Date: Jun 2007
Location: New Jersey
Posts: 2,599
Getting the IR codes attached to the SageTV plugin was pretty simple. I managed to get it controlling Sage in like 10 minutes. Thanks!

Since these are the same codes that will be sent to PowerDVD, I'm assuming I need to disable the SageTV tree when I open up PowerDVD? So, would the first part of every Sage command (macro--i.e. STOP, PAUSE, UP, etc) be to disable the PowerDVD tree? Then, the last part of each Sage macro would be to enable the PowerDVD tree? I'd reverse this for the PowerDVD tree's macros. Seems like a lot of extra steps, so I want to make sure I'm not missing an easier route.
Reply With Quote
  #19  
Old 11-25-2008, 06:02 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Quote:
Originally Posted by Skirge01 View Post
Getting the IR codes attached to the SageTV plugin was pretty simple. I managed to get it controlling Sage in like 10 minutes. Thanks!

Since these are the same codes that will be sent to PowerDVD, I'm assuming I need to disable the SageTV tree when I open up PowerDVD? So, would the first part of every Sage command (macro--i.e. STOP, PAUSE, UP, etc) be to disable the PowerDVD tree? Then, the last part of each Sage macro would be to enable the PowerDVD tree? I'd reverse this for the PowerDVD tree's macros. Seems like a lot of extra steps, so I want to make sure I'm not missing an easier route.
Just disable the main folder where where all the commands reside. Disabling the folder will disable all the macros it contains.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #20  
Old 11-25-2008, 07:35 PM
Skirge01's Avatar
Skirge01 Skirge01 is offline
SageTVaholic
 
Join Date: Jun 2007
Location: New Jersey
Posts: 2,599
I've now got macros for controlling the functions (up, down, play, etc.) in Sage and PowerDVD, as well as some macros that should open PowerDVD, close it, or return to Sage, all in a single EG file called LaunchPowerDVD.xml. How do I create a dynamic menu option (SageMC) to call these macros or EG's .xml files? I tried creating a menu option to an external program, linked to "eventghost.exe -e LaunchPowerDVD.xml", but clicking the menu item did nothing.

What do I have wrong?
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
New MCE Remote Software StephaneM Hardware Support 298 11-23-2009 06:13 PM
NO USB UIRT Configuration Controls in SAGE!!!! OldPCGUY Hardware Support 9 10-28-2008 09:14 PM
USB UIRT is sending double digit of the number mistergq Hardware Support 4 08-29-2008 08:04 PM
IR Blaster USB UIRT not waking STB up 2FarGone Hardware Support 4 06-11-2007 08:11 AM
Problems controlling DEC-3000S with USB UIRT oaamaas Hardware Support 2 04-10-2007 01:52 PM


All times are GMT -6. The time now is 11:19 AM.


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