Arbuzov / home_assistant_delonghi_primadonna

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

Cannot turn on Delonghi Primadonna anymore #89

Open mannipulator opened 10 months ago

mannipulator commented 10 months ago

Hello, thanks for this great integration, I love it !

Since the last release my Primadonna stopped working, which means I cannot turn it on by Home Assistant any more. The status, like descaling, is it running or not seems to work, these entities update if I turn the Primadonna on manually.

In the protocols I have after each try to turn it on 2 logs, a warning and and error:

this is the warning log: Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: custom_components.delonghi_primadonna.device Source: custom_components/delonghi_primadonna/device.py:355 Integration: DeLonghi BLE (documentation, issues) First occurred: 7. November 2023 um 22:10:00 (9 occurrences) Last logged: 07:34:47

BleakDBusError: [org.bluez.Error.Failed] Operation failed with ATT error: 0x0e (Unlikely Error) BleakDBusError: [org.bluez.Error.Failed] Operation already in progress

and this is the error-log: Logger: homeassistant Source: components/bluetooth/wrappers.py:292 First occurred: 07:33:17 (9 occurrences) Last logged: 07:34:47

Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/config/custom_components/delonghi_primadonna/device.py", line 294, in power_on await self.send_command(BYTES_POWER) File "/config/custom_components/delonghi_primadonna/device.py", line 377, in send_command await self._connect() File "/config/custom_components/delonghi_primadonna/device.py", line 222, in _connect raise error File "/config/custom_components/delonghi_primadonna/device.py", line 216, in _connect await self._client.connect() File "/usr/src/homeassistant/homeassistant/components/bluetooth/wrappers.py", line 292, in connect connected = await super().connect(kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/bleak/init.py", line 605, in connect return await self._backend.connect(kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/bleak/backends/bluezdbus/client.py", line 249, in connect assert_reply(reply) File "/usr/local/lib/python3.11/site-packages/bleak/backends/bluezdbus/utils.py", line 22, in assert_reply raise BleakDBusError(reply.error_name, reply.body) bleak.exc.BleakDBusError: [org.bluez.Error.Failed] br-connection-canceled

I hope this helps ;)

codyc1515 commented 10 months ago

What Bluetooth adapter are you using? How many other Bluetooth devices are you accessing in HA? Are you using Bluetooth Proxies? Is the coffee machine far away from your HA device?

MaxEl3ven commented 9 months ago

I have the same issue as @mannipulator with the same machine (Delonghi Primadonna). This integration is the only one using bluetooth on my home assistant system. The machine is aprox. 6m away from my bluetooth adapter which worked fine with this integration for the last months. I am using a TP Link UB400 Nano bluetooth dongle. The integration does recognize when my machine gets turned on.

EDIT: It seeems like the entity ID changed! Setting it to "button.kaffeemaschine_turn_on" (kaffeemaschine is the name of the device as I set it up in the integration) instead of the old "button.turn_on_ecam" brought everything back to work!

mannipulator commented 9 months ago

In my case, the problem has probably solved itself and everything is working as usual again. Nevertheless, here is some more information about my setup:

HassOS on RPi4 Home Assistant Version 23.11.2 Delonghi BLE v1.5.3 Devices connected with Bluetooth: 2

mannipulator commented 9 months ago

Ok it is back again After each major update of HASS, the integration stops working. I recognized that if I turn the Primadonna manually on, the Bluetooth symbol on the display appears around every 10 seconds for less then a second and then disappears. Maybe that’s a sign of a failing connection.

here is the log:

Logger: homeassistant Source: custom_components/delonghi_primadonna/device.py:222 Integration: DeLonghi BLE (documentation, issues) First occurred: 07:14:40 (2 occurrences) Last logged: 07:16:35

Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/config/custom_components/delonghi_primadonna/device.py", line 302, in power_on await self.send_command(BYTES_POWER) File "/config/custom_components/delonghi_primadonna/device.py", line 403, in send_command await self._connect() File "/config/custom_components/delonghi_primadonna/device.py", line 234, in _connect raise error File "/config/custom_components/delonghi_primadonna/device.py", line 222, in _connect raise BleakError( bleak.exc.BleakError: A device with address 00:A0:50:14:19:B0 could not be found.

codyc1515 commented 8 months ago

Is the app working for you? Not being able to find the MAC address at all suggests that the coffee machine itself is not broadcasting or not within range of your Bluetooth adapter.

mannipulator commented 6 months ago

No, it stopped to work now completely, I cannot get any connection to the device.