HDMI-CEC some buttons not working on Vero2 that do work on Pi2

I have an up-to-date Vero2 connected directly to a Samsung TV.

Most buttons on the TV remote are passed to the Vero2, but not all: The “Guide” button and “P+”/“P-” buttons are controlling the TV directly.

On a Pi2 in the same setup, these three buttons do not control the TV directly and are instead interpreted by Kodi.

Is this a configuration issue that I can fix?

There’s a kodi addon for button configuration which should let you assign the buttons given they are recognized in the first place:
http://kodi.wiki/view/Add-on:Keymap_Editor
It’s pretty self-explanatory.

If the addon doesn’t work there’s also a manual way:

First of all determine which buttons are recognized:
In kodi go to Settings → System → Logging and turn on Enable debug logging.
Then ssh to your vero2 and type in tail -f ~/.kodi/temp/kodi.log |grep OnKey:
Now press the buttons on your remote that aren’t working yet.
If a message shows up in the console you know they are recognized.
Something like this:
1855: 09:11:33 T:1972789248 DEBUG: OnKey: 229 (e5) pressed, action is ContextMenu
It’s also possible you get a name after OnKey: like “guide” or “back”

After that create a remote.xml file:
nano ~/.kodi/userdata/keymaps/remote.xml
The file hast to look like this:

<remote> 
  <guide>Play</guide>
</remote>

In the example I assume the name you get after OnKey:… is “guide”.
And between … you type the desired kodi command/action that should be carried out. In the example its Play.
Here are some commands that can be assigned: http://kodi.wiki/view/Action_IDs
If you are done, press Ctrl + X and y to save the file.
After that restart kodi with systemctl restart mediacenter and you should be able to use the buttons.

1 Like

Thanks, trohn.

I appreciate you taking the time to answer, but I’m pretty sure this is a CEC issue, not a keymap issue.

For example, if I enable debugging and push those three buttons on the remote, then nothing appears in the Kodi log as those buttons aren’t even passed from the TV to the Vero box. In fact, they are controlling the TV directly (opening the TV guide and changing the TV channels.)

Similarly, the Keymap Editor just times out, as it isn’t seeing the button presses either.

Hello

Logs would likely help here, as well as the make and model of the TV. Make sure that you are running the latest version of OSMC as well.

In the recent versions of OSMC on Vero 2, we use libCEC, which is also used on Pi. I would therefore expect CEC functionality to be the same.

Check that both your Pi and Vero 2 are on the same version of OSMC.

Sam

Thanks, Sam.

Logs from a fresh install of OSMC on a Pi 2 + My OSMC updates + apt-get dist-upgrade

http://paste.osmc.io/cidipoxize

Logs from a clean-ish install of OSMC on a Vero 2 (i.e. moved ~/.kodi out of the way before the reboot) + My OSMC updates + apt-get dist-upgrade:

http://paste.osmc.io/hocasidufu

In both cases, I rebooted then pushed “Guide” then “P-” then “P+” then kept using only the TV remote to upload the logs.

On the Pi 2, the “Guide” button did nothing, and the “P-” and “P+” buttons navigated around the Kodi UI.

On the Vero 2, the “Guide” button interacted with the Television UI, and the “P-” and “P+” buttons changed my TV source (so I also had to switch back to the HDMI source).

The television is a Samsung UE48H6400 (with latest software updates.)

Okay, I will look at this. That TV in particular is a little problematic (some GH issues regarding it on the Pulse Eight issue tracker), but if it works on Pi, it should work on the V2.

Sam

It’s probably how Kodi is defined by the TV, recorder vs player or whatever the modes are. Is there a way on the TV in Cec settings to change what Kodi is?

1 Like

Interesting. Vero 2 is configured as a Player by the bootloader but it behaves as a Recorder on Pi. You can try editing this file and see if it fixes things:

Edit /usr/share/kodi/system/peripherals.xml. Change

<setting key="device_type" type="int" value="4" configurable="0" />

to

<setting key="device_type" type="int" value="1" configurable="0" />

This change will be overwritten by future updates, but the plan here is to see if this works for you.

Thanks, Sam.

I made that edit and rebooted, but unfortunately there was no change in behaviour.

I recommend you power off the TV and the device for a few minutes. A reboot may not do the trick.

Still the same behaviour, I’m afraid, even after leaving everything off at the wall for an hour.

Double check the peripherals file. Did you stop Kodi first (see Wiki)? Otherwise when you reboot the file will be rewritten by Kodi and your changes will be overwritten

Sorry for the delay, personal stuff came up.

The peripherals file is still the edited version you suggested, even after multiple reboots.

I have the same problem like androb. (Samsung TV, UE B series) I followed Sam´s advices without success.
I found a file cec_0000_0000.xml in .kodi/userdata/peripheral_data. This file has the same CEC related keys. After stopping Kodi, I change the key device_type to 1. After starting Kodi , the remote keys Guide, Prg … are working again.

1 Like

Thanks for sharing this information @lichtus. It is hard to verify this as I don’t have a TV with problematic keys here. I suspect you will need to change the peripherals.xml and the XML file under peripheral_data for this to work properly.

Thank you, @lichtus, that was the fix for me as well.

I reverted the change under /usr/share, powered off the TV for a while, rebooted the vero, and had the TV scan for CEC devices. The Guide and P+/- buttons continue to work, so it appears that only the file under .kodi needs to be changed. Probably. Maybe.

Thanks also to @Dilligaf and @sam_nazarko for their help.

Hi, I tried this, but the guide and context-menu buttons on my TV remote don’t work.
They were ok with Pi.
Also the key-presses don’t appear in debug mode, when I tail -f the kodi.log
I have Samsung TV. It’s not a Smart TV, but it’s HD LED (about 10 years old).
Will check if I need firmware update in TV, and I’ll revert.

Thanks.
Best regards,
Niall.

This means that the buttons you are using are not passed from your TV to Kodi… Nothing you can do about that unless you can re-program your TV.

Does it even provide CEC support?

well, those buttons worked fine when I was using the Pi … so, it’s hardly the TV to blame :slight_smile:

Any remote button that doesn’t appear when tailing the Kodi log is NOT being passed via CEC to Kodi. Maybe you need to try another HDMI cable.