I have described how I setup my Ubuntu-XBMC based HTPC in several of my previous posts:
https://www.smarthomebeginner.com/?p=252
https://www.smarthomebeginner.com/?p=279
https://www.smarthomebeginner.com/?p=285
I bought the Wireless USB PC Remote Control Mouse for PC as a cheap IR remote / receiver to control my HTPC. It sells for about $7 on Amazon. This USB remote works out of the box on Ubuntu and provides basic out of the box control for XBMC operation. On Windows, it provides much more features.
Unlike other MCE remotes available for a higher price, which work well with lirc, this remote is recognized by Ubuntu as keyboard and mouse and not as a remote control. Upon doing lsusb the device is identified as “Chaplet Systems, Inc”.
$ lsusb
Bus 003 Device 002: ID 074a:2230 Chaplet Systems, Inc.
Many people suggest investing in a good MCE remote that works well with lirc. But at this point this is what I have and so I set out trying to configuring it as close to my needs as possible. “Setup Chinavasion IR receiver with Harmony 300i” is a blog post that served a key reference in my attempt.
First create the “keymaps” folder under ~/.xbmc/userdata if not already present. If it is already present then move all files within the folder to a safe location. Then create the file “keymap.xml” within the keymaps folder.
cd ~/.xbmc/userdata
mkdir keymaps
cd keymaps
nano keymap.xml
Copy and paste the following contents to the keymap.xml:
<keymap> <!--**************GLOBAL**************--> <global> <keyboard> <key id="389185">ActivateWindow(home)</key> <!--Green--> <key id="389188">Close</key> <!--Yellow/Exit--> <key id="61619">Play</key> <!--Play/Play--> <key id="61618">Stop</key> <!--Stop/Stop--> <key id="61448">PreviousMenu</key> <!--Backspace/Prev--> </keyboard> </global> <!--**************HOME**************--> <home> <keyboard> <key id="389186">XBMC.CleanLibrary(video)</key> <!--Red--> <key id="389187">XBMC.UpdateLibrary(video)</key> <!--Blue--> <key id="61467">ActivateWindow(settings)</key> <!--ESC/Menu--> <key id="323597">ActivateWindow(systeminfo)</key> <!--FullScreen/Info--> </keyboard> </home> <!--**************VIDEO LIBRARY**************--> <videolibrary> <keyboard> <key id="389187">ToggleWatched</key> <!--Blue--> <key id="61467">ContextMenu</key> <!--ESC/Menu--> <key id="61473">PageUp</key> <!--PageUp/Channel Up--> <key id="61474">PageDown</key> <!--PageDown/Channel Down--> </keyboard> </videolibrary> <!--**************MUSIC LIBRARY**************--> <musiclibrary> <keyboard> <key id="61467">ContextMenu</key> <!--ESC/Menu--> <key id="61473">PageUp</key> <!--PageUp/ChapterUp--> <key id="61474">PageDown</key> <!--PageDown/ChapterDown--> </keyboard> </musiclibrary> <!--**************FULLSCREEN VIDEO**************--> <fullscreenvideo> <keyboard> <key id="61467">OSD</key> <!--ESC/Menu--> <key id="61473">SubtitleDelayPlus</key> <!--PageUp/Channel Up--> <key id="61474">SubtitleDelayMinus</key> <!--PageDown/Channel Down--> <key id="61617">SmallStepBack</key> <!--Track Left/Previous Track--> <key id="61616">SmallStepBack</key> <!--Track Right/Next Track--> <key id="323597">CodecInfo</key> <!--FullScreen/Info--> </keyboard> </fullscreenvideo> <!--**************VISUALISATION**************--> <visualisation> <keyboard> <key id="61467">ActivateWindow(musicosd)</key> <!--Esc/Menu--> <key id="389188">XBMC.RunScript(script.cu.lyrics)</key> <!--Yellow/Exit--> </keyboard> </visualisation> <!--**************SLIDESHOW**************--> <slideshow> <keyboard> <key id="61473">ZoomIn</key> <!--PageUp/Channel Up--> <key id="61474">ZoomOut</key> <!--PageDown/Channel Down--> <key id="323597">ActivateWindow(pictureinfo)</key> <!--FullScreen/Info--> </keyboard> </slideshow> <!--**************END KEYMAP**************--> </keymap>
Then map your Logitech Harmony remote to Chinavision remote. I have the old Logitech Harmony 520, which does not have the special quick color buttons (Red, Blue, Green, and Yellow). So my setup is a bit different. You may wish to tweak the button mappings to your liking. My Harmony remote button customization looks like this:
Logitech Harmony Key | Chinavision Remote | Function |
---|---|---|
Channel Down | PageDown | For faster scrolling down through media lists. Zoom out during picture slideshow. |
Channel Up | PageUp | For faster scrolling up through media lists. Zoom in during picture slideshow. |
Prev | Backspace | Back to previous menu or Home Screen. |
Logitech Harmony Key | Chinavision Remote | Function |
---|---|---|
OK | Enter | To select by pressing Enter key |
Menu | ESC | Home Screen -> opens Settings window Video Library -> opens Context Menu Fullscreen Video -> opens OSD Music Visualization -> opens OSD |
Exit | Yellow | Exit from a menu or a window |
Info | Fullscreen | Home Screen -> opens System Info window Fullscreen Video -> opens Codec Info Slideshow -> opens Picture Info |
Record | Tab | Go back to Now Playing / Fullscreen Video |
The remaining buttons are self explanatory. My full Chinavision to Harmony remote mapping for standard buttons is given below:
In addition I have the following “Additional Buttons” configured to more flexibility:
After configuring the remotes as above, update your Harmony Remote and it should be ready to go. You might have to restart your HTPC. Again, my guide is just a starting point for others to customize it for their application. I am not a music person; therefore my configuration is primarily for watching videos.
I tried mapping several other events listed in: http://wiki.xbmc.org/index.php?title=Keyboard.xml. But they did not work for me. But you may try to improve the mappings. If you find anything exciting please do share with me and others.
Hope this helps!
UPDATE (2/22/2012): Refer to this post for a further tweaked/improved version of this post.