Freigeben über


Media Center and the Universal Remote Challenge

A few posts back, I mentioned that I installed Media Center 2005 on my old P4 1.8GHz computer. Since I've now fallen in love with it, I figured it was time to assimilate its remote control functionality into my 2-year-old Marantz RC9200 universal remote. As a side note, my wife was gracious enough to give me the RC9200 as a gift after I had been salivating over it for months. Although it's a couple years old, it has been a fantastic remote control. It is truly universal in that it can "learn" by recording other remote infra-red (IR) signals, it can broadcast radio frequency (RF) signals (to control your X10 room lighting, for example), and it has custom software that allows you to completely configure everything, including the look and feel of the screen. It's not for the faint-of-heart, but if you like programming, you have a bit of creativity, and you are a patient person, you can work wonders. Here are a few of my screens:

As usual, I plugged the RC9200 into my computer and started recording IR commands from the Media Center remote. The process went smoothly, and I was able to successfully record the codes for each key. I configured the macros I planned on using and hooked up my virtual touch-screen buttons to their appropriate IR counterparts. After downloading the new configuration to my universal remote, I carried it downstairs for its first test. Initially, it seemed as if everything was working just fine. However, after a few short moments, I quickly realized that something was amiss. The first press of my down arrow button worked properly, but it wouldn't accept a second press...that is, until I pressed something else first. And the other buttons all behaved in a similar fashion. Very strange.

So, I turned to the remote control experts at Remote Central and The Green Button. A casual search of their forums turned up a couple of posts (here and here) about similar behavior with other learning remotes. Turns out that the Media Center remote has two sets of codes that alternate with each button press (apparently using a bit flipping technique). This method is used so that a single key press isn't accidentally received twice by the computer and is referred to as debounce. From what I've been able to find on the internet, it seems that IR codes can inadvertently be received more than once by reflecting off surfaces or being interfered with by displays, lamps, etc. How interesting. To avoid this effect, the Media Center remote sends the first IR command for down arrow, and when the user presses the button again, it sends a second IR command for down arrow. If a different button is pressed in between these two presses, it doesn't matter, because clearly, it's not a key "bounce" in that scenario. It's interesting to note that this is exactly the behavior I was noticing.

There are a few suggested options to deal with this. First, you can follow every normal command with a "do nothing" command. Unfortunately, it's often difficult to identify a do nothing command on the remote. For example, if the clear command did nothing useful on the remote, you could conceptually program the down arrow functionality as: down arrow + clear. By doing this, you've sent a second real command to the receiver, and your next down arrow command will be considered a second press. Not pretty, but a functional hack. The second option is to literally duplicate the user interface panels and switch between them with each press of a key. Of course, you'd have two panels, each with their own set of IR codes. Although it sounds doable, it's definitely more work, and it sounds like even more of a hack. And I'm no fan of hacks.

The third option is to simply disable the debounce feature of Media Center and use a single set of IR codes. I don't know why this isn't exposed in the settings screens in Media Center, because it's something that anyone with a learning remote will run into. To disable the debounce feature, you need to modify a single registry key. Standard registry editing rules apply...make sure you create a backup, know what you're doing, etc., etc. The key is called EnableDebounce, and from what I've read in various posts, it's found in the following locations:

For Media Center 2004: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\idIr\Remotes\745a17a0-74d3-11d0-b6fe-00a0c90f57da

For Media Center 2005: HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\HidIr\Remotes\745a17a0-74d3-11d0-b6fe-00a0c90f57da

So, fire up RegEdit, navigate to the appropriate key, and change the EnableDebounce value from 1 (its default setting) to 0. Note that you'll have to reboot your system for this change to take effect. After this modification, my universal remote now works like a charm, and I've added one more remote to the remote control graveyard behind my big screen TV.

Comments

  • Anonymous
    December 01, 2004
    I don't have any programmable remotes, I don't own Windows Media Center, and (as you know), I hardly use PCs, and I STILL found this to be an interesting article! Great writing, keep it up, MIke!

  • Anonymous
    December 01, 2004
    Shouldn't you always modify CurrentControlSet? ControlSetXXX are just backups.

  • Anonymous
    December 01, 2004
    Good question, Mike. Frankly, I simply made the change suggested in the post, and it worked. So, it must be more than just a backup. I'll have to take a closer look at the registry entries on that machine.

  • Anonymous
    December 01, 2004
    Mike...after a quick search, it appears that ControlSet001 is what is used to boot the machine, CurrentControlSet likely points to it, and ControlSet002 is probably the Last Known Good Configuration: http://www.windowsitlibrary.com/Content/405/11/3.html

  • Anonymous
    December 02, 2004

    Yeah, this is a highly annoying "feature" that was introduced in MCE 2004.

    Be careful that your alphanumeric text entry fields in MCE (search by name, etc) still work after making this modification, though.

  • Anonymous
    December 06, 2004
    The comment has been removed

  • Anonymous
    December 13, 2004
    Hmmm, I have the exact same symptoms. However, I do not have the aforementioned HidIr entry in my registry. I do not have a Media Center remote, and learned my keys from my LiteOn IR keyboard to my Marantz RC3200. Strangely enough, using the up/down/letf/right keys from the wireless keyboard do not exhibit these symptoms.

    Any Ideas?

  • Anonymous
    March 28, 2006
    Hey Michael,

    I'm home automation programmer.
    So far the remotes that we use seem to work perfectly for MCE (Nevo, MX850s and MX3000s)

    granted these remotes range from 500 - 1000$ and as far as the IR bounce this is why we use RF 2 IR blasters and turn off the ir capabilities in the remotes. anyway I have templates for all of the remotes that i mentioned so If anyone needs them or limited help just ask and try my best.

    chris@kryoss.com

  • Anonymous
    August 20, 2006
    I press down button, the mce goes 2 steps down. I press up button, the mce goes 2 steps up. I press right butten, the mce goes 2 steps right. I press left button, the mce goes one step left. I have a URC8060 programmable remote. What am i doing wrong here ? I set the debounce thing to zero.

  • Anonymous
    October 29, 2006
    is there a way to change what buttons do what on the remote?, is it somthing simple as an xml file? All i really want to do is disable a few of the buttons functionality on the remote and use it within another program, conflicting results with same buttons. and no i don't want to change the other prog.  if this is asked in the wrong place my appologies

  • Anonymous
    January 02, 2007
    Mike, I know this is an old post but i really apperate people like you that take time out of your day to do this stuff. i did as you said and my rf remote works like a charm. Thank you and everyone else very much foyour help. tj

  • Anonymous
    February 05, 2007
    PingBack from http://avforum.no/forum/generell-htpc/49741-opplaering-av-ir-fjernkontroller-mot-original-mce-remote-problemer-piltaster-etc.html#post572917

  • Anonymous
    September 02, 2008
    EXCELLENT !!! I've been searching all over for something like this! Works like a charm !

  • Anonymous
    April 26, 2009
    PingBack from http://forum.team-mediaportal.com/hardware-174/mce-remote-doch-noch-bestellbar-53805/index4.html#post411815

  • Anonymous
    February 07, 2010
    Holy Cow!!! Thank you so much, that was driving me insane!!!! Leave it to Microsoft to fix things by over programing.

  • Anonymous
    June 20, 2011
    I've lost few days searching because of this stupid DeBounce... Now it WORX! Cheers!!