[solved] - Remote / HID-Handler: Harmony Smart Hub

Discussion in 'General Support' started by HTPCSourcer, December 20, 2015.

  1. HTPCSourcer
    • Team MediaPortal
    • Administrator

    HTPCSourcer MP2 Product Manager

    Joined:
    May 16, 2008
    Messages:
    10,540
    Likes Received:
    1,106
    Gender:
    Male
    Ratings:
    +2,377 / 21
    Home Country:
    Germany Germany
    Show System Specs
    Hi @Stéphane Lenclud ,

    I am using a Logitech Smart Control Hub. The hub came with a small remote. Besides standard keys such as "Guide" there is also a key "Menu", however, the latter is currently doing nothing. Using extended logging, I found out that this key is received with code "0032"

    I would like to assign the "Green button" functionality to this key, or rather have this key get me to the main MP homescreen from anywhere within MediaPortal. So I began looking in the MP configuration but was unable to identify the respective function. In the past we used to have the associated codes displayed in the menu, which made such tasks easier ;). Can you tell me, which entry to modify?



    I also looked in the Wiki, which mentions the Generic-HID.xml. It appears that the MP Config is updating this file. There is no reference to a cmdproperty32 though. So how do keymap.xml and genric-hid.xml play together? I also see a Microsoft MCE.xml in the same path, dated Oct 2014. Is this actively used or legacy from previous installs?

    Actually it is a little bit confusing as the Wiki is not completely up-to-date in this respect and contains some outdated/contradictive information when using 1.13.
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Stéphane Lenclud
    • Team MediaPortal

    Stéphane Lenclud Development Group

    Joined:
    April 29, 2013
    Messages:
    2,562
    Likes Received:
    657
    Gender:
    Male
    Ratings:
    +1,270 / 8
    Home Country:
    Germany Germany
    Show System Specs
    That's exactly what "Green Button" does in the default HID config. I would recommend changing the key on the remote rather than the HID config.

    They don't. They belong to different systems.

    That one belong to our retired MCE handler. It should not be distributed from 1.13 onward. No harm leaving it there though.

    Which device did you use from Harmony? I used the 'HP Media Center' but then I had it learn quite a few missing keys from various smartphone apps or other remotes I have laying around.
    I got myself an Harmony 950 recently and I'm now using the long press on the 'Ok' button for the Green Button command. I find you don't use the Green Button so often anyway so long press is perfect. You just use it to start MP and go back to the Home Screen.
     
  4. HTPCSourcer
    • Team MediaPortal
    • Administrator

    HTPCSourcer MP2 Product Manager

    Joined:
    May 16, 2008
    Messages:
    10,540
    Likes Received:
    1,106
    Gender:
    Male
    Ratings:
    +2,377 / 21
    Home Country:
    Germany Germany
    Show System Specs
    This is a possibility, however, it requires unplugging the hub from where it is now, connect it via USB with another PC, boot it and then find the corret setup, which is not really obvious with their software.

    So it's safe to delete it, right?

    Microsoft Media Center PC

    Not sure if short and long is differentiated for standard keys.

    Anyway, any experiment to change one key on the remote is takes an eternity, whereas changing a setting in a xml file is a matter of a few seconds. Can you give me some advice on what to do to define a definition for 032?
     
  5. Stéphane Lenclud
    • Team MediaPortal

    Stéphane Lenclud Development Group

    Joined:
    April 29, 2013
    Messages:
    2,562
    Likes Received:
    657
    Gender:
    Male
    Ratings:
    +1,270 / 8
    Home Country:
    Germany Germany
    Show System Specs
    I don't have a hub so I can't tell really. I'm using my remote in IR mode only. I'd thought it should be quite straight forward though.

    I'm not sure I tried this one.

    You can program every key on your Harmony with different functions for long and short presses. That's the Harmony killer feature in my opinion.

    I'm not sure what's 32 to be honest. HID code belong to various namespace so you can't do much without the namespace it belongs to.

    Try the following:
    Open Genreic-HID.xml and look up the action for GreenStart.
    Copy it and put it inside the Ext0 button block as Ext0 could be your 32.
     
    • Like Like x 1
  6. Stéphane Lenclud
    • Team MediaPortal

    Stéphane Lenclud Development Group

    Joined:
    April 29, 2013
    Messages:
    2,562
    Likes Received:
    657
    Gender:
    Male
    Ratings:
    +1,270 / 8
    Home Country:
    Germany Germany
    Show System Specs
    • Thank You! Thank You! x 2
  7. HTPCSourcer
    • Team MediaPortal
    • Administrator

    HTPCSourcer MP2 Product Manager

    Joined:
    May 16, 2008
    Messages:
    10,540
    Likes Received:
    1,106
    Gender:
    Male
    Ratings:
    +2,377 / 21
    Home Country:
    Germany Germany
    Show System Specs
    I guess, I should download the manual and read it.

    Well, yes and no. What I mean is that for major changes such as modifying key responses the hub needs to be connected via USB to a PC where the Harmony Software is installed - in my case on a different PC. Hence I need to plug it on there, wait for the hub to boot, do the changes, unplug, connect it back to power in the other room, wait for it to boot, test , etc.... Yes, I could of course install the My Harmony on the other PC but so far preferred to manage eveything from one central point. But the long-OK to get to the menu is an appealing idea of yours.

    You are losing me here. My knowledge about these things is close to zero. However, my understanding would be that a standard MCE remote triggers the same actions in MediaPortal as it would in WMC, correct? For example I checked the code that gets logged in MP when I press "DVD Menu" on my MCE clone, which is 0024. Unfortunately the clone doesn't have a "Menu" button" to compare against. By the way, my MP (1.13) does funny things when pressing this button: When on home screen, it starts Live TV. Clicking it again brings up the mini-guide, but that's a different subject.

    Basically I am trying to understand at what place and by what associations a code such as 0024 (DVD Menu) gets mapped to an action. As it stands this appeares to be a kin of black box where the HID handler is hard-coded. AGain, as I said, I have not much understanding.


    Well, there is no Ext0. The choices start with Ext4. Without the knowledge what HID code is associated to each funtion it appears quite difficult to me to make meaningful changes.
     
    • Like Like x 1
  8. HTPCSourcer
    • Team MediaPortal
    • Administrator

    HTPCSourcer MP2 Product Manager

    Joined:
    May 16, 2008
    Messages:
    10,540
    Likes Received:
    1,106
    Gender:
    Male
    Ratings:
    +2,377 / 21
    Home Country:
    Germany Germany
    Show System Specs
    I tested the different codes using the HID-Demo from your other posting. Very helpful! :) We should add this to the Wiki.

    Indeed "Menu" on the Smart Control Hub is recognized as Ext0(y). So I guess that I will have to manually edit the Generic-HID.xml and add a Ext0 entry to it. Now in the file I see
    which explains why the list in the MP Config starts with Ext4. So I defined the action Windows/Home for "Visualization" and now it works the way I want.(y)

    With respect to these four placeholders: they could be misleading and the question is whether they should be renamed to Ext0-Ext3 instead.

    Anyway, I learned something today.:D
     
    • Like Like x 2
  9. Stéphane Lenclud
    • Team MediaPortal

    Stéphane Lenclud Development Group

    Joined:
    April 29, 2013
    Messages:
    2,562
    Likes Received:
    657
    Gender:
    Male
    Ratings:
    +1,270 / 8
    Home Country:
    Germany Germany
    Show System Specs
    Mostly I guess but not strictly. Far from it. It's been at least a couple of years since I last used WMC so I could not really tell TBH.

    Odd, from the XML it looks like it should only do DVD stuff which is rather limiting anyway since so few of us are using DVD I think.

    What kind of Harmony remote do you use together with your hub?
    I find that the default Harmony devices setup for RC6 remotes do not make much sense.
    Putting Ext0 on the Menu key for instance would not be my obvious choice.
    On which of your Harmony button is GreenStart setup? Is it setup at all?

    I'm glad you could setup your behavior from the UI rather than from the XML file.
    Thus at least someone is testing that UI :)

    I guess I could change those button names to something like:
    Visualization/Ext0

    Feel free to edit the wiki as you seen fit. Do post links to the edited or newly created pages here so that I can take a look at it.
     
  10. HTPCSourcer
    • Team MediaPortal
    • Administrator

    HTPCSourcer MP2 Product Manager

    Joined:
    May 16, 2008
    Messages:
    10,540
    Likes Received:
    1,106
    Gender:
    Male
    Ratings:
    +2,377 / 21
    Home Country:
    Germany Germany
    Show System Specs
    DVD is deactivated in MP. Now that I know how to quickly change assignments in genric-HID.xml, I may just put a different function there.

    The one that came with the hub:
    Unbenannt.JPG

    As you can see there are not that many buttons to assign. I took a quick look at the manual and could not see anything that would allow me to distinguish between short and long key presses. However, this feature is described for the three "action buttons" at the top of the remote.

    Maybe rather Ext0 (Visualization)? Or even simply Ext0? Out of curiosity, why did you give any name to these four functions?

    "fit" is the keyword - I now have a certain, but probably limited understanding of the model, i.e. HID abstraction layer. Actually the implementation is great work of yours!(y)
    Thus far I never made any entry into the Wiki. Is there any WYSIWG editor that you would advise to use?

    I will, but don't expect anything shortly:barefoot:. Right now the only reference to the HID GUI seems to be part of the 1.12 release news.
     
  11. Stéphane Lenclud
    • Team MediaPortal

    Stéphane Lenclud Development Group

    Joined:
    April 29, 2013
    Messages:
    2,562
    Likes Received:
    657
    Gender:
    Male
    Ratings:
    +1,270 / 8
    Home Country:
    Germany Germany
    Show System Specs
    By default or on your setup? Not doing DVD anymore here :)

    Alright that's the Harmony Smart Control I guess. I think it does not do IR without going through the hub so it might not be like any classic IR Harmony but I believe it should still support long press for any button. No screen though so no software button. I find they are very useful to help you test various commands. Though I do prefer using hardware buttons once all is setup.

    I like "Ext0 (Visualization)" not sure if the spaces could cause problem to our parsers.
    The HID specs names are Extn. However some of them have been used, sometimes needlessly, by various remote hardware manufacturer notably HP.
    That is where the feature names come from. Ext2 (0x34) is notably used has eject by HP whereas Microsoft already defines and 'Eject' command as 0x28.

    SharpLibHid is the library MP is using for HID handling. It defines some of the most common HID usage tables there:
    https://sharplibhid.codeplex.com/SourceControl/latest#Hid/HidUsageTables.cs
    Though if a name is not present for your code you can still use the code itself rather than the name in the XML file.

    Danke :) glad you like it!

    Not sure you have a choice of editor. Just click the edit button on the wiki page and edit it from your browser. It is mostly WYSIWG.

    I have absolutely not expectation in that mater. Feel free to do it if you are having fun doing it.
    At some point I would like to have some neat graphics like I did for the gamepads there:
    http://wiki.team-mediaportal.com/1_...ics/03_Navigation/Gamepads?highlight=gamepads
    It could be a while until I get there though.
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!