Help with Girder sending commands to Xlobby needed

Help each other out

Help with Girder sending commands to Xlobby needed

Postby Naylia on Thu May 19, 2005 1:20 pm

Hey guys,

LovingHD is looking for some help and I don't use girder with XLobby so I thought maybe you could lend a hand.

LovingHD:
I've got it working with my ppc but now need to get my remote working as this is my main means of controlling sage.

I currently use Girder and the WinLIRC plugin to control Sage. I have all my remote command setup to sendmessage commands to Sage. Its been working well for a couple years. I'm a little hesitant to open this can of worms, but I need to.

I downloaded the girder2xlobby plugin, and created an xlobby.xml file from SageMC. I now have a list of commands that it parsed from Xlobby that I need to link to my remote inside Girder.

I understand some simple ones, like xlobby:up, will go to my up key. But what do I do with the multi-use commans like play? Is there an xlobby version of these commands that I need to use so that xlobby can control the correct program? I believe that play is used for music, zoomplayer, and sage with xlobby handling all the details, but I have to tell xlobby somehow that I hit the play buttton. I did not see an xlobby:play command in the xml file and believe that if I link the play key to sagetv:play for example, it will only work under sagetv.

Hoping you could enlighten me.


LovingHD:
OK, maybe I've figured out something.

It appears that I will need to create an event for each of the ircommand that you have created in the ir dirctory. When I do this I can assign them a wparam/lparam pair and then use Girder to call them.

Is this correct?

Now, off to figure out how to create the events. Looks like a perl script to convert the ir command xml file to an event xml file would work best


Naylia:
ok, here's what you do, xlobby can recieve wparam/lparam you should be able to retarget you existing commands to events in xlobby. i think you should use girder to direct all it's sendmessages to xlobby and let xlobby redirect, i suspec that the delay will be nonexistant and this will allow for multiuse commands

this is similar to why i disable my usb-uirt because you don't want play doing to both programs, you only need it to goto one program and let that program decide what to do with it based on what you are doing

i wish i knew more about the girder plugin i think you should be able to assign the same trigger to multiple events like you can with IR


LovingHD:
So I should be able to link my play command in girder to the xlobby music:play, zoom:play, and sagetv:play commands and then xlobby will forward the appropriate command to the right place.

I'll give that a shot.


Any help for this guy?
Naylia
 
Posts: 530
Joined: Tue Oct 19, 2004 7:50 pm
Location: Boston, MA

Postby lovingHDTV on Thu May 19, 2005 2:40 pm

What would be really nice is a WinLIRC plugin :)

In Girder I have an Xlobby.gml file created via the girder2xlobby plugin/script. In this gml file I can see all the commands defined by Xlobby, and the skin. For example, there is no xlobby:play, but instead sagetv:play, zoomplayer:play, music:play. This is not what I expected.

I expected something similar to the ir commands created by the usb-uirt plugin, commands like menu, guide, play, pause, up, down.

With these commands I could easily target xlobby2.exe, and add the appropriate WinLIRC event to the command. I would then have a command/event pair for every command in the ir command summary. Then shouldn't Xlobby work with Girder just like using the usb-uirt?

I hope this is easier to understand :)
lovingHDTV
 
Posts: 38
Joined: Thu Apr 28, 2005 7:18 pm

Postby Naylia on Thu May 19, 2005 5:51 pm

when you look at a particular command in girder, how does it contact xlobby? Does it use sendmessage on the grider side? If so that means the plugin went and just numbered commands pretty much with w/lparams. If that's true than you can probably combine the plays into one command in girder(so only one w/lparam) and then try using that same w/lparam on the trigger side in xlobby for all three play events. This of course assumes that girdertoxlobby create sendmessage send/recieve in girder/xlobby and that xlobby will treat a sendmessage trigger like an IR trigger and prioritize it. Can you share more details about what you see in girder for how it communicates with xlobby?
Naylia
 
Posts: 530
Joined: Tue Oct 19, 2004 7:50 pm
Location: Boston, MA

Postby lovingHDTV on Thu May 19, 2005 6:12 pm

Girder communicates to Xlobby via the girder2xlobby plugin.

The girder2xloby script creates the gml file so that you have a commend defined for every event exposed by the plugin. Since they are reading the same inputs, they match one-to-one.

So I go to the xlobby->navigation->down command in girde, select the Girder2Xlobby plugin, hit target, hit xlobby2.exe. Then hit settings and a window with all the xlobby event pops up. I then hit the navigation:down event.

Now when I test the command in girder, I see down work in Xlobby as I expect. But, what I can't do is set multiple xlobby events to a single play command. I know there has to be some way to do this.

If I knew how to define the events in Xlobby that match the IR commands, I could use sendmessage and not use the plugin at all. I just don't know how to create matching events and get them used in the same manner as the ir commands.

I can create sendmessage events in girder, I have done that for every key on my remote for Sage. This is currently how I use sage. Each remote key is mapped to a command/event pair that uses sendmessage to sage. I was hoping for something similar with xlobby.

thanks for you time,
lovingHDTV
 
Posts: 38
Joined: Thu Apr 28, 2005 7:18 pm

Postby Naylia on Thu May 19, 2005 7:09 pm

Dave,

All the events you could need are already in Xlobby, all you need to do is attach a sendmessage trigger to them, then you can redirect your preexisting commands.

If you open setup with F2, then goto Event Mangager you'll see all the comands in SKIN which can be expanded, then there's different types of events in those folders. If you select an event say sagetv:play then you can goto Triggers in the upper right this expands some options down bottom and one is sendmessage and you can specify the w/l param for the event and click 'add' and you get a trigger. The only thing I dont' know is the other info you need on the girder side, appname things like that. You should be able to find it somewhere around here or maybe someone can help out and post that info.
Naylia
 
Posts: 530
Joined: Tue Oct 19, 2004 7:50 pm
Location: Boston, MA

Postby lovingHDTV on Thu May 19, 2005 7:17 pm

OK, so for sage:play, music:play, zoom:play I give the same wparam/lparam within Xlobby event manager, then Xlobby is smart enough to prioritize which event should be used at the appropriate time?

If that is all I need to do, then I know the other girder stuff.
lovingHDTV
 
Posts: 38
Joined: Thu Apr 28, 2005 7:18 pm

Postby Naylia on Thu May 19, 2005 8:12 pm

yeah, i would give that a try in my mind it should be the same process as the IR events, both are triggers attached to commands usually

so xlobby gets a command
xlobby says ok what do I do
xlobby looks on current screen for appropriate command
then xlobby looks elsewhere if can't find it

i'm hoping that the process is broad among all triggers, seems like good code would handle it this way and stevens a good coder, so that you can create different types of triggers and once xlobby resolves the trigger they are all handled with the same routine
Naylia
 
Posts: 530
Joined: Tue Oct 19, 2004 7:50 pm
Location: Boston, MA

Postby lovingHDTV on Thu May 19, 2005 8:46 pm

This approach seems to work. At least for the few commands I've tried. More testing will be needed to know for sure.

But as a backup I orderd a USB-UIRT today :)

I want to be able to turn on my reciever via the PPC and play my music. I figured everyone uses the USB-UIRT so I could not miss.

thanks again for your patiance
lovingHDTV
 
Posts: 38
Joined: Thu Apr 28, 2005 7:18 pm

Postby Naylia on Fri May 20, 2005 12:07 am

no problem, just glad it's working for you :)

yeah then you can set it up as a blaster and have the ppc control volume on the reciever too, then since you're using winamp or foobar you can set up bit perfect audio using ASIO or KernalStreaming if your an audiophile...although I've heard that bitperfect even with mp3s can make a big difference let alone if you rerip into a lossless format like flac.
Naylia
 
Posts: 530
Joined: Tue Oct 19, 2004 7:50 pm
Location: Boston, MA