Logitech Harmony Hub

UPDATE: Went to build 186 and it is now working again.

This binding was working correctly in OH2 build 172 with openhabaddons build 1174. Yesterday I went to OH2 build 183 with openhab addons build 1178. I copied my harmonyhub.cfg from the 172 build location to the 183 build location so I am using the same cfg file. I now get the following error thrown while tailing the log:

04:46:54.007 [INFO ] [nhab.io.harmonyhub.HarmonyHubGateway] - HarmonyHub gateway activated
04:46:54.393 [ERROR] [org.apache.felix.configadmin ] - Cannot use configuration org.openhab.harmonyhub for [org.openhab.io.harmonyhub.HarmonyHubGateway, org.osgi.service.cm.ManagedService, id=97, bundle=11/file:/C:/openhab-online-183/addons/org.openhab.io.harmonyhub-1.9.0-SNAPSHOT.jar]: No visibility to configuration bound to file:/C:/openhab-online-183/addons/org.openhab.binding.harmonyhub-1.9.0-SNAPSHOT.jar
04:46:54.778 [ERROR] [org.eclipse.smarthome.core.transform] - [org.eclipse.smarthome.action.transformation.action(48)] Circular reference detected, getService returning null

Looking into the log file I see the following:

2016-03-11 06:11:13.515 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/C:/openhab-online-183/addons/org.openhab.io.harmonyhub-1.9.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.io.harmonyhub [11]
Unresolved requirement: Import-Package: org.apache.commons.lang; version=“2.6.0”

at org.eclipse.osgi.container.Module.start(Module.java:434)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:393)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1245)[8:org.apache.felix.fileinstall:3.5.0]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1217)[8:org.apache.felix.fileinstall:3.5.0]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1207)[8:org.apache.felix.fileinstall:3.5.0]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:504)[8:org.apache.felix.fileinstall:3.5.0]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:358)[8:org.apache.felix.fileinstall:3.5.0]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:310)[8:org.apache.felix.fileinstall:3.5.0]

As of right now the binding is no longer working. Any thoughts?

Hi Roy, thanks for the update, from your log file it would seem I accidentally put a version dependency on the apache.lang, eclipse can do this by default which can be annoying. In the meantime, I have the 2.0 version done and in code review, would you be willing to test? It’s much easier to configure, no more usernames, passwords or even item files, everything is auto configured, you just need to create an item file. The ReadMe is here:

you can download the jar here:

Sorry I meant the thing file is not required, just your items

I downloaded the jar file and will play with it over the next couple of days.

If you don’t mind, I can test this too. I have 3 hubs, and currently use activity switching, and buttons presses pretty extensively.

That sounds great, let me know how it goes.

I am seeing this in the console log:
09:59:49.934 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occured during notification of thing ‘harmonyhub:device:Mediaroom:30397246’ about bridge initialization at ‘null’: null
at org.eclipse.smarthome.core.thing.internal.ThingManager$8.run(ThingManager.java:686)[94:org.eclipse.smarthome.core.thing:]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_65]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_65]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)[:1.8.0_65]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[: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]

Hi Roy, I have not seen that, do you know what build of OH you are using?

I just installed this binding: works like a charm > zero errors so far. Will test it over the next couple of days. Thanks for porting this over to OH2

I have completed some testing this morning and am seeing inconsistent results in OpenHab 2.0 build 195. I have created a document with the steps, with screen captures, I took and the results. Dan, if you will PM me an email I can send it to you for review.