cjaliaga / home-assistant-aquarea

Home Assistant integration for Panasonic Aquarea devices connected to Aquarea Smart Cloud
MIT License
76 stars 13 forks source link

[Bug]: keeps disconnecting #112

Open vaibhavratnaparkhi opened 3 months ago

vaibhavratnaparkhi commented 3 months ago

The problem

The integration keeps disconnecting and the sensors are disappearing. Screenshot_2024-06-09-22-20-19-24_c3a231c25ed346e59462e84656a70e50

What version of Home Assistant Core are you running?

core-2024.6.0

What type of installation are you running?

Home Assistant OS

What version of the integration are you running?

040700

Device description

Yes

Is the integration loading?

Yes

Is the adapter able to connect to the Aquarea Smart Cloud with a stable internet connection?

Yes

Are you able to perform the action you're trying to with the Aquarea Smart Cloud Site/App?

Yes

Area of the issue

No response

Anything in the logs?

No response

Additional information

No response

lrodorigo commented 3 months ago

Same Here. Reloading the integration does not solve the issue, neither temporarily.

  File "/usr/local/lib/python3.12/site-packages/aioaquarea/core.py", line 239, in request
    raise ApiError(error.error_code, error.error_message)
aioaquarea.errors.ApiError: API error: 1000-1503 - Failed communication with adaptor. Please make sure 
it is connected to the network or check again 
after resetting adaptor.
2024-05-11 01:43:38.045 ERROR (MainThread) [custom_components.aquarea.coordinator] Unexpected error fetching aquarea------@gmail.com-B253322680 data: API error: 1000-1503 - Failed communication with adaptor. Please make sure 
it is connected to the network or check again 
after resetting adaptor.
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 318, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/aquarea/coordinator.py", line 67, in _async_update_data
cjaliaga commented 3 months ago

TL;DR: Restart the adapter/device.

That error comes directly from the Aquarea service and it means that the Aquarea cloud is not able to connect to the adapter. I'm glad that their errors come with the specific information and the instructions to follow.

The integration works on a device direct mode, which means it asks the Aquarea Service to connect to the adapter and load the latest data directly from the device instead of relying on the data cached in the service (which can be outdated, by minutes or even worse).

In the past I've thought on trying to use the cached data if for whatever reason the integration fails to refresh the data with direct mode, but honestly I've decided to rather show the error as it's better to fix the situation than hide it until data that might be highly outdated.