CEC remote keys mapping

Hi,

 

I am testing Rasplex for a few days now, and first I would like to congratulate you guys for the great job done.

 

I am a interacting with Rasplex through the remote of my panasonic 42PX71 , (trough CEC

I am a little bit confused by the keys and their functions.

 

I have found out that the folloqing keys or active through CEC:

- up , down, left, right, 

- OK, 

- Return

- Option

 

It seems also that the red, green, blue and yellow keys are active, but I have not been able to understand what they are doing exactly .

Is it documented ? Are there other active keys ?

Its not really well documented anywhere, no. Just takes some experimentation, and, better yet, configuration and tweaking.

I have a Panasonic plasma TV, and my Rasplex pi is connected via HDMI through a Marantz receiver. I have configured a `remote.xml` file that maps some unused or lesser used functionality to useful settings, and reprogrammed my Logitech Harmony remote to make everything work really well. Here is my remote.xml:


  
    
      Play
      FastForward
      Rewind
      Stop
      Left
      Right
      Up
      Down
      Select
    
  

My only issue is that if I switch my receiver from the Rasplex to my DirecTV or Apple TV and then back a little while later, Rasplex seems to lose its CEC handshake with the TV, and I have to either reboot the pi, or simply restart Plex Home Theater. I have configured a little single-tap shortcut in iSSH on my iPhone and iPad to `killall plexhometheater` for this purpose.

I have configured a `remote.xml` file that maps some unused or lesser used functionality to useful settings

Where do you place that file? I'd be interested in something like that as well.

Its not really well documented anywhere, no. Just takes some experimentation, and, better yet, configuration and tweaking.

I have a Panasonic plasma TV, and my Rasplex pi is connected via HDMI through a Marantz receiver. I have configured a `remote.xml` file that maps some unused or lesser used functionality to useful settings, and reprogrammed my Logitech Harmony remote to make everything work really well. Here is my remote.xml:

  
    
      Play
      FastForward
      Rewind
      Stop
      Left
      Right
      Up
      Down
      
    
  

My only issue is that if I switch my receiver from the Rasplex to my DirecTV or Apple TV and then back a little while later, Rasplex seems to lose its CEC handshake with the TV, and I have to either reboot the pi, or simply restart Plex Home Theater. I have configured a little single-tap shortcut in iSSH on my iPhone and iPad to `killall plexhometheater` for this purpose.

Great !

Where do you install this file ?

Is there a list of the available key from the panasonic ? and the corresponding list of possible actions on PHT ?

EDIT: Ok: interesting informations here: http://wiki.xbmc.org/index.php?title=Keymap

Great !

Where do you install this file ?

Is there a list of the available key from the panasonic ? and the corresponding list of possible actions on PHT ?

EDIT: Ok: interesting informations here: http://wiki.xbmc.org/index.php?title=Keymap

I installed it at /storage/.plexht/userdata/keymaps and I think I also installed it at /storage/.plexht/userdata because I wasn't positive which place. Then, I reboot the pi.

I don't know if there is a list of available keys from panasonic. There are some tools out there for exploring and logging CEC commands, but I couldn't get any of them working reliably on the pi, so mostly did trial and error by pushing buttons on the remote to see if they did *anything* at all. If they did, but not what I wanted, I just remapped them in the XML file. 

I'll give this a try. This sounds like a good way to program the remote to reboot the RPI if needed.

The list of commands you programmed (Play,Stop, etc.), where is this configured? Is this a fixed list? 

Thanks!

I installed it at /storage/.plexht/userdata/keymaps and I think I also installed it at /storage/.plexht/userdata because I wasn't positive which place. Then, I reboot the pi.

I don't know if there is a list of available keys from panasonic. There are some tools out there for exploring and logging CEC commands, but I couldn't get any of them working reliably on the pi, so mostly did trial and error by pushing buttons on the remote to see if they did *anything* at all. If they did, but not what I wanted, I just remapped them in the XML file. 

/storage/.plexht/userdata/keymaps was the right pasth form me.

I used your remote.xml file, and added a command for the "exit" button to go back to home screen. 

Thanks to the "cec-client" program (to be executed throug ssh) i have been able to monitor the CEC command received by the Pi. 

Conclusion:

The only buttons that goes through CEC are :

- arrows

- select

- exit (seen as "clear" through CEC)

- option

- the 4 colored buttons.

All others buttons commands are not reaching the Pi.

The list of commands you programmed (Play,Stop, etc.), where is this configured? Is this a fixed list? 

Everything is here:

http://wiki.xbmc.org/index.php?title=Action_IDs

Thanks, i'll try it tonight!

I tried this lat night and it didn't seem to work.

This is the contents of the remote.xml:

 
   
      Info
      OSD
      Rewind
      ShowSubtitles
      Left
      Right
      Up
      Down
      Select
   
 
 
Clicking the colored buttons during playback had 0 effect. I place hte file under /storage/.plexht/userdata/keymaps and restarted the device.
Any suggestions?

I dealt with is as well. In Debug you'll find what is loaded for your system

cat /storage/.plexht/temp/plexhometheater.log |grep "Loading special"

usually it is remote.xml now copy this to userdata

cp /usr/share/xbmc/system/keymaps/remote.xml /storage/.plexht/userdata/keymaps/

check when pressing keys what is send thru Cec

tail -f /storage/.plexht/temp/plexhometheater.log |grep CecLogMessage

and check as well other debug output "OnKey"

tail -f /storage/.plexht/temp/plexhometheater.log |grep "OnKey"

then according on your findings edit the remote.xml file

vi /storage/.plexht/userdata/keymaps/remote.xml

Mine for Panasonic Viera TV remote looks like this: (to be able to use play, pause etc in lower part of the remote (part for VieraConnect player), you need to code the remote. In my case hold the lower power button, press 73 and STOP and release lower power button.)


  
    
      Play
      Pause
      Stop
      FastForward
      Rewind
      Left
      Right
      Up
      Down
      Select
      FullScreen 
      PageUp
      PageDown
      Back
      PreviousMenu
      ContextMenu
      Info
      SkipNext
      SkipPrevious
      FullScreen
      PreviousMenu
      Screenshot
      VolumeUp
      VolumeDown
      Mute
      XBMC.ShutDown()
      reloadkeymaps
      XBMC.ActivateWindow(MySharedContent,plexserver://shared,return)
      XBMC.ActivateWindow(VideoFiles,plexserver://2b1a499bb9906fc5ab5304f4345b90ae365264c0/library/sections/3/all,return)
      XBMC.ActivateWindow(VideoFiles,plexserver://2b1a499bb9906fc5ab5304f4345b90ae365264c0/library/sections/7/all,return)
      Number0
      Number1
      JumpSMS2
      JumpSMS3
      JumpSMS4
      JumpSMS5
      JumpSMS6
      JumpSMS7
      JumpSMS8
      JumpSMS9
    
  
  
    
      XBMC.ActivateWindow(SystemInfo)
      
    
  
  
    
      Number0
      Number1
      Number2
      Number3
      Number4
      Number5
      Number6
      Number7
      Number8
      Number9
      StepBack
      StepForward
      BigStepForward
      BigStepBack
      Stop
      OSD
      OSD
      OSD
      NextSubtitle
      AudioNextLanguage
      Info
      SubtitleDelayPlus
      CodecInfo
      Info
      
	ChapterOrBigStepForward
	ChapterOrBigStepBack
      Playlist
      AudioNextLanguage
      SubtitleDelayPlus
      SubtitleDelayMinus
    
  
....etc

I tried this lat night and it didn't seem to work.

This is the contents of the remote.xml:

 
   
      Info
      OSD
      Rewind
      ShowSubtitles
      Left
      Right
      Up
      Down
     
   
 
 
Clicking the colored buttons during playback had 0 effect. I place hte file under /storage/.plexht/userdata/keymaps and restarted the device.
Any suggestions?

Has anyone succefully remapped the color buttons on their TV remote to do what liight was trying to do? I am trying to do the exact same thing and am getting nowhere. Does Rasplex support mapping of the more exotic keystoke features like OSD or marking as watched or are we only able to map things like play or fast forward etc.?

I managed to figure out how to run a SSH shell and use the "trail" feature to show my button presses and discovered that the color buttons on my particular TV (2013 Vizio) are not registered as button presses by the Pi. Liiight, I am posting this for you in particular just in case you are still trying to figure out why your remote.xml file doesnt seem to do anything.

thanks for the information, ill look into this "trail" feature as well!

I dealt with is as well. In Debug you'll find what is loaded for your system

cat /storage/.plexht/temp/plexhometheater.log |grep "Loading special"

usually it is remote.xml now copy this to userdata

cp /usr/share/xbmc/system/keymaps/remote.xml /storage/.plexht/userdata/keymaps/

check when pressing keys what is send thru Cec

tail -f /storage/.plexht/temp/plexhometheater.log |grep CecLogMessage

and check as well other debug output "OnKey"

tail -f /storage/.plexht/temp/plexhometheater.log |grep "OnKey"

then according on your findings edit the remote.xml file

vi /storage/.plexht/userdata/keymaps/remote.xml

Mine for Panasonic Viera TV remote looks like this: (to be able to use play, pause etc in lower part of the remote (part for VieraConnect player), you need to code the remote. In my case hold the lower power button, press 73 and STOP and release lower power button.)

Hello Issic, any chance you could post your full remote.xml and tell me where you found the long urls for the plex server libraries? I have the same TV and have had only some success remapping remote buttons. 

1) Create Remote.xml

2) Copy Remote.xml to Pi

  • The remote.xml needs to go into  /storage/.plexht/userdata/keymaps/
  • Quick way on a Mac (sorry, someone else can chime in for other OS) is through terminal:
scp /location/remote.xml root@rasplex.local:/storage/.plexht/userdata/keymaps/
  • Where location is the correct location of the file.
  • Depending on your network, you might need to change rasplex.local to an IP address, you can get your IP address by doing these steps on the Pi:
    • Go left and choose System Settings
    • Select Connections - IP address should be listed.
  • If this is the first time, you'll be asked to accept the RSA key, type "yes" and hit enter/return.
  • You'll be asked for password, if this is your first time and everything is default, the password is: rasplex

3) Reboot Pi

  • Either unplug power, or use ssh and reboot.

Issues

  • If nothing works, check to make sure that remote.xml is in the correct place and isn't corrupted. Somehow copying once for me the file corrupted, so I had to redo

Extra Gravy AKA Get Your Remote REALLY Working

If anyone having trouble with the Pi recognizing your extra remote buttons, such as Fastforward/Rewind etc, you might want to try adding this line to your config.txt

hdmi_ignore_cec_init=1

Place it at the end of the config text file and do a power cycle of BOTH the Pi and your TV (just to make sure). You might need to redo your HDMI link, on my Panasonic I can hit Viera Tools, Viera Link, and confirm Player. I have a Panasonic 55" 3D TC something or other model, so your mileage might vary on this one.

Here's what I do with my keymap currently:


 
   
      ContextMenu
      Delete
      AudioNextLanguage
      NextSubtitle
  
 

  • Yellow - brings up the context menu on a file so I can delete.
  • Blue - was an attempt to map straight to a delete action, which is taken from XBMC list, but doesn't actually work, boooo..
  • Red - I can cycle through audio languages while playing
  • Green - I can cycle through subtitles while playing

You can pretty much set any of your buttons on your remote, other than hardcoded ones such as Netflix or whatever, to do various functions. I used to have it set up on a Mac so I could hit 1, 2, or 3 to change the view to recently added, etc.. but that was on the Mac version, and I haven't looked into it yet with the Pi.

That's good info vengeancegoon.

One question which I hope someone knows the answer to, I have used winscp to search rasplex and found that there is a remote.xml file in the following location:

/usr/share/xbmc/system/keymaps

Does putting a remote.xml in to /storage/.plexht/userdata/keymaps/ override what is in /usr/share/xbmc/system/keymaps?

Or does they work together to provide extended functionality???

That's good info vengeancegoon.
 
One question which I hope someone knows the answer to, I have used winscp to search rasplex and found that there is a remote.xml file in the following location:
 
/usr/share/xbmc/system/keymaps
 
Does putting a remote.xml in to /storage/.plexht/userdata/keymaps/ override what is in /usr/share/xbmc/system/keymaps?
 
Or does they work together to provide extended functionality???


Yes, they override.

Regards

Yes, they override.

Regards

Cool, ta Ned.

This is an old thread but do you know if there is a command for launching and closing plex home theater. Some kind on toggle on/off?

The idea is that when pressing red button on tv-remote (panasonic) this will launch plex.