I noticed on Kai’s blog here, in the description of the Logitech Harmony Hub binding the following:
The binding supports bi-directional communication with the hub, i.e. it can send commands as well as being informed about actions on the hub, e.g. triggered through a Harmony remote control.
I am primarily interested in the second part of this statement- having the OpenHAB server do something if a particular action is executed on the Harmony Hub. Essentially, I have a network (http) callable device that the Harmony hub can not control, but I can control via the http binding. When a given action is started on the Harmony remote, I’d like to send a command to that device. Looking though the docs for the Harmony Hub binding, I could not figure out if/how this might be done. Any thoughts would be appreciated!
In the documentation it shows how to get the current activity of the hub like so: String Harmony_Activity "activity [%s]" { harmonyhub="<[currentActivity]" }
You can have a rule that gets triggered off this like rule "Harmony Activity" when Item Harmony_Activity changed then logDebug("Harmony_Activity changed", Harmony_Activity.state.toString) end
I’m working on this same issue (now under oh2 and a item channel= binding), and the Switch on my basic panel is working well. If I had a rule and put in “changed from X” instead of just “changed”, what would the appropriate values of X be? The string version of the option I want is “PowerOff”, but I don’t think “changed from” is expecting the string version of the state.
This rule works:
_Item Harmony_Activity changed
works, but none of these work:
_Item Harmony_Activity changed from POWEROFF
_Item Harmony_Activity changed from PowerOff
_Item Harmony_Activity changed from “PowerOff”
Thankyou. That certainly works (Item HarmonyActivity received command PowerOff) . Any idea how to reproduce the desired logic of knowing when the current state has changed from PowerOff to something else, without listing all the other options as possible commands received?
Has anyone had success with this in OH2? I’ve set up this binding in OH2 and I can set the activity just fine but I’m unable to read the activity. Any help is appreciated.
That’s probably it. That was probably me misreading the documentation. The strangest thing though is that it works for sending commands but just not receiving updates. Thanks that should do the trick!