Send command from Harmony remote to exit XBMC
#1
I'm trying to get my Harmony remote (the Smart Control one) to exit XBMC by pressing a key on the remote, much like pressing the menu button opens it up. I could have sworn I was able to do this before but I can't find the option now. Basically, I need the "Shutdown" command to be sent, because in XBMC I have that set to exit the app rather than power down the machine. Does anybody know how to get this to work? I tried making a keyboard.xml file but failed to get it to do what I wanted.
Reply
#2
Try adding in the <global> section of your keyboard.xml:
Code:
<some-remote-key>XBMC.ShutDown()</some-remote-key>
Reply
#3
Thanks! The problem, though, is that I have no idea what "some remote key" would be. I can't find a list of harmony remote keys anywhere.
Reply
#4
If you use Plex Player device profile you should be able to map F1, F2 etc. so use those. To make sure, go to myharmony(it's programmed there, right?) and check which buttons are available.
Reply
#5
You could also try enabling debug logging in XBMC, pressing an unused button on your remote and then examing your debug log (wiki) to see if the keypress was recognized by XBMC and by what key name.
Reply
#6
Here's what my keyboard.xml looks like:

Code:
<keymap>
    <global>
        <keyboard>
            <F13>XBMC.ShutDown()</F13>
            <F14>XBMC.ShutDown()</F14>
        </keyboard>
    </global>
</keymap>

I have it placed in User/Library/Application Support/XBMC/userdata/keymaps/keyboard.xml. In the harmony remote setup, I can have F13 and F14 commands set to a button on the remote, but when I press it, nothing happens.

Am I doing something incorrectly?
Reply
#7
Bump - anybody able to help with this? I'd really appreciate it!
Reply
#8
By default, the Exit button should take you to the shutdown menu from the home screen. So if you're somewhere else, just hit exit several times till you're at the shutdown menu. If you have one button that directly shuts it down, you're likely to hit it by accident and regret it. At least I would be.
LibreELEC 10.0.4 * ViMediaManager or TinyMediaManager | Raspberry pi 4b
Sharing media from NAS via NFS (optical out to receiver, HDMI to TV) | TV remote with CEC / Bluetooth keyboard
Reply
#9
What I'm trying to do is have XBMC automatically exit when I hit the universal "off" button on the remote. I can make it start by itself when I turn everything on without any issue. The reason I want to do this is so that it eliminates any standing problems from memory leaks and also automatically updates the XBMC library every time I turn on TV.
Reply
#10
That would be cool. Please let us know if you figure out how to do it.
Also, how do you start XBMC when you start the activity on the remote?
Does it also wake up the computer or whatever?
I just hit the menu button and it does both (after I start the activity).
LibreELEC 10.0.4 * ViMediaManager or TinyMediaManager | Raspberry pi 4b
Sharing media from NAS via NFS (optical out to receiver, HDMI to TV) | TV remote with CEC / Bluetooth keyboard
Reply
#11
(2013-10-12, 20:08)yanathin Wrote: Here's what my keyboard.xml looks like:

Code:
<keymap>
    <global>
        <keyboard>
            <F13>XBMC.ShutDown()</F13>
            <F14>XBMC.ShutDown()</F14>
        </keyboard>
    </global>
</keymap>

I have it placed in User/Library/Application Support/XBMC/userdata/keymaps/keyboard.xml. In the harmony remote setup, I can have F13 and F14 commands set to a button on the remote, but when I press it, nothing happens.

Am I doing something incorrectly?

Hi yanathin,

It's been a long time since you posted this, but I have just mapped a key (F12 in my case) to exit XBMC and I just wanted to let you know how I did it.

Actually you are almost done, but I am afraid you are placing the keyboard.xml file in the wrong folder: I am running Windows 7 and the correct folder to copy the edited keyboard file is: C:\Users\[your name here]\AppData\Roaming\XBMC\userdata
Please note that the appdata folder might be hidden by default.

Once you copy the edited keyboard file into the correct folder you should be able to exit XBMC using whatever key you want to use.

Cheers
TV: Pioneer PDP-LX5090H; BD player: Pioneer BDP-LX58-K; AV receiver: Pioneer SC-LX56-K; HTPC: OrigenAE M10 (i3 6100); NAS: Synology DS213j; Game Consoles: Xbox One & Xbox 360 250 GB ("Slim"); Speakers: Focal-Jmlab Chorus S; Sub: SVS PB-1000; Universal remote: Logitech Harmony Ultimate.
Reply
#12
Nope, he put it in exactly the right place for a mac. But I wonder if it is the right kind of file. Mine is named joystick.Harmony.xml, and the commands are in
Code:
<keymap>
  <global>
    <joystick name="Harmony">
and the commands are of the form
Code:
<button id="1">Up</button>
LibreELEC 10.0.4 * ViMediaManager or TinyMediaManager | Raspberry pi 4b
Sharing media from NAS via NFS (optical out to receiver, HDMI to TV) | TV remote with CEC / Bluetooth keyboard
Reply

Logout Mark Read Team Forum Stats Members Help
Send command from Harmony remote to exit XBMC0