ATV2 [BUG] - Button IDs for Learned Remote Buttons are incorrect
#1
I wanted to add some additional functionality to my Harmony remote and I thought I could maybe do this by learning a second remote to my ATV2 then mapping those buttons to specific functions via the Joystick.AppleRemote.xml file. Anyways after a bit of research I've finally figured out which Button IDs correspond to the correct learned remote function. Note: The button IDs are not in sequential order to the order that the ATV2 learns the functions. The comments denote the order in which the specific function is learned, there are 9 additional functions and they have separate IR codes from the main remote (The function names are from the ATV2 itself, they have nothing to do with XBMC per say -- I consider them 9 additional IR codes that can be used).

Code:
<button id=13></button>    <!-- 9. Skip Forward -->
<button id=14></button>    <!-- 8. Skip Back -->
<button id=15></button>    <!-- 2. Pause -->
<button id=16></button>    <!-- 1. Play -->
<button id=17></button>    <!-- 3. Stop -->
<button id=18></button>    <!-- 5. Fast Forward -->
<button id=19></button>    <!-- 4. Rewind -->
<button id=20></button>    <!-- 6. Previous Chapter -->
<button id=21></button>    <!-- 7. Next Chapter -->

I did this by grabbing a spare remote and having the ATV2 learn the remote codes 1-9 then played around with the xml file until I narrowed down which button IDs were actually being used.
ATV2 running XBMC Eden (Skin: Quartz3)
Windows 7 running XBMC Eden (custom setup as I'm basically running it as a service)
MySQL installed on Windows 7 for sharing libraries
iOS Specific FAQ | Alternative ATV2 keymap | Default ATV2 keymap
Post log files to Pastebin

Image
Reply
#2
Well if anyone is interested I now have 9 additional IR codes I can program my Harmony with to provide additional configurations. Here's my current setup, hopefully you can piece it together with what I wrote above.

Code:
<keymap>
    <!-- 1. Play -->            <!-- <button id=16></button> Movies -->
    <!-- 2. Pause -->            <!-- <button id=15></button> TV Shows -->
    <!-- 3. Stop -->            <!-- <button id=17></button> Settings -->
    <!-- 4. Rewind -->            <!-- <button id=19></button> Favourites -->
    <!-- 5. Fast Forward -->        <!-- <button id=18></button> Home -->
    <!-- 6. Previous Chapter -->    <!-- <button id=20></button> Info / Subtitles (not working...) -->
    <!-- 7. Next Chapter -->        <!-- <button id=21></button> Big step forward -->
    <!-- 8. Skip Back -->        <!-- <button id=14></button> Big step backward -->
    <!-- 9. Skip Forward -->        <!-- <button id=13></button> Not in use -->
  <global>
    <joystick name="AppleRemote">
      <!-- plus       -->      <button id="1">Up</button>
      <!-- minus      -->      <button id="2">Down</button>
      <!-- left       -->      <button id="3">Left</button>
      <!-- right      -->      <button id="4">Right</button>
      <!-- center     -->      <button id="5">Select</button>
      <!-- menu       -->      <button id="6">PreviousMenu</button>
      <!-- hold center-->      <button id="7">Fullscreen</button>
      <!-- hold menu  -->      <button id="8">ContextMenu</button>

      <!-- old buttons for ATV <2.2, used on OSX  -->
      <!-- hold left  -->      <button id="9">Left</button>
      <!-- hold right -->      <button id="10">Right</button>

      <!-- new aluminium remote buttons  -->
      <!-- play/pause -->      <button id="12">Play</button>

    <!-- 1 -->    <button id=16>ActivateWindow(VideoLibrary,MovieTitles)</button>
    <!-- 2 -->    <button id=15>ActivateWindow(VideoLibrary,TvShowTitles)</button>
    <!-- 3 -->    <button id=17>ActivateWindow(systemsettings)</button>
    <!-- 4 -->    <button id=19>XBMC.ActivateWindow(Favourites)</button>
    <!-- 5 -->    <button id=18>ActivateWindow(home)</button>
    <!-- 6 -->    <button id=20>Info</button>
    </joystick>
  </global>

  <FullscreenVideo>
    <joystick name="AppleRemote">
                  <button id="1">OSD</button>
               <button id="2">OSD</button>
            <button id="3">StepBack</button>
            <button id="4">StepForward</button>
            <button id="5">Pause</button>
            <button id="6">Stop</button>
            <button id="7">OSD</button>
            <button id="8">Fullscreen</button>
            <button id="9">Rewind</button>
            <button id="10">FastForward</button>
      <!-- 7 -->     <button id="">BigStepForward</button>
      <!-- 8 -->     <button id="14">BigStepBack</button>
      <!-- 6 -->    <button id=20>RunScript(script.xbmc.subtitles)</button>
    </joystick>
  </FullscreenVideo>

</keymap>

And a little note to anyone messing around with keymaps: If you are editing part of the keymap you need to make sure you include the original parts that you want to remain. Ie you can't just add a new part to the global keymapping, you need to include all of the old code you want (for example button IDs 1-12) as you are completely replacing that section not appending to it. Original found here.
ATV2 running XBMC Eden (Skin: Quartz3)
Windows 7 running XBMC Eden (custom setup as I'm basically running it as a service)
MySQL installed on Windows 7 for sharing libraries
iOS Specific FAQ | Alternative ATV2 keymap | Default ATV2 keymap
Post log files to Pastebin

Image
Reply
#3
It's not necessary to first learn another remote to the AppleTV and the Harmony, as you can add the AppleTV as a device to the Harmony setup and all those keys (plus a reset AppleTV function) will be added to your Harmony. You can then immediately use the extra codes and they should already work out of the box.

Of course you can then put a custom keymap in the userdata folder to tweak how each button works for you. For example, I've changed one of the buttons to activate the subtitle addon during playback.

Remco
Reply
#4
This is strictly in reference to the mislabeling of the button IDs in the default XML for the learned IR codes. I'm aware of the IR codes for the harmony but I've already used those mostly for their intended purposes. Using what I have above I have 9 separate IR codes to use for whatever.
ATV2 running XBMC Eden (Skin: Quartz3)
Windows 7 running XBMC Eden (custom setup as I'm basically running it as a service)
MySQL installed on Windows 7 for sharing libraries
iOS Specific FAQ | Alternative ATV2 keymap | Default ATV2 keymap
Post log files to Pastebin

Image
Reply
#5
So, am I correct in assuming that by learning the extra buttons from a third remote, you get an additional 9 button id's that the apple tv responds to, in addition to the extra id's that the harmony already adds itself?

That I didn't know and it's very cool. I think I'll be adding some extra features to my remote then. Like turnings subs on/off or changing sub language.

Hmmm, what else can I do...
Reply
#6
kno1 Wrote:So, am I correct in assuming that by learning the extra buttons from a third remote, you get an additional 9 button id's that the apple tv responds to, in addition to the extra id's that the harmony already adds itself?

That I didn't know and it's very cool. I think I'll be adding some extra features to my remote then. Like turnings subs on/off or changing sub language.

Hmmm, what else can I do...

I haven't fully confirmed that the Harmony Remote commands are actually separate button presses. My guess is that they are since they are documented as such, however the documentation seems to have mislabeled the button IDs. If I have time later today I can test that out too.
ATV2 running XBMC Eden (Skin: Quartz3)
Windows 7 running XBMC Eden (custom setup as I'm basically running it as a service)
MySQL installed on Windows 7 for sharing libraries
iOS Specific FAQ | Alternative ATV2 keymap | Default ATV2 keymap
Post log files to Pastebin

Image
Reply
#7
I had hoped to add more buttons also but I think the learned buttons show the same code as the extra buttons in the Harmony set up. Maybe I am wrong. I did give up somewhat quickly thinking they were actually the same.

J_K_M_A_N
Reply
#8
Unfortunately the case seems to be that the Learned Remote codes are the equivalent to the Harmony codes in some regards. I haven't mapped each Harmony function to a specific button ID but I'm not really sure what's going on with the learned remote button IDs being 13-21 instead of 70-78.

This still doesn't change that the documentation XML is not properly labeled. The listed Harmony functions are not the same as what are actually the name of the Harmony functions. Additionally the button IDs for the learned remote codes don't seem to be in a logical order, plus those are not labeled correctly either and are actually in the same Button ID range as the harmony.

From what I've researched it looks like you will get a lot more buttons out of learning a 2nd remote to your AppleTV then programming those 9 additional IR codes to your Harmony. From what I can tell there aren't a lot of buttons actually being used in the Harmony profile aside from those that come stock with the ATV2.

Quote:DirectionDown
DirectionLeft
DirectionRight
DirectionUp
FastForward
Menu
NextChapter=13
PageDown
PageUp
Pair
Pause
Play
PrevChapter=14
Reset
Rewind
Select
SkipBackward=Also seems to be ID=14
SkipForward=21
Stop
UnPair
VideoMode
ATV2 running XBMC Eden (Skin: Quartz3)
Windows 7 running XBMC Eden (custom setup as I'm basically running it as a service)
MySQL installed on Windows 7 for sharing libraries
iOS Specific FAQ | Alternative ATV2 keymap | Default ATV2 keymap
Post log files to Pastebin

Image
Reply
#9
akevit, do you know what button id VideoMode will generate? Is it possible to map this harmony remote code to a specific action on the ATV2?
Reply
#10
stefan129 Wrote:akevit, do you know what button id VideoMode will generate? Is it possible to map this harmony remote code to a specific action on the ATV2?

From what I could tell that button as well as the pair, unpair, and reset buttons are hard-coded to the ATV2 to do those exact things. I'm not sure if XBMC is capable of intercepting those commands or stopping the ATV from responding to them.
ATV2 running XBMC Eden (Skin: Quartz3)
Windows 7 running XBMC Eden (custom setup as I'm basically running it as a service)
MySQL installed on Windows 7 for sharing libraries
iOS Specific FAQ | Alternative ATV2 keymap | Default ATV2 keymap
Post log files to Pastebin

Image
Reply

Logout Mark Read Team Forum Stats Members Help
ATV2 [BUG] - Button IDs for Learned Remote Buttons are incorrect0