Harmony Binding Discovery - null pointer exception in 2.5

Running openHAB on Windows 10. Using current distribution at 2.5

  1. What would be causing these traps to be issued with Harmony discovery service? Are there assumed required dependencies (services, binding, transforms…) or configuration entries not mentioned in the docs?

  2. Once the Harmony Hubs have been configured, is it even necessary that this be running? Is there a configuration property that can tell it not to run?

Launching the openHAB runtime…

                      __  _____    ____

____ ____ ___ ____ / / / / | / __ )
/ __ / __ / _ / __ / // / /| | / __ |
/ /
/ / // / __/ / / / __ / ___ |/ // /
_/ ./_// /// /// |/___/
/_/ 2.5.0
Release Build

Hit ‘’ for a list of available commands
and ‘[cmd] --help’ for help on a specific command.
Hit ‘’ or type ‘system:shutdown’ or ‘logout’ to shutdown openHAB.

openhab> Exception in thread “HarmonyDiscoveryServer(tcp/55511)” java.lang.NullPointerException
at org.openhab.binding.harmonyhub.internal.discovery.HarmonyHubDiscoveryService.hubDiscovered(HarmonyHubDiscoveryService.java:277)
at org.openhab.binding.harmonyhub.internal.discovery.HarmonyHubDiscoveryService.access$2(HarmonyHubDiscoveryService.java:274)
at org.openhab.binding.harmonyhub.internal.discovery.HarmonyHubDiscoveryService$HarmonyServer.run(HarmonyHubDiscoveryService.java:253)
at java.lang.Thread.run(Thread.java:748)
Exception in thread “HarmonyDiscoveryServer(tcp/55671)” java.lang.NullPointerException
at org.openhab.binding.harmonyhub.internal.discovery.HarmonyHubDiscoveryService.hubDiscovered(HarmonyHubDiscoveryService.java:277)
at org.openhab.binding.harmonyhub.internal.discovery.HarmonyHubDiscoveryService.access$2(HarmonyHubDiscoveryService.java:274)
at org.openhab.binding.harmonyhub.internal.discovery.HarmonyHubDiscoveryService$HarmonyServer.run(HarmonyHubDiscoveryService.java:253)
at java.lang.Thread.run(Thread.java:748)
Exception in thread “HarmonyDiscoveryServer(tcp/55852)” java.lang.NullPointerException
at org.openhab.binding.harmonyhub.internal.discovery.HarmonyHubDiscoveryService.hubDiscovered(HarmonyHubDiscoveryService.java:277)
at org.openhab.binding.harmonyhub.internal.discovery.HarmonyHubDiscoveryService.access$2(HarmonyHubDiscoveryService.java:274)
at org.openhab.binding.harmonyhub.internal.discovery.HarmonyHubDiscoveryService$HarmonyServer.run(HarmonyHubDiscoveryService.java:253)
at java.lang.Thread.run(Thread.java:748)
Exception in thread “HarmonyDiscoveryServer(tcp/55977)” java.lang.NullPointerException
at org.openhab.binding.harmonyhub.internal.discovery.HarmonyHubDiscoveryService.hubDiscovered(HarmonyHubDiscoveryService.java:277)
at org.openhab.binding.harmonyhub.internal.discovery.HarmonyHubDiscoveryService.access$2(HarmonyHubDiscoveryService.java:274)
at org.openhab.binding.harmonyhub.internal.discovery.HarmonyHubDiscoveryService$HarmonyServer.run(HarmonyHubDiscoveryService.java:253)
at java.lang.Thread.run(Thread.java:748)
Exception in thread “HarmonyDiscoveryServer(tcp/56109)” java.lang.NullPointerException
at org.openhab.binding.harmonyhub.internal.discovery.HarmonyHubDiscoveryService.hubDiscovered(HarmonyHubDiscoveryService.java:277)
at org.openhab.binding.harmonyhub.internal.discovery.HarmonyHubDiscoveryService.access$2(HarmonyHubDiscoveryService.java:274)
at org.openhab.binding.harmonyhub.internal.discovery.HarmonyHubDiscoveryService$HarmonyServer.run(HarmonyHubDiscoveryService.java:253)
at java.lang.Thread.run(Thread.java:748)

Please open an Issue on GitHub.

OK, will do, was not sure if my setup or bug.

1 Like

What firmware version of Harmony Hub you are using?

It should be equal or greater than: 4.15.206

Firmware before 4.15.206 is using XMPP as communication protocol. Since 4.15.206 it’s communicating over Web Socket. OH2 binding supports Web Socket only, since February 2019 (= after 2.5.0.M1). It should be mentioned in the release notes, but it’s not.

Is there any way the binding could check and warn instead of NPE ?

Sure, but you have to ask digitaldan (he is the developer).

I have two hubs on the network. Both at version 4.15.250

Of course due to the NPE auto discovery did not find. I manually created two entries using IP# of each hub. At that point, all the devices/activities were found.
But this auto discovery is continuing to run all day issuing the error in the server window, each time with a different port reference.

As a final update. Determined that an old Logitech Revue (google tv) with partial harmony support was causing the NPE. Thanks to digitaldan for posting a fix.