core: Unable to connect to Yale lock via active Bluetooth proxy

The problem

I am trying to connect to connect to a Yale Bluetooth lock via an active Bluetooth proxy (on ESPHome 2022.9.3). I am able to discover the device, and it is correctly associated with the lock that is pulled in from the August cloud integration (so the discovered device shows the name of the August integration lock). However, I am not able to include the device. When I click “Configure” then “Submit”, the configuration errors out saying “Unknown error occurred”. I do see some error coming from yalexs-ble in the Home Assistant logs, and I do see some connection attempt being made from the ESPHome device. Using a different computer (my laptop), I am able to start Home Assistant with the native Bluetooth integration, and I am able to configure the Yale Access Bluetooth connection to the lock after connecting it to the August cloud integration, so I believe the problem is somewhere in the new Bluetooth proxy functionality.

The ESPHome device is a TinyPico ESP32 board. The lock has a Yale/August bluetooth module.

What version of Home Assistant Core has the issue?

2022.10.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Yale Access Bluetooth

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

ESPHome configuration:

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

bluetooth_proxy:
  active: true

Anything in the logs that might be useful for us?

From the Home Assistant logs:

Front (M105TDC): Auth error: key or slot (key index) is incorrect: Front (M105TDC): Characteristic None not found!

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/yalexs_ble/session.py", line 126, in _locked_write
    await self._start_notify(self._notify)
  File "/usr/local/lib/python3.10/site-packages/yalexs_ble/session.py", line 153, in _start_notify
    await self.client.start_notify(self.read_characteristic, callback)
  File "/usr/local/lib/python3.10/site-packages/bleak/__init__.py", line 546, in start_notify
    raise BleakError(f"Characteristic {char_specifier} not found!")
bleak.exc.BleakError: Characteristic None not found!

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/yalexs_ble/push.py", line 552, in _queue_update
    await self._update_task
  File "/usr/local/lib/python3.10/site-packages/yalexs_ble/push.py", line 86, in _async_wrap_operation_lock
    return await func(self, *args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/yalexs_ble/push.py", line 107, in _async_wrap_retry_bluetooth_connection_error
    return await func(self, *args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/yalexs_ble/push.py", line 370, in _update
    async with lock:
  File "/usr/local/lib/python3.10/site-packages/yalexs_ble/lock.py", line 61, in __aenter__
    await self.connect()
  File "/usr/local/lib/python3.10/site-packages/yalexs_ble/lock.py", line 104, in connect
    response = await self.secure_session.execute(self._disconnected_event, cmd)
  File "/usr/local/lib/python3.10/site-packages/yalexs_ble/session.py", line 190, in execute
    return write_task.result()
  File "/usr/local/lib/python3.10/site-packages/yalexs_ble/session.py", line 91, in _write
    return await self._locked_write(command)
  File "/usr/local/lib/python3.10/site-packages/yalexs_ble/session.py", line 130, in _locked_write
    raise AuthError(f"{self.name}: {err}") from err
yalexs_ble.session.AuthError: Front (M105TDC): Characteristic None not found!

From the redacted ESPHome logs:

[00:23:19][I][esp32_ble_client:058]: Attempting BLE connection to XX
[00:23:22][I][esp32_ble_client:142]: Service UUID: XX
[00:23:22][I][esp32_ble_client:143]:   start_handle: XX  end_handle: XX
[00:23:22][I][esp32_ble_client.service:057]:  characteristic XX, handle XX, properties XX
[00:23:22][I][esp32_ble_client.service:057]:  characteristic XX, handle XX, properties XX
[00:23:22][I][esp32_ble_client:142]: Service UUID: XX
[00:23:22][I][esp32_ble_client:143]:   start_handle: XX  end_handle: XX
[00:23:22][I][esp32_ble_client:142]: Service UUID: XX
[00:23:22][I][esp32_ble_client:143]:   start_handle: XX  end_handle: XX
[00:23:22][I][esp32_ble_client.service:057]:  characteristic XX, handle XX, properties XX
[00:23:22][I][esp32_ble_client.service:057]:  characteristic XX, handle XX, properties XX
[00:23:22][I][esp32_ble_client.service:057]:  characteristic XX, handle XX, properties XX
[00:23:23][I][esp32_ble_client:143]:   start_handle: XX  end_handle: XX
[00:23:23][I][esp32_ble_client:142]: Service UUID: XX
[00:23:23][I][esp32_ble_client:143]:   start_handle: XX  end_handle: XX
[00:23:23][I][esp32_ble_client.service:057]:  characteristic XX, handle XX, properties XX
[00:23:23][I][esp32_ble_client.service:057]:  characteristic XX, handle XX, properties XX
[00:23:23][I][esp32_ble_client.service:057]:  characteristic XX, handle XX, properties XX
[00:23:23][I][esp32_ble_client.service:057]:  characteristic XX, handle XX, properties XX
[00:23:23][I][esp32_ble_client.service:057]:  characteristic XX, handle XX, properties XX
[00:23:23][I][esp32_ble_client.service:057]:  characteristic XX, handle XX, properties XX
[00:23:23][I][esp32_ble_client.service:057]:  characteristic XX, handle XX, properties XX
[00:23:23][I][esp32_ble_client.service:057]:  characteristic XX, handle XX, properties XX
[00:23:23][I][esp32_ble_client:142]: Service UUID: XX
[00:23:23][I][esp32_ble_client:143]:   start_handle: XX  end_handle: XX
[00:23:23][I][esp32_ble_client.service:057]:  characteristic XX, handle XX, properties XX
[00:23:23][I][esp32_ble_client.service:057]:  characteristic XX, handle XX, properties XX
[00:23:23][I][esp32_ble_client.service:057]:  characteristic XX, handle XX, properties XX
[00:23:23][I][esp32_ble_client:142]: Service UUID: XX
[00:23:23][I][esp32_ble_client:143]:   start_handle: XX  end_handle: XX
[00:23:23][I][esp32_ble_client.service:057]:  characteristic XX, handle XX, properties XX
[00:23:23][I][esp32_ble_client.service:057]:  characteristic XX, handle XX, properties XX
[00:23:23][I][esp32_ble_client.service:057]:  characteristic XX, handle XX, properties XX
[00:23:23][I][esp32_ble_client:142]: Service UUID: XX
[00:23:23][I][esp32_ble_client:143]:   start_handle: XX  end_handle: XX
[00:23:23][I][esp32_ble_client.service:057]:  characteristic XX, handle XX, properties XX
[00:23:23][I][esp32_ble_client.service:057]:  characteristic XX, handle XX, properties XX
[00:23:23][I][esp32_ble_client.service:057]:  characteristic XX, handle XX, properties XX
[00:23:23][I][esp32_ble_client.service:057]:  characteristic XX, handle XX, properties XX
[00:23:23][I][esp32_ble_client.service:057]:  characteristic XX, handle XX, properties XX
[00:23:23][I][esp32_ble_client:142]: Service UUID: XX
[00:23:23][I][esp32_ble_client:143]:   start_handle: XX  end_handle: XX
[00:23:23][I][esp32_ble_client.service:057]:  characteristic XX, handle XX, properties XX
[00:23:23][I][esp32_ble_client.service:057]:  characteristic XX, handle XX, properties XX
[00:23:23][I][esp32_ble_client.service:057]:  characteristic XX, handle XX, properties XX

I am happy to more provide information from the ESPHome logs as well, but I’m not sure what information there is sensitive.

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 26 (14 by maintainers)

Most upvoted comments

Its not the same issue. The op’s issue was yalexs_ble.session.AuthError: Front (M105TDC): Characteristic None not found!

I logged the ESP32 via serial and it seems it is crashing while trying to connect to the August lock. Logs here: https://github.com/esphome/issues/issues/3687

Here is the issue I submitted for ESPhome devs to take a look at:

https://github.com/esphome/issues/issues/3687