[solved] Remote / HID-Handler: Harmony Smart Hub (1 Viewer)

HTPCSourcer

Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,418
    2,335
    Home Country
    Germany Germany
    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.
     

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    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.
    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.

    So how do keymap.xml and genric-hid.xml play together?
    They don't. They belong to different systems.

    I also see a Microsoft MCE.xml in the same path, dated Oct 2014. Is this actively used or legacy from previous installs?
    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.
     

    HTPCSourcer

    Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,418
    2,335
    Home Country
    Germany Germany
    I would recommend changing the key on the remote rather than the HID config.
    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.

    That one belong to our retired MCE handler.
    So it's safe to delete it, right?

    Which device did you use from Harmony?
    Microsoft Media Center PC

    I got myself an Harmony 950 recently and I'm now using the long press on the 'Ok' button for the Green Button command
    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?
     

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    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.

    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.

    Microsoft Media Center PC

    I'm not sure I tried this one.

    Not sure if short and long is differentiated for standard keys.
    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.

    Can you give me some advice on what to do to define a definition for 032?
    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.
     

    HTPCSourcer

    Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,418
    2,335
    Home Country
    Germany Germany
    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 guess, I should download the manual and read it.

    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.
    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.
    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.

    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.
    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.


    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.
    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.
     

    HTPCSourcer

    Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,418
    2,335
    Home Country
    Germany Germany
    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
    <button name="Visualization" code="Ext0" />
    <button name="SlideShow" code="Ext1" />
    <button name="HpEject" code="Ext2" />
    <button name="InputSelection" code="Ext3" />
    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
     

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    However, my understanding would be that a standard MCE remote triggers the same actions in MediaPortal as it would in WMC, correct?
    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.

    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.
    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.
     

    HTPCSourcer

    Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,418
    2,335
    Home Country
    Germany Germany
    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.
    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.

    What kind of Harmony remote do you use together with your hub?
    The one that came with the hub:
    Unbenannt.JPG

    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?
    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.

    I guess I could change those button names to something like:
    Visualization/Ext0
    Maybe rather Ext0 (Visualization)? Or even simply Ext0? Out of curiosity, why did you give any name to these four functions?

    Feel free to edit the wiki as you seen fit.
    "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?

    Do post links to the edited or newly created pages here so that I can take a look at it.
    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.
     

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    DVD is deactivated in MP.
    By default or on your setup? Not doing DVD anymore here :)

    The one that came with the hub:
    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.

    Maybe rather Ext0 (Visualization)? Or even simply Ext0? Out of curiosity, why did you give any name to these four functions?
    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.

    Actually the implementation is great work of yours!
    Danke :) glad you like it!

    Thus far I never made any entry into the Wiki. Is there any WYSIWG editor that you would advise to use?
    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 will, but don't expect anything shortly:barefoot:.
    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.
     

    Users who are viewing this thread

    Top Bottom