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.14k stars 31.12k forks source link

Bluetooth switchbot devices are not working anymore #123482

Open Rosti4 opened 3 months ago

Rosti4 commented 3 months ago

The problem

Since an update my Thermometers are not worlink anymore. Some of them are shown an error and the rest is permanently "initializing" (see picture below) image

What version of Home Assistant Core has the issue?

core-2024.8.0

What was the last working version of Home Assistant Core?

core-2024.6.0

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Switchbot Bluetooth

Link to integration documentation on our website

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

Diagnostics information

home-assistant_switchbot_2024-08-09T16-02-04.660Z.log

Example YAML snippet

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/bleak_retry_connector/__init__.py", line 363, in establish_connection
    await client.connect(
  File "/usr/local/lib/python3.12/site-packages/habluetooth/wrappers.py", line 285, in connect
    wrapped_backend = self._async_get_best_available_backend_and_device(manager)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/habluetooth/wrappers.py", line 394, in _async_get_best_available_backend_and_device
    raise BleakError(
bleak.exc.BleakError: No backend with an available connection slot that can reach address CB:20:32:FF:18:F2 was found

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

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/switchbot/devices/device.py", line 185, in _send_command
    return await self._send_command_locked(key, command)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/switchbot/devices/device.py", line 419, in _send_command_locked
    await self._ensure_connected()
  File "/usr/local/lib/python3.12/site-packages/switchbot/devices/device.py", line 279, in _ensure_connected
    client: BleakClientWithServiceCache = await establish_connection(
                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/bleak_retry_connector/__init__.py", line 472, in establish_connection
    _raise_if_needed(name, device.address, exc)
  File "/usr/local/lib/python3.12/site-packages/bleak_retry_connector/__init__.py", line 332, in _raise_if_needed
    raise BleakOutOfConnectionSlotsError(
bleak_retry_connector.BleakOutOfConnectionSlotsError: CB-20-32-FF-18-F2 (CB:20:32:FF:18:F2) - CB:20:32:FF:18:F2: Failed to connect after 10 attempt(s): No backend with an available connection slot that can reach address CB:20:32:FF:18:F2 was found: The proxy/adapter is out of connection slots or the device is no longer reachable; Add additional proxies (https://esphome.github.io/bluetooth-proxies/) near this device

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 3 months ago

Hey there @danielhiversen, @renierm26, @murtas, @eloston, @dsypniewski, mind taking a look at this issue as it has been labeled with an integration (switchbot) you are listed as a code owner for? Thanks!

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


switchbot documentation switchbot source (message by IssueLinks)

mib1185 commented 3 months ago

do you have issues with any other Bluetooth based devices in HA?

Rosti4 commented 3 months ago

I do not have other Bluetooth devices in use

Michael @.***> schrieb am Fr., 9. Aug. 2024, 21:45:

do you have issues with any other Bluetooth based devices in HA?

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/123482#issuecomment-2278632891, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACIO4X5Q6LAATTICZ6OIYHTZQUL6PAVCNFSM6AAAAABMIXTQPGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZYGYZTEOBZGE . You are receiving this because you authored the thread.Message ID: @.***>

mib1185 commented 3 months ago

it seems you Bluetooth device is "overloaded". Maybe you'll find more specific help in the #bluetooth channel on our discord chat server

Lux315 commented 3 months ago

I got the same issue, even all all esp32 bluetooth proxys are offline aswell since 2024.8

jbouwh commented 3 months ago

Hmm, my bluetooth switchbot thermometer/hygrometer seems to be working okay. Seems more bluetooth related to me.

rcubed47 commented 3 months ago

Screenshot 2024-08-10 114013 I was having the same issue. I went to the web UI for ESPhome addon in Home Assistant, clicked the update all for my proxies and now it finds all Switchbot Bluetooth devices.

jbouwh commented 3 months ago

As it seems this was an issue with ESP home, I suggest to close this issue.

home-assistant[bot] commented 3 months ago

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

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


esphome documentation esphome source (message by IssueLinks)

magnusroe commented 1 month ago

I have this issue as well, I don't have esphome installed, but about 8 switchbot thermometers, two door sensors and one power plug. My only other bluetooth device is a Braun toothbrush, and it appears to have issues as well so perhaps my issue too is bluetooth overload?

kapabel commented 3 weeks ago

My switchbot curtain also suddenly stopped working for no reason. I tried to do the usual problem fixing with restarting and updating etc but nothing seems to work.

Madlegit commented 2 weeks ago

"This issue occurs once a month, and I need to restart the Raspberry Pi, not just Home Assistant, to get everything working again."

Rosti4 commented 2 weeks ago

This is not solving the problem in my case. But thanks for the advice.

Madlegit @.***> schrieb am Fr., 15. Nov. 2024, 13:05:

"This issue occurs once a month, and I need to restart the Raspberry Pi, not just Home Assistant, to get everything working again."

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/123482#issuecomment-2478671043, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACIO4XZQBRSA7IWGJ36MI7T2AXPRTAVCNFSM6AAAAABMIXTQPGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZYGY3TCMBUGM . You are receiving this because you authored the thread.Message ID: @.***>