openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.88k stars 3.59k forks source link

Harmony Hub binding exception #1222

Closed ertanden closed 7 years ago

ertanden commented 8 years ago

I'm getting the following exception periodicallay; Don't know what the problem is.

16:17:25.139 [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)[197:org.openhab.binding.harmonyhub:2.0.0.201609062002]
        at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046)[197:org.openhab.binding.harmonyhub:2.0.0.201609062002]
        at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1144)[197:org.openhab.binding.harmonyhub:2.0.0.201609062002]
        at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)[197:org.openhab.binding.harmonyhub:2.0.0.201609062002]
        at org.jivesoftware.smack.tcp.PacketReader.parsePackets(PacketReader.java:279)[197:org.openhab.binding.harmonyhub:2.0.0.201609062002]
        at org.jivesoftware.smack.tcp.PacketReader.access$000(PacketReader.java:47)[197:org.openhab.binding.harmonyhub:2.0.0.201609062002]
        at org.jivesoftware.smack.tcp.PacketReader$1.run(PacketReader.java:81)[197:org.openhab.binding.harmonyhub:2.0.0.201609062002]

yp87 commented 8 years ago

Hello,

I have the same error since a few days ago. Another weird behavior is that the "CurrentActivity" channel get duplicated many times. As you can see in this screen shot from PaperUI: image image

I have to remove and re-add the thing to clear them up and had over 100 of them today.

Do you see the same behavior?

digitaldan commented 8 years ago

@yp87 this is another problem can you open another issue for it? @ertanden I recently pushed a new version can you make sure you are running the latest. Also when you get this error is the binding still working? This error happens if the hub closes the connection or the connection somehow gets disconnected, but we should attempt to reconnect.

garrettwp commented 8 years ago

@digitaldan I am getting the same error as @ertanden. I just started getting this error and not sure why this is happening. Here is my error message which looks very similar. I am running version 2.0.0.201610290946 of the binding. It also shows that the binding is currently connected to the hubs. The binding does appear to work with the hubs when this is going on.

tcp6       0      0 192.168.20.204:44220    192.168.20.30:5222      ESTABLISHED 5408/java
tcp6       0      0 192.168.20.204:44756    192.168.20.31:5222      ESTABLISHED 5408/java
tcp6       0      0 192.168.20.204:38852    192.168.20.32:5222      ESTABLISHED 5408/java
tcp6       0      0 192.168.20.204:47250    192.168.20.31:5222      ESTABLISHED 5408/java

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]
digitaldan commented 7 years ago

I just made a PR here https://github.com/openhab/openhab2-addons/pull/1451 , I'm hoping that this helps when there are stream errors and not create duplicate connections.

garrettwp commented 7 years ago

@digitaldan I am still getting the following error with the latest changes using Openhab2 build 2.0.0.201612022359

01:56:52.589 [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)[205:org.openhab.binding.harmonyhub:2.0.0.201612022359] at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046)[205:org.openhab.binding.harmonyhub:2.0.0.201612022359] at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1144)[205:org.openhab.binding.harmonyhub:2.0.0.201612022359] at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)[205:org.openhab.binding.harmonyhub:2.0.0.201612022359] at org.jivesoftware.smack.tcp.PacketReader.parsePackets(PacketReader.java:279)[205:org.openhab.binding.harmonyhub:2.0.0.201612022359] at org.jivesoftware.smack.tcp.PacketReader.access$000(PacketReader.java:47)[205:org.openhab.binding.harmonyhub:2.0.0.201612022359] at org.jivesoftware.smack.tcp.PacketReader$1.run(PacketReader.java:81)[205:org.openhab.binding.harmonyhub:2.0.0.201612022359]

FredericMa commented 7 years ago

I'm also still seeing this error message. Also the multiple occurances of the current activity are still there. I'm using the build of 22nd of november, the day after the fix has been implemented.

Homey-GER commented 7 years ago

same issue here with build 201612180944, it spams my logfile every 2 minutes with a EOFException.

But no issue with "duplicate activities"

2016-12-21 08:41:46.935 [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=23034925]]></oa></iq>... @1:646 at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:3035)[176:org.openhab.binding.harmonyhub:2.0.0.201612180944] at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046)[176:org.openhab.binding.harmonyhub:2.0.0.201612180944] at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1144)[176:org.openhab.binding.harmonyhub:2.0.0.201612180944] at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)[176:org.openhab.binding.harmonyhub:2.0.0.201612180944] at org.jivesoftware.smack.tcp.PacketReader.parsePackets(PacketReader.java:279)[176:org.openhab.binding.harmonyhub:2.0.0.201612180944] at org.jivesoftware.smack.tcp.PacketReader.access$000(PacketReader.java:47)[176:org.openhab.binding.harmonyhub:2.0.0.201612180944] at org.jivesoftware.smack.tcp.PacketReader$1.run(PacketReader.java:81)[176:org.openhab.binding.harmonyhub:2.0.0.201612180944]

FredericMa commented 7 years ago

I can also confirm that the duplicates are solved with one of the latest builds (20161218.094050). I was using beta4 of OpenHAB in combination with the latest version of the harmony binding . This still caused the duplicates, my fault.

Also, I still receive the EOFExceptions. I saw these popping up this morning in my system after a reboot of my router. A second reboot of my router didn't solve the problem.

My solution was to stop openhab, restart my router again and then start openhab again. After doing this, I didn't see the error anymore.

thomassandberg commented 7 years ago

I also have this problem. If I restart OH2 it's OK for a couple of hours. Then it start spamming again. Got 3 hubs running in my network.

yp87 commented 7 years ago

The duplicates entries are effectively fixed. Still having the Error spam as mentioned above.

CrEaK commented 7 years ago

Having the same error spam as mentioned above.

digitaldan commented 7 years ago

I believe there is a bug in the underlying XMPP library (SMACK), unfortunately the latest version of that library changed their API significantly and it will take some time for me to integrate it. Its on my list.

Celaeno1 commented 7 years ago

FYI: Having the same error spam as mentioned above.

tobyS commented 7 years ago

Also getting tons of them:

2017-01-24 10:09:40.898 [WARN ] [.jivesoftware.smack.tcp.PacketWriter] - Exception writing closing stream element java.net.SocketException: Connection reset at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:113)[:1.8.0_111] at java.net.SocketOutputStream.write(SocketOutputStream.java:153)[:1.8.0_111] at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)[:1.8.0_111] at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)[:1.8.0_111] at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:295)[:1.8.0_111] at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141)[:1.8.0_111] at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)[:1.8.0_111] at java.io.BufferedWriter.flush(BufferedWriter.java:254)[:1.8.0_111] at org.jivesoftware.smack.tcp.PacketWriter.writePackets(PacketWriter.java:190)[203:org.openhab.binding.harmonyhub:2.0.0.b5] at org.jivesoftware.smack.tcp.PacketWriter.access$000(PacketWriter.java:40)[203:org.openhab.binding.harmonyhub:2.0.0.b5] at org.jivesoftware.smack.tcp.PacketWriter$1.run(PacketWriter.java:77)[203:org.openhab.binding.harmonyhub:2.0.0.b5]

Celaeno1 commented 7 years ago

@digitaldan is there any progress? I guess it will take some time, but could you please keep us up to date?

FrederikNT commented 7 years ago

The binding is functioning but but not sure if it is related to the exception I get 4 errors every 2 seconds in my log. I am using two hubs.

2017-01-24 12:39:05.795 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-01-24 12:39:05.795 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-01-24 12:39:05.803 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-01-24 12:39:05.803 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-01-24 12:39:07.763 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-01-24 12:39:07.764 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-01-24 12:39:07.771 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-01-24 12:39:07.771 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-01-24 12:39:09.761 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-01-24 12:39:09.761 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-01-24 12:39:09.769 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-01-24 12:39:09.769 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed

NoTechi

digitaldan commented 7 years ago

@digitaldan is there any progress? I guess it will take some time, but could you please keep us up to date?

I do not, I need to find a large chunk of time to refactor the underlying library which I am not the author of.

The binding is functioning but but not sure if it is related to the exception I get 4 errors every 2 seconds in my log. I am using two hubs.

I have a PR open which addresses this, not sure why I had that under error logging originally. Its defiantly annoying, but as you observed does not effect functionality.

tnemrap commented 7 years ago

I have the same problem with released version of OpenHAB 2.0 on raspberry PI.

/Mike

staehler commented 7 years ago

Same problem here. Michael

Dan1001 commented 7 years ago

And me. I have the harmonyhub binding logging to a separate file, but annoyingly these error messages always go into my main openhab.log logfile. I don't suppose anyone has a temporary solution for that?

wborn commented 7 years ago

When things work fine but you get annoyed with the warnings you can always raise the log level in the openHAB console:

log:set ERROR org.jivesoftware.smack

You can revert this with:

log:set DEFAULT org.jivesoftware.smack
FrederikNT commented 7 years ago

I am wondering if the warning/error message spam has an influence on general system stability. Gona raise the log level as adviced. I am just worried that there will be still something going on which is failing and keeping the system busy even though not shown in the logfiles anymore.

NoTechi

Dan1001 commented 7 years ago

that was just what I was looking for - thank you!

dhermanns commented 7 years ago

I've got problems with the xmpp stack, too:

2017-02-09 19:00:25.398 [WARN ] [rg.jivesoftware.smack.XMPPConnection] - Connection closed with error net.whistlingfish.harmony.protocol.HarmonyProtocolException: Got error response [505]: Bluetooth device not reachable at net.whistlingfish.harmony.protocol.OAReplyProvider.parseIQ(OAReplyProvider.java:61)[181:org.openhab.binding.harmonyhub:2.0.0.201701191638] at org.jivesoftware.smack.util.PacketParserUtils.parseIQ(PacketParserUtils.java:440)[181:org.openhab.binding.harmonyhub:2.0.0.201701191638] at org.jivesoftware.smack.tcp.PacketReader.parsePackets(PacketReader.java:170)[181:org.openhab.binding.harmonyhub:2.0.0.201701191638] at org.jivesoftware.smack.tcp.PacketReader.access$000(PacketReader.java:47)[181:org.openhab.binding.harmonyhub:2.0.0.201701191638] at org.jivesoftware.smack.tcp.PacketReader$1.run(PacketReader.java:81)[181:org.openhab.binding.harmonyhub:2.0.0.201701191638] 2017-02-09 19:00:34.205 [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)[181:org.openhab.binding.harmonyhub:2.0.0.201701191638] at net.whistlingfish.harmony.HarmonyClient.startActivity(HarmonyClient.java:368)[181:org.openhab.binding.harmonyhub:2.0.0.201701191638] at net.whistlingfish.harmony.HarmonyClient.startActivityByName(HarmonyClient.java:377)[181:org.openhab.binding.harmonyhub:2.0.0.201701191638] at org.openhab.binding.harmonyhub.handler.HarmonyHubHandler.handleCommand(HarmonyHubHandler.java:114)[181:org.openhab.binding.harmonyhub:2.0.0.201701191638] at org.eclipse.smarthome.core.thing.internal.ThingManager$4.call(ThingManager.java:372)[105:org.eclipse.smarthome.core.thing:0.9.0.201701091847] at org.eclipse.smarthome.core.thing.internal.ThingManager$4.call(ThingManager.java:1)[105:org.eclipse.smarthome.core.thing:0.9.0.201701091847] at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:179)[98:org.eclipse.smarthome.core:0.9.0.201701091847] at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121] at java.lang.Thread.run(Thread.java:745)[:1.8.0_121] Caused by: org.jivesoftware.smack.SmackException$NotConnectedException at org.jivesoftware.smack.XMPPConnection.sendPacket(XMPPConnection.java:584)[181:org.openhab.binding.harmonyhub:2.0.0.201701191638] at net.whistlingfish.harmony.HarmonyClient.sendOAPacket(HarmonyClient.java:267)[181:org.openhab.binding.harmonyhub:2.0.0.201701191638] ... 10 more

Is it the same that has already been addressed by this ticket?

Marty56 commented 7 years ago

With respect of stability. Aside that the harmony hub binding is not working properly I noticed that my openhab installation is getting very slow after about 2-3 days and finally it is crashing when I have harmony hub binding installed.

Marco-Kawon commented 7 years ago

Any updates here? Only addon for me that causes trouble. Logfiles totally get spammed since weeks with thousands of these errors. Also openhab seems to get slow and unstable somehow and crashes every few days. When harmonyhub binding uninstalled, all is good.

A bit annoying as the harmony hub is used to control lots of devices (via amazon alexa -> openhab)

dhermanns commented 7 years ago

Still the same effects on my side, too. I can only confirm what Marco said. Let us know if we can help to get this fixed...

FrederikNT commented 7 years ago

Same here what Marco says. Whole openhab gets unstable with this errors. On the other hand its a very important part of my homeautomation so deinstalling will take away many functions. I am wondering if just users with more then one hub having these problems. I got 2.

NoTechi

dhermanns commented 7 years ago

I have just one hub - but same Problems... FrederikNT notifications@github.com schrieb am Di. 7. März 2017 um 22:13:

Same here what Marco says. Whole openhab gets unstable with this errors. On the other hand its a very important part of my homeautomation so deinstalling will take away many functions. I am wondering if just users with more then one hub having these problems. I got 2.

NoTechi

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/openhab/openhab2-addons/issues/1222#issuecomment-284860985, or mute the thread https://github.com/notifications/unsubscribe-auth/ADDwlffxUgo69hTPq7U9PBH-Kel1FG9Oks5rjciAgaJpZM4J3-_S .

FrederikNT commented 7 years ago

My guess then is that with two or more hubs there are also more error messages which leads to make the system even more unstable. According to the time stamp I get 4 error messages every 2 seconds

2017-03-16 08:29:01.021 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-03-16 08:29:01.021 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-03-16 08:29:01.029 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-03-16 08:29:01.029 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-03-16 08:29:03.022 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-03-16 08:29:03.023 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-03-16 08:29:03.030 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-03-16 08:29:03.030 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-03-16 08:29:05.015 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-03-16 08:29:05.015 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-03-16 08:29:05.022 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-03-16 08:29:05.023 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed

Again the binding is functioning ... untill the whole openhab installation is not responsive anymore (after 1-3days) and I have to restart the system.

NoTechi

Moxified commented 7 years ago

@FrederikNT does all of OH freeze or just rules? I have the mentioned problem and my OH rules stop running after a couple of days but items still update and other bindings still work.

dhermanns commented 7 years ago

Same for me. Rules seem to have Problems. But not all Rules. Just some stop working. Moxified notifications@github.com schrieb am Do. 16. März 2017 um 23:48:

@FrederikNT https://github.com/FrederikNT does all of OH freeze or just rules? I have the mentioned problem and my OH rules stop running after a couple of days but items still update and other bindings still work.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/openhab/openhab2-addons/issues/1222#issuecomment-287215133, or mute the thread https://github.com/notifications/unsubscribe-auth/ADDwlYWkOMUnD1LtBCz-6abgRmplHy8Zks5rmbwsgaJpZM4J3-_S .

FrederikNT commented 7 years ago

@Moxified Yes same for me. Rules stop working or I had already things like just a part of the rule did not work. Like the rule should turn light and music on but just the music turns on. After a openhab/windows reboot the same rule works as intended. I am thinking already of scheduling a nightly reboot. At the moment the whole openhab is just not reliable. I am soon going to implement a balcony flower watering system and for that I will need a robust system so I will have to de-install the harmony hub binding even though that means loosing lots of cool functionality.

Just curios is there still a developer maintaining the harmony hub binding?

NoTechi

dhermanns commented 7 years ago

This case is open a half year long now. Is there still progress or is this binding dead? If the latter is the case, maybe you should remove the code from the set of openhab2 addons since it makes the whole system unstable...

wborn commented 7 years ago

For me the binding is stable with my two harmony hubs except for the warnings.

I've ported the whistlingfish library (on which the binding depends) this week so it uses Smack 4.2.0 and am testing how stable it is. All compiles and I see activities properly updating. But I do not know if upgrading Smack will solve the problems everyone has, since it is already stable for me.

FrederikNT commented 7 years ago

@wborn This sounds promising that you are trying something which might fix the errors!! :)

Just a comment, the harmony hub binding itself is still working (like switching tv on via paperui). The problem is rules, even unrelated to the harmony hub binding, are not working anymore after some time (1-3 days). I tested with the harmony hub binding deinstalled and then I don't have this effect. So I would assume handling all those errors makes complete openhab unstable after some time.

Looking forward to your update and if you need someone to test just let me know where to find your tar file :)

NoTechi

wborn commented 7 years ago

I've created a version of the binding with the updated Smack dependency. I haven't run into any issues/warnings with it yet. Usually these show up after several days for me.

Here's a link to the updated org.openhab.binding.harmonyhub-2.1.0-SNAPSHOT.jar for people who want to give it a try.

These are the links to the commits of the updated code:

thomassandberg commented 7 years ago

@wborn That sounds good! Is it just to overwrite the .jar-file or do I need to do something more?

wborn commented 7 years ago

@DrLaban The easiest way to test the updated binding is by:

  1. uninstall the default Harmony binding via PaperUI (Add-ons, Bindings)
  2. copy the updated JAR into the openHAB /addons/ directory

In the reverse order you can again revert to the default Harmony binding:

  1. delete the updated JAR from the openHAB /addons/ directory
  2. install the default Harmony binding via PaperUI (Add-ons, Bindings)

In the openHAB console you can also check your Harmony binding version with:

It will then show version 2.0.0 (default) or 2.1.0.201703190118 (update)

thomassandberg commented 7 years ago

Will I loose my configuration for the Harmony binding doing this swap?

wborn commented 7 years ago

@DrLaban I just had a look and Harmony things, their configurations and linked items all remained when swapping between both versions.

Marty56 commented 7 years ago

And if you are using the addons.cfg file remote the "harmonyhub" entry in the bindings session.

PS: I have installed the snapshot I did not get any error message. Looking good so far.

digitaldan commented 7 years ago

@wborn you are my hero! I started working on upgrading to 4.2 this weekend, but got stuck after trying to do the sasl plain auth. I will test your port today. Thanks so much.

FrederikNT commented 7 years ago

@wborn Great to see progress and the errors related to smack dependencies seem to be fixed :)

Sadly I still have following error spam: 2017-03-19 19:27:44.597 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-03-19 19:27:44.597 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-03-19 19:27:44.605 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-03-19 19:27:44.605 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-03-19 19:27:46.598 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-03-19 19:27:46.599 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-03-19 19:27:46.606 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-03-19 19:27:46.606 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-03-19 19:27:48.599 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-03-19 19:27:48.599 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-03-19 19:27:48.607 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-03-19 19:27:48.607 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-03-19 19:27:50.591 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-03-19 19:27:50.591 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-03-19 19:27:50.599 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed 2017-03-19 19:27:50.599 [ERROR] [onyhub.discovery.HarmonyHubDiscovery] - IO error during HarmonyHub discovery: No route to host: Datagram send failed

Any idea what else I could try or what could cause this? Both of my hubs are working but I am worried I will still have a unstable system after some time.

NoTechi

wborn commented 7 years ago

@FrederikNT According to the binding code it will just recover from this error. Because it is nothing critical it is just logged with the wrong log level. Debug log level would be better.

During hub discovery it sends packets on all your network interfaces. So the binding can not detect hubs on all your network interfaces. There may be a firewall or something blocking access on a particular inteface.

See also the NoRouteToHostException JavaDoc:

/**
 * Signals that an error occurred while attempting to connect a
 * socket to a remote address and port.  Typically, the remote
 * host cannot be reached because of an intervening firewall, or
 * if an intermediate router is down.
 *
 * @since   JDK1.1
 */
public class NoRouteToHostException extends SocketException {
FrederikNT commented 7 years ago

@wborn Thanks for the error info!

Is hub discovery intended to run infinite 4 times every 2 seconds like it shows in my logs? If hub discovery is just to find out the hub IP it should stop searching after a minute always when the binding is restarted or something shouldn't it?

Since both of my hubs are working I assume there is no problem to them and they are in the same internal network where no firewall is active. Actually all my devices are in the same network and I can't think of anything blocking. Any ideas how to find the blocker or how to prevent the binding to keep searching?

NoTechi

wborn commented 7 years ago

@FrederikNT Yes it keeps scanning for new hubs indefinitely. The binding does not know how many hubs you are connecting and at what moment in time. :-)

The log level was already tuned to debug by @digitaldan in PR 1643 but this PR has not yet been merged. I could merge that PR into the JAR as well.

codefalk commented 7 years ago

Great to see progress on this! Never the less, I still can't get the binding to work in reliable manner. When I restart openHAB it works for 2-3 button operations. After that I receive the following errors and there is no action triggered on my device (Samsung TV):

22:27:54.056 [INFO ] [smarthome.event.ItemCommandEvent ] - Item 'Ha_TVPRessButton' received command PowerOff 22:27:59.059 [WARN ] [ore.internal.events.OSGiEventManager] - Dispatching event to subscriber 'org.eclipse.smarthome.core.thing.internal.ThingManager@1719a38' takes more than 5000ms. 22:27:59.061 [WARN ] [ome.core.thing.internal.ThingManager] - Handler for thing 'harmonyhub:device:Wohnzimmer:23420645' takes more than 5000ms for processing event 22:27:59.888 [INFO ] [marthome.event.ItemStateChangedEvent] - Ha_TVPRessButton changed from PowerOn to PowerOff 22:28:05.966 [WARN ] [ocol.HarmonyExceptionLoggingCallback] - Smack message parsing exception. Content: '<oa xmlns='connect.logitech.com' mime='vnd.logitech.harmony/vnd.logitech.harmony.engine?holdAction' errorcode='503' errorstring='RF link lost'></oa></iq>' net.whistlingfish.harmony.protocol.HarmonyProtocolException: Got error response [503]: RF link lost at net.whistlingfish.harmony.protocol.OAReplyProvider.parse(OAReplyProvider.java:54)[210:org.openhab.binding.harmonyhub:2.1.0.201703190118] at net.whistlingfish.harmony.protocol.OAReplyProvider.parse(OAReplyProvider.java:19)[210:org.openhab.binding.harmonyhub:2.1.0.201703190118] at org.jivesoftware.smack.provider.Provider.parse(Provider.java:31)[210:org.openhab.binding.harmonyhub:2.1.0.201703190118] at org.jivesoftware.smack.util.PacketParserUtils.parseIQ(PacketParserUtils.java:632)[210:org.openhab.binding.harmonyhub:2.1.0.201703190118] at org.jivesoftware.smack.util.PacketParserUtils.parseStanza(PacketParserUtils.java:152)[210:org.openhab.binding.harmonyhub:2.1.0.201703190118] at org.jivesoftware.smack.AbstractXMPPConnection.parseAndProcessStanza(AbstractXMPPConnection.java:1025)[210:org.openhab.binding.harmonyhub:2.1.0.201703190118] at org.jivesoftware.smack.tcp.XMPPTCPConnection.access$500(XMPPTCPConnection.java:149)[210:org.openhab.binding.harmonyhub:2.1.0.201703190118] at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1026)[210:org.openhab.binding.harmonyhub:2.1.0.201703190118] at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$300(XMPPTCPConnection.java:980)[210:org.openhab.binding.harmonyhub:2.1.0.201703190118] at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:996)[210:org.openhab.binding.harmonyhub:2.1.0.201703190118] at java.lang.Thread.run(Thread.java:745)[:1.8.0_111]

Any ideas on this? Is this related to the observation FrederikNT reported?

Thanks a lot

FrederikNT commented 7 years ago

@wborn Oh if you could add the log level fix in the JAR that would be just great!!! :)

NoTechi

wborn commented 7 years ago

@codefalk That is a different problem. The Harmony hub seems to have trouble sending commands to your device errorcode='503' errorstring='RF link lost'. Did you check if the device is properly configured? It looks similar to the issue reported here. Maybe your problem has the same solution?

Power off commands always take a while before they are processed by the hub. It may also help to wait a bit between commands. Commands might fail when the hub is still busy.