Posts: 1,741
Joined: Jul 2010
Reputation:
10
2020-07-05, 22:39
(This post was last modified: 2020-07-05, 22:41 by meridius.)
Hi all
I bought a flirc and use Logitech harmony hub and the app, I can wake the pic no problem as sending any code wakes the pc. The problem I have is I can not suspend the system as there is no key in the harmony hub to use to do that.
Is there a way to suspend the pc ? Not shutdown as I just can not figure this out. I have read some posts but not to sure on what to do or if there out of date.
Is there a way to send a command to kodi so make it suspend.
Thanks.
Posts: 1,741
Joined: Jul 2010
Reputation:
10
Hi all
I created two xml files called remote and keyboard and did this
<keymap>
<global>
<keyboard>
<red>XBMC.ShutDown()</red>
</keyboard>
</global>
</keymap>
and
<keymap>
<global>
<remote>
<red>XBMC.ShutDown()</red>
</remote>
</global>
</keymap>
but none of that worked ? I can not figure this out any help
thanks
Posts: 1,741
Joined: Jul 2010
Reputation:
10
2020-07-12, 10:02
(This post was last modified: 2020-07-12, 10:20 by meridius.)
Hi all
Got it sorted at last, this is for people who might need this in the future to suspend kodi with a single button press.
The problem is you need to create a IR signal that u don't use and assign that IR code to a key then use keyboard.xml to assign that key to do what you want. The problem is you need a remote that you don't have a device for or a different remote that you can reprogram to work with different TV devices.
I have a Sky TV remote that you can reprogram to different TVs using the built in codes as this remote is designed to be a universal remote. I reprogrammed it to use a Sony TV Codes as I don't own any sony products so the IR will not set something else off in my room. If you don't have such a remote maybe you have a very old one laying around that you no longer have a device that uses it and that would be just as good.
1. load Flirc software and select keyboard and choose a key, I picked F12 as kodi does not use this key
2. Program the power button of the TV remote that you will never use on other devices like I explained above, this will program the power button to F12 of the keyboard inside the flirc hardware.
3. Now you have to program the same IR command into your Harmony remote or like me Harmony Hub and called it F12 Shutdown by using the guides provided for programing a command into your Logitech device.
4. Create a Keyboard.XML file in the keymaps folder and use this format
<keymap>
<global>
<keyboard>
<f12>XBMC.ShutDown()</f12>
</keyboard>
</global>
</keymap>
5. set up an activity in harmony hub and add the command you just created.
it now all works, its abit of a pain and you do need another remote that you don't use on anything to get a IR command programed into flirc and Logitech so that u can use it to do what u want. this guide will work for other keys and commands as well just program any IR signal from the unused remote to do what u need.
What I find strange is flirc keyboard layout does not send any key commands to the PC there all blank and you need to assign them to a IR code. I thought they would of used all the keys in the kodi options but maybe they can not send them as keys and u would need a keyboard driver or something.
at last.
thanks