cdpuk/ha-bestway

This past week I've had so far 3 disconnections... possibly since update but could be coincidence?

Closed this issue · 5 comments

About 2 days ago I found out my HA had lost connection with the hottub for 2 days, so no temp control occurred and so it went quite a lot colder. After restarting HA it seemed to connect ok and so put it down to a one off since I've been using this for a good few months now without issue.

Today I looked and realised it had got disconnected again at a time its last request was to heat to max.. so it's been maintaining 40 for 2 days.. a big cost problem if it reoccurs! Again a restart of HA got it working.

A little later I've just looked and it's gone again. I'm not over-familiar with HA but did look around for where logs are and found:

This error originated from a custom integration.

Logger: custom_components.bestway
Source: helpers/update_coordinator.py:168
Integration: Bestway (documentation, issues)
First occurred: January 8, 2023 at 10:17:11 PM (2 occurrences)
Last logged: January 8, 2023 at 11:21:55 PM

Error fetching Bestway API data: Error communicating with API:

Suggesting to me it's losing contact with bestway cloud system, not my hottub (as restart is reconnecting). This all seems to me to have started happening since the recent updates, although as per the title accept that could be coincidence. So need to figure out what's going on as I can't use this anymore if it's going to keep disconnecting and leaving the hot tub in last state.

Disconnected again and seen another error:

This error originated from a custom integration.

Logger: custom_components.bestway
Source: custom_components/bestway/bestway.py:339
Integration: Bestway (documentation, issues)
First occurred: 7:38:08 AM (684 occurrences)
Last logged: 3:13:28 PM

Data update failed
Traceback (most recent call last):
File "/config/custom_components/bestway/bestway.py", line 340, in _do_get
response = await self._session.get(url, headers=headers)
File "/usr/lib/python3.10/site-packages/aiohttp/client.py", line 535, in _request
conn = await self._connector.connect(
File "/usr/lib/python3.10/site-packages/aiohttp/connector.py", line 522, in connect
raise e
File "/usr/lib/python3.10/site-packages/aiohttp/connector.py", line 512, in connect
await fut
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/config/custom_components/bestway/init.py", line 139, in _async_update_data
await self.api.refresh_bindings()
File "/config/custom_components/bestway/bestway.py", line 176, in refresh_bindings
device.device_id: device for device in await self._get_bindings()
File "/config/custom_components/bestway/bestway.py", line 183, in _get_bindings
api_data = await self._do_get(f"{self._api_root}/app/bindings", headers)
File "/config/custom_components/bestway/bestway.py", line 339, in _do_get
async with async_timeout.timeout(_TIMEOUT):
File "/usr/lib/python3.10/site-packages/async_timeout/init.py", line 129, in aexit
self._do_exit(exc_type)
File "/usr/lib/python3.10/site-packages/async_timeout/init.py", line 212, in _do_exit
raise asyncio.TimeoutError
asyncio.exceptions.TimeoutError

If that helps? :)

Just updated but no luck, still having this problem, it lasts around 2h 30mins or so and goes to unavailable with the following:
image

I've tried removing and re-adding, I've tried removing and downgrading.. no luck. Only fix I've found for now is I scheduled a restart of HA every 2h to keep it connected to the hot tub.

cdpuk commented

Thanks for the feedback. I've not seen any errors on mine, howver it's not really being used in anger at the moment since the Spa is packed away for winter.

Are you on the US or EU API?

Thanks for replying, I'm using EU

cdpuk commented

Having done a bit more investigation, I can't see anything wrong at the moment. The timeout error suggests either an issue with the API itself, or your internet connection. I continue to have no errors talking to the EU API.

I attempted to set an artificially low timeout to trigger those errors on my instance, but it simply retries as it should do.

Given nobody else is reporting the same issue and it can't be reproduced, I'm going to close this for now. Obviously I'll be watching for this when my spa is back online in 2-3 months time.