MindrustUK / Heatmiser-for-home-assistant

Heatmiser Neo-Hub / Neostat support for home-assistant.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NeoHubConnectionError

swinster opened this issue · comments

Hi,

I have a connection error between Home Assistant Docker and the Neo hub. I see the following log entries in HA (currently running 2023.1.1).

2023-06-12 23:03:33.360 ERROR (MainThread) [neohub] [1] Could not connect to NeoHub at Neo-Hub: [Errno -3] Try again
2023-06-12 23:03:33.361 ERROR (MainThread) [custom_components.heatmiserneo] Unexpected error fetching neostat data: [Errno -3] Try again
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 225, in _async_refresh
    self.data = await self._async_update_data()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 181, in _async_update_data
    return await self.update_method()
  File "/config/custom_components/heatmiserneo/__init__.py", line 41, in async_update_data
    _, devices_data = await hub.get_live_data()
  File "/usr/local/lib/python3.10/site-packages/neohubapi/neohub.py", line 439, in get_live_data
    hub_data = await self._send(message)
  File "/usr/local/lib/python3.10/site-packages/neohubapi/neohub.py", line 133, in _send
    raise last_exception
neohubapi.neohub.NeoHubConnectionError: [Errno -3] Try again

I have no issue when I connect via the Andriod Heatmiser app, and I can ping the Neohub device on the local network. Just to be sure, I have also rebooted the Neohub.

I see NO ability to change the API setting within the Heatmiser app.

I have deleted and re-added the integration and am running the latest "Heatmiser Neo Integration" via HACS.

Any further ideas?

Hi @swinster ,

So the big bit here is I see NO ability to change the API setting within the Heatmiser app. what platform are you on? iPhone or Android? On Android this should be under Settings -> Account -> API can you have another look and confirm that you have no ability to enable legacy API and it doesn't appear in a sub menu etc?

Thanks for getting back to me @MindrustUK . FYI, this is Andriod, and this is what I see in the Account section of the app, from the Home screen:

image

There is another way to access the "Account" section when you click into the location, then click "Settings --> Account --> Security" (which is slightly different, but the same result:

image

So the second way is almost right, click into Location then Settings -> Account -> API note the API option not Security let us know how you get on with that.

So, the submenus in the Account section are Security (as you see above) and Users; unfortunately, no API option.

Screenshot_20230613-110330

Hmm, interesting, I'm running the same version of the app and it appears as an option. It 'should' be there by default, do you have a NeoHub Version 1 or 2? I'd also consider reaching out to Heatmiser support as I'm not sure what would cause this option not to be available...

Thanks. TBH, I can't remember what version it is - it is several years old now, and there are no noticeable markings on the case. There is what looks to be a serial number label, so I'm sure Heatmiser support will be able to look it up. I will give them a ping.

OK, an update.

Heatmiser said the nehub was offline. I rebooted it again, and it eventually came back online. Still, the integration would not connect. Eventually, I deleted the integration and re-added and hey presto, it all started working.

They also suggest I have the Neohub v1 as it doesn't have v2 markings, and the API option in the Account menu will NOT appear in the Heatmiser app for a v1 Neohub.

Ultimately, no idea what got broken, but it's working again (fixed by effectively switching it off/on again!!!!).