Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

August Lock Pro Gen3 connects and disconnects Yale BLE using Bluetooth proxy #132018

Open
nprez83 opened this issue Dec 1, 2024 · 5 comments
Open

Comments

@nprez83
Copy link
Contributor

nprez83 commented Dec 1, 2024

The problem

I've have two August Lock Pro Gen3 for a very long time, and used them with Yale BLE and bluetooth proxies without issues. I used the Lilygo-tdongle-s3 as my proxies and used them with the arduino platform. A few months ago they stopped connecting, but it took me a while to realize it as one of them was close enough to my NUC that it continued to work without issues. So I'm not really sure when the problem started. Based on some ready I'm suspect it may have been around 2024.4, but I'm unsure.

Since I realized they weren't connecting, I've started to troubleshoot them and have used a number of different configurations, all without success. The configuration that comes closest to working is the following.

esp32:
  board: esp32-s3-devkitc-1
  variant: esp32s3
  framework:
    type: arduino
    version: recommended
    platform_version: 6.9.0

With the above configuration the locks connect, but immediately disconnect when I send the lock or unlock command, and the reconnect, at which point I can retry the command and most of the times it works. If I wait a minute and try the command again, the behavior repeats.

I've also tried using esp-idf, with the following configuration, as well as leaving the version and platform_version to their defaults:

esp32:
  board: esp32-s3-devkitc-1
  variant: esp32s3
  framework:
    type: esp-idf
    version: 5.3.1
    platform_version: 6.9.0

esp32:
  board: esp32-s3-devkitc-1
  variant: esp32s3
  framework:
    type: esp-idf
    version: 5.0.2
    platform_version: 6.3.2

But the lock doesn't even connnect at all with these, it keeps disconnecting and reconnecting. See logs below.

As far as the esp_ble and bluetooth proxy I've used the following, but have also tried leaving the interval and window to the defaults.

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

bluetooth_proxy:
  active: true

Last bit of detail is a I have a Yale Assure Lock 2 that is working great, with the proxy, and with both arduino and esp-idf configurations, so this seems to be related to the August locks only.

What version of Home Assistant Core has the issue?

2024.11.3

What was the last working version of Home Assistant Core?

cannot remember

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Yale Bluetooth

Link to integration documentation on our website

https://www.home-assistant.io/integrations/yalexs_ble/

Diagnostics information

Logs when using esp-idf. The lock MAC is 78:9C:85:05:1C:DE

INFO ESPHome 2024.11.2
INFO Reading configuration /config/esphome/lilygo-tdongle-s3-2.yaml...
WARNING The selected ESP-IDF framework version is not the recommended one. If there are connectivity or build issues please remove the manual version.
WARNING The selected ESP-IDF framework version is not the recommended one. If there are connectivity or build issues please remove the manual version.
INFO Starting log output from 192.168.0.152 using esphome API
INFO Successfully connected to lilygo-tdongle-s3-2 @ 192.168.0.152 in 0.036s
INFO Successful handshake with lilygo-tdongle-s3-2 @ 192.168.0.152 in 0.020s
[11:34:26][I][app:100]: ESPHome version 2024.11.2 compiled on Dec  1 2024, 11:15:45
[11:34:26][C][wifi:600]: WiFi:
[11:34:26][C][wifi:428]:   Local MAC: F4:12:FA:41:43:FC
[11:34:26][C][wifi:433]:   SSID: 'crash_guest'[redacted]
[11:34:26][C][wifi:436]:   IP Address: 192.168.0.152
[11:34:26][C][wifi:439]:   BSSID: 04:42:1A:DB:82:A1[redacted]
[11:34:26][C][wifi:441]:   Hostname: 'lilygo-tdongle-s3-2'
[11:34:26][C][wifi:443]:   Signal strength: -56 dB ▂▄▆█
[11:34:26][C][wifi:447]:   Channel: 1
[11:34:26][C][wifi:448]:   Subnet: 255.255.255.0
[11:34:26][C][wifi:449]:   Gateway: 192.168.0.1
[11:34:26][C][wifi:450]:   DNS1: 192.168.0.1
[11:34:26][C][wifi:451]:   DNS2: 0.0.0.0
[11:34:26][C][logger:185]: Logger:
[11:34:26][C][logger:186]:   Level: VERBOSE
[11:34:26][C][logger:188]:   Log Baud Rate: 115200
[11:34:26][C][logger:189]:   Hardware UART: USB_SERIAL_JTAG
[11:34:26][C][bluetooth_proxy:091]: Bluetooth Proxy:
[11:34:26][C][bluetooth_proxy:092]:   Active: YES
[11:34:26][C][bluetooth_proxy:093]:   Connections: 3
[11:34:26][C][bluetooth_proxy:094]:   Raw advertisements: YES
[11:34:26][C][esp32_ble:391]: ESP32 BLE:
[11:34:26][C][esp32_ble:392]:   MAC address: F4:12:FA:41:43:FE
[11:34:26][C][esp32_ble_tracker:658]: BLE Tracker:
[11:34:26][C][captive_portal:089]: Captive Portal:
[11:34:27][C][mdns:116]: mDNS:
[11:34:27][C][mdns:117]:   Hostname: lilygo-tdongle-s3-2
[11:34:27][V][mdns:118]:   Services:
[11:34:27][V][mdns:120]:   - _esphomelib, _tcp, 6053
[11:34:27][V][mdns:122]:     TXT: version = 2024.11.2
[11:34:27][V][mdns:122]:     TXT: mac = f412fa4143fc
[11:34:27][V][mdns:122]:     TXT: platform = ESP32
[11:34:27][V][mdns:122]:     TXT: board = esp32-s3-devkitc-1
[11:34:27][V][mdns:122]:     TXT: network = wifi
[11:34:27][C][esphome.ota:073]: Over-The-Air updates:
[11:34:27][C][esphome.ota:074]:   Address: lilygo-tdongle-s3-2.local:3232
[11:34:27][C][esphome.ota:075]:   Version: 2
[11:34:27][C][esphome.ota:078]:   Password configured
[11:34:27][C][safe_mode:018]: Safe Mode:
[11:34:27][C][safe_mode:019]:   Boot considered successful after 60 seconds
[11:34:27][C][safe_mode:021]:   Invoke after 10 boot attempts
[11:34:28][V][esp32_ble:331]: (BLE) gap_event_handler - 3
[11:34:28][V][bluetooth_proxy:058]: Proxying raw packet from 3A:22:3F:29:9C:6E, length 31. RSSI: -75 dB
[11:34:28][V][bluetooth_proxy:061]: Proxying 1 packets
[11:34:29][V][esp32_ble:331]: (BLE) gap_event_handler - 3
[11:34:29][V][bluetooth_proxy:058]: Proxying raw packet from 60:8E:B9:92:72:BC, length 38. RSSI: -76 dB
[11:34:29][V][bluetooth_proxy:061]: Proxying 1 packets
[11:34:29][V][esp-idf:000][BTU_TASK]: W (103329) BT_APPL: gattc_conn_cb: if=3 st=0 id=3 rsn=0x13

[11:34:29][V][esp-idf:000][BTU_TASK]: W (103331) BT_APPL: gattc_conn_cb: if=4 st=0 id=4 rsn=0x13

[11:34:29][V][esp-idf:000][BTU_TASK]: W (103333) BT_APPL: gattc_conn_cb: if=5 st=0 id=5 rsn=0x13

[11:34:29][V][esp-idf:000][BTU_TASK]: W (103335) BT_HCI: hcif disc complete: hdl 0x1, rsn 0x13

[11:34:29][V][esp32_ble:359]: (BLE) gattc_event [esp_gatt_if: 3] - 41
[11:34:29][V][esp32_ble_client:120]: [0] [78:9C:85:05:1C:DE] gattc_event_handler: event=41 gattc_if=3
[11:34:29][D][esp32_ble_client:171]: [0] [78:9C:85:05:1C:DE] ESP_GATTC_DISCONNECT_EVT, reason 19
[11:34:29][V][bluetooth_proxy:102]: [0] Free connection
[11:34:29][V][bluetooth_proxy:102]: [1] Free connection
[11:34:29][V][bluetooth_proxy:102]: [2] Free connection
[11:34:29][V][esp32_ble:359]: (BLE) gattc_event [esp_gatt_if: 3] - 5
[11:34:29][V][esp32_ble_client:120]: [0] [] gattc_event_handler: event=5 gattc_if=3
[11:34:29][D][esp32_ble_client:110]: [0] [] ESP_GATTC_CLOSE_EVT
[11:34:29][V][bluetooth_proxy:102]: [0] Free connection
[11:34:29][V][bluetooth_proxy:102]: [1] Free connection
[11:34:29][V][bluetooth_proxy:102]: [2] Free connection
[11:34:30][V][esp32_ble:331]: (BLE) gap_event_handler - 3
[11:34:30][V][esp32_ble:331]: (BLE) gap_event_handler - 3
[11:34:41][I][bluetooth_proxy:286]: [0] [78:9C:85:05:1C:DE] Connecting v3 without cache
[11:34:41][V][bluetooth_proxy:104]: [0] Used connection by [78:9C:85:05:1C:DE]
[11:34:41][V][bluetooth_proxy:102]: [1] Free connection
[11:34:41][V][bluetooth_proxy:102]: [2] Free connection
[11:34:41][D][esp32_ble_tracker:222]: Pausing scan to make connection...
[11:34:41][V][esp32_ble:331]: (BLE) gap_event_handler - 18
[11:34:41][I][esp32_ble_client:066]: [0] [78:9C:85:05:1C:DE] 0x00 Attempting BLE connection
[11:34:42][V][esp32_ble:359]: (BLE) gattc_event [esp_gatt_if: 3] - 40
[11:34:42][V][esp32_ble_client:120]: [0] [78:9C:85:05:1C:DE] gattc_event_handler: event=40 gattc_if=3
[11:34:42][D][esp32_ble_client:110]: [0] [78:9C:85:05:1C:DE] ESP_GATTC_CONNECT_EVT
[11:34:42][V][esp32_ble:359]: (BLE) gattc_event [esp_gatt_if: 3] - 2
[11:34:42][V][esp32_ble_client:120]: [0] [78:9C:85:05:1C:DE] gattc_event_handler: event=2 gattc_if=3
[11:34:42][D][esp32_ble_client:110]: [0] [78:9C:85:05:1C:DE] ESP_GATTC_OPEN_EVT
[11:34:42][V][esp32_ble:359]: (BLE) gattc_event [esp_gatt_if: 4] - 40
[11:34:42][V][esp32_ble_client:120]: [1] [] gattc_event_handler: event=40 gattc_if=4
[11:34:42][V][esp32_ble:359]: (BLE) gattc_event [esp_gatt_if: 5] - 40
[11:34:42][V][esp32_ble_client:120]: [2] [] gattc_event_handler: event=40 gattc_if=5
[11:34:42][D][esp32_ble_tracker:273]: Starting scan...
[11:34:42][V][esp32_ble:331]: (BLE) gap_event_handler - 2
[11:34:42][V][esp32_ble:331]: (BLE) gap_event_handler - 7
[11:34:42][V][esp32_ble:331]: (BLE) gap_event_handler - 3
[11:34:48][W][bluetooth_proxy:250]: [0] [78:9C:85:05:1C:DE] Connection already established
[11:34:48][V][bluetooth_proxy:104]: [0] Used connection by [78:9C:85:05:1C:DE]
[11:34:48][V][bluetooth_proxy:102]: [1] Free connection
[11:34:48][V][bluetooth_proxy:102]: [2] Free connection
[11:34:48][W][bluetooth_proxy:414]: Cannot get GATT services, not connected
[11:34:48][I][esp32_ble_client:084]: [0] [78:9C:85:05:1C:DE] Disconnecting.
[11:34:48][V][esp-idf:000][BTU_TASK]: E (122070) BT_GATT: GATTC_ConfigureMTU GATT_BUSY conn_id = 3

[11:34:48][V][esp-idf:000][BTU_TASK]: W (122073) BT_HCI: hci cmd send: disconnect: hdl 0x1, rsn:0x13

[11:34:48][V][esp-idf:000][BTU_TASK]: W (122076) BT_APPL: gattc_conn_cb: if=3 st=0 id=3 rsn=0x16

[11:34:48][V][esp-idf:000][BTU_TASK]: W (122078) BT_APPL: gattc_conn_cb: if=4 st=0 id=4 rsn=0x16

[11:34:48][V][esp-idf:000][BTU_TASK]: W (122080) BT_APPL: gattc_conn_cb: if=5 st=0 id=5 rsn=0x16

[11:34:48][V][esp-idf:000][BTU_TASK]: W (122083) BT_HCI: hcif disc complete: hdl 0x1, rsn 0x16

[11:34:48][V][esp32_ble:359]: (BLE) gattc_event [esp_gatt_if: 3] - 6
[11:34:48][V][esp32_ble_client:120]: [0] [78:9C:85:05:1C:DE] gattc_event_handler: event=6 gattc_if=3
[11:34:48][D][esp32_ble_client:110]: [0] [78:9C:85:05:1C:DE] ESP_GATTC_SEARCH_CMPL_EVT
[11:34:48][I][esp32_ble_client:227]: [0] [78:9C:85:05:1C:DE] Connected
[11:34:48][V][esp32_ble:359]: (BLE) gattc_event [esp_gatt_if: 3] - 5
[11:34:48][V][esp32_ble_client:120]: [0] [78:9C:85:05:1C:DE] gattc_event_handler: event=5 gattc_if=3
[11:34:48][D][esp32_ble_client:110]: [0] [78:9C:85:05:1C:DE] ESP_GATTC_CLOSE_EVT
[11:34:48][V][bluetooth_proxy:102]: [0] Free connection
[11:34:48][V][bluetooth_proxy:102]: [1] Free connection
[11:34:48][I][bluetooth_proxy:286]: [0] [78:9C:85:05:1C:DE] Connecting v3 without cache
[11:34:48][V][bluetooth_proxy:104]: [0] Used connection by [78:9C:85:05:1C:DE]
[11:34:48][V][bluetooth_proxy:102]: [1] Free connection
[11:34:48][V][bluetooth_proxy:102]: [2] Free connection

Logs when using the arduino platform. This is what happens when I send a commend to the lock.

INFO ESPHome 2024.11.2
INFO Reading configuration /config/esphome/lilygo-tdongle-s3-2.yaml...
INFO Starting log output from 192.168.0.152 using esphome API
INFO Successfully connected to lilygo-tdongle-s3-2 @ 192.168.0.152 in 0.021s
INFO Successful handshake with lilygo-tdongle-s3-2 @ 192.168.0.152 in 0.064s
[12:21:26][I][app:100]: ESPHome version 2024.11.2 compiled on Dec  1 2024, 12:20:44
[12:21:26][C][wifi:600]: WiFi:
[12:21:26][C][wifi:428]:   Local MAC: F4:12:FA:41:43:FC
[12:21:26][C][wifi:433]:   SSID: 'crash_guest'[redacted]
[12:21:26][C][wifi:436]:   IP Address: 192.168.0.152
[12:21:26][C][wifi:440]:   BSSID: C8:7F:54:3F:FC:02[redacted]
[12:21:26][C][wifi:441]:   Hostname: 'lilygo-tdongle-s3-2'
[12:21:26][C][wifi:443]:   Signal strength: -56 dB ▂▄▆█
[12:21:26][C][wifi:447]:   Channel: 1
[12:21:26][C][wifi:448]:   Subnet: 255.255.255.0
[12:21:26][C][wifi:449]:   Gateway: 192.168.0.1
[12:21:26][C][wifi:450]:   DNS1: 192.168.0.1
[12:21:26][C][wifi:451]:   DNS2: 0.0.0.0
[12:21:26][C][logger:185]: Logger:
[12:21:26][C][logger:186]:   Level: VERBOSE
[12:21:26][C][logger:188]:   Log Baud Rate: 115200
[12:21:26][C][bluetooth_proxy:091]: Bluetooth Proxy:
[12:21:26][C][bluetooth_proxy:092]:   Active: YES
[12:21:26][C][bluetooth_proxy:093]:   Connections: 3
[12:21:26][C][bluetooth_proxy:094]:   Raw advertisements: YES
[12:21:26][V][esp32_ble:331]: (BLE) gap_event_handler - 3
[12:21:26][V][bluetooth_proxy:059]: Proxying raw packet from 78:9C:85:05:1C:DE, length 43. RSSI: -64 dB
[12:21:26][V][bluetooth_proxy:061]: Proxying 1 packets
[12:21:26][C][esp32_ble:391]: ESP32 BLE:
[12:21:26][C][esp32_ble:393]:   MAC address: F4:12:FA:41:43:FD
[12:21:26][C][esp32_ble:394]:   IO Capability: none
[12:21:26][V][esp32_ble:331]: (BLE) gap_event_handler - 3
[12:21:26][C][captive_portal:089]: Captive Portal:
[12:21:26][C][mdns:116]: mDNS:
[12:21:26][C][mdns:117]:   Hostname: lilygo-tdongle-s3-2
[12:21:26][V][mdns:118]:   Services:
[12:21:26][V][mdns:120]:   - _esphomelib, _tcp, 6053
[12:21:26][V][mdns:122]:     TXT: version = 2024.11.2
[12:21:26][V][mdns:122]:     TXT: mac = f412fa4143fc
[12:21:26][V][mdns:122]:     TXT: platform = ESP32
[12:21:26][V][mdns:122]:     TXT: board = esp32-s3-devkitc-1
[12:21:26][V][mdns:122]:     TXT: network = wifi
[12:21:26][C][esphome.ota:073]: Over-The-Air updates:
[12:21:26][C][esphome.ota:074]:   Address: lilygo-tdongle-s3-2.local:3232
[12:21:26][C][esphome.ota:075]:   Version: 2
[12:21:26][C][esphome.ota:078]:   Password configured
[12:21:26][C][safe_mode:018]: Safe Mode:
[12:21:26][C][safe_mode:020]:   Boot considered successful after 60 seconds
[12:21:26][V][esp32_ble:331]: (BLE) gap_event_handler - 3
[12:21:26][V][esp32_ble:331]: (BLE) gap_event_handler - 3
[12:21:40][I][bluetooth_proxy:283]: [0] [78:9C:85:05:1C:DE] Connecting v3 with cache
[12:21:40][V][bluetooth_proxy:105]: [0] Used connection by [78:9C:85:05:1C:DE]
[12:21:40][V][bluetooth_proxy:102]: [1] Free connection
[12:21:40][V][bluetooth_proxy:102]: [2] Free connection
[12:21:40][D][esp32_ble_tracker:222]: Pausing scan to make connection...
[12:21:40][V][esp32_ble:331]: (BLE) gap_event_handler - 18
[12:21:40][I][esp32_ble_client:067]: [0] [78:9C:85:05:1C:DE] 0x00 Attempting BLE connection
[12:21:40][V][esp-idf:000][BTU_TASK]: W (33263) BT_HCI: hcif disc complete: hdl 0x1, rsn 0x3e

[12:21:41][V][esp32_ble:359]: (BLE) gattc_event [esp_gatt_if: 3] - 40
[12:21:41][V][esp32_ble_client:121]: [0] [78:9C:85:05:1C:DE] gattc_event_handler: event=40 gattc_if=3
[12:21:41][D][esp32_ble_client:110]: [0] [78:9C:85:05:1C:DE] ESP_GATTC_CONNECT_EVT
[12:21:41][V][esp32_ble:359]: (BLE) gattc_event [esp_gatt_if: 3] - 2
[12:21:41][V][esp32_ble_client:121]: [0] [78:9C:85:05:1C:DE] gattc_event_handler: event=2 gattc_if=3
[12:21:41][D][esp32_ble_client:110]: [0] [78:9C:85:05:1C:DE] ESP_GATTC_OPEN_EVT
[12:21:41][I][esp32_ble_client:154]: [0] [78:9C:85:05:1C:DE] Connected
[12:21:41][V][bluetooth_proxy:105]: [0] Used connection by [78:9C:85:05:1C:DE]
[12:21:41][V][bluetooth_proxy:102]: [1] Free connection
[12:21:41][V][bluetooth_proxy:102]: [2] Free connection
[12:21:41][V][esp32_ble:359]: (BLE) gattc_event [esp_gatt_if: 4] - 40
[12:21:41][V][esp32_ble_client:121]: [1] [] gattc_event_handler: event=40 gattc_if=4
[12:21:41][V][esp32_ble:359]: (BLE) gattc_event [esp_gatt_if: 5] - 40
[12:21:41][V][esp32_ble_client:121]: [2] [] gattc_event_handler: event=40 gattc_if=5
[12:21:41][D][esp32_ble_tracker:273]: Starting scan...
[12:21:41][V][esp32_ble:331]: (BLE) gap_event_handler - 2
[12:21:41][V][esp32_ble:331]: (BLE) gap_event_handler - 7
[12:21:41][V][bluetooth_proxy.connection:241]: [0] [78:9C:85:05:1C:DE] Registering for GATT characteristic notifications handle 25
[12:21:41][V][esp32_ble:359]: (BLE) gattc_event [esp_gatt_if: 3] - 38
[12:21:41][V][esp32_ble_client:121]: [0] [78:9C:85:05:1C:DE] gattc_event_handler: event=38 gattc_if=3
[12:21:41][D][esp32_ble_client:110]: [0] [78:9C:85:05:1C:DE] ESP_GATTC_REG_FOR_NOTIFY_EVT
[12:21:41][V][esp32_ble:331]: (BLE) gap_event_handler - 3
[12:21:41][V][bluetooth_proxy:059]: Proxying raw packet from 44:30:8A:2E:11:A3, length 38. RSSI: -59 dB
[12:21:41][V][bluetooth_proxy:061]: Proxying 1 packets
[12:21:41][V][bluetooth_proxy.connection:219]: [0] [78:9C:85:05:1C:DE] Writing GATT descriptor handle 26
[12:21:41][V][bluetooth_proxy.connection:181]: [0] [78:9C:85:05:1C:DE] Writing GATT characteristic handle 23
[12:21:41][V][esp32_ble:331]: (BLE) gap_event_handler - 3
[12:21:49][V][esp32_ble_client:121]: [0] [78:9C:85:05:1C:DE] gattc_event_handler: event=46 gattc_if=3
[12:21:49][D][esp32_ble_client:306]: [0] [78:9C:85:05:1C:DE] Event 46
[12:21:49][V][esp32_ble:331]: (BLE) gap_event_handler - 3
[12:21:49][V][bluetooth_proxy:059]: Proxying raw packet from 6C:9A:A1:AE:43:0D, length 38. RSSI: -70 dB
[12:21:49][V][bluetooth_proxy:061]: Proxying 1 packets
[12:21:49][V][esp32_ble:359]: (BLE) gattc_event [esp_gatt_if: 3] - 18
[12:21:49][V][esp32_ble_client:121]: [0] [78:9C:85:05:1C:DE] gattc_event_handler: event=18 gattc_if=3
[12:21:49][D][esp32_ble_client:188]: [0] [78:9C:85:05:1C:DE] cfg_mtu status 0, mtu 512
[12:21:49][V][esp32_ble:331]: (BLE) gap_event_handler - 3
[12:21:49][V][bluetooth_proxy:059]: Proxying raw packet from 80:C5:F2:1A:20:60, length 31. RSSI: -68 dB
[12:21:49][V][bluetooth_proxy:061]: Proxying 1 packets
[12:21:49][V][esp32_ble:359]: (BLE) gattc_event [esp_gatt_if: 3] - 9
[12:21:49][V][esp32_ble_client:121]: [0] [78:9C:85:05:1C:DE] gattc_event_handler: event=9 gattc_if=3
[12:21:49][D][esp32_ble_client:110]: [0] [78:9C:85:05:1C:DE] ESP_GATTC_WRITE_DESCR_EVT
[12:21:49][V][esp-idf:000][BTU_TASK]: W (42592) BT_HCI: hcif disc complete: hdl 0x1, rsn 0x13

[12:21:49][V][esp-idf:000][BTU_TASK]: W (42594) BT_APPL: gattc_conn_cb: if=3 st=0 id=3 rsn=0x13

[12:21:49][V][esp-idf:000][BTU_TASK]: W (42596) BT_APPL: gattc_conn_cb: if=4 st=0 id=4 rsn=0x13

[12:21:49][V][esp-idf:000][BTU_TASK]: W (42598) BT_APPL: gattc_conn_cb: if=5 st=0 id=5 rsn=0x13

[12:21:49][V][esp32_ble:359]: (BLE) gattc_event [esp_gatt_if: 3] - 4
[12:21:49][V][esp32_ble_client:121]: [0] [78:9C:85:05:1C:DE] gattc_event_handler: event=4 gattc_if=3
[12:21:49][D][esp32_ble_client:110]: [0] [78:9C:85:05:1C:DE] ESP_GATTC_WRITE_CHAR_EVT
[12:21:49][W][bluetooth_proxy.connection:081]: [0] [78:9C:85:05:1C:DE] Error writing char/descriptor at handle 0x17, status=133
[12:21:49][V][esp32_ble:359]: (BLE) gattc_event [esp_gatt_if: 3] - 41
[12:21:49][V][esp32_ble_client:121]: [0] [78:9C:85:05:1C:DE] gattc_event_handler: event=41 gattc_if=3
[12:21:49][D][esp32_ble_client:172]: [0] [78:9C:85:05:1C:DE] ESP_GATTC_DISCONNECT_EVT, reason 19
[12:21:49][V][bluetooth_proxy:102]: [0] Free connection
[12:21:49][V][bluetooth_proxy:102]: [1] Free connection
[12:21:49][V][bluetooth_proxy:102]: [2] Free connection
[12:21:49][V][esp32_ble:359]: (BLE) gattc_event [esp_gatt_if: 3] - 5
[12:21:49][V][esp32_ble_client:121]: [0] [] gattc_event_handler: event=5 gattc_if=3
[12:21:49][D][esp32_ble_client:110]: [0] [] ESP_GATTC_CLOSE_EVT
[12:21:49][V][bluetooth_proxy:102]: [0] Free connection
[12:21:49][V][bluetooth_proxy:102]: [1] Free connection
[12:21:49][V][bluetooth_proxy:102]: [2] Free connection

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

home-assistant bot commented Dec 1, 2024

Hey there @bdraco, mind taking a look at this issue as it has been labeled with an integration (yalexs_ble) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of yalexs_ble can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign yalexs_ble Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


yalexs_ble documentation
yalexs_ble source
(message by IssueLinks)

@bdraco
Copy link
Member

bdraco commented Dec 1, 2024

I've had the best luck with esp-idf 4.4.8 with my Gen3

@bdraco
Copy link
Member

bdraco commented Dec 1, 2024

I'm using a GLi s10. YAML below in case it helps

substitutions:
  name: "entryclosetgliproxy"
  friendly_name: entryclosetgliproxy

esphome:
  name: ${name}
  friendly_name: ${friendly_name}
  project:
    name: esphome.bluetooth-proxy
    version: "1.0"
# turn on Power LED when esphome boots
  on_boot:
    then:
      - output.turn_on: power_led


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

# Configuration fo V2.3 hardware revision
ethernet:
  type: IP101
  mdc_pin: GPIO23
  mdio_pin: GPIO18
  clk_mode: GPIO0_IN
  phy_addr: 1
  power_pin: GPIO5

# Comment the above and use this instead for V1.0 revision of the hardware
# ethernet:
#   type: LAN8720
#   mdc_pin: GPIO23
#   mdio_pin: GPIO18
#   clk_mode: GPIO17_OUT
#   phy_addr: 1

api:
logger:

ota:
  platform: esphome

dashboard_import:
  package_import_url: github://esphome/bluetooth-proxies/gl-s10.yaml@main

esp32_ble_tracker:
  scan_parameters:
    active: false
# Bluetooth LED blinks when receiving Bluetooth advertising
#  on_ble_advertise:
#    then:
#      - output.turn_on: bluetooth_led
#      - delay: 0.5s
#      - output.turn_off: bluetooth_led

bluetooth_proxy:
  active: true

button:
- platform: safe_mode
  name: Safe Mode Boot
  entity_category: diagnostic


## DEVICE SPECIFIC CONFIGURATION
# network LED (white one) configured as status led
status_led:
  pin:
    number: GPIO32
    inverted: true

# button on the side labeled RESET
binary_sensor:
  - platform: gpio
    pin:
      number: GPIO33
      inverted: true
    name: "Reset Button"

# output settings for LED's marked Power and Bluetooth
# power LED use: see code line 12
# bluetooth LED use: see code line 41
output:
  - platform: gpio
    pin: GPIO14
    inverted: true
    id: power_led
  - platform: gpio
    pin: GPIO12
    inverted: true
    id: bluetooth_led

# since these pins are broken out inside and labeled as I2C pins they're configured here
i2c:
  sda: 15
  scl: 13
  scan: true

@nprez83
Copy link
Contributor Author

nprez83 commented Dec 2, 2024

I tried, but I can't even get it to connect at all when I use esp-idf, even if I use 4.4.8. At least with the arduino framework, it actually connects, and I can get it to carry out commands, albeit with the hiccup of becoming unavailable first. Any other thoughts? Again, I used both of my August Pro Gen3 for a long time with Yale BLE + bluetooth proxy without issues, and even currently my Yale Assure Lock 2 works well.

@nprez83
Copy link
Contributor Author

nprez83 commented Dec 2, 2024

One more detail. When I control the lock using the August app the lock disconnects from the proxy and becomes unavailable in home assistant momentarily but reconnects after a few seconds/minutes showing the correct state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants