Setup Chinavision Remote for Kodi and Harmony Remote

I have described how I setup my Ubuntu-XBMC based HTPC in several of my previous posts:

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”.

Chinavision | Smarthomebeginner
Wireless Usb Pc Remote Control Mouse For Pc

$ 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:

	<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-->

	<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-->

<!--**************VIDEO LIBRARY**************-->
	<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-->

<!--**************MUSIC LIBRARY**************-->
	<key id="61467">ContextMenu</key> <!--ESC/Menu-->
	<key id="61473">PageUp</key> <!--PageUp/ChapterUp-->
	<key id="61474">PageDown</key> <!--PageDown/ChapterDown-->

<!--**************FULLSCREEN VIDEO**************-->
	<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-->

	<key id="61467">ActivateWindow(musicosd)</key> <!--Esc/Menu-->
	<key id="389188">XBMC.RunScript(</key> <!--Yellow/Exit-->

	<key id="61473">ZoomIn</key> <!--PageUp/Channel Up-->
	<key id="61474">ZoomOut</key> <!--PageDown/Channel Down-->
	<key id="323597">ActivateWindow(pictureinfo)</key> <!--FullScreen/Info-->

<!--**************END 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 KeyChinavision RemoteFunction
Channel DownPageDownFor faster scrolling down through media lists. Zoom out during picture slideshow.
Channel UpPageUpFor faster scrolling up through media lists. Zoom in during picture slideshow.
PrevBackspaceBack to previous menu or Home Screen.
Logitech Harmony KeyChinavision RemoteFunction
OKEnterTo select by pressing Enter key
MenuESCHome Screen -> opens Settings window
Video Library -> opens Context Menu
Fullscreen Video -> opens OSD
Music Visualization -> opens OSD
ExitYellowExit from a menu or a window
InfoFullscreenHome Screen -> opens System Info window
Fullscreen Video -> opens Codec Info
Slideshow -> opens Picture Info
RecordTabGo 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:

Harmonymapping1 | Smarthomebeginner
Chinavision - Logitech Harmony Mapping 1

Harmonymapping2 | Smarthomebeginner
Chinavision - Logitech Harmony Mapping 2

Harmonymapping3 | Smarthomebeginner
Chinavision - Logitech Harmony Mapping 3

In addition I have the following “Additional Buttons” configured to more flexibility:

Additional Mappings1 | Smarthomebeginner
To Emulate Mouse Movements

Additional Mappings2 | Smarthomebeginner
To Emulate Mouse Clicks And To Update/Clean Library.

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: 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.

Be the ONE IN 100,000 that read this, and support us...
  • Feeling generous? Become a member and get ad-free browsing, exclusive content, Discord benefits, and more.
  • Just want to thank us? Buy us a Coffee or a Ko-Fi.
  • May be another day? Shop on Amazon using our links. Your prices won't change but we get a small commission.
  • Don't feel like spending? You can still show your support by sharing this post, linking to it in forums, or even commenting below.


Anand is a self-learned computer enthusiast, hopeless tinkerer (if it ain't broke, fix it), a part-time blogger, and a Scientist during the day. He has been blogging since 2010 on Linux, Ubuntu, Home/Media/File Servers, Smart Home Automation, and related HOW-TOs.