EventAdmin: Exception during event dispatch [org.osgi.service.event.Event [topic=openhab/command/Harmony_Activity_choose] | {org.osgi.service.event.EventHandler}={event.topics=openhab/command/, service.pid=org.openhab.harmonyhub, password=, host=10.7.2.40, component.name=org.openhab.binding.harmonyhub.binding, component.id=214, username=*, service.id=337, service.bundleid=167, service.scope=bundle} | Bundle(org.openhab.binding.harmonyhub_1.7.0 [167])]
java.lang.IllegalStateException: Harmony Hub Gateway is not properly configured, or the connection is not yet started
What I’ve done, ist copied all harmonybindings in addons
root@smarthome:/usr/share/openhab2/addons# ls -la harmony
-rw-r–r-- 1 root root 6744 Jan 31 13:52 org.openhab.action.harmonyhub-1.7.0.jar
-rw-r–r-- 1 root root 17167 Jan 31 13:52 org.openhab.binding.harmonyhub-1.7.0.jar
-rw-r–r-- 1 root root 4388670 Jan 31 13:52 org.openhab.io.harmonyhub-1.7.0.jar
That was posted before OH2 beta which seems to have causes a few issues/broken some things.
However, why are you using the old versions instead of the 1.8 or even 1.9 snapshots? Try using up-to-date versions as that may solve your troubles, let us know if that doesn’t work.
Just a FYI, I have the OH2 port almost ready to go, https://github.com/openhab/openhab2-addons/pull/639 I expect to have a few
more changes before it gets included, but its mostly working. I’ll try and
get something posted soon.
That was posted before OH2 beta which seems to have causes a few
issues/broken some things.
However, why are you using the old versions instead of the 1.8 or even 1.9
snapshots? Try using up-to-date versions as that may solve your troubles,
let us know if that doesn’t work.
@danielwalters86, would you mind either linking me someplace to learn how to build the bindings from their source, or give me a brief overview on it? I’m a little hazy on it.
Awesome! Coming back to see this way too late haha. Gonna try this tonight. I got some rad IR flameless candles that I want to link up with my hue lights.
Does anyone have some examples of accessing the auto generated harmony things/items from rules? I am trying to get this working with the echo/hue emulator binding…
My current approach is to use a proxy item associated with the echo to trigger a rule that then send the string to the harmony hub or device. I can watch the string update in the thing area within habmin, but no action occurs. I have tried sendCommand and postUpdate. I believe a “button push” uses sendCommand, so i assume that is the correct one to use based upon the binding examples showing a sitemap with switch items utilized as button pushes.
Before i post my sorry attempt, would be willing to show some of your working examples? Do you have sitemap and rules setup to work with your autogenerated things/items for harmony hub?
I dont want to waste your time troubleshooting my ignorant attempt, with some examples, i am sure i could work it out.
I’m pulling my hair out with the Harmony Binding. I’ve installed the binding using the paper UI, the “things” were found and added. I want to run an activity and wrote the Items and Sitemaps as I had it in OH1. (with the minor change in the items due to the channels). In the log, it says the change in state for the activity but then I run into to a “Unauthorized policy write haDevice denied” in the log.
13:23:43.107 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘Harmony_Activity’ received command ToggleBlinds
13:23:43.487 [WARN ] [rg.jivesoftware.smack.XMPPConnection] - Connection closed with error
net.whistlingfish.harmony.protocol.HarmonyProtocolException: Got error response [401.2]: Unauthorized policy write haDevice denied
at net.whistlingfish.harmony.protocol.OAReplyProvider.parseIQ(OAReplyProvider.java:61)[191:org.openhab.binding.harmonyhub:2.0.0.b3]
at org.jivesoftware.smack.util.PacketParserUtils.parseIQ(PacketParserUtils.java:440)[191:org.openhab.binding.harmonyhub:2.0.0.b3]
at org.jivesoftware.smack.tcp.PacketReader.parsePackets(PacketReader.java:170)[191:org.openhab.binding.harmonyhub:2.0.0.b3]
at org.jivesoftware.smack.tcp.PacketReader.access$000(PacketReader.java:47)[191:org.openhab.binding.harmonyhub:2.0.0.b3]
at org.jivesoftware.smack.tcp.PacketReader$1.run(PacketReader.java:81)[191:org.openhab.binding.harmonyhub:2.0.0.b3]
13:23:48.115 [WARN ] [ore.internal.events.OSGiEventManager] - Dispatching event to subscriber ‘org.eclipse.smarthome.core.thing.internal.ThingManager@1a0d27a’ takes more than 5000ms.
13:23:48.115 [WARN ] [ome.core.thing.internal.ThingManager] - Handler for thing ‘harmonyhub:hub:HarmonyHub’ takes more than 5000ms for processing event
13:23:53.122 [WARN ] [ome.core.thing.internal.ThingManager] - Handler for thing ‘harmonyhub:hub:HarmonyHub’ takes more than 5000ms for processing event
13:24:13.116 [ERROR] [harmonyhub.handler.HarmonyHubHandler] - Could not start activity
java.lang.RuntimeException: Failed communicating with Harmony Hub
at net.whistlingfish.harmony.HarmonyClient.sendOAPacket(HarmonyClient.java:270)[191:org.openhab.binding.harmonyhub:2.0.0.b3]
at net.whistlingfish.harmony.HarmonyClient.startActivity(HarmonyClient.java:368)[191:org.openhab.binding.harmonyhub:2.0.0.b3]
at net.whistlingfish.harmony.HarmonyClient.startActivityByName(HarmonyClient.java:377)[191:org.openhab.binding.harmonyhub:2.0.0.b3]
at org.openhab.binding.harmonyhub.handler.HarmonyHubHandler.handleCommand(HarmonyHubHandler.java:97)[191:org.openhab.binding.harmonyhub:2.0.0.b3]
at org.eclipse.smarthome.core.thing.internal.ThingManager$2.call(ThingManager.java:371)[104:org.eclipse.smarthome.core.thing:0.8.0.b5]
at org.eclipse.smarthome.core.thing.internal.ThingManager$2.call(ThingManager.java:1)[104:org.eclipse.smarthome.core.thing:0.8.0.b5]
at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:170)[98:org.eclipse.smarthome.core:0.8.0.b5]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_65]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_65]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_65]
Caused by: org.jivesoftware.smack.SmackException$NoResponseException
at net.whistlingfish.harmony.HarmonyClient.getNextPacketSkipContinues(HarmonyClient.java:282)[191:org.openhab.binding.harmonyhub:2.0.0.b3]
at net.whistlingfish.harmony.HarmonyClient.sendOAPacket(HarmonyClient.java:268)[191:org.openhab.binding.harmonyhub:2.0.0.b3]
… 10 more
13:24:13.341 [WARN ] [rg.jivesoftware.smack.XMPPConnection] - Connection closed with error
net.whistlingfish.harmony.protocol.HarmonyProtocolException: Got error response [401.2]: Unauthorized policy write haDevice denied
at net.whistlingfish.harmony.protocol.OAReplyProvider.parseIQ(OAReplyProvider.java:61)[191:org.openhab.binding.harmonyhub:2.0.0.b3]
at org.jivesoftware.smack.util.PacketParserUtils.parseIQ(PacketParserUtils.java:440)[191:org.openhab.binding.harmonyhub:2.0.0.b3]
at org.jivesoftware.smack.tcp.PacketReader.parsePackets(PacketReader.java:170)[191:org.openhab.binding.harmonyhub:2.0.0.b3]
at org.jivesoftware.smack.tcp.PacketReader.access$000(PacketReader.java:47)[191:org.openhab.binding.harmonyhub:2.0.0.b3]
at org.jivesoftware.smack.tcp.PacketReader$1.run(PacketReader.java:81)[191:org.openhab.binding.harmonyhub:2.0.0.b3]
13:24:32.537 [INFO ] [marthome.event.ItemStateChangedEvent] - Nest_last_connection changed from 2016-06-25T13:23:31.177+0000 to 2016-06-25T13:24:32.461+0000
13:24:37.703 [DEBUG] [overy.HarmonyHubDiscoveryParticipant] - StartScan called
13:24:37.712 [DEBUG] [onyhub.discovery.HarmonyHubDiscovery] - Creating Harmony server on port 44707
13:24:43.153 [ERROR] [harmonyhub.handler.HarmonyHubHandler] - Could not start activity
java.lang.RuntimeException: Failed communicating with Harmony Hub
at net.whistlingfish.harmony.HarmonyClient.sendOAPacket(HarmonyClient.java:270)[191:org.openhab.binding.harmonyhub:2.0.0.b3]
at net.whistlingfish.harmony.HarmonyClient.startActivity(HarmonyClient.java:368)[191:org.openhab.binding.harmonyhub:2.0.0.b3]
at net.whistlingfish.harmony.HarmonyClient.startActivityByName(HarmonyClient.java:377)[191:org.openhab.binding.harmonyhub:2.0.0.b3]
at org.openhab.binding.harmonyhub.handler.HarmonyHubHandler.handleCommand(HarmonyHubHandler.java:97)[191:org.openhab.binding.harmonyhub:2.0.0.b3]
at org.eclipse.smarthome.core.thing.internal.ThingManager$2.call(ThingManager.java:371)[104:org.eclipse.smarthome.core.thing:0.8.0.b5]
at org.eclipse.smarthome.core.thing.internal.ThingManager$2.call(ThingManager.java:1)[104:org.eclipse.smarthome.core.thing:0.8.0.b5]
at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:170)[98:org.eclipse.smarthome.core:0.8.0.b5]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_65]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_65]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_65]
Caused by: org.jivesoftware.smack.SmackException$NoResponseException
at net.whistlingfish.harmony.HarmonyClient.getNextPacketSkipContinues(HarmonyClient.java:282)[191:org.openhab.binding.harmonyhub:2.0.0.b3]
at net.whistlingfish.harmony.HarmonyClient.sendOAPacket(HarmonyClient.java:268)[191:org.openhab.binding.harmonyhub:2.0.0.b3]
… 10 more
13:24:43.153 [WARN ] [software.smack.tcp.XMPPTCPConnection] - notifyReconnection()
java.lang.RuntimeException: Failed communicating with Harmony Hub
at net.whistlingfish.harmony.HarmonyClient.sendOAPacket(HarmonyClient.java:270)[191:org.openhab.binding.harmonyhub:2.0.0.b3]
at net.whistlingfish.harmony.HarmonyClient.sendOAPacket(HarmonyClient.java:259)[191:org.openhab.binding.harmonyhub:2.0.0.b3]
at net.whistlingfish.harmony.HarmonyClient.getCurrentActivity(HarmonyClient.java:358)[191:org.openhab.binding.harmonyhub:2.0.0.b3]
at net.whistlingfish.harmony.HarmonyClient$1.reconnectionSuccessful(HarmonyClient.java:140)[191:org.openhab.binding.harmonyhub:2.0.0.b3]
at org.jivesoftware.smack.tcp.XMPPTCPConnection.notifyReconnection(XMPPTCPConnection.java:914)[191:org.openhab.binding.harmonyhub:2.0.0.b3]
at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectInternal(XMPPTCPConnection.java:825)[191:org.openhab.binding.harmonyhub:2.0.0.b3]
at org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:396)[191:org.openhab.binding.harmonyhub:2.0.0.b3]
at org.jivesoftware.smack.ReconnectionManager$2.run(ReconnectionManager.java:148)[191:org.openhab.binding.harmonyhub:2.0.0.b3]
Caused by: org.jivesoftware.smack.SmackException$NotConnectedException
at org.jivesoftware.smack.XMPPConnection.sendPacket(XMPPConnection.java:584)[191:org.openhab.binding.harmonyhub:2.0.0.b3]
at net.whistlingfish.harmony.HarmonyClient.sendOAPacket(HarmonyClient.java:267)[191:org.openhab.binding.harmonyhub:2.0.0.b3]
… 7 more
It’s been a while, but i believe i setup the items in the hub first, and when i added the binding and discovered the hub, the additional items came with it (roku and tv).
I created proxy switch items to use with rules and the echo. Switch eVolume "Level" ["Switchable"]
rule "TV Volume" when Item eVolume received update then if (eVolume.state == OFF) { sendCommand(harmonyhub_device_HarmonyHub_36462390_buttonPress, "VolumeDown") sendCommand(harmonyhub_device_HarmonyHub_36462390_buttonPress, "VolumeDown") } else if (eVolume.state == ON) { sendCommand(harmonyhub_device_HarmonyHub_36462390_buttonPress, "VolumeUp") sendCommand(harmonyhub_device_HarmonyHub_36462390_buttonPress, "VolumeUp") } end
Sadly, I, too, cannot get the binding to find anything.
Already tried with a totally clean snapshot setup with only the Harmony Hub binding installed (via PaperUI). Nothing. So I added the hub manually by using the name my Harmony App (on my phone) is using, which is working fine.
I only get the error that a hub with the name specified could not be found.
I worked this out. I didn’t know the binding was actually using other ports for the communication. Looking at the logs (debug) I recognized that the binding was starting a local Harmony server - and then I realized: I am using iptables to block all traffic except certain ports. Opening up all of them (for now) fixed this issue.
TLDR: Open up your ports, if you want the binding to discover anything!