Harmony Binding Openhab2 Unauthorized policy! Cant control Activities

Hello,

I’m pulling my hair here trying to figure this out. In OH1 I was able to put in the user/pass for it to work. Now… switching to OH2 I have binded Harmony and see it as a “thing” but can’t send any commands to it!! below is the logging.

13:22:55.895 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘Harmony_Activity’ received command REFRESH
13:22:55.903 [WARN ] [harmonyhub.handler.HarmonyHubHandler] - Command {]: Not a acceptable type (String or Decimal), ignorning
13:22:55.905 [WARN ] [harmonyhub.handler.HarmonyHubHandler] - Command {]: Not a acceptable type (String or Decimal), ignorning
13:23:09.401 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘Harmony_Fireplace’ for widget org.eclipse.smarthome.model.sitemap.Switch
13:23:09.408 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘Harmony_Fireplace’ for widget org.eclipse.smarthome.model.sitemap.Switch
13:23:09.412 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Switch
13:23:31.275 [INFO ] [marthome.event.ItemStateChangedEvent] - Nest_last_connection changed from 2016-06-25T13:22:28.641+0000 to 2016-06-25T13:23:31.177+0000
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

MY ITEMS FILE:

String Harmony_Activity “Current Activity [%s]” { channel=“harmonyhub:hub:HarmonyHub:activity” }

MY SITEMAP:
sitemap home label=“Main Menu” {
Frame {
Switch item=Harmony_Activity label=“Smart Blinds” mappings=[ToggleBlinds=“Open/Close”]
Switch item=Harmony_Fireplace mappings=[“Volume Up”=“Volume Up”,“Volume Down”=“Volume Down”]
}
}

Sorry I missed this message and am replying so late. The OH2 binding no longer requires a username or password, instead it discovers hubs on your network and connects directly to them (much like the mobile harmony apps). Once the binding is installed, do your hubs show up in the discovery inbox?

Hi

sorry for re-opening this rather old post, but I have similar issues with the HarmonyHub binding.
Here’s the excerpt from the log:

2016-11-02 16:45:23.714 [WARN ] [rg.jivesoftware.smack.XMPPConnection] - Connection closed with error
java.io.EOFException: no more data available - expected end tag </stream:stream> to close start tag stream:stream from line 1, parser stopped on END_TAG seen …… @1:649
at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:3035)[196:org.openhab.binding.harmonyhub:2.0.0.b4]
at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046)[196:org.openhab.binding.harmonyhub:2.0.0.b4]
at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1144)[196:org.openhab.binding.harmonyhub:2.0.0.b4]
at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)[196:org.openhab.binding.harmonyhub:2.0.0.b4]
at org.jivesoftware.smack.tcp.PacketReader.parsePackets(PacketReader.java:279)[196:org.openhab.binding.harmonyhub:2.0.0.b4]
at org.jivesoftware.smack.tcp.PacketReader.access$000(PacketReader.java:47)[196:org.openhab.binding.harmonyhub:2.0.0.b4]
at org.jivesoftware.smack.tcp.PacketReader$1.run(PacketReader.java:81)[196:org.openhab.binding.harmonyhub:2.0.0.b4]

My item file:
String HarmonyHubLauter (gEG) “Lauter” { channel=“harmonyhub:device:HarmonyHub:26634429:buttonPress” }

My sitemap:
Switch item=HarmonyHubLauter label=“Volume” mappings=[“VolumeUp”=“Lauter”, “VolumeDown”=“Leiser”]

Maybe one more remark: I tried using “Volume Up” and “VolumeUp” also without the qutoes in the sitemap, but it never worked.
Similar to another post in here, I also have an item which deals with the activites (CurrentActivity) and this works fine, i.e. I can switch between all different actitives, but the button presses do not seem to work on any device.

Thx

I am starting to get the same error message. This started happening in the last day and was not the case a few days ago. Here is my error message:

08:47:00.530 [WARN ] [rg.jivesoftware.smack.XMPPConnection] - Connection closed with error
java.io.EOFException: no more data available - expected end tag </stream:stream> to close start tag <stream:stream> from line 1, parser stopped on END_TAG seen ...<![CDATA[result=-1]]></oa></iq>... @1:640
        at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:3035)[216:org.openhab.binding.harmonyhub:2.0.0.201610290946]
        at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046)[216:org.openhab.binding.harmonyhub:2.0.0.201610290946]
        at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1144)[216:org.openhab.binding.harmonyhub:2.0.0.201610290946]
        at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)[216:org.openhab.binding.harmonyhub:2.0.0.201610290946]
        at org.jivesoftware.smack.tcp.PacketReader.parsePackets(PacketReader.java:279)[216:org.openhab.binding.harmonyhub:2.0.0.201610290946]
        at org.jivesoftware.smack.tcp.PacketReader.access$000(PacketReader.java:47)[216:org.openhab.binding.harmonyhub:2.0.0.201610290946]
        at org.jivesoftware.smack.tcp.PacketReader$1.run(PacketReader.java:81)[216:org.openhab.binding.harmonyhub:2.0.0.201610290946]