HOW TO - Configure a Logitech Harmony Remote for Kodi 2016

Tags

Logitech Harmony Remote Configuration Guide – Kodi
Last Updated: 2016-2-3

Please share your experiences with various IR receiver models and Windows 10. I don't want to recommend any IR receiver with poor driver compatibility or impaired function.

This guide is dedicated to configuring a Logitech Harmony remote to control Kodi Entertainment Center. Set-up is specific to Windows. Linux users should start here before visiting this thread dealing with Harmony remotes. Mac users should rely on set-up from this thread.

You will need:

  • Logitech Harmony Remote;
  • IR Receiver (built-in or external);
  • Harmony Remote Software;
  • Windows OS.
This Harmony Configuration Guide Includes:
  1. Guide to Microsoft eHome RC6 IR Receivers;
  2. Guide to Non-eHome IR Receivers;
  3. Adding Devices;
  4. Creating a Kodi Activity – Microsoft eHome Devices;
  5. Creating a Kodi Activity – Non-eHome Devices;
  6. Reducing Lag & Improving Responsiveness;
  7. Other Resources.
1. GUIDE TO MICROSOFT eHOME RC6 IR RECEIVERS

DefinitionMicrosoft eHome Infrared Transceiver is a type of IR receiver designed to work with Windows Media Center, Windows Media Player and other native Microsoft media applications. This type of receiver is easiest to work with and the most compatible with Kodi. Its ease-of-use comes from its ability to use devices in the Harmony database that can be directly mapped to keyboard commands in Kodi without having to translate through a third-party such as a keyboard.xml. If possible, you want to get your hands on one of these.

To determine if your IR receiver is a true eHome RC6, open the Device Manager in Windows and see if your receiver is listed as a Microsoft eHome Infrared Transceiver under Human Interface Devices. Even this may not be a guarantee of performance. I have experienced an issue with an HP OVU400102/71, which installed the correct drivers but wouldn’t recognize commands correctly. It turns out, this receiver uses a different chipset than other HP receivers, and, as a result, does not function as a true eHome remote. But, chances are, if the eHome driver installs, you have the correct receiver.

Genuine eHome receivers can be purchased alone, but it may be just as easy to remove an IR receiver from a combined remote/receiver package. Many small form factor (mini) computers contain built-in CIR receivers, which are also RC6-compatible. Examples of computers with built-in receivers include the Intel NUC and ZOTAC ZBOX. Some Intel NUCs do not come with eHome receivers and need to be treated as non-eHome devices using Intel NUC as the Harmony device and by converting some commands into Kodi actions via a keyboard.xml.

A list of external Microsoft eHome receivers can be found here

Popular eHome RC6 receivers:

HP 5070-2584 / TSGI-IR01
[Image: HP-5070-2584_zpseaxa55x4.png]

HP 5188-1667 / OVU400103/00
[Image: HP-OVU400103-00_zpsx60m0suy.png]

Microsoft A9O-00007
[Image: Microsoft-A9O-00007_zpsvdqqb2zn.png]

Phillips-Dell OVU4003/00
[Image: Phillips-Dell-OVU4003-00_zpstt1zlfg2.png]

Phillips-Dell OVU412002/00
[Image: Dell-Phillips-OVU412002_zpskafsi3ql.png]

MediaGate HA-IR01SV / TSDX-IR
[Image: MediaGate-HA-IR01SV_zpsxw4wgwky.png]




2. GUIDE TO NON-eHOME IR RECEIVERS

Definition: A Non-eHome IR receiver also emulates keyboard commands and typically comes preconfigured to control Window Media Center. The limitations of a non-eHome receiver relate to how the device is stored in the Harmony database. Unlike a true eHome receiver, these receivers cannot use generic Microsoft devices. Therefore, they are limited to the commands on the remote itself such as “Red,” “Green,” “Play,” “Pause,” “Browser,” etc. Each button could send a command for a single key press (e.g. “i”), multiple key presses (e.g. cntrl + g) or an app command (e.g. play_pause). In either case, some key presses will have to be translated to Kodi commands through the creation of a keyboard.xml. Set-up for Non-eHome receivers is covered separately in Section 5.

Non-eHome receivers are usually packaged with an accompanying remote that will be needed to determine what key presses are sent by each button.

Some examples of non-eHome receivers can be found here

Example of a popular Non-eHome receiver:

Ortek VRC-1100:
[Image: Ortek-VRC-1100_zpsgrcmt1ds.png]



3. ADDING DEVICES

Devices are added from the Harmony remote software. Currently, there are two versions of this desktop application:

MyHarmony: For newer remotes, delivering a visual-oriented approach to set-up.

[Image: Harmony---MyHarmony_zpsfss1fjbi.png]

Logitech Harmony Remote Software: For legacy remotes, relying more on drop-down menus and tab-based navigation.

[Image: Harmony---Legacy_zpsnwygsfls.png]

You are not cheating yourself regardless of what type of software you use, as the options remain virtually identical between the two.

Adding Microsoft eHome Devices

Two devices should be added from the Devices tab. The first device, MCE Keyboard, is comprised of simple key presses found on the keyboard face. The second device, Windows Media Center SE, is pre-configured for Windows Media Center and includes numerous multi-key commands. Either device may work well on its own, and many commands are repeated across devices. To increase flexibility in designing a keymap, it is recommended to use both devices.

Add Device 1 – MCE Keyboard

MyHarmony:
  • Manufacturer: Microsoft
  • Model: MCE Keyboard
Legacy Software:
  • Media Center PC --> Microsoft --> MCE Keyboard
Add Device 2 – Windows Media Center SE

MyHarmony:
  • Manufacturer: Microsoft
  • Model: Windows Media Center SE
Legacy Software:
  • Media Center PC --> Microsoft --> Windows Media Center SE

Adding Non-eHome Devices

To add a non-eHome device, you must first determine the device’s manufacturer and product number. For example, this MCE remote is advertised below at Amazon:



Some research reveals the remote is manufactured by ORtek and its model number is listed as VRC-1100. To retrieve its command list from the Harmony database, the device is added as follows:

MyHarmony:
  • Manufacturer: ORtek
  • Model: VRC-1100
Legacy Software:
  • Media Center PC --> ORtek --> VRC-1100
Most commands for non-eHome devices are taken directly from Window Media Center. The command list will vary from device to device.

Flirc Users: Users of Flirc should treat the receiver as a non-eHome device. Flirc has its own Kodi profile in the Harmony database: Manufacturer - FlircModel - Kodi. Any additional custom button mapping should be done with the Flirc software.


4. CREATING A KODI ACTIVITY – MICROSOFT eHOME DEVICES

By this point, two devices should be added to your Harmony profile:
  • MCE Keyboard
  • Windows Media Center SE
Adding an Activity

MyHarmony:
  • Choose Custom activity and follow the on-screen instructions.
Legacy Software:

From the Activities tab:
  1. Select Manual Activity;
  2. Choose Utility;
  3. Generic Activity;
  4. Add Required Devices;
  5. Complete Set-up.
Power On and Off – Only one device should be used to power the system on and off. I recommend Windows Media Center SE for this purpose. Leaving the computer off when not in use is the recommended setting. The Off state may be wake from sleep/hibernate, or wake from a power off state if your motherboard supports this. 

Customizing Buttons – Harmony Keymap

To customize the remote, commands from the Kodi keymap must be matched to commands for a device in the Harmony database. Most key commands (e.g. "I") can be matched directly to the MCE Keyboard, so this process can usually be planned without looking up anything in the Harmony software. The idea is to match commands in the Kodi keymap with a corresponding button on the remote. 

Below is an example starter keymap for a Harmony 650. This keymap covers most of the essential commands for navigation and playback and is a good launching point for a more elaborate key design.

Click here for a complete list of Kodi keyboard commands.

eHome: Basic Keymap – Harmony 650:

[Image: Harmony-650-eHome_zpsijpvlnef.png]

Basic Keymap Command List:

Harmony --> Kodi Command --> Device

*Cust (Start) --> Start Kodi --> Win + # (SE)
Cust (Quit) --> Quit Kodi --> Alt + F4 (MCE)
Cust (Full) --> Fullscreen --> Tab (MCE)
Cust (Codec) --> Codec Info --> O (MCE)
Menu > Shutdown Menu > S (MCE)
*Exit --> Back --> Backspace (MCE)
Info --> Info --> I (MCE)
Guide --> Contextual Menu --> C (MCE)
Up Arrow --> Jump to Top --> Home (MCE)
Down Arrow --> Jump to Bottom --> End (MCE)
Cust (Watched) --> Watched Status --> W (MCE)
Cust (Item Up) --> Move Item Up --> U (MCE)
Up --> Up --> DirectionUp (SE)
Down --> Down --> DirectionDown (SE)
Left --> Left --> DirectionLeft (SE)
Right --> Right --> DirectionRight (SE)
Channel Up --> Page Up --> ChannelUp (SE)
Channel Down --> Page Down --> ChannelDown (SE)
*OK --> OK --> Enter (SE)
Prev --> Player Controls --> M (MCE)
Play --> Play --> Play (SE)
Stop --> Stop --> Stop (SE)
Rewind --> Rewind --> Rewind (SE)
Fast Forward --> Fast Forward --> FastForward (SE)
Skip Back --> Skip Backward --> , (MCE)
Skip Forward --> Skip Forward --> . (MCE)
Pause --> Pause --> Pause (SE)
0 to 9 --> Number Keys --> 0 to 9 (MCE)

*Start Kodi – The command Win + # is a means of opening a program in Windows. The # refers to the program's position on the Taskbar. Pressing Win + 3, for example, would open the third item on the Windows Taskbar.

*Long-press – Jarvis v16 introduced a long-press for select keystrokes. Holding a key for a couple of seconds enables a secondary command. Currently, this is limited to two keystrokes and only appears to be compatible with eHome receivers:
  • Short: Enter –> Long: Contextual Menu
  • Short: Backspace –> Long: Home Screen or Shutdown Menu
  • Short: Enter –> Long: Pause
  • Short: Backspace –> Long: Stop
Advanced Configuration – keyboard.xml

It is possible to add commands not included in the list of Kodi keyboard controls by creating a file called a keyboard.xml. For example, if I wanted a command to toggle the videos section to show only unwatched, watched or all videos, I would add the following to my keyboard.xml:

keyboard.xml:

<keymap>
<global>
<keyboard>
<m>SendClick(Videos,10)</m>
</keyboard>
</global>
</keymap>

The entry in the Harmony software would look like this:

Prev (Harmony) --> Send a click to a control in a given window --> M (MCE)

If I wanted to map commands already assigned to other keys for specific circumstances, such as fullscreen playback, subsections could be added:

<keymap>
<FullScreenVideo>
<keyboard>
<home>subtitledelay</home>
<end>AudioNextLanguage</end>
</keyboard> 
</FullScreenVideo>
</keymap>

The above file should be created in a text editor such as Notepad or Notepad++ and saved askeyboard.xml. The .xml must be stored at the following location:

C:\Users\USERNAME\AppData\Roaming\Kodi\userdata\keymaps

Click here for a complete list of Kodi Action IDs.
Click here for a complete list of Kodi built-in functions.

More information on the formatting and contents of a keyboard.xml can be found here.

Link: Another take on how to bind a key to a custom command.


5. CREATING A KODI ACTIVITY – NON-eHOME DEVICES

By now, a single device should be added in the Harmony software based on the remote's manufacturer and product number. The next step involves preliminary work to retrieve a list of commands output by the remote. Remember, we are starting with a remote that outputs Windows Media Center commands. You need to translate those commands to Kodi functions. The goal is to determine what key presses are output by each button and use these key presses to create a customized keyboard.xml. This is a three-step-process:

Step 1 – Download ShowKey

ShowKey is a great little app designed to provide a textual display of key commands received by Windows. This app will show both key presses and Windows Media Center app commands.

Download ShowKey

To use, simply point your remote at the receiver and press a button. The corresponding command will appear on the screen. I suggest using the program's copy function to retrieve each key press and put it into an Excel spreadsheet or Word document along with the name of the pressed button.

ShowKey Interface:
[Image: ShowKey_zpsa7jfyee4.png]

The completed ShowKey for an Ortek VRC-1100:

[Image: Ortek-VRC-1100_zpssndpjwhw.png]

Step 2 – Translate Key Commands to Kodi Functions

Once we know the commands for each button, the next step is to translate choice commands into Kodi functions. Any command that is not a native Kodi keyboard or app command can be used to create a custom function in Kodi.

Using the VRC-1100 as an example, 11 chosen commands will be converted to Kodi functions:

VRC-1100 (Harmony database) --> VRC-1100 Keys --> Kodi Command

# --> Alt + 5 --> Action(MoveItemUp)
RecordedTV --> Cntrl + O --> codecinfo
Yellow --> Cntrl + Shift + T --> fullscreen
* --> Numpadtimes --> lastpage
Live --> Cntrl + T --> ActivateWindow(shutdownmenu)
Green --> Cntrl + I --> info
Blue --> Cntrl + M --> contextmenu
Guide --> Cntrl + G --> ActivateWindow(PlayerControls)
Red --> Cntrl + E --> togglewatched
*SkipBack --> Previous_Track --> stepback
*SkipForward --> Next_Track --> stepforward

*Previous_Track and Next_Track are read incorrectly by Kodi and required definitions. 

Click here for a complete list of Kodi Action IDs.
Click here for a complete list of Kodi built-in functions.

Step 3 – Create a keyboard.xml

The final step involves taking the translated commands and adding them to a keyboard.xml that can be read by Kodi. The basic formatting of this document is shown below:

keyboard.xml:

<keymap>
<global>
<keyboard>
<numpadfive mod="alt">Action(MoveItemUp)</numpadfive>
<o mod="ctrl">codecinfo</o> 
<t mod="ctrl,shift">fullscreen</t>
<numpadtimes>lastpage</numpadtimes>
<t mod="ctrl">ActivateWindow(shutdownmenu)</t>
<i mod="ctrl">info</i>
<m mod="ctrl">contextmenu</m>
<g mod="ctrl">ActivateWindow(PlayerControls)</g>
<e mod="ctrl">togglewatched</e>
<prev_track>stepback</prev_track>
<next_track>stepforward</next_track>
</keyboard>
</global>
</keymap>

This file should be created in a text editor such as Notepad or Notepad++ and saved as keyboard.xml. The .xml must be stored at the following location:

C:\Users\USERNAME\AppData\Roaming\Kodi\userdata\keymaps

More information on the formatting and contents of a keyboard.xml can be found here.

Adding an Activity

MyHarmony:
  • Choose Custom activity and follow the on-screen instructions.
Legacy Software:

From the Activities tab:
  1. Select Manual Activity;
  2. Choose Utility;
  3. Generic Activity;
  4. Add Required Devices;
  5. Complete Set-up.
Customizing Buttons – Harmony Keymap

The Harmony keymap will be a combination of native commands recognized by Kodi and those defined in the keyboard.xml. The Harmony database treats non-eHome receivers as Windows Media Center devices. Accordingly, the name of each button references its function in Windows Media Center (e.g. Browser) not its combined key presses. Sometimes, a process of elimination is required to determine the origin of button names on the original remote and cross-reference it with its name in the Harmony database.

Below is a starter keymap for a Harmony 650 used in conjunction with a VRC-1100. This keymap covers most of the essential commands for navigation and playback and is a good launching point for a more elaborate key design.

VRC-1100: Basic Keymap – Harmony 650:
Green Items: Commands set via keyboard.xml

[Image: Harmony-650-VRC-1100_zpswlgl1ewz.png]

Basic Keymap Command List:

Harmony --> Kodi Command --> VRC-1100

*Cust (Start) --> Start Kodi --> AutoHotKey
Cust (Quit) --> Quit Kodi --> Close
Cust (Full) --> Fullscreen --> Yellow
Cust (Codec) --> Codec Info --> RecordedTV
Menu --> Shutdown Menu --> Live
Exit --> Back --> Backspace
Info --> Info --> Green
Guide --> Contextual Menu --> Blue
Up Arrow --> Jump to Top --> Browser
Down Arrow --> Jump to Bottom --> *
Cust (Watched) --> Watched Status --> Red
Cust (Item Up) --> Move Item Up --> #
Up --> Up --> DirectionUp
Down --> Down --> DirectionDown
Left --> Left --> DirectionLeft
Right --> Right --> DirectionRight
Channel Up --> Page Up --> ChannelUp
Channel Down --> Page Down --> ChannelDown
OK --> OK --> OK
Prev --> Player Controls --> Guide
Play --> Play/Pause --> Play
Stop --> Stop --> Stop
Rewind --> Rewind --> Rewind
Fast Forward --> Fast Forward --> FastForward
Skip Back --> Skip Backward --> SkipBack
Skip Forward --> Skip Forward --> SkipForward
Pause --> Pause/Play --> Pause
0 to 9 --> Number Keys --> 0 to 9

*Start Kodi – In this example, Kodi is started through the use of an AutoHotKey script, which is covered inSection 7. The command Start (Cntrl+Alt+Enter) (or ^!Enter if referenced directly in the script) is used as the hot key to initiate the script, which opens Kodi.exe.

6. REDUCING LAG & IMPROVING RESPONSIVENESS

With any Harmony remote, some degree of input lag will be experienced while navigating the Kodi interface. This slight delay is normal. However, this lag can be minimized by adjusting two settings for each Kodi device.

Setting 1 – Adjust Delay (Speed) Settings

MyHarmony:

Devices --> MCE Keyboard --> Change Device Settings --> Device delay settings

Devices --> Windows Media Center SE --> Change Device Settings --> Device delay settings

Legacy Software:

Devices --> MCE Keyboard --> Settings --> Adjust the delays (speed settings)

Devices --> Windows Media Center SE --> Settings --> Adjust the delays (speed settings)

Recommended Delays:

Inter-key Delay: 0 ms
Input Delay: 300-500 ms
Inter-Device Delay: 500 ms

Setting 2 – Troubleshooting

MyHarmony:

Devices --> MCE Keyboard --> Change Device Settings --> Device command repeats 
MCE Keyboard responds to some commands either too many times or only occasionally.

Number of repeats: 1

Devices --> MCE Keyboard --> Change Device Settings --> Device command repeats 
MCE Keyboard responds to some commands either too many times or only occasionally.

Number of repeats: 1

Legacy Software:

Devices --> MCE Keyboard --> Troubleshooting --> 
MCE Keyboard responds to some commands either too many times or only occasionally.

Number of retries: 1

Devices --> Windows Media Center SE --> Troubleshooting --> 
Windows Media Center SE responds to some commands either too many times or only occasionally.

Number of retries: 1

If anyone can improve the technical accuracy of this section, it would be welcome. At this point, it is more an art than a science. I have gotten the best results with the settings posted. I'm not really sure about the Input Delay, as I've used anywhere from 300 to 1000 ms.



7. OTHER RESOURCES

AutoHotKey

AutoHotkey is a useful utility that can be used to assign hotkeys (actions) to select key commands. For those unable to use the Windows Media Center SE device, creating a HotKey script is a means of assigning a key combination to start Kodi from Windows. 

A tutorial on how to create and execute AutoHotKey scripts is found in this post

EventGhost

EventGhost is an alternative method of configuring a remote by using macros to assign Kodi functions to your Harmony. The program is plugin-based, meaning device profiles must be added manually before macros (functions) can be assigned to these profiles.

A tutorial on how to use EventGhost with MCE remotes is found in this post

Additional Method of Starting Kodi from Windows

This poster proposes an additional method of starting Kodi from Windows by changing the shortcut assigned to Kodi.exe. This method is untested.

Launcher4Kodi

Launcher4Kodi is a HTPC helper utility that auto-starts Kodi on power on and auto-closes Kodi on power off. It can also be used to ensure Kodi remains focused when loaded fullscreen and set either Windows or Kodi to run as a shell.

Troubleshooting Tips

Those experiencing difficulties due to driver issues or remotes that will not recognize commandsshould visit this post.