Jump to content
Flirc Forums
crutonbn

Flirc, Harmony, Kodi and Suspend

Recommended Posts

If you have been wondering on how to make Kodi work with Flirc and Harmony remotes to automatically suspend without you having to call up the shutdown menu or be stuck with the other methods that limit suspend commands to the home screen of Kodi this is how to do it with Kodi v15 at time of writing. Thx to GoodOmens for the tip though his info is a little out of date now so this is a guide on how to do it all.

 

Kodi/Openelec

Go to system information and make a note of it's IP address

Turn on SSH in Kodi services

 

Harmony Software

Devices

Flirc Media Player

Change Device Settings

Power Settings

I want to turn this device off when not in use

I press the same button for on and off

Add command and select PowerOff (if you have messed with poweroff before finding this guide choose the fix command and reset IR code for PowerOff)

Sync remote

 

Go to Flirc software

Select file clear configuration

Select full keyboard

Select Ctrl+F12 (as Kodi wont respond to this at least not yet)

Go to devices on Harmony remote and select Flirc media player then hit the power off key to map it to Ctrl+F12 (requires harmony with display screen or map power off to physical button)

 

From Windows

Download WinSCP

Select SFTP

Input Kodi IP address

Username = root and password = openelec

Once logged in select options\preferences\panels and tick the box for “show hidden files”

Browse to /storage/.kodi/userdata/keymaps folder

Create a file called remote.xml

Copy and paste in the text below, then save (old floppy disk icon)

<keymap>
 <global>
  <keyboard>
   <f12 mod="ctrl">XBMC.Suspend()</f12>
  </keyboard>
 </global>
</keymap>

 

Exit WinSCP

 

Kodi/Openelec

Reboot the system (required for new xml to take effect)

 

Now if all goes well when using Harmony activities the system should go into suspend.

If you've been wondering why not just use the stock Flirc/Kodi power off command combined with the Kodi settings\power saving changing it from shutdown to suspend, this doesn't work. If you go this path the system will always wake up when using any activity and not go into suspend, the stock power off command is bugged somehow like it's being sent multiple times.

Edited by crutonbn

Share this post


Link to post
Share on other sites

I'm running Kodi 15.1 with Windows 10.  I have the "wake" function from suspend working with a Harmony One.  I want to try your solution for a "suspend" function but I am a real beginner. What is "SSH" and where under Services do I find it; I looked for something like it but didn't recognize anything it might be.

Sorry for what is probably a silly question..

Share this post


Link to post
Share on other sites

I'm running Kodi 15.1 with Windows 10.  I have the "wake" function from suspend working with a Harmony One.  I want to try your solution for a "suspend" function but I am a real beginner. What is "SSH" and where under Services do I find it; I looked for something like it but didn't recognize anything it might be.

Sorry for what is probably a silly question..

http://lmgtfy.com/?q=what+is+ssh%3F

and to atone for that

http://kodi.wiki/view/Settings/Services

Share this post


Link to post
Share on other sites

This has been a very helpful thread - many thanks to CRUTONBN for taking the time to document this. This would all work very well if it didn't make the assumption that the MyHarmony default settings for the FLIRC/Kodi device included the keyboard "ctrl-F12" for the PowerOff command. Several other threads which I read also indicated that this was now part of the MyHarmony profile for the device. But it was not the case for me... and I have a few grayer hairs because I didn't validate this first.

I followed the directions to a T, but selecting PowerOff always resulted in the Kodi shutdown menu. I'll spare the reader the variety of things I tried and get to the punchline: MyHarmony put the keyboard "s" for the PowerOff command. I finally validated this by watching the keyboard in the FLIRC software while I pressed the PowerOff button, yep, "s" lit up.

The quick resolution was to the change the line:

<f12 mod="ctrl">XBMC.Suspend()</f12>

To:

<s>XBMC.Suspend()</s>

Bliss at last! Now if I could just figure out why my Harmony activity of turning on the TV, Amp and Kodi takes SO long before it exits and I can use the buttons... But that's for another forum.

Edit:  OK, using the s key wasn't ideal since whenever I needed to enter text in Kodi (search function etc) if I hit s it would suspend. lol  I remapped the PowerOff command on the remote in FLIRC to ctrl-F12, so I'm in line with the "standard"

Cheers!

Robert

Edited by Phydeaux
Additional Information

Share this post


Link to post
Share on other sites

Harmony Software

Devices

Flirc Media Player

Change Device Settings

Power Settings

 

 

 

This is as far as I got - there is no Power Settings in MyHarmony software. Am I missing something?

Share this post


Link to post
Share on other sites

I followed the OP and got this working in suspending and waking up my Windows 10 box with Kodi.  But during the suspend time, any Harmony hub activity or even without Harmony hub activities, the Kodi box will wake up...  I thought by making an xml file as described by the OP, this won't happen.  I am running the latest Krypton release of Kodi.

Any ideas?  Thank you.

Share this post


Link to post
Share on other sites

Now both wake and suspend stopped working... LOL  This has been a very frustrating and confusing experience so far, to say the least.  I think for now, I'll just turn the HTPC on and off manually...  Thinking about trying the SE though.

Edited by DE2000

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×