esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
290 stars 35 forks source link

ble_client isn't logging service and charateristic like the docs say it should #5833

Open hachi opened 4 months ago

hachi commented 4 months ago

The problem

Documentation at https://esphome.io/components/ble_client.html#setting-up-devices says adding a client and connecting should cause it to enumerate and dump services and characteristics including UUID.

The example output shows this at level INFO

@jesserockz on discord notes the service dump has moved to VERBOSE log level, but characteristic dump is not able to happen during scan/connect

I noticed that if I guess and add a sensor it will walk the single service I am querying and give me characteristics.

I was trying to use this so I can create a component or config to talk to an HPA-250B air filter.

Which version of ESPHome has the issue?

Version: 2024.4.1

What type of installation are you using?

pip

Which version of Home Assistant has the issue?

N/A

What platform are you using?

ESP32

Board

No response

Component causing the issue

No response

Example YAML snippet

esp32_ble_tracker:

ble_client:
  - mac_address: 9C:1D:58:93:5B:DE
    id: air_filter
    auto_connect: true

Anything in the logs that might be useful for us?

[20:05:56][V][esp32_ble_client:223]: [0] [9C:1D:58:93:5B:DE] Service UUID: 0x1800
[20:05:56][V][esp32_ble_client:225]: [0] [9C:1D:58:93:5B:DE]  start_handle: 0x1  end_handle: 0xb
[20:05:56][V][esp32_ble_client:223]: [0] [9C:1D:58:93:5B:DE] Service UUID: 0x1801
[20:05:56][V][esp32_ble_client:225]: [0] [9C:1D:58:93:5B:DE]  start_handle: 0xc  end_handle: 0xf
[20:05:56][V][esp32_ble_client:223]: [0] [9C:1D:58:93:5B:DE] Service UUID: 0x180A
[20:05:56][V][esp32_ble_client:225]: [0] [9C:1D:58:93:5B:DE]  start_handle: 0x10  end_handle: 0x22
[20:05:56][V][esp32_ble_client:223]: [0] [9C:1D:58:93:5B:DE] Service UUID: 0xFFF0
[20:05:56][V][esp32_ble_client:225]: [0] [9C:1D:58:93:5B:DE]  start_handle: 0x23  end_handle: 0xffff
[20:05:56][I][esp32_ble_client:227]: [0] [9C:1D:58:93:5B:DE] Connected
[20:05:56][V][esp32_ble_client:069]: [0] [9C:1D:58:93:5B:DE]  characteristic 0x2A23, handle 0x12, properties 0x2
[20:05:56][V][esp32_ble_client:069]: [0] [9C:1D:58:93:5B:DE]  characteristic 0x2A24, handle 0x14, properties 0x2
[20:05:56][V][esp32_ble_client:069]: [0] [9C:1D:58:93:5B:DE]  characteristic 0x2A25, handle 0x16, properties 0x2
[20:05:56][V][esp32_ble_client:069]: [0] [9C:1D:58:93:5B:DE]  characteristic 0x2A26, handle 0x18, properties 0x2
[20:05:56][V][esp32_ble_client:069]: [0] [9C:1D:58:93:5B:DE]  characteristic 0x2A27, handle 0x1a, properties 0x2
[20:05:56][V][esp32_ble_client:069]: [0] [9C:1D:58:93:5B:DE]  characteristic 0x2A28, handle 0x1c, properties 0x2
[20:05:56][V][esp32_ble_client:069]: [0] [9C:1D:58:93:5B:DE]  characteristic 0x2A29, handle 0x1e, properties 0x2
[20:05:56][V][esp32_ble_client:069]: [0] [9C:1D:58:93:5B:DE]  characteristic 0x2A2A, handle 0x20, properties 0x2
[20:05:56][V][esp32_ble_client:069]: [0] [9C:1D:58:93:5B:DE]  characteristic 0x2A50, handle 0x22, properties 0x2

Additional information

No response

github-actions[bot] commented 3 weeks ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.