Remapping OSMC rf remote

Hi,

I just got my new Vero 4k+ \m/ and now I’m playing with the remote that came with it. I’d like to remap some buttons but I’m not sure how to do it properly. I know I need to edit either /etc/eventlirc.d/osmc_rf.evmap or ~/.kodi/userdata/keymaps/keymaps.xml but I don’t know how the keys are named or how to set them to execute a python script or built-in command like CECActivateSource. I would like to set the info button to execute a script and the volume buttons to set the TV volume via cec. Is this documented somewhere?

Thanks!

Willem

You can download an add-on called Keymap Editor which should greatly simplify things for you.

Cheers

Sam

Hey Sam,

thanks for the pointer. Looking at the keymap xml the addon created helped me identify the remote as and find the key codes for the buttons. Though I’m not able to control TV volume through CEC, I can use it’s http api to control volume (it’s an older LG TV) with a python script.

The only thing that’s got me stumped is that the first time the CECActivateSource command doesn’t work. I take the power off most of my electronic equipment at night. After the power’s restored I need to wake the TV once use the IR, after that the CEC command can wake the TV using CEC. It seems the TV needs to ‘register’ with the Vero before CEC commands are properly passed on. Any thoughts on how to fix that?

Willem

Not 100% sure if I understand what you mean (as I have the feeling you wrote it the wrong way around.

  1. TV Remote will always control the TV’s Volume. The TV will not forward the volume command to the Vero via CEC (AFAIK)

  2. The HTTP API will always control the Vero/Kodi volume and not forward that via CEC (AFAIK)

Hey,

it’s the other way around: I’m using the ‘Official OSMC rf Remote’ to change the volume of my TV. The TV does not accept volume commands over CEC afaik, but the tv does have a http api to allow control from the LG android app. I’m using that api to control the TV with the OSMC remote through a python script based on this addon: Kodi.Screensaver.TurnOffLGTV/addon.py at master · filimonic/Kodi.Screensaver.TurnOffLGTV · GitHub

Unfortunately I need to turn the TV on once to get it to turn on over CEC. I need to use CEC to wake the tv from standby because it shuts down its network connection in standby mode.

Willem