HID - Power Button (1 Viewer)

chrisonline

MP Donator
  • Premium Supporter
  • August 17, 2007
    515
    37
    44
    Tirol/Wörgl
    Home Country
    Austria Austria
    How to I found which key is mapped for my Harmony Remote "Power Button" inside the HID Mapping?
    If I open the Mapping I don't find any "Power Off" or something similar.

    So how can I change the behaviour of the "Power Off" button of my Harmony Remote?
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,873
    1,801
    Southampton
    Home Country
    United Kingdom United Kingdom
    How do I find which key is mapped for my Harmony Remote "Power Button" inside the HID Mapping? If I open the Mapping I don't find any "Power Off" or something similar.
    Interesting question. My understanding is that the POWER button on a true WMC RC6 remote control sends the SLEEP command, and that this command is intercepted by Windows itself, and never seen by the piece of code that is handling the button presses from the remote control. So MP's "General HID" support will never see the SLEEP command, and so there is no definition for it in the HID mapping. What the application will see is a broadcast message informing all applications that the system is about to sleep, but it is not "General HID" that sees that.

    For a true WMC remote control, you define in the Windows power plan what action the SLEEP button is to perform (sleep, hibernate, or ignore).

    For your Harmony, you can of course define the POWER button to perform any action you like, including multiple actions (you do that using the Harmony software). But ultimately the Harmony must issue the SLEEP command if you want it to turn the HTPC on or off.

    Windows supports only POWER_TOGGLE -- Windows does not have separate POWER_ON and POWER_OFF actions. Using "Activities" on my Harmony 650 remote, the absence of separate ON and OFF actions does not cause a problem, because the Hamony 650 does state tracking.

    What exactly are you trying to do with your Harmony POWER button(s)?

    -- from CyberSimian in the UK
     

    chrisonline

    MP Donator
  • Premium Supporter
  • August 17, 2007
    515
    37
    44
    Tirol/Wörgl
    Home Country
    Austria Austria
    Thanks for your answer.
    I want that the power button starts a windows batch file.
    Inside the batch file I send some commands and afterwards the command standby.

    For example:
    1.) Tap on power button
    2.) Turn off the hue lights
    3.) PC Sleep
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,873
    1,801
    Southampton
    Home Country
    United Kingdom United Kingdom
    I want that the power button starts a windows batch file. Inside the batch file I send some commands and afterwards the command standby.
    If you are using PowerScheduler, there is a setting in "Advanced Mode" that allows you to specify the name of a BAT file to be invoked just before sleep and just after wake; look at "Run command before standby / after wakeup":

    http://wiki.team-mediaportal.com/1_...lugins/Power_Scheduler/2_Server_Configuration

    I have never used this myself, so I am not sure whether it will do what you want.

    -- from CyberSimian in the UK
     

    chrisonline

    MP Donator
  • Premium Supporter
  • August 17, 2007
    515
    37
    44
    Tirol/Wörgl
    Home Country
    Austria Austria
    Thanks, but it seems it does not work or not on manually Sleep.
    I think it only works when the PowerScheduler turns the PC to sleep.
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,873
    1,801
    Southampton
    Home Country
    United Kingdom United Kingdom
    Thanks, but it seems it does not work or not on manually Sleep. I think it only works when the PowerScheduler turns the PC to sleep.
    You could try this:

    http://win7suspendresume.codeplex.com/

    I have never used it myself, but it might do what you want. It seems that it was written for Windows 7, but there is one report that says that it does not work on Windows 10. (Your system specs indicate that you are still using Windows 7.) If you try it and it works, please report back!

    -- from CyberSimian in the UK
     

    Users who are viewing this thread

    Top Bottom