Solved Just bought a flirc need help on suspend.
#1
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.
Reply
#2
(2020-07-05, 22:39)meridius Wrote: 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.

Simplest way is to change your power down settings so that the power button sleeps your PC rather than power it down. You can then use your remote's power button to sleep/wake the PC.

Microsoft's PSTools: https://docs.microsoft.com/en-us/sysinte...ds/pstools has a command line option to sleep your PC. I use command:

psshutdown.exe -d -v 0 -t 0

You can put this in a .bat file, assign a key to it in Windows and then assign that key to a button on your remote.

You can also suspend from within Kodi from the power down menu.

Andy
Reply
#3
(2020-07-05, 22:39)meridius Wrote: 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.

Try using the addon called Keymap Editor.
Reply
#4
(2020-07-06, 13:30)AndyHenderson Wrote:
(2020-07-05, 22:39)meridius Wrote: 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.

Simplest way is to change your power down settings so that the power button sleeps your PC rather than power it down. You can then use your remote's power button to sleep/wake the PC.

Microsoft's PSTools: https://docs.microsoft.com/en-us/sysinte...ds/pstools has a command line option to sleep your PC. I use command:

psshutdown.exe -d -v 0 -t 0

You can put this in a .bat file, assign a key to it in Windows and then assign that key to a button on your remote.

You can also suspend from within Kodi from the power down menu.

Andy


That seems very long winded just to suspend the pc. I know u can use the power down menu but the iOS remote does not have a command for that.

Why do u need to get extra software and create batch files just to suspend kodi ?
Reply
#5
(2020-07-06, 13:44)Sidewinder_2011 Wrote:
(2020-07-05, 22:39)meridius Wrote: 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.

Try using the addon called Keymap Editor.


Thanks I might look at that. I just find it strange that it's so hard to suspend kodi with flirc and Logitech harmony iOS app. I think flirc acts like a keyboard but i would of thought there would be a simple way to suspend it with a single key or command from Logitech app to flirc.
Reply
#6
Simple: In Control Panel\Hardware and Sound\Power Options
On the left menu click "choose what the power buttons do"

You will then also have to configure your PC to wake from sleep like this: https://www.intowindows.com/wake-pc-from...indows-10/
Reply
#7
(2020-07-07, 12:49)fredfred Wrote: Simple: In Control Panel\Hardware and Sound\Power Options
On the left menu click "choose what the power buttons do"

You will then also have to configure your PC to wake from sleep like this: https://www.intowindows.com/wake-pc-from...indows-10/

why are you telling me how to wake my pc I don't have that problem waking my  pc as any command to flirc just wakes it anyway, why are you all telling me to use extra software and go to windows control options when all I need to do is make kodi suspend from a control command from a ipad ios Logitech harmony remote app to flirc to kodi.  how can it be so hard to shutdown the pc from kodi without using menus and extra software and changing windows settings. when all I need is to suspend kodi from a single button press. there must be a way

thanks
Reply
#8
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
Reply
#9
FLIRC appears to the PC as a keyboard, so that is the type of keymap you'll need to use.

The simplest way to get it working is to use their programming app which you can use to assign remote key presses to keyboard keys, and then set up the keymap based on those (remember that Kodi already has a number of pre-defined keyboard (wiki) inputs).

Your maps above won't work as I don't know any keyboard out there that has a "red" button.

In case of ongoing issues, what you can do is enable debug logging, and then every keypress that Kodi receives is logged into the debug log (wiki). You can use that to identify which key you should actually be mapping from the input you want.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#10
FWIW, I've never had any luck mapping remote-specific buttons even though there are bits in the wiki that say it should be possible.

Instead, I've used the number buttons to do specific tasks because they aren't used much in Kodi (the only issue I've encountered is picture viewing) and remapping is reliable.

For example:

xml:
<keymap>
  <global>
    <keyboard>
      <zero>XBMC.ActivateWindow(shutdownmenu)</zero>
      <one>Info</one>
      <two>ContextMenu</two>
      <three>ToggleFullScreen</three>
    </keyboard>
  </global>
</keymap>

Andy
Reply
#11
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
Reply
#12
Thread marked solved.
Reply

Logout Mark Read Team Forum Stats Members Help
Just bought a flirc need help on suspend.0