2013. január 13., vasárnap

Better use of Panasonic Viera remote with XBMC

I am using XBMC on a Raspberry Pi (raspbmc actually) with my Panasonic Viera plasma screen.
It really is fascinating to see that it can be controlled with the TV remote out-of-the-box, right after install. It uses a communication between the computer and the display, on the HDMI cable called CEC.
However I missed some functions while found a few buttons on the remote which did not do anything useful to me. So here is the result of my investigation on which buttons can be programmed and how I changed the defaults to a more sensible layout.

I found, that not all the button presses from the remote are actually reported over the HDMI cable to the computer: (I used the custom remote config printig messages described here)

number on the right (label of the button) - what it sends to XBMC
8 (OK) - select
9 (OPTION) - title
10 (no labels, just colors) - red, green, yellow, blue
11 (text) - teletext
12 (STTL) - subtitle
13 (1-9, 0) - one two, three, four, five, six, seven, eight, nine, zero
19 (X) - clear
20 (GUIDE) - guide
21 (just arrows) - up, down, left, right
22 (arrow turning from right to left) - back
26 (up and down arrows) - pageplus, pageminus

These buttons do not send any signals on CEC: 1, 2, 3, 4, 5, 6, 7, 14, 15, 16, 17, 18, 23, 24, 25 and unfortunatelly the whole group 27 of buttons, even though they seem best fit for media control. :(
And this is how I added all the usually needed: on notmal XBMC systems you modify this file:
/opt/xbmc-bcm/xbmc-bin/share/xbmc/system/keymaps/remote.xml
on the raspbmc I modified this (raspbmc can have multiple versions of XBMC at the same time and switch between them):
/home/pi/.xbmc-current/xbmc-bin/share/xbmc/system/keymaps/remote.xml
In there, inside global I added:



That makes the red button to stop playback, the green to play and yellow to pause. Blue will bring up the window to download subtitle for the item being played. (The subtitle add-on has to be installed and enabled for that.) I also changed zero to highlight an item in the file listings.
In the Home section I added:


For Guide button to show the System Info window and the OPTION button to go directly into Settings.
In the FullscreenVideo I have added:


This makes the program changing up and down buttons to adjust the subtitle delay directly.

Should you want to add more or other functions to the buttons or bring up other windows you can find the Action IDs here and the Window IDs here!

Happy hacking with the rest of the buttons, screens and functions! :)

Rendszeres olvasók