Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse SmartHome » Channel questions / Logitech Harmony Hub
Channel questions / Logitech Harmony Hub [message #1691248] Fri, 03 April 2015 20:59 Go to next message
Dan Cunningham is currently offline Dan CunninghamFriend
Messages: 44
Registered: March 2014
Member
I just finished the Logitech Harmony Hub binding for oh1 and have begin to think how this would translate to esh/oh2. Fyi, Logitech's Harmony hub is a universal remote control unit which uses IR, zwave, zigbee, wifi and bluetooth to talk to various things (Stereo, TV, PS4, etc.). They have mobile apps as well as physical remotes that communicate using a custom XMPP protocol to the hub.

initially my thought on a integration looks like:

Harmony Hub -> Bridge Thing.
Devices (TV, Stereo, Roku, ect..) -> Things
Buttons (volume up, next, prev, ect..) -> channels

Unfortunately buttons are not a finite set of possibilities, they can vary from device to device. In their most primitive form they consist of a label and command. The commands can be as common as "VolumeUp" to something more specific like "iPodStop". There are other properties I would like to support such as groupings but not required for a MVP.

So the scenario i imagine is that a user finds a hub on their network using autodiscovery, once found, we can dynamically pull all the devices (things) on a hub and put those in a users inbox. A device will have an arbitrary number of channels, each channel would have a unique label and command.

So
1. if we define a single channel, can a device have an arbitrary number of them (1-n)?
2. it sounds like channels can be extended with properties (maybe related to Chris's topic), would having a property that would be the channel command be an appropriate solution? (assuming 1. can be done.)
3. if not 1 or 2, any thoughts?
Re: Channel questions / Logitech Harmony Hub [message #1691636 is a reply to message #1691248] Wed, 08 April 2015 16:24 Go to previous messageGo to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 673
Registered: December 2011
Senior Member
Hi Dan,

Check out https://github.com/eclipse/smarthome/blob/master/docs/sources/development/faq.md, maybe this clarifies a few questions.
In general, your concept looks pretty straight-forward: The hub as a bridge and the devices as things make perfect sense.

For the channels, I am wondering if you can get any additional meta information for the "buttons" - after all, the channels (i.e. the functionality) are not the buttons, but the devices, i.e. it is switching it on/off, adjusting the volume etc. So it would be best to map these to Switch vs. Dimmer channels, but this would require that you can tell what it is. Is there any such chance?

If all you have is a thing with a name and all you know is that you can send "button 1", "button 2" or "button 3" as commands to it, you might as well simply model it as a single channel that maps to a String item - and possibly provide a state description with the valid commands as options (see also https://groups.google.com/d/msg/openhab2/ntyNKv7MQ5Y/qLoHDiu2dUMJ).

Best regards,
Kai
Re: Channel questions / Logitech Harmony Hub [message #1691643 is a reply to message #1691636] Wed, 08 April 2015 17:03 Go to previous messageGo to next message
Dan Cunningham is currently offline Dan CunninghamFriend
Messages: 44
Registered: March 2014
Member
Quote:
For the channels, I am wondering if you can get any additional meta information for the "buttons" - after all, the channels (i.e. the functionality) are not the buttons, but the devices, i.e. it is switching it on/off, adjusting the volume etc. So it would be best to map these to Switch vs. Dimmer channels, but this would require that you can tell what it is. Is there any such chance?

If all you have is a thing with a name and all you know is that you can send "button 1", "button 2" or "button 3" as commands to it, you might as well simply model it as a single channel that maps to a String item - and possibly provide a state description with the valid commands as options (see also https://groups.google.com/d/msg/openhab2/ntyNKv7MQ5Y/qLoHDiu2dUMJ).


The Logitech Database of devices is huge, tens of thousands of devices (if not more). I agree a single channel with the possible button commands would be nice, but for example a modern AV receiver will have hundreds of button possibilities, which differ from other AV receivers . So we can't predefine the buttons in the channel state options. If we say the channel is a string (command) with no options, then this will work as the OH1 version does, but requires the users know about those commands when defining a sitemap (mapping a button). I was hoping to use autodiscovery to configure the choices for the user so we don't have to ask them to look at the logs for a output of button commands ;-(

What would be nice is to dynamically define a channels state options, your entry https://bugs.eclipse.org/bugs/show_bug.cgi?id=464141 seems to be hinting at having a more dynamic way of defining channels in general, I think this problem is related. I'm still getting my head around the new system, so I'm not confident right now in voicing an opinion on how to solve this.
Re: Channel questions / Logitech Harmony Hub [message #1691664 is a reply to message #1691643] Wed, 08 April 2015 20:17 Go to previous messageGo to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 673
Registered: December 2011
Senior Member
Daniel Cunningham wrote on Wed, 08 April 2015 19:03
I was hoping to use autodiscovery to configure the choices for the user so we don't have to ask them to look at the logs for a output of button commands ;-(


Well, this was my question: Is it possible through the Harmony API to get hold of the list of commands? Then the thing / thing type can be dynamically created, it is not necessary to do that statically in XML.

But as I mentioned, even having the list of commands is not really optimal, because you still do not have any knowledge about what kind of functionality it is. So being able to associate a channel category would be best (as we could render suitable icons, widgets, etc. with it).

Regards,
Kai
Re: Channel questions / Logitech Harmony Hub [message #1691666 is a reply to message #1691664] Wed, 08 April 2015 20:31 Go to previous message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 673
Registered: December 2011
Senior Member
Ah, sorry, I just now read on Bugzilla "I can discovery the possible values and would like to populate this on behalf of a user." - so this answers my first question nicely!
Previous Topic:Player Type
Next Topic:Things, Channels and Items
Goto Forum:
  


Current Time: Thu Apr 25 07:00:29 GMT 2024

Powered by FUDForum. Page generated in 0.02969 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top