Arbuzov / home_assistant_delonghi_primadonna

Home assistant integration for the Delonghi coffee machine
Apache License 2.0
71 stars 15 forks source link

le-connection-abort-by-local on home-assistant.log #35

Closed paolo-rendano closed 1 year ago

paolo-rendano commented 1 year ago

Hello Arbuzov, thanks for this great integration. I'm using it with a De Longhi Dinamica Plus and it works very well. Since I have a lot of integrations and device i'm trying to clean up the home-assistant.log from any not useful log. Looking at the most frequent log I see these:

2023-01-19 11:47:12.573 WARNING (MainThread) [custom_components.delonghi_primadonna.device] TimeoutError: 2023-01-19 11:47:27.580 WARNING (MainThread) [custom_components.delonghi_primadonna.device] TimeoutError: 2023-01-19 11:47:39.233 WARNING (MainThread) [custom_components.delonghi_primadonna.device] BleakError: failed to discover services, device disconnected 2023-01-19 11:47:54.541 WARNING (MainThread) [custom_components.delonghi_primadonna.device] BleakDBusError: [org.bluez.Error.Failed] le-connection-abort-by-local 2023-01-19 11:48:12.579 WARNING (MainThread) [custom_components.delonghi_primadonna.device] TimeoutError: 2023-01-19 11:48:19.824 WARNING (MainThread) [custom_components.delonghi_primadonna.device] BleakError: failed to discover services, device disconnected

they happens with a frequency of about 2 minutes. Are they a "normal" behavior? Currently my HA is installed onto a RP4 8MB and the coffee machine is located less than 2 meters away from RPI, so they should have a good communication channel.

HA is completely updated with latest changes:

Home Assistant 2023.1.5 Supervisor 2022.12.1 Operating System 9.4 Frontend 20230110.0 - latest

Any ideas/advise to fix those messages?

Arbuzov commented 1 year ago

No this is not normal. I am getting the same behaviour at my main home assistant but the lab instance work fine. What bluetooth integration do you use?

paolo-rendano commented 1 year ago

I'm not using any other specific integration. The delonghi machine is the only one BT device that i control from HA. Anyway, as hint, at the moment I had to move the RPI4 some meters away from the coffee machine (let's say almost 5 meters with a light wall in the middle) and now this is not connecting anymore and the message appears every 20 seconds: 2023-02-05 10:45:43.383 WARNING (MainThread) [custom_components.delonghi_primadonna.device] TimeoutError: 2023-02-05 10:45:57.909 WARNING (MainThread) [custom_components.delonghi_primadonna.device] TimeoutError: 2023-02-05 10:46:13.193 WARNING (MainThread) [custom_components.delonghi_primadonna.device] TimeoutError: 2023-02-05 10:46:27.958 WARNING (MainThread) [custom_components.delonghi_primadonna.device] TimeoutError: 2023-02-05 10:46:42.954 WARNING (MainThread) [custom_components.delonghi_primadonna.device] TimeoutError: 2023-02-05 10:46:57.956 WARNING (MainThread) [custom_components.delonghi_primadonna.device] TimeoutError: 2023-02-05 10:47:07.026 WARNING (MainThread) [custom_components.delonghi_primadonna.device] BleakDBusError: [org.bluez.Error.Failed] le-connection-abort-by-local 2023-02-05 10:47:27.967 WARNING (MainThread) [custom_components.delonghi_primadonna.device] TimeoutError: 2023-02-05 10:47:42.967 WARNING (MainThread) [custom_components.delonghi_primadonna.device] TimeoutError: 2023-02-05 10:47:57.967 WARNING (MainThread) [custom_components.delonghi_primadonna.device] TimeoutError: 2023-02-05 10:48:12.970 WARNING (MainThread) [custom_components.delonghi_primadonna.device] TimeoutError: 2023-02-05 10:48:38.256 WARNING (MainThread) [custom_components.delonghi_primadonna.device] TimeoutError: 2023-02-05 10:48:53.259 WARNING (MainThread) [custom_components.delonghi_primadonna.device] TimeoutError: 2023-02-05 10:49:08.258 WARNING (MainThread) [custom_components.delonghi_primadonna.device] TimeoutError:

is that the case when the machine is not reachable? The weird thing is that from log (before.. pls see timestamps) I see the machine has been discovered: 2023-02-05 10:45:33.101 WARNING (MainThread) [custom_components.delonghi_primadonna.config_flow] Discovered Delonghi device: 00:A0:50:26:9A:63 D1545233

If I try to Turn on ecam, the machine is not switching on anymore and on the log it appears this message: 2023-02-05 10:49:15.617 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/config/custom_components/delonghi_primadonna/device.py", line 217, in power_on await self._connect() File "/config/custom_components/delonghi_primadonna/device.py", line 167, in _connect await self._client.connect() File "/usr/src/homeassistant/homeassistant/components/bluetooth/wrappers.py", line 249, in connect connected = await super().connect(kwargs) File "/usr/local/lib/python3.10/site-packages/bleak/init.py", line 471, in connect return await self._backend.connect(kwargs) File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/client.py", line 190, in connect assert_reply(reply) File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/utils.py", line 20, in assert_reply raise BleakDBusError(reply.error_name, reply.body) bleak.exc.BleakDBusError: [org.bluez.Error.Failed] Operation already in progress 2023-02-05 10:49:15.625 WARNING (MainThread) [custom_components.delonghi_primadonna.device] BleakDBusError: [org.bluez.Error.Failed] br-connection-canceled 2023-02-05 10:49:38.262 WARNING (MainThread) [custom_components.delonghi_primadonna.device] TimeoutError: 2023-02-05 10:49:53.263 WARNING (MainThread) [custom_components.delonghi_primadonna.device] TimeoutError:

I updated this morning before this test to: Home Assistant 2023.2.2 Supervisor 2023.01.1 Operating System 9.5 Frontend 20230202.0 - latest and 1.3.2 delonghi integration

Arbuzov commented 1 year ago

This issue was caused by the BLEAK and was fixed by the home assistant OS update. If it was not fixed, please let be know.