Xsend Ir Command

Help each other out

Xsend Ir Command

Postby oakoen on Fri Jan 07, 2011 2:56 am

Guy's, I have had a really long and stessfull day and I am getting very frustraded looking for this.

Can someone please help me out? I would like to use Xsend to send IRcommands from a thin client.

Where/how do I set up the xsend events? My brain hurts and I just can't find it.

Any help would be appriciated.

Thanks,

john
oakoen
 
Posts: 18
Joined: Wed Jun 04, 2008 8:51 pm
Location: Tampa FL

Re: Xsend Ir Command

Postby Marbles_00 on Fri Jan 07, 2011 4:07 am

I'm a little confused. Are you using the xlobby thin client? Then you shouldn't need to use xsend commands...unless your trying to control IR on a remote xlobby machine via a xlobby server that your thin client is connected to.

Anyways, to use the xReceive plugin, you have to setup the IP address in the conf.ini file of the xlobby machine you want to control. This file is located in the plugins/xRecieve directory. By default it is set to 127.0.0.1 (local machine). Set this to your network IP address of the xlobby computer.

Now if your doing a scenario above (controlling a xlobby machine via xlobby thin client connected to server), then you have to create os commands like this on the server machine:
Code: Select all
command: os
type: execute file
file: c:\program file\xlobby\plugins\xReceive\xSend.exe
argument: "command:ir:command:Alias (name):command name" {port number} {IP Address}

the port number and IP address is defined in the conf.ini file.

This is assuming that you have defined your ir alias name and commands on the remote xlobby machine to control.

Not sure if that would work (I've never dealt with using IR commands in the xSend variable) , but an alternative is to first create your IR group events (ir commands and all) on the remote xlobby machine, then create events for the thin client like this:
Code: Select all
command: os
type: execute file
file: c:\program files\xlobby\plugins\xReceive\xSend.exe
argument: "command:xlobby:run event:ir group:ir command" {port number} {IP Address}


I've used those setups for controlling my music-server via HTPC. I use xSend commands in .bat/.vbs files to control my MediaPVR via Hauppauge remote. An example of a bat file is this:
Code: Select all
cd\
xsend "command:xlobby:run event:playback control:pause" "8009" "192.168.0.19"

exit

Then to hide the DOS window opening, my vbs file is this:
Code: Select all
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "C:\player_pause.bat" & Chr(34), 0
Set WshShell = Nothing

It works great.

What have you tried so far?
Marbles_00
 
Posts: 1867
Joined: Wed Apr 06, 2005 12:44 pm
Location: Canada

Re: Xsend Ir Command

Postby oakoen on Sun Jan 09, 2011 1:41 am

Marbles, thank you for replying.

I have not tried anything. I am kind of lost. I understand the logic and code example but have no idea where to put that or how to link the event to a button. Can you throw me a screen shot or two. :)

What I am tryin to to is use a thin client to control two xl machines. I have a very mini pc drawing very little power(trying to be green) tha I always leave on which is the server that i am connecting to. I use it to control all my electronics VIA IR from my thin client. All that is working fine. I want to add my HTPC which is not always on as an xlobby machine that I can control with the thin client hooked to the mini pc. So I am guessing that I have to send events to the HTPC to control screen movements and such. After that I would like to hook a third pc up and have the same thin client control that as well by using different send events to that machine. Make sense?

Am I making this too hard? Is there an easier way?

Thanks
oakoen
 
Posts: 18
Joined: Wed Jun 04, 2008 8:51 pm
Location: Tampa FL

Re: Xsend Ir Command

Postby Marbles_00 on Sun Jan 09, 2011 6:07 am

I'll start with your last question:
Is there an easier way?

You could have two thin client executables at different locations on your "thin client". One would be set for mini pc the other for the HTPC.

Am I making this too hard?

No, just xsend/xreceive can be a pretty tricky plugin, but what your attempting is very doable. What your describing is pretty much the way I was controlling zone (KX driver control via P3rvTalk) events on my music-server via HTPC. Here's a post on what I was developing during my Mirage skin attempt.

I don't want to get into the whole teaching how to skin, but here are two of the most important documents on using the free version of xlobby:
1) The great Colby's "Xlobby Skinning Guide"
2) Colby's Variable Event List

Following these two guides, you should be able to place a button on the HTPC and associate an event to it. Now, I'm going to proceed in a way that we will do this in steps, or "lessons". Tonight I will attempt to explain in how to create an IR event, and define your IR device. So...
    - first, make sure that the USB-UIRT plugin reside in the plugins directory of the HTCP
    - start xlobby, the press F2 to get to the setup
    - look down the left side to where it says IR Plugin and select it.
    - select the "New Device" tab
    - You must fill in the "Brand", "Device", "Model", and "Alias" of the IR device
    - click on "Create"
    - now select the "Device" tab
    - in the drop down list under the tabs you should be able to select your new device you created
    - type in the name of the command (usually the button name like play, pause, stop)
    - now I'm running on memory...you may have to click on "Learn"
    - then with your remote pointing at the USB-UIRT, press the button you want to learn
    - this should fill in the IR box with the button IR code
    - then click on "Set"
    - you can test this command by clicking on the "Transmit" button
    - do the previous 6 steps above for each button of the remote you want to control
    - once the learning of the remote is done, then select "Events" from the left list
    - highlight SKIN under the "Events" window
    - click on the "Add Group" button, which will add a "new group", which you will name
    - highlight this new group, then click on the "Add Event" button, then name this event (call it IR_{button})
    - highlight this new event you want to create, the scroll down the "Commands" window to "ir"
    - expand this by clicking on the + sign next to it will show "command" and "send number"...select "command"
    - under "Alias", drop down the list to find your new device
    - under "Command", drop down the list to find the command to associate to your event
    - then click on "Add", and this command will then populate under the event you have selected in the "Events" window.
    - do the above for all the IR commands that you want to send from the HTPC
    - once done close setup, and open the skin editor (Pause/Break)
    - select the "Screen" tab then the "Add Button" tab
    - scroll through the list of buttons to find the one you want the click on "Add"
    - you should now see a big button in the upper left corner of the screen, select it by clicking on it
    - back to the Skin Editor window, select the "Item" tab, then the "Default" tab
    - here you can manually select the position (x,y co-ordinates) and the size (WxH) as well as other features
    - select the "Event" tab, then the "Assign" button under "Click Event"
    - scroll down the events list to the event group you just created above, the scroll to the actual event you want to associate to this button
    - click on the "Select" button
    - you can copy and paste the button, each time changing the location of it, and change the event for each button with a new IR event you created
    - once done, close the Skin Editor, and you should be able to click the button and your equipment should now be controlled via the HTPC

Once you have performed the above, let me know, and we can move onto the next step of setting up xReceive on the HTPC, create xSend events on the mini PC and try and communicate between the two.
Marbles_00
 
Posts: 1867
Joined: Wed Apr 06, 2005 12:44 pm
Location: Canada

Re: Xsend Ir Command

Postby oakoen on Sun Jan 09, 2011 3:14 pm

Marbles, again thank for getting back to me. I am familiar with modifying skins and programming IR codes. I have been using XL to control my equipment for a few years with a touch screen.
Trying to to step up my setup a little with the thin client tablet and PC's in other rooms and xsend has me lost. I have the client screens made for sending ir commands from the mini pc but I am lacking the xsend commands to send to the htpc.

Thank you for taking the time to give me a hand. I really appreciate your help.

John
oakoen
 
Posts: 18
Joined: Wed Jun 04, 2008 8:51 pm
Location: Tampa FL

Re: Xsend Ir Command

Postby Marbles_00 on Sun Jan 09, 2011 6:08 pm

Sorry, I didn't mean to "dumb it down", but now I have a better idea of your comfort level with modifying xlobby.

Basically, you need to have the xReceive plugin on both the HTPC and the mini PC. The HTPC will utilize the xReceive plugin .dll, while the miniPC will utilize the xSend.exe executable.

First thing is to modify the conf.ini file that is found in the xReceive plugin directory for each computer.

This file will comprise of two lines, the first line being the IP address, the second line is a port number. The default IP is 127.0.0.1 (which is for a local machine). Change the conf.ini IP of each machine to what the IP address is for that machine, for this you have to know if your IP address is static or assigned by your router via DHCP. Personally for internal networking and ease, I use static IP's for all my computers, but every individual is different.

The only other thing that is required is the list of events you want to control on the HTPC via xSend. Other than that there is really nothing more for you to do on the HTPC, just load up xlobby.

On the mini PC, if you open a DOS prompt the goto the location that you have xSend, then you could test your connection by typing in the following simple command and view the results on your HTPC display.

Code: Select all
xsend command:xlobby:goto screen:{HTPC screen} {HTPC port number} {HTPC IP number}

where {HTPC screen} is the name of the screen on the HTPC you want to goto
{HTPC port number} is the port number you defined in the HTPC xReceive conf.ini file
{HTPC IP number} is the IP address of the HTPC that you defined in the xReceive conf.ini file
Example:
Code: Select all
xsend command:xlobby:goto screen:movies 8009 192.168.0.100


If everything is correct, your HTPC should be displaying your movies screen (if titled the same).

If that works, then you know you have a good connection to the HTPC. Now assuming that you have all the required commands setup on the HTPC, the easiest route is to create xsend commands on the mini PC using the run event command (xlobby/run event). So on the mini PC enter setup, create events using the os/execute file. In the contents you would use the following:
File: the location of the xSend executable on the mini PC
Arguments: command:xlobby:run event:{event group}:{event} {HTPC port} {HTPC IP}
where: {HTPC port} is the port of the HTPC like indicated above
{HTPC IP} is the IP address of the HTPC like indicated above
{event group}:{event} is the event group name and event on the HTPC you want to control.

As you know you can test the event, and if it doesn't work you may have to put quotations around the arguments like this: "command:xlobby:run event:{event group}:{event}" "{HTPC port}" "{HTPC IP}"

Then associate these events to buttons that are used by your thin client via the skin editor.

If all works out, you should be controlling both computers via one thin client. :)
Marbles_00
 
Posts: 1867
Joined: Wed Apr 06, 2005 12:44 pm
Location: Canada

Re: Xsend Ir Command

Postby oakoen on Sun Jan 09, 2011 7:07 pm

Thank you. You went way above and beyond the type of help usually found in forums. You filled in the missing piece of the puzzle for me. Now on to the playing part. :D

Hope one day I can help you out is some way. Thanks Again.

John
oakoen
 
Posts: 18
Joined: Wed Jun 04, 2008 8:51 pm
Location: Tampa FL

Re: Xsend Ir Command

Postby Marbles_00 on Mon Jan 10, 2011 1:16 am

Hope one day I can help you out is some way.

Sure, download xStreamed and give some feedback ;) :lol: :lol:
Marbles_00
 
Posts: 1867
Joined: Wed Apr 06, 2005 12:44 pm
Location: Canada