home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
74.04k stars 31.07k forks source link

Pinecil integration - Devices found by Bluetooth Proxy "Cannot connect to device" #123566

Open notmayo opened 3 months ago

notmayo commented 3 months ago

The problem

Bluetooth proxy is setup in active mode and both irons have been freshly flashed to 2.22. HA discovered the irons instantly.

What version of Home Assistant Core has the issue?

core-2024.8.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

IronOS / Pinecil

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

`2024-08-11 01:46:42.410 DEBUG (MainThread) [pynecil.client] Read characteristic 9eae1003-9d0d-48c5-aa55-33e27f9bc533, result: v2.22
2024-08-11 01:46:42.570 DEBUG (MainThread) [pynecil.client] Read characteristic 9eae1004-9d0d-48c5-aa55-33e27f9bc533, result: 00007395d7fdd7c4
2024-08-11 01:46:42.571 DEBUG (MainThread) [pynecil.client] Failed to read characteristic 9eae1005-9d0d-48c5-aa55-33e27f9bc533: upstairs-bluetooth-proxy [10:06:1C:0A:BA:C0]: Pinecil-D7FDA45 - C4:D7:FD:D7:95:73: Characteristic 9eae1005-9d0d-48c5-aa55-33e27f9bc533 was not found!`

`2024-08-11 01:46:43.626 DEBUG (MainThread) [pynecil.client] Read characteristic 9eae1003-9d0d-48c5-aa55-33e27f9bc533, result: v2.22
2024-08-11 01:46:43.724 DEBUG (MainThread) [pynecil.client] Read characteristic 9eae1004-9d0d-48c5-aa55-33e27f9bc533, result: 00005878d8fdd7c4
2024-08-11 01:46:43.724 DEBUG (MainThread) [pynecil.client] Failed to read characteristic 9eae1005-9d0d-48c5-aa55-33e27f9bc533: upstairs-bluetooth-proxy [10:06:1C:0A:BA:C0]: Pinecil-D8FD8FB - C4:D7:FD:D8:78:58: Characteristic 9eae1005-9d0d-48c5-aa55-33e27f9bc533 was not found!`

Additional information

No response

home-assistant[bot] commented 3 months ago

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

Code owner commands Code owners of `iron_os` 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 iron_os` 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)


iron_os documentation iron_os source (message by IssueLinks)

tr4nt0r commented 3 months ago

ESPHome Bluetooth proxies have some limitations regarding not only the number of active connections but also the number of characteristics it can handle. I encountered this behaviour while reading all characteristics of the Pinecil with no other device connected. There are almost 50, on the last 6 i also got this same error. When connected with a normal bluetooth adapter like the Raspberry Pi's on-board adapter i never encountered these problems. The integration currently only reads around 5 characteristics, so it should not be a problem.

Do you have other devices with active connection that are connected to the same Bluetooth proxy and if so, do you know how many characteristics they have in total?

notmayo commented 3 months ago

Heyo, thanks for getting back to me. I only have passive BT devices connected (6 mi flora plant sensors) currently.

When the integration tries to load the two irons, it never connects to them when they're on and has not made any entities.

tr4nt0r commented 3 months ago

The plant sensors also use active connections though HA will only connect to them when they advertise changes. I have one of those. I counted 8 characteristics. That makes 48 in total and it seems these are kept cached by the proxy. So that should be the reason why only the first 2 characteristics can be read

EdenNelson commented 2 months ago

+1 same issue. My iron did connect at one point because I had it in another part of the house, but now it back to trying to use the proxy. I don’t have any other active BLE devices. HA Yellow uses the built-in CM4 BT, and my Proxy is a LilyGo T-Internet-POE, if that’s useful.

2024-09-20 13:50:54.037 DEBUG (MainThread) [pynecil.client] Failed to read characteristic 9eae1001-9d0d-48c5-aa55-33e27f9bc533: [org.bluez.Error.Failed] Not connected
2024-09-20 13:50:54.037 DEBUG (MainThread) [homeassistant.components.iron_os.coordinator] Finished fetching iron_os data in 0.003 seconds (success: False)
2024-09-20 13:50:58.366 DEBUG (MainThread) [pynecil.client] Failed to read characteristic 9eae1003-9d0d-48c5-aa55-33e27f9bc533: [org.bluez.Error.Failed] Not connected
2024-09-20 13:51:02.264 DEBUG (MainThread) [pynecil.client] Failed to read characteristic 9eae1003-9d0d-48c5-aa55-33e27f9bc533: [org.bluez.Error.Failed] Not connected