Following a number of requests for help on remapping CEC remote buttons I offer the following info:
Various people have been trying to determine the key values for CEC button presses by issuing the command ‘irw’, this only works for determining IR remote button presses not CEC.
To determine the key value for CEC button presses you need to make sure debug is on then enter the following command:
tail -F /storage/.plexht/temp/plexhometheater.log
This will give you a real time view of the log in an SSH session.
If you press the blue button on your remote you should see something like this:
21:37:25 T:1182790720 DEBUG: CecLogMessage - >> 01:45:71
21:37:25 T:1182790720 DEBUG: CecLogMessage - >> TV (0) -> Recorder 1 (1): user control release (45)
21:37:25 T:1182790720 DEBUG: CecCommand - processing command: initiator=0 destination=1 opcode=45
21:37:25 T:1182790720 DEBUG: CecLogMessage - key released: F1 (blue) (71)
21:37:25 T:1182790720 DEBUG: PushCecKeypress - received key fe duration 376
Once you know which button has been pressed you can use the information to create a keymaps.xml file with your own custom keys.
For info on creating a keymaps.xml file see this post https://forums.plex.tv/topic/92902-how-do-i-configure-an-ir-remote-lircmapxml/?p=841628
Regards
Forgot to mention your new keymap.xml file needs to be placed in /storage/.plexht/userdata/keymaps/ directory.
It would be useful to others if you could post your custom keymap.xml in this forum as an attachment with details about which TV make/model it relates to to help others.
Thanks
PIN THIS THREAD!!!
Legend!
Edit.
Typed that in on putty.exe and it’s not working. Getting this problem…
You've missed the relevant part of the log as other errors encountered after the CEC entries has made it scroll 'off screen',PIN THIS THREAD!!!!!!!
Legend!
Edit.
Typed that in on putty.exe and it's not working. Getting this problem...
Try with a SD file with no subtitles. have you turned debug on in Rasplex?
Looks like my return/back button is labelled “clear”
I’m off to make that the back button. Weird part is that in menus. That button gives me a blank screen and putty goes on about SECRETSTUFF and weather!?
Throwback to XBMC, my Back button is 'Exit'Looks like my return/back button is labelled "clear"
I'm off to make that the back button. Weird part is that in menus. That button gives me a blank screen and putty goes on about SECRETSTUFF and weather!?
Hope you're a happy chappy now.
Regards
Very happy. My nagging paid off :DThrowback to XBMC, my Back button is 'Exit'
Hope you're a happy chappy now.
Regards
My END button is "exit" so do I make two "exit" buttons or I could make one of them be keypress 1 and make my pin 1111.
Hahaha!
Thanks again Ned.
Very happy. My nagging paid off :D
My END button is "exit" so do I make two "exit" buttons or I could make one of them be keypress 1 and make my pin 1111.
Hahaha!
Thanks again Ned.
You flatter yourself!
Constantly! One of the many perks of being a jammy ■■■■■■■.
See attached my custom remote.xml file for my Samsung TV remote.
It fixes the Return and Exit buttons on the remote, which drove me crazy until I used trial and error to eventually fix everything about a year ago.
RETURN button: goes back a screen
EXIT button: goes back to Home screen
Green button: Shows metadata info during playback
Yellow button: Shows context menu
Blue button: Toggles subtitles during playback
Red button: goes back to Home screen (same as EXIT button).
Some of the buttons on the remote that you think would be good for Context Menu, Settings etc cannot actually be mapped as they are reserved for Samsung (eg Tools, Info and Menu buttons)
Rename the attached to remote.xml and copy it to your userdata/keymaps folder. Works in my case for both PHT on a Windows machine (using a HDMI-CEC adapter) and Rasplex on the pi / pi2.
Hi,
My first Rasperry Pi here, version 2
Install etc worked flawlessly.
Thanks heaps for the effort put in.
I did start with XBMC but compared to Plex it's rubbish :)
Just a couple of things I thought I would mention
Samsung new 9 series remote using hdmi-cec the back / return button not working.
It brings up what looks like a console type debug command which shows a whole heap of information about cpu, cache, memory usage etc. 4 lines of info up the top of the screen
Makes it, not impossible to use, (I can bring up the tools and select PT Main Menu to go back) but close to it. :(
I tried DVBLink live TV and could get sound but no picture. This worked when I had XBMC installed
I think I also had the issue where the movie wouldn't resume from where it left of and go back to the start , but that seemd to resolve itself after a few times.
(Yes the Plex is installed directly onto the TV, but I'm testing the Pi2 so..)
All in all fantastic first release you should be proud
Not all TV manufacturers implement CEC the same with regard to button configuration, they map buttons that fit with their range of CEC enabled devices, not necessarily any third party devices.
However, all is not lost, see this topic https://forums.plex.tv/topic/150209-cec-remote-buttons-how-do-i-find-out-which-button-has-been-pressed/?p=865067, with 10 minutes work you be able to map your remotes buttons to something better suited to yourself.
Regards
Thanks Ned,
Without keymap
1853: 09:11:33 T:1811936352 DEBUG: CecLogMessage - key pressed: return (Samsung) (91)
1855: 09:11:33 T:1972789248 DEBUG: OnKey: 229 (e5) pressed, action is ContextMenu
1869: 09:11:34 T:1811936352 DEBUG: CecLogMessage - key pressed: return (Samsung) (91)
1871: 09:11:34 T:1972789248 DEBUG: OnKey: 229 (e5) pressed, action is Back
1875: 09:11:37 T:1811936352 DEBUG: CecLogMessage - >> TV (0) -> Recorder 1 (1): user control pressed (44)
1876: 09:11:37 T:1811936352 DEBUG: CecLogMessage - key pressed: F2 (red) (72)
1878: 09:11:37 T:1972789248 DEBUG: OnKey: 251 (fb) pressed, action is XBMC.ActivateWindow(MyPVR)
1890: 09:11:40 T:1811936352 DEBUG: CecLogMessage - >> TV (0) -> Recorder 1 (1): user control pressed (44)
1891: 09:11:40 T:1811936352 DEBUG: CecLogMessage - key pressed: F3 (green) (73)
1893: 09:11:40 T:1972789248 DEBUG: OnKey: 252 (fc) pressed, action is XBMC.ActivateWindow(MyVideos)
1943: 09:11:43 T:1811936352 DEBUG: CecLogMessage - >> TV (0) -> Recorder 1 (1): user control pressed (44)
1944: 09:11:43 T:1811936352 DEBUG: CecLogMessage - key pressed: F4 (yellow) (74)
1946: 09:11:43 T:1972789248 DEBUG: OnKey: 253 (fd) pressed, action is XBMC.ActivateWindow(MyMusic)
1976: 09:11:46 T:1811936352 DEBUG: CecLogMessage - >> TV (0) -> Recorder 1 (1): user control pressed (44)
1977: 09:11:46 T:1811936352 DEBUG: CecLogMessage - key pressed: F1 (blue) (71)
1979: 09:11:46 T:1972789248 DEBUG: OnKey: 254 (fe) pressed, action is XBMC.ActivateWindow(MyPictures)
With keymap
2018: 09:23:12 T:1871135840 DEBUG: CecLogMessage - key pressed: return (Samsung) (91)
2020: 09:23:12 T:1971961856 DEBUG: OnKey: 229 (e5) pressed, action is ContextMenu
2035: 09:23:14 T:1871135840 DEBUG: CecLogMessage - key pressed: return (Samsung) (91)
2037: 09:23:14 T:1971961856 DEBUG: OnKey: 229 (e5) pressed, action is Back
2303: 09:23:33 T:1871135840 DEBUG: CecLogMessage - key pressed: F2 (red) (72)
2305: 09:23:33 T:1971961856 DEBUG: OnKey: 251 (fb) pressed, action is back
2041: 09:23:16 T:1871135840 DEBUG: CecLogMessage - >> TV (0) -> Recorder 1 (1): user control pressed (44)
2042: 09:23:16 T:1871135840 DEBUG: CecLogMessage - key pressed: F3 (green) (73)
2044: 09:23:16 T:1971961856 DEBUG: OnKey: 252 (fc) pressed, action is FullScreen
2048: 09:23:18 T:1871135840 DEBUG: CecLogMessage - >> TV (0) -> Recorder 1 (1): user control pressed (44)
2049: 09:23:18 T:1871135840 DEBUG: CecLogMessage - key pressed: F4 (yellow) (74)
2051: 09:23:18 T:1971961856 DEBUG: OnKey: 253 (fd) pressed, action is PreviousMenu
2202: 09:23:26 T:1871135840 DEBUG: CecLogMessage - >> TV (0) -> Recorder 1 (1): user control pressed (44)
2203: 09:23:26 T:1871135840 DEBUG: CecLogMessage - key pressed: F1 (blue) (71)
2205: 09:23:26 T:1971961856 DEBUG: OnKey: 254 (fe) pressed, action is ToggleWatched
This works for now
But I really wanted to get 1853: 09:11:33 T:1811936352 DEBUG: CecLogMessage - key pressed: return (Samsung) to be "back"
Maybe because it dosen't announce this first CecLogMessage - >> TV (0) -> Recorder 1 (1): user control pressed (44) it's not mappable?
Hope someone can work it out though
Remote Picture
PreviousMenu
FullScreen
ToggleWatched
back
OSD
Info
CodecInfo
back
See attached my custom remote.xml file for my Samsung TV remote.
It fixes the Return and Exit buttons on the remote, which drove me crazy until I used trial and error to eventually fix everything about a year ago.
RETURN button: goes back a screen
EXIT button: goes back to Home screen
Green button: Shows metadata info during playback
Yellow button: Shows context menu
Blue button: Toggles subtitles during playback
Red button: goes back to Home screen (same as EXIT button).
Some of the buttons on the remote that you think would be good for Context Menu, Settings etc cannot actually be mapped as they are reserved for Samsung (eg Tools, Info and Menu buttons)
Rename the attached to remote.xml and copy it to your userdata/keymaps folder. Works in my case for both PHT on a Windows machine (using a HDMI-CEC adapter) and Rasplex on the pi / pi2.
Does this solve the issue in 0.5.1 where EXIT does not stop the playing of the media file (audio continues)?
thanx! used Elantra04's keymap for combination
Samsung TVUE37D6350
Samsung Remote AA59-00445A (delivered with TV) http://ecx.images-amazon.com/images/I/611LE4ewlJL._SL1280_.jpg
RaspberryPI2
Works like a charm.
Note: pressing "Guide" button reboots my Raspberry PI. Have to change that one.... :-)
Follow the instructions and remap the button, obviously it's mapped on your version of the remote to 'Restart'. Glad your liking it :-)thanx! used Elantra04's keymap for combination
Samsung TVUE37D6350
Samsung Remote AA59-00445A (delivered with TV) http://ecx.images-amazon.com/images/I/611LE4ewlJL._SL1280_.jpg
RaspberryPI2
Works like a charm.
Note: pressing "Guide" button reboots my Raspberry PI. Have to change that one.... :-)
Regards
Does this solve the issue in 0.5.1 where EXIT does not stop the playing of the media file (audio continues)?
In a way, yes ;-) I've remapped the EXIT button on the remote so that it returns you to home. And the RETURN button therefore correctly goes back a screen. However if you press RETURN during playback then the video continues to play in the background as you describe. You should really be hitting the STOP button to stop playback, but otherwise if you accidently hit the RETURN button during playback then I've configured the BLUE button to return to playback (where you can then hit STOP).
thanx! used Elantra04's keymap for combination
Samsung TVUE37D6350
Samsung Remote AA59-00445A (delivered with TV) http://ecx.images-amazon.com/images/I/611LE4ewlJL._SL1280_.jpg
RaspberryPI2
Works like a charm.
Note: pressing "Guide" button reboots my Raspberry PI. Have to change that one.... :-)
Forgot I added that! I've only ever needed to use it a handful of times, Rasplex is stable enough now that a reboot is rarely necessary.
posted in error
Regards
What if you press EXIT during playback? Does it stop the playback? I'm trying to figure out a way to make RETURN or EXIT automatically stop playback.
In a way, yes ;-) I've remapped the EXIT button on the remote so that it returns you to home. And the RETURN button therefore correctly goes back a screen. However if you press RETURN during playback then the video continues to play in the background as you describe. You should really be hitting the STOP button to stop playback, but otherwise if you accidently hit the RETURN button during playback then I've configured the BLUE button to return to playback (where you can then hit STOP).
Forgot I added that! I've only ever needed to use it a handful of times, Rasplex is stable enough now that a reboot is rarely necessary.
What if you press EXIT during playback? Does it stop the playback? I'm trying to figure out a way to make RETURN or EXIT automatically stop playback.
However you control Rasplex, keyboard or remote, 'Exit' will do what it says - it will exit the current item that has focus, screen, pop up, etc, it is a navigation key, not a playback key. If you want to stop playback on any screen press the 'Stop' key/button. Obvious really!
However you control Rasplex, keyboard or remote, 'Exit' will do what it says - it will exit the current item that has focus, screen, pop up, etc, it is a navigation key, not a playback key. If you want to stop playback on any screen press the 'Stop' key/button. Obvious really!
Is this a standard for just rasplex, the function you describe for esc and back?
As PHT does stop playback with esc and back.
See: https://forums.plex.tv/topic/150209-cec-remote-buttons-how-do-i-find-out-which-button-has-been-pressed/?p=881090