Following up with log output of a failure where the entities become unavailable (and then recover):
2022-01-09 13:25:26 DEBUG (MainThread) [homeassistant.components.fjaraskupan] Finished fetching Fjaraskupan Updater data in 10.917 seconds (success: True)
2022-01-09 13:25:56 DEBUG (MainThread) [homeassistant.components.fjaraskupan] Finished fetching Fjaraskupan Updater data in 10.882 seconds (success: True)
2022-01-09 13:26:26 DEBUG (MainThread) [homeassistant.components.fjaraskupan] Finished fetching Fjaraskupan Updater data in 10.905 seconds (success: True)
2022-01-09 13:26:56 ERROR (MainThread) [homeassistant.components.fjaraskupan] Unexpected error fetching Fjaraskupan Updater data: Timeout on connect
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/dbus_next/aio/message_bus.py", line 305, in call
await future
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/asyncio/tasks.py", line 492, in wait_for
fut.result()
asyncio.exceptions.CancelledError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/fjaraskupan/__init__.py", line 156, in __aenter__
await self._client.__aenter__()
File "/usr/local/lib/python3.9/site-packages/bleak/backends/client.py", line 61, in __aenter__
await self.connect()
File "/usr/local/lib/python3.9/site-packages/bleak/backends/bluezdbus/client.py", line 267, in connect
reply = await asyncio.wait_for(
File "/usr/local/lib/python3.9/asyncio/tasks.py", line 494, in wait_for
raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh
self.data = await self._async_update_data()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 147, in _async_update_data
return await self.update_method()
File "/usr/src/homeassistant/homeassistant/components/fjaraskupan/__init__.py", line 80, in async_update_data
await device.update()
File "/usr/local/lib/python3.9/site-packages/fjaraskupan/__init__.py", line 210, in update
async with self:
File "/usr/local/lib/python3.9/site-packages/fjaraskupan/__init__.py", line 159, in __aenter__
raise FjaraskupanTimeout("Timeout on connect") from exc
fjaraskupan.FjaraskupanTimeout: Timeout on connect
2022-01-09 13:26:56 DEBUG (MainThread) [homeassistant.components.fjaraskupan] Finished fetching Fjaraskupan Updater data in 10.090 seconds (success: False)
2022-01-09 13:27:26 ERROR (MainThread) [homeassistant.components.fjaraskupan] Unexpected error fetching Fjaraskupan Updater data: Timeout on connect
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/dbus_next/aio/message_bus.py", line 305, in call
await future
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/asyncio/tasks.py", line 492, in wait_for
fut.result()
asyncio.exceptions.CancelledError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/fjaraskupan/__init__.py", line 156, in __aenter__
await self._client.__aenter__()
File "/usr/local/lib/python3.9/site-packages/bleak/backends/client.py", line 61, in __aenter__
await self.connect()
File "/usr/local/lib/python3.9/site-packages/bleak/backends/bluezdbus/client.py", line 267, in connect
reply = await asyncio.wait_for(
File "/usr/local/lib/python3.9/asyncio/tasks.py", line 494, in wait_for
raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh
self.data = await self._async_update_data()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 147, in _async_update_data
return await self.update_method()
File "/usr/src/homeassistant/homeassistant/components/fjaraskupan/__init__.py", line 80, in async_update_data
await device.update()
File "/usr/local/lib/python3.9/site-packages/fjaraskupan/__init__.py", line 210, in update
async with self:
File "/usr/local/lib/python3.9/site-packages/fjaraskupan/__init__.py", line 159, in __aenter__
raise FjaraskupanTimeout("Timeout on connect") from exc
fjaraskupan.FjaraskupanTimeout: Timeout on connect
2022-01-09 13:27:26 DEBUG (MainThread) [homeassistant.components.fjaraskupan] Finished fetching Fjaraskupan Updater data in 10.067 seconds (success: False)
2022-01-09 13:27:49 INFO (MainThread) [homeassistant.components.fjaraskupan] Fetching Fjaraskupan Updater data recovered
2022-01-09 13:27:49 DEBUG (MainThread) [homeassistant.components.fjaraskupan] Finished fetching Fjaraskupan Updater data in 3.879 seconds (success: True)
Note that I have changed update interval to 20 seconds between updates to speed things up. I also see these types of failures:
2022-01-09 14:26:52 ERROR (MainThread) [homeassistant.components.fjaraskupan] Unexpected error fetching Fjaraskupan Updater data: Error on connect
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/fjaraskupan/__init__.py", line 156, in __aenter__
await self._client.__aenter__()
File "/usr/local/lib/python3.9/site-packages/bleak/backends/client.py", line 61, in __aenter__
await self.connect()
File "/usr/local/lib/python3.9/site-packages/bleak/backends/bluezdbus/client.py", line 278, in connect
assert_reply(reply)
File "/usr/local/lib/python3.9/site-packages/bleak/backends/bluezdbus/utils.py", line 23, in assert_reply
raise BleakDBusError(reply.error_name, reply.body)
bleak.exc.BleakDBusError: [org.bluez.Error.Failed] Software caused connection abort
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh
self.data = await self._async_update_data()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 147, in _async_update_data
return await self.update_method()
File "/usr/src/homeassistant/homeassistant/components/fjaraskupan/__init__.py", line 80, in async_update_data
await device.update()
File "/usr/local/lib/python3.9/site-packages/fjaraskupan/__init__.py", line 210, in update
async with self:
File "/usr/local/lib/python3.9/site-packages/fjaraskupan/__init__.py", line 162, in __aenter__
raise FjaraskupanBleakError("Error on connect") from exc
fjaraskupan.FjaraskupanBleakError: Error on connect
I regularly see update times > 20 seconds, so I have increased the timeout for the bleak client to 60 sec. Will post updates if I get any more insights.