Post Reply 
CEC Remote Help
7th Jan, 2013, 02:36 AM
Post: #1
CEC Remote Help
I've just purchased a new 42" LED LG TV and hooked my Pi up to it. Much to my delight the TV's remote works to control nearly every aspect of XBMC, however the one thing that doesn't work is the "Info" Button. This just brings up the standard TV Info (i.e resolution and refresh rate) instead of Video information.

Is there a simple way in which i can map this key or alternatively another key on the remote to bring up the video information/ library information? I've trawled the internet and found all the guides thus far very confusing!

My remote is a LG AKB73615388 (picture attached) in case anyone has already created a custom key map?

Find all posts by this user
Quote this message in a reply
7th Jan, 2013, 03:15 AM
Post: #2
RE: CEC Remote Help
LOL, you're in luck, I have almost the exact same remote. Good timing of your purchase too because a few months back, LG TVs were experiencing a problem with CEC whereby once you switch source (say, back to normal DTV) and then back to the Raspi HDMI again, the CEC functionality would die. Aren't you lucky I bug reported that and the great guys at Pulse-Eight found a solution? Smile

Essentially when XBian is running and the active source on your LG, if you press a button that doesn't apply to the current source, you should see an overlay from the TV software stating "This function is not available now". So you can rule out those keys, they will not be available to you.

Secondly, there will be some keys that do not produce the "This function is not available now" message but nevertheless do not do anything in Xbian because they are not passed through the HDMI CEC wire. These include, for example, the red/green/yellow/blue buttons.

Thirdly there are the keys like the Info button that are always completely mapped to the TV's system software. So you cannot remap those.

Lastly there are the keys you CAN remap. To do this is reasonably easy if you are not afraid of a little bit of XML, can access your Xbian via SSH and edit a text file. The one aspect that is a little messy is the documentation. Loosely speaking AFAIK there are about half a dozen different representations of the keys on a remote control so that gets messy but I can help you out and hopefully others will too. Let's keep it as simple as possible though ..

1) In which mode are you in when you press the button? The mappings for XBMC can be global or context specific. For example, pressing a key when watching full screen video can trigger a different action to pressing the same key when viewing a file list or the library.

2) What do you want to do when you click a certain button?

From what I can determine from your post, you want to have XBMC switch to the main Video menu when you press a button, is that correct?

Just let me know a little bit more about those two questions and I can write you a simple XML file to help.

pd
Find all posts by this user
Quote this message in a reply
8th Jan, 2013, 09:52 AM
Post: #3
RE: CEC Remote Help
Hey pd,

thanks for the reply. Its good to know that a lot of the problems with the LG remotes have been ironed out, though actually i still have the problem with changing sources, when i go back to the Pi i cannot use the remote, so not sure what is going on there.

In answer to your questions:

1) I am in the video library when i press the button.
2) I have attached a screenshot to illustrate. I want to be able to map a button on the remote to bring up this menu.

Would be really good if you are able to help at all. Am ok at XML but have got in a muddle trying to edit the remote.xml file as instructed on the various websites i have looked at.



Cheers

Steve


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
8th Jan, 2013, 02:21 PM
Post: #4
RE: CEC Remote Help
Hmm, sorry to hear about the sources switching bug. What is the exact model of your actual TV, as opposed to the remote? I have access to two LG TVs and both are ok with switching sources ATM. I tend to use the Input button as opposed to the Simplink button. Maybe that helps?

Cool that you already know that you need a remote.xml, the path and so forth. Here's an example remote.xml that should enable you to use that menu, which is known as ContextMenu .

Code:
<keymap>

        <global>
                <remote>
                        <skipplus>ContextMenu</skipplus>
                </remote>
        </global>

        <MyVideoLibrary>
                <remote>
                        <skipplus>ContextMenu</skipplus>
                </remote>
        </MyVideoLibrary>

        <MyVideoFiles>
                <remote>
                        <skipplus>ContextMenu</skipplus>
                </remote>
        </MyVideoFiles>

        <FullscreenVideo>
                <remote>
                        <skipplus>StepForward</skipplus>
                </remote>
        </FullscreenVideo>

</keymap>

That should map your >> Fast forward (skipplus) button to the ContextMenu globally and in video files and video library views.

You might want to nominate a different key to assign the ContextMenu to, that's up to you. I'd suggest do the above and if that doesn't get you access to the ContextMenu I don't know what will, LOL, because there's actually duplication there. You can probably omit the two MyVideo* sections as the global section covers that.

Anyway, just in case, the editing procedure that seems to work for me is:

1) Start XBian, wait for it to boot
2) Click the power icon in the bottom left
3) Select "Exit" to close XBMC as cleanly as possible
4) SSH in to the XBian command line / terminal / shell (whatever you like to call it), or log in if you have a keyboard plugged into your Pi
5) Edit remote.xml in ~xbian/.xbmc/userdata/keymaps/remote.xml by adding in the above code
6) run ...

Code:
sudo /etc/init.d/xbmc  start

In other words, in my experience, XBMC does require restarting before it will attempt to use/implement your remote.xml edits.

Good luck!
Find all posts by this user
Quote this message in a reply
10th Jan, 2013, 03:42 AM
Post: #5
RE: CEC Remote Help
Thanks for the instructions! Unfortunately they did not work though :-(

Just one question..I had to create the remote.xml file as it was missing from the keymaps folder, do i have to register this or do anything so that XBMC will read it? It doesn't seem to matter what changes i make to the file it doesn't make any difference to the key mapping.

My TV is an LG 42LM3450. Have tried both the input button and the simplink, doesn't seem to make any different.

Cheers!
Find all posts by this user
Quote this message in a reply
18th Jan, 2013, 01:33 AM
Post: #6
RE: CEC Remote Help
(7th Jan, 2013 03:15 AM)raspberry_pd Wrote:  .....
Secondly, there will be some keys that do not produce the "This function is not available now" message but nevertheless do not do anything in Xbian because they are not passed through the HDMI CEC wire. These include, for example, the red/green/yellow/blue buttons.
.....
pd

pd, why do you say the colored buttons are not passed?
i have a Samsung TV and have these same buttons, Sony TV remote too so I think they are standard these days and they are passed through HDMI CEC wire.

Mine works, and here is the part from xbian remote.xml for them:

Code:
<red>XBMC.ActivateWindow(MyPVR)</red>
      <green>XBMC.ActivateWindow(MyVideos)</green>
      <yellow>XBMC.ActivateWindow(MyMusic)</yellow>
      <blue>XBMC.ActivateWindow(MyPictures)</blue>

I am also trying to remap some of the remote buttons to do other stuff for example I don't care about Music and Pictures, so will try to map Yellow and Blue to work as "Show info" and "Cancel" or other useful commands.

If you guys find links for such mapping and naming kindly share it here
Find all posts by this user
Quote this message in a reply
29th Jan, 2013, 10:25 AM
Post: #7
RE: CEC Remote Help
I just tried this with a 60" LG Plasma (60PA6500) and could not map any of the colored buttons. Mapped fine with the "skipplus" and "skipminus" as raspberry_pd suggested.

FYI my remote is the same as the one pictured.
Find all posts by this user
Quote this message in a reply
18th Feb, 2013, 05:15 PM
Post: #8
RE: CEC Remote Help
(18th Jan, 2013 01:33 AM)FADpi Wrote:  
(7th Jan, 2013 03:15 AM)raspberry_pd Wrote:  .....
Secondly, there will be some keys that do not produce the "This function is not available now" message but nevertheless do not do anything in Xbian because they are not passed through the HDMI CEC wire. These include, for example, the red/green/yellow/blue buttons.
.....
pd

pd, why do you say the colored buttons are not passed?
i have a Samsung TV and have these same buttons, Sony TV remote too so I think they are standard these days and they are passed through HDMI CEC wire.

Mine works, and here is the part from xbian remote.xml for them:

Code:
<red>XBMC.ActivateWindow(MyPVR)</red>
      <green>XBMC.ActivateWindow(MyVideos)</green>
      <yellow>XBMC.ActivateWindow(MyMusic)</yellow>
      <blue>XBMC.ActivateWindow(MyPictures)</blue>

I am also trying to remap some of the remote buttons to do other stuff for example I don't care about Music and Pictures, so will try to map Yellow and Blue to work as "Show info" and "Cancel" or other useful commands.

If you guys find links for such mapping and naming kindly share it here

The coloured buttons are not passed through with LG devices. When it comes to CEC support, there is no 'standard'. Every manufacturer supports CEC to varying levels.

http://libcec.pulse-eight.com/vendor/support

If you have an LG example where the coloured buttons are passed through, I'd be happy to hear about it.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: