Category Archives: XBox

XBMC + XBox + HTPC = XBMCBox. Part 2 – Remote Control

INTRODUCTION

This is a follow up to my previous 2 articles about building an XBMCBox. If you missed them, here are the links to the articles.

My experience with building the HTPC is that the major issue is not so much with assembling the motherboard, CPU, etc. The major hurdle is to overcome the teething issues with using the remote control with XBMC, so much so that this is sufficient to warrant a dedicated blog post to describe the problems I faced and how I have overcome them, sort of. So if you have the same hardware as I do and have done sufficient hair pulling exercise and still cannot get it to work, I hope this post will give you some ideas. This is not meant to be an exhaustive how to. Expect unintended errors.

So let me just summarize the aim of this blog post here – I wanted to use the original Xbox IR dongle on my windows based HTPC and wanted to use the Harmony 600 as the main remote controller. I am not working with any other hardware and won’t have first hand experiences how to. I have also lost my original XBox remote control and as such I won’t be able to confirm if the steps below will still work with the original Xbox remote. That being said, I am reasonably confident that the steps will work for most Harmony remotes albeit the button keycodes could be slightly different. 

THE HARDWARE COMPONENT

Current HTPC Hardware

I have the following hardware:

  1. A 40″ LG LCD TV. I bought this for A$398 from Harvey Norman when it is on sale. It is the bottom range from LG and only has one HDMI input and no RCA/audio outputs to other devices. It is also not capable of 3D. It is just a cheap and cheerful TV and I like it well enough. I might upgrade in future but it is not a priority.
  2. A pair of Creative Labs Gigaworks T40 Series II speakers. I could not afford an AV receiver and a proper 7.1 speaker setup at this stage but I hope I could add this to my HTPC setup in future. It is not an urgent thing for me.
  3. The XBox HTPC build that I described in my previous posts. This is essentially an AMD A6-5400K microATX system running Windows 7.1 and XBMC v12 Frodo. I am also currently experimenting with OpenELEC so this may change in future.
  4. The Xbox IR dongle and the Harmony 600 remote that has served me well for 2 years.

Certainly not the latest and greatest hardware most HTPC enthusiast will have in their house.

Original XBox IR Receiver (Dongle)

Xbox IR receiver

I like the original XBox IR receiver because it seems to work well for my needs and looks good when it is paired to the Xbox console. And also why spend more money when this is perfectly useable.

Original XBox Remote Control

The original XBox DVD remote looks like this. I lost mine so this image is taken from http://www.xbmc4xbox.org.uk/wiki/General_Navigation

Xbox-dvd-remote-global

As you can see, the XBox remote does not have a dedicated volume up and down button but uses the “3” and “6” button accordingly. The Xbox remote does not have the best build in my experience but it is nevertheless a very straightforward device to use for XBMC.

The Harmony 600 Remote Control

Harmony 600

The Harmony 600 is a middle range programmable remote control from Logitech. Certainly not the best in Logitech’s product range but should be plenty for most users out there. Out of the box, many buttons will work with XBMC. Some buttons will not work without playing with the settings, which is what I have done here.

THE SOFTWARE COMPONENT

In order to make sure that the remote codes sent by the Harmony 600 will actually communicate with Windows and XBMC, some kind of interfacing software must be used. I used EventGhost following some of the excellent forum posts in XBMC and AVS forums. I also use the Harmony’s software to re-configure the Harmony 600 buttons.

Configuring EventGhost (Part 1)

EventGhost is as described by the official EventGhost website as “an advanced, easy to use and extensible automation tool for MS Windows. It can use different input devices like infrared or wireless remote controls to trigger macros, that on their part control a computer and its attached hardware. So it can be used to control a Media-PC with a normal consumer remote.” I think this is a very accurate description.

Here are several very well written articles that shows how to setup EventGhost for the XBOX DVD remote controller.

HOW-TO setup the original Xbox DVD remote the correct way with EventGhost

HOW-TO use a module to configure Xbox Remote Control on XBMC for Windows

Support for XBMC2 plugin (formerly XBMCRepeat)

I follow the above articles closely. Very useful stuff and excellent reference materials.

I installed the latest version of EventGhost v0.4.1.r1610 dated 2013.01.20.  When EventGhost first start up, the setting can be a little daunting…at least this is to me. But I get used to the interface after a while. The left hand pane essentially logs all the commands registered on the remote controller. The right hand pane shows all the current configuration settings associated with the remote control.

2013-02-17_150507

As per the instruction, the next step is to download the XBMCrepeat plugin. These are really just 2 python scripts that will need to be copied to a “XBMCrepeat” directory within the plugin folder where EventGhost is installed. I find that there are already existing python scripts in this folder but I ignore them and just copy the new files to this location. So the resulting folder now looks like this:

2013-02-17_151630

The next step is to shutdown EventGhost from the taskbar and then restart it. Again, as per the instruction, I will need to load the EventGhost XML config file. Using the links provided, I downloaded the XML config file, save the file as XBMC.xml, copy to c:\Program Files\EventGhost folder and load the file from within EventGhost.

EventGhost will now show a bunch of red error log messages like so:

2013-02-17_152410

This is to be expected so I will ignore those errors for now. The default settings on EventGhost with the XBMCRepeat plugin will work well enough for a start (except a couple of missing buttons and controls). So I still need to tweak the settings.

Configuring Harmony Remote Software 

The next thing I did is to setup my Harmony 600 universal remote so that it will recognize the Xbox IR dongle and talks to XBMC via EventGhost.

The configuration software can be downloaded from Harmony website. The file I downloaded and installed is named “LogitechHarmonyRemote7.7.0-WIN-x86.exe“.

Here are some good references.

Official HOW-TO use a Logitech Harmony Remote with XBMC

Official Logitech Harmony 650/600 remote thread

Logitech will require a web login to start the configuration. As I have previously registered, this is not a problem.

2013-02-17_153909

I found that my Harmony 600 will only work with the the Xbox IR dongle if the device I added is a “Game Console” from “Microsoft”. I tried adding the MCE devices but it does not work for me. YMMV.

So I added a new device to the remote control, as follows:

2013-02-17_165036

This will create a “Game Console (with DVD)” device. I rename this to “XBox” by clicking on the “Settings” button. This will also create a default set of “Standard Buttons” and “Additional Buttons” which has been pre-defined by Logitech. The “Standard Buttons” are physical hardware buttons on the remote and the “Additional Buttons” are software “buttons” on the LCD screen. To see what these settings are, click on the “settings” button and then select “Customize Buttons”. This is shown as follows:

2013-03-04_100348

I suppose the default settings work well, except that there is no working volume up, volume down and mute button as far as I can tell. Also, I did not quite like the default settings of the LCD panel. There are far too many pages on the LCD panel. So I just have to customize the settings to my own requirements.

The original Xbox DVD remote, while it does not have a dedicated volume up/down/mute button, it does map this functionality to the number button 3, 6 and 9 respectively. These are all missing on the “standard buttons” settings, among other things. And if you click on the “command” dropdown dialog box associated with Volume Up button, there is no sign of a “Volume Up” command which I find annoying.

And because I don’t have an AV receiver for the volume control of the speakers, and I used a pair of Creative labs active speakers with no remote control features, the only way I can adjust the volume while I am on the couch is to adjust the volume of XBMC. Not the best way of doing things but this has to do for now.

So I set up the “Standard Buttons” and “Additional Buttons” as follows. I deleted most of the settings on the LCD screen and maintain only 2 pages of the LCD panel as no one likes to press too many buttons on the remote to do things. One thing to note is that Logitech’s button sequence for the LCD screen is like this:

2013-03-04_113605

So in my setup below, “Video Library” corresponds to menu item 3 and this will be showed up on the bottom left hand corner of the LCD screen.

2013-03-04_100636

Because of the way the Harmony’s buttons are assigned when it is configured as a remote control for a  “Game console with DVD”, some buttons are missing from the setup and some buttons are redundant for my needs. I ended up remapping some standard buttons to whatever redundant buttons I do not need. For instance I have mapped “VolumeUp” button with the “3D” button. If your TV has 3D capabilities, you might want to substitute the “3D” with some other buttons that you know you won’t use. One thing to watch out for is that it is easy to go overboard with programming the Harmony. Try to keep the remote buttons simple and easy to operate. Your wife will love you for being considerate.

Next, I define a new activity.

Next I step through the questionaires when the software prompt me on the input to the TV and what channel XBMC needs to be on. Complete the process and select “Save”. Rename the generic activity name to “XBMC”.XBMC

Now back at the main menu, I select “Customize Activity Buttons”, again following the instructions.

2013-02-17_161818

Configuring EventGhost (Part 2)

The default XBMCRepeat plugins on EventGhost already has most of the buttons correctly programmed. But I still need to tweak some settings so that they match the remote codes from the Harmony 600.

EventGhost uses a set of mapping codes to associated the hardware codes on the remote control with the remote IR dongle and XBMC. These mapping codes are embedded in the __init__.py file located in c:\Program Files\EventGhost\plugins\XBCDRC\ folder. This file has close to 1000 lines and can be quite intimidating. At approximately 410 lines into the file, there is a section that started with “self.xbcdrc_mapping”. This is how this section looks like on my system:

self.xbcdrc_mapping = {
 '006d50a': 'DISPLAY', '0066a05': 'DISPLAY', '0066afd': 'DISPLAY',
 '006e20a': 'REVERSE', '00671f5': 'REVERSE', '006710d': 'REVERSE',
 '006ea0a': 'PLAY', '00675f5': 'PLAY', '006750d': 'PLAY', 
 '006e30a': 'FORWARD', '0067105': 'FORWARD', '00671fd': 'FORWARD', 
 '006dd0a': 'SKIP-', '0066e05': 'SKIP-', '0066efd': 'SKIP-', 
 '006e00a': 'STOP', '00670f5': 'STOP', '006700d': 'STOP', 
 '006e60a': 'PAUSE', '00673f5': 'PAUSE', '006730d': 'PAUSE', 
 '006df0a': 'SKIP+', '0066f05': 'SKIP+', '0066ffd': 'SKIP+', 
 '006e50a': 'TITLE', '0067205': 'TITLE', '00672fd': 'TITLE', 
 '006c30a': 'INFO', '0066105': 'INFO', '00661fd': 'INFO',
 '006a60a': 'UP', '00653f5': 'UP', '006530d': 'UP', 
 '006a70a': 'DOWN', '0065305': 'DOWN', '00653fd': 'DOWN', 
 '006a90a': 'LEFT', '0065405': 'LEFT', '00654fd': 'LEFT', 
 '006a80a': 'RIGHT', '00654f5': 'RIGHT', '006540d': 'RIGHT', 
 '0060b0a': 'SELECT', '0060505': 'SELECT', '00605fd': 'SELECT', 
 '006f70a': 'MENU', '0067b05': 'MENU', '0067bfd': 'MENU', 
 '006d80a': 'BACK', '0066cf5': 'BACK', '0066c0d': 'BACK', 6af0a
 '006ce0a': '1', '00667f5': '1', '006670d': '1', 
 '006cd0a': '2', '0066605': '2', '00666fd': '2', 
 '006cc0a': '3', '00666f5': '3', '006660d': '3', 
 '006cb0a': '4', '0066505': '4', '00665fd': '4', 
 '006ca0a': '5', '00665f5': '5', '006650d': '5',
 '006c90a': '6', '0066405': '6', '00664fd': '6',
 '006c80a': '7', '00664f5': '7', '006640d': '7',
 '006c70a': '8', '0066305': '8', '00663fd': '8',
 '006c60a': '9', '00663f5': '9', '006630d': '9',
 '006cf0a': '0', '0066705': '0', '00667fd': '0',
 '0064f0a': 'AUDIO',
 '006af0a': 'ENT.',
 '006d100': 'LT',
 '006890a': 'LAST',
 '006c000': 'MUTE',
 '006e70a': 'A*B',
 '006f90a': 'EXIT',
 '0067f0a': 'D',
 '0068c0a': 'REC'
 }

What I did is to first remove the following lines from the above. Again, YMMV.

 '006d50a': 'DISPLAY', '0066a05': 'DISPLAY', '0066afd': 'DISPLAY',
 '006dd0a': 'SKIP-', '0066e05': 'SKIP-', '0066efd': 'SKIP-', 
 '006df0a': 'SKIP+', '0066f05': 'SKIP+', '0066ffd': 'SKIP+', 
 '006e50a': 'TITLE', '0067205': 'TITLE', '00672fd': 'TITLE', 
 '0064f0a': 'AUDIO',
 '006af0a': 'ENT.',
 '006d100': 'LT',
 '006890a': 'LAST',
 '006c000': 'MUTE',
 '006e70a': 'A*B',
 '006f90a': 'EXIT',
 '0067f0a': 'D',
 '0068c0a': 'REC'

So my amended section now looks like this:
self.xbcdrc_mapping = {
 '006e20a': 'REVERSE', '00671f5': 'REVERSE', '006710d': 'REVERSE',
 '006ea0a': 'PLAY', '00675f5': 'PLAY', '006750d': 'PLAY', 
 '006e30a': 'FORWARD', '0067105': 'FORWARD', '00671fd': 'FORWARD', 
 '006e00a': 'STOP', '00670f5': 'STOP', '006700d': 'STOP', 
 '006e60a': 'PAUSE', '00673f5': 'PAUSE', '006730d': 'PAUSE', 
 '006c30a': 'INFO', '0066105': 'INFO', '00661fd': 'INFO',
 '006a60a': 'UP', '00653f5': 'UP', '006530d': 'UP', 
 '006a70a': 'DOWN', '0065305': 'DOWN', '00653fd': 'DOWN', 
 '006a90a': 'LEFT', '0065405': 'LEFT', '00654fd': 'LEFT', 
 '006a80a': 'RIGHT', '00654f5': 'RIGHT', '006540d': 'RIGHT', 
 '0060b0a': 'SELECT', '0060505': 'SELECT', '00605fd': 'SELECT', 
 '006f70a': 'MENU', '0067b05': 'MENU', '0067bfd': 'MENU', 
 '006d80a': 'BACK', '0066cf5': 'BACK', '0066c0d': 'BACK', 6af0a
 '006ce0a': '1', '00667f5': '1', '006670d': '1', 
 '006cd0a': '2', '0066605': '2', '00666fd': '2', 
 '006cc0a': '3', '00666f5': '3', '006660d': '3', 
 '006cb0a': '4', '0066505': '4', '00665fd': '4', 
 '006ca0a': '5', '00665f5': '5', '006650d': '5',
 '006c90a': '6', '0066405': '6', '00664fd': '6',
 '006c80a': '7', '00664f5': '7', '006640d': '7',
 '006c70a': '8', '0066305': '8', '00663fd': '8',
 '006c60a': '9', '00663f5': '9', '006630d': '9',
 '006cf0a': '0', '0066705': '0', '00667fd': '0',
 }

Getting EventGhost to recognize other keys on the remote.

Then I shutdown EventGhost and restart it.

Essentially what I did was to maintain those buttons

that I know will work with XBMC and I do not need to fiddle around with those settings anymore that whatever has been pre-defined by XBMCRepeat plugins. There are still many buttons that are otherwise not defined in this mapping file and I will have to manually program each one individually. This can be done by first obtaining from within EventGhost what is the hardware code when a button (that has not been previously mapped) is pressed.

The first thing is to getting EventGhost to clear the log. Then I press one of the button that is otherwise not recognized by EventGhost. This will generate a series of unknown code like so:

2013-02-23_142207

I record this code accordingly, make sure that I know this code is associated with which button on the remote. Most of the buttons are already correctly mapped. These are the codes on my remote that are not mapped/mapped incorrectly or require further tweaking. Some buttons share the same hardware codes and I am not sure why.

2013-03-04_145458

In my case Volume Up button has a code “006a50a”. We will need to assign this to an appropriate name. I named this button “VolumeUp” and append a line

‘006a50a’: ‘VolumeUp’

to the __init__.py file. Choose the convention of the name carefully. Assign something meaningful. I repeat the same procedure to the other buttons and this is how my __int__.py file looks like I have made the amendments. The more tricky ones are the software buttons to the LCD screen but the process is the same regardless.

2013-03-04_150137

After the file is saved, I restarted EventGhost. And now pressing some of the new buttons that I just defined will return the following codes on XBCDRC. 

2013-02-24_171256

The naming of the button code in __init__.py file is extremely important. If the button has been mapped to a text sting say “ABCDE”, pressing that button on the remote will return a code XBCDRC.ABCDE. For instance, The button “006c500” has been mapped to ‘Powerdown’ in XBCDRC config file and this therefore tells EventGhost that if this button is pressed, it should execute a macro associated with ‘Powerdown’. Obviously nothing will happen when I press this button as yet as I have not defined the actions/macros as yet.

Defining actions on EventGhost is extremely simple. It wasn’t so to me when I first started but after reading some tutorials on the internet, I began to understand the process more.

First of all, I clear the log on the left hand pane of EventGhost. Now go to the right hand pane and under “XBMCRepeat” -> “Buttons” -> “Remote”, I can see that button 3, 6 and 9 are all mapped to the default actions.

Essentially all you have to do is to drag and drop the “events” on the left hand pane of EventGhost to the right action you want to associated XBMC with. This can be difficult to explain so I will start off with a simple one.

So for instance, to setup the “VolumeUp” event correctly, I drag XBCDRC.VoumeUp on the left pane to “Vol+” on the right pane.

VolumeUp, VolumeDown and Mute Buttons

2013-02-24_172714

This will now look like so:

2013-02-24_172932

There is an existing “XBMC2.RemoteVol + ()” that does not seem to do very much apart from giving me an error, so I got rid of this. The Mute action script appears to be just fine, however.

2013-02-24_173448

I did the same to “Vol-“. Just right click on this and select “delete”. So now we have defined an event VolumeUp that is to be associated with the Vol+ on XBMC but we have yet to define an “action” for this. 

The screen should now look like so:

2013-02-24_173805

Then I right click on Vol + and select “Add Action”. A dialog box will appear. Navigate to XBMC2 -> Actions -> General and select VolumeUp. This will populate an event called “XBMC2: VolumeUp” to “Vol +”. Repeat similarly for Vol-. The final screen now looks like this:

2013-02-24_183808

However, the process is not complete yet. This should now enable the Vol+/Vol- button on the harmony remote to work correctly but the experience is not as smooth as what one would normally expect as the button needs to be pressed repeatedly to move the volume up (or down). I would prefer to press the button continuously to adjust the volume, just like any TV remote. Fortunately there is an easy fix to this.

The easiest way I have found is to scroll up the right hand pane, navigate to the “Up” entry, right click on “Autorepeat current macro: 0.6” and then select “copy”. The screen should now looks like this:

2013-02-24_184300

Now press “save” to save the settings in EventGhost.

I still have several custom settings that have yet to be configured.

2013-02-24_185253

Powerdown and Restart Computer Buttons

XBCDRC.Powerdown should be dragged to XBMCRepeat -> Actions -> Shutdown related -> Powerdown Computer

XBCDRC.Restart Computer should be dragged to XBMCRepeat -> Actions -> Shutdown related -> Restart Computer

2013-02-24_191402

Codec, Update Video Library, Update Music Library Buttons

XBCDRC.Update Video Library should be dragged to XBMCRepeat -> Actions -> Media playing -> Update Video Library

XBCDRC.Update Music Library should be dragged to XBMCRepeat -> Actions -> Media playing -> Update Music Library

XBCDRC.CodecInfo should be dragged to XBMCRepeat -> Actions -> Media playing -> CodecInfo

2013-02-24_192006

Screenshot, Music Library and Video Library Buttons

XBCDRC.Screenshot should be dragged to XBMC2 -> Actions -> General -> Screenshot.

XBCDRC.Music Library and Video Library should be dragged to XBMCRepeat -> Buttons -> Remote ->My Music and My Video respectively.

2013-02-24_193235

Next and Previous Buttons

Lastly I mapped the “Next” button and “Previous” button. I want these buttons to automatically skip to the next movie instead of skipping the video 30 seconds at a time. I find this is extremely helpful when watching TV series as it allows me to skip to the next episode if I am inpatient.

I deleted the existing “XBMC2.RemoteSkip” actions and “XBCDRC.SKIP” events as these are not working for me anyway.

2013-03-04_152209

Then I drag the XBCDRC.Next and XBCDRC.Previous events to the right hand pane, assigned to Skip+ and Skip- respectively and added the action scripts “XBMC2.SkipNext” and “XBMC2.SkipPrevious” as well.

2013-03-04_162611

This is not completed yet. I have to turn on the automatic playing of the next video by going to XBMC’s settings then click on Video -> Playback -> Play next video automatically.

Some other miscellaneous buttons I re-mapped.

I also mapped the following button this way:

Exit and Subtitle Buttons

Button ‘006f90a’ which corresponds to the ‘Exit’ Button on the remote is mapped to “Back”.

Button ‘0067f0a’ (Guide) is now mapped to ‘subtitle’ which is mapped to fullscreen video -> show subtitles

EventGhost’s XBMC.xml file.

Whatever settings that we did in EventGhost, these will be saved to the XBMC.xml file that we loaded earlier. It is recommended that this file be backed up for obvious reasons. I have made the file available here just in case anyone is interested.

Bug in Harmony’s Software?

Sometimes I find that Logitech will misplace the label into the wrong “quadrant” of the LCD display. This appears to be a bug. See the following screenshots where item 4 “Reboot” should really go into the bottom right corner of the LCD but another menu item takes the place instead.

IMG_9220  IMG_9219

find that this cannot be resolved simply by moving menu items up and down (by pressing the up/down icons). The only workable way is to delete the device and start from scratch again. A bit annoying but otherwise not a big deal. 

ALTERNATIVE TO XBOX IR RECEIVER

There are plenty of IR receivers out there that will work with XBMC without much issues. The ones that are highly recommended by others are (in no particular order):

1. Any MCE compatible IR receiver. MCE remotes and receivers have great support in XBMC and usually the process is pretty much plug and play with very minimal editing (if any). Prices are very cheap as well.

2. Flirc. This is arguably the best IR receiver that appears to have the capability to pair any remote buttons with the software without worrying about proprietary protocols. This would be my choice if I don’t already have the XBox IR receiver.

3. Any RC6 based IR receiver. RC6 refers to a specific consumer IR (CIR) protocol developed by Philips. RC6 receivers will work with most harmony remotes and are believed to be easy in setting up.

CONCLUDING REMARKS

XBMC on the HTPC does need a fair bit of setting up before it is deemed useable. It can be difficult at times especially with using legacy hardware like the Xbox IR receiver but it is doable with a bit of patience. I hope this post is helpful. Thanks for reading.