Arbuzov / home_assistant_delonghi_primadonna

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

ESPHome Bluetooth Proxy is unsupported #23

Closed codyc1515 closed 1 year ago

codyc1515 commented 1 year ago

Getting the following error in my Home Assistant logs:

Logger: homeassistant
Source: components/esphome/bluetooth/client.py:263
First occurred: 8:17:40 PM (1 occurrences)
Last logged: 8:17:40 PM

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/delonghi_primadonna/device.py", line 226, in beverage_start
    await self._connect()
  File "/config/custom_components/delonghi_primadonna/device.py", line 162, in _connect
    await self._client.connect()
  File "/usr/src/homeassistant/homeassistant/components/bluetooth/models.py", line 306, in connect
    return 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/src/homeassistant/homeassistant/components/esphome/bluetooth/client.py", line 84, in _async_wrap_bluetooth_operation
    return await func(self, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/components/esphome/bluetooth/client.py", line 263, in connect
    await connected_future
bleak.exc.BleakError: Error ESP_GATT_CONN_FAIL_ESTABLISH while connecting: Connection failed to establish
Arbuzov commented 1 year ago

Does not looks like something related to the integration. Looks like the bleak error. The bleak is not stable enougth but HA enforce to use it. Could you please share some details on your configuratuon?

SCCMOG commented 1 year ago

I can confirm an issue with the ESPHome Gateways, tried mac without colons also.

2023-01-28 18:02:46.278 WARNING (MainThread) [custom_components.delonghi_primadonna.device] BleakError: A device with address 00:a0:50:3d:5c:62 could not be found.

groosman commented 1 year ago

@Arbuzov thanks for the great work in making this integration. I'm experiencing the same issue with ESP Bluetooth proxy. Although the coffeemachine (De'Longhi Dinamica Plus ECAM370.95.T) is detected, the other options don't respond and I get the Bleakerror. Any thoughts on what I could try?

Coffeemachine detected: detected

Bleakerror: error Delonghi

YAML code:


  name: bluetooth_proxy
  friendly_name: Bluetooth Proxy

esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}

esp32:
  board: esp32doit-devkit-v1
  framework:
    type: esp-idf

logger:

api:
  encryption:
    key: **************************************

ota:
  password: "*******************************"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

esp32_ble_tracker:
  scan_parameters:
    interval: 1100ms
    window: 1100ms
    active: true

bluetooth_proxy:
  active: true
codyc1515 commented 1 year ago

Not seeing this issue since a while now. Going to close. Thank you

groosman commented 1 year ago

@codyc1515 you've got it working with ESP Bluetooth Proxy?

codyc1515 commented 1 year ago

Well I am using the ESPHome Bluetooth Proxy and not seeing the original issue anymore so in my mind the issue is resolved now. The ESPHome folks pushed a lot of fixes the past few months.

groosman commented 1 year ago

Okay, thanks... Don't know where to look to get this fixed, yet... I guess I'll just have to start from scratch.