NeoHub binding: Error connecting to my neoHub 2nd generation

Hi All,

I’m having trouble connecting the NeoHub binding to my 2nd generation hub. I have searched the forum for answers and I’ve tried quite a few different methods. I’m hoping someone can help me…

Installation details:

  • Raspberry Pi 4
  • neoHub (2nd generation)
  • Openhabian (openHAB3)
  • Openhab stable 3.1
  • Tried the standard binding and also the snapshot below:

After installing either version of the binding the hub is auto-discovered but when I add it via the UI I get errors…

I’ve also tried adding the bridge via a .things file:

Bridge neohub:neohub:neohub "Heatmiser NeoHub" [ hostName="", portNumber=4242, pollingInterval=60, socketTimeout=5, preferLegacyApi=false ]

This is what is shown in my logs:
2021-12-12 07_28_49-tail -f _var_log_openhab_openhab.log _var_log_openhab_events.log

I’ve tried setting “Prefer Legacy API” to true but that does not work either.

Any help would be really appreciated, thanks very much!

For those that arrive here due to the same issue, I found a way. First you have to open the Heatmiser App and enable “Legacy API” which is found in settings/api access/

Then set the neohub thing to “Prefer Legacy API”

I missed your post. And I am glad you solved it, by forcing legacy API. But I would like to figure out why it does not work in your system using the new API. So would you be willing to log:set TRACE on the binding and force non legacy API (for a few minutes) and post the salient data?

2022-06-06 14:57:56.963 [DEBUG] [ohub.internal.NeoHubDiscoveryService] - start background discovery..
2022-06-06 14:57:56.962 [INFO ] [openhab.event.InboxRemovedEvent     ] - Discovery Result with UID 'neohub:neohub:192_168_1_92' has been removed.
2022-06-06 14:57:56.975 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'neohub:neohub:192_168_1_92' changed from UNINITIALIZED to UNINITIALIZED (DISABLED)
2022-06-06 14:58:15.414 [DEBUG] [inding.neohub.internal.NeoHubHandler] - hub 'neohub:neohub:192_168_1_92' hostname=
2022-06-06 14:58:15.416 [DEBUG] [inding.neohub.internal.NeoHubHandler] - hub 'neohub:neohub:192_168_1_92' port=4242
2022-06-06 14:58:15.418 [DEBUG] [inding.neohub.internal.NeoHubHandler] - hub 'neohub:neohub:192_168_1_92' polling interval=60
2022-06-06 14:58:15.420 [DEBUG] [inding.neohub.internal.NeoHubHandler] - hub 'neohub:neohub:192_168_1_92' socketTimeout=5
2022-06-06 14:58:15.421 [DEBUG] [inding.neohub.internal.NeoHubHandler] - hub 'neohub:neohub:192_168_1_92' preferLegacyApi=false
2022-06-06 14:58:15.423 [DEBUG] [inding.neohub.internal.NeoHubHandler] - hub 'neohub:neohub:192_168_1_92' start background polling..
2022-06-06 14:58:15.395 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'neohub:neohub:192_168_1_92' changed from UNINITIALIZED (DISABLED) to INITIALIZING
2022-06-06 14:58:15.427 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'neohub:neohub:192_168_1_92' changed from INITIALIZING to UNKNOWN
2022-06-06 14:58:19.436 [TRACE] [binding.neohub.internal.NeoHubSocket] - received 0 characters..
2022-06-06 14:58:19.438 [TRACE] [binding.neohub.internal.NeoHubSocket] - << 
2022-06-06 14:58:19.440 [DEBUG] [inding.neohub.internal.NeoHubHandler] - hub 'neohub:neohub:192_168_1_92' legacy API is not supported!
2022-06-06 14:58:19.448 [TRACE] [binding.neohub.internal.NeoHubSocket] - received 0 characters..
2022-06-06 14:58:19.450 [TRACE] [binding.neohub.internal.NeoHubSocket] - << 
2022-06-06 14:58:19.452 [DEBUG] [inding.neohub.internal.NeoHubHandler] - hub 'neohub:neohub:192_168_1_92' new API is not supported!
2022-06-06 14:58:19.454 [WARN ] [inding.neohub.internal.NeoHubHandler] - hub 'neohub:neohub:192_168_1_92' currently neither legacy nor new API are supported!
2022-06-06 14:58:19.460 [TRACE] [binding.neohub.internal.NeoHubSocket] - received 0 characters..
2022-06-06 14:58:19.462 [TRACE] [binding.neohub.internal.NeoHubSocket] - << 
2022-06-06 14:58:19.464 [WARN ] [inding.neohub.internal.NeoHubHandler] - hub 'neohub:neohub:192_168_1_92' device data polling error: Connection refused (Connection refused)
openhab> bundle:list | grep NeoHub
266 x Active   x  80 x 3.2.0                 x openHAB Add-ons :: Bundles :: NeoHub Binding

This test was done on a new home so new: Network, Pi, hub and thermostats. Again I had problems until I turned on the Legacy API

@Curtis many thanks for getting back to me. It looks as though the NeoHub “new” API is even newer than the “new” API used by the OH binding. I need to dig into this further, and will get back to you in a few days.

1 Like

@Curtis it seems that the “new” API is a proprietary connection that Heatmiser is not going to share with us. However they say that they plan to maintain the “old” API in the system for purposes of third party integrations (like OH). The only difference is that in new systems the “old” API is disabled by default, and has to be enabled via the switch in the App. Therefore, I think the only thing that I will be able to do, is to modify the OH binding Read Me to explain this, and add a more explicit logger message in the case that the OH binding detects that the “old” API is disabled.

@Curtis just for info, the above change has just been merged into the OH code, and it will be released in v3.3 Milestone 7 resp. v3.3 Final. Many thanks to you for your support.

No problem at all.

Thanks very much for your help clarifying the issue, updating the documents and adding to the log for others who will no doubt come across it.

1 Like

PS you may be interested in this PR that I just created…