ERROR: Harmony-Binding

As I mentioned, I will take a look, we had a large refactoring of the base libraries which has probably caused an issue when we need to reconnect.

@digitaldan
I just had a look at the reconnect issue. It seems to be caused by the fact that the retryJob in HarmonyHubHandler cancels its own execution in disconnectFromHub() on line 230. When I comment that line the InterruptedException no longer occurs.

When the connection is setup Smack waits for a reply from the hub for 5s using awaitNanos. That method also aborts when the current thread has been interrupted due to cancellation:

     * @throws InterruptedException if the current thread is interrupted
     *         (and interruption of thread suspension is supported)
     */
    long awaitNanos(long nanosTimeout) throws InterruptedException;

I’ll wait and see if you agree and have a nice solution for this. :slight_smile:

@wborn thanks! I was just starting to look, that sounds reasonable, let me take a peek and see what I can do.

@digitaldan’s PR #2201 with the reconnection fix just got merged and is available in 2.1.0-SNAPSHOT build #893 or newer.

I’ve also uploaded a org.openhab.binding.harmonyhub-2.1.0-SNAPSHOT.jar with this fix.

1 Like

It’s great to have a fix for the Harmony Hub problem. to update to this version of the binding I can simply replace the .jar file in the relevant binding folder with the new version? Or am I better placed to uninstall and reinstall the binding?

TIA

The best way to upgrade depends on what kind of installation you have:

  • If you already have a org.openhab.binding.harmonyhub-2.1.0-SNAPSHOT.jar in your /addons directory you can simply replace that one.
  • When you have a OH 2.1.0-SNAPSHOT installation and use the online repository, uninstalling and reinstalling the Harmony Binding should upgrade it.

After updating, the command:

bundle:list|grep Harmony

should show a version from April 24th or newer, e.g. 2.1.0.201704251551 when using the online repository. Versions prior to April 24th will have one of the known issues listed above.

1 Like

Thanks so much for the fix! It works now like a charm.

1 Like

Hi. I try to update harmony binding as @wborn sudgestion, but after uninstall/install i got old version.
I used paper ui and snapshot build.
What should i do to update binding?

This was also the case for me. After switching “Use online repositories” to OFF in Paper UI it took the binding from the openhab2-addons KAR file. Make sure that you have the correct version installed under /usr/share/openhab2/addons

Had the same problem. It always took the old version again.

At the end I just copied org.openhab.binding.harmonyhub-2.1.0-SNAPSHOT.jar into addons folder…

Now I have version: 2.1.0.201704261428

At the moment harmony binding is running, but I’m going to observe it…

Edit: After more than 1 week, continously running, no errors anymore. Good job!

1 Like

I had the same issue with my hub.
(it was disconnected after I re-installed my km200 binding - don’t know, if this matters though.)

However, I assume that changing the heartbeat interval in general triggers something in the binding (re-initialization or something) which leads to a re-connection!?
I have set it to 120 sec and it started working right away.

So is this a known issue maybe?
EDIT: Of course it is - and it’s fixed obviously (see above :wink:
Will check out the latest snapshot

Me too. I’m now running 2.1.0.201704261428 and the connection to the Harmony Hub is working well again. Big thanks to the maintainers! Much appreciated.

Hi. I have 2.1.0.201705011011 | HarmonyHub Binding.
I got power falue, and harmony was turned off (openHAB works on battery).

Send heartbeat failed
Failed communicating with Harmony Hub

When power was on - i have:

heartbeat failed
Failed communicating with Harmony Hub
Could not start activity
Failed communicating with Harmony Hub

Binding not start working until i restart it manually:

bundle:restart 208

Is this a bug?

Binding does not reconnect to Harmony Hab after Harmony Hab power off & on.
Can anybody check it (simply turn off and on harmony)?

@martiniman I tested this (power OFF/ON) a little while before (with version 2.1.0.201704261428 ) and harmonyhub was reconnected. But in the meantime I have installed version ( 2.1.0.201705151816) and I will be able to test it this evening!

I have 2.1.0.201705011011 version, and wat the latest version?

latest version= 2.1.0.201705151816

I updated to 2.1.0.201705151816 will chek this evening too :slight_smile:

@martiniman I tested it right now. Harmony Hub was reconnected. Then it was offline once. “Communication error”. But then it reconnected again. It is running since then.
EDIT: 11 hours later: it is still running!

Thanks @Celaeno1, after update my Hab works too.