CEC With Amp remote

I’ve recently decided to update to OSMC from a 2 year old install of Raspbmc that has been serving me well - but I’m doing this on a new rPi so I can still go back to the old one if I can’t get this working.

I’ve done a fresh install of OSMC this evening and it’s booted up fine and I can control it with my keyboard but previously I had XBMC working with my Yamaha amp’s remote via CEC.

I have disabled CEC on my TV, Blu-Ray and other devices - it is simply used for allowing me to use the Up, Down etc… buttons on my amp’s remote to control XBMC - this was (and still is if I plug it back in) working perfectly with my old XBMC installation on my other Pi.

However, on booting OSMC nothing is happening. I seem to remember I had to do something to RaspBMC to make it work, I just can’t remember what (yeah useful I know, sorry…). I believe it’s something to do with them not being the standard buttons / tv remote?

Anyway, if I SSH into OSMC and run cec-client and press the UP button on the remote I get:

DEBUG:   [            9176]	device Audio (5) status changed to present after command give device vendor id
WARNING: [            9326]	unhandled response received: opcode=87 initiator=1 destination=f response=0
TRAFFIC: [            9395]	>> 51:44:01
DEBUG:   [            9395]	SetCurrentButton up (1) D:0ms cur:1
DEBUG:   [            9395]	key pressed: up (1) current(ff) duration(0)
DEBUG:   [            9395]	Changed key up (1) D:0ms cur:ff
DEBUG:   [            9396]	key pressed: up (1, 0)
DEBUG:   [            9396]	CheckKeypressTimeout T:927.791
DEBUG:   [            9396]	Key up: idle (duration:0) (1) timeout:8ms (rel:500,rep:0,prs:500,rel:0)
DEBUG:   [            9397]	>> Audio (5) -> Recorder 1 (1): user control pressed (44)
TRAFFIC: [            9472]	>> 51:8b:01
DEBUG:   [            9473]	key released: up (1) D:77ms
DEBUG:   [            9473]	>> Audio (5) -> Recorder 1 (1): vendor remote button up (8B)

So the Pi is picking up the commands - but Kodi isn’t responding to them. I know this is something I need to configure I just can’t remember what.

If I enable DEBUG logging on the new OSMC install when I press the UP button I see

17:52:39.194 T:2875675632   DEBUG: PushCecKeypress - received key a6 duration 0 (rep:0 size:0)
17:52:39.196 T:2875675632   DEBUG: PushCecKeypress - added key a6
17:52:39.430 T:2875675632   DEBUG: PushCecKeypress - received key a6 duration 239 (rep:0 size:1)
17:52:39.431 T:2875675632   DEBUG: PushCecKeypress - replaced key a6

So I think it’s mostly working, I just need to convince OSMC to listen to those buttons - I’m just not sure how to do. Is it mapping ‘a6’ to something?

If I look on my old installation when pressing the UP button I get this:

18:16:36 T:2952787008   DEBUG: PushCecKeypress - received key a6 duration 0
18:16:36 T:3038867456   DEBUG: OnKey: 166 (0xa6) pressed, action is Up
18:16:36 T:2952787008   DEBUG: PushCecKeypress - received key a6 duration 247

As you can old XBMC is capturing the key press and identifying an action

Can anyone give me any pointers please?

FYI I defined a user remote.xml in it:

<keymap>
  <global>
    <remote>
      <a6>Up</a6>
    </remote>
  </global>  
</keymap>

No luck…

Not sure if I used to have to hack the code with XBMC… (have a vague memory of recompiling ButtonTranslator.cpp…

You could try using the keymap editor Add on
http://kodi.wiki/view/Add-on:Keymap_Editor

Thanks, I tried but no luck I’m afraid.

When assigning a new key it doesn’t seem to detect the button presses.

It’s almost like Kodi is detecting them on the CEC bus but then ignoring them