core: Switchbot can`t connect after last 2022.8.3 update
The problem
Switchbot doesnt react anymore after the last update 2022.8.3 with OS 8.4 on my RPI4. Have deleted the integration and return it with the new bluetooth function. It was detected automatically, but cant control it.
The error that I got is:
Logger: switchbot.devices.device Source: /usr/local/lib/python3.10/site-packages/switchbot/devices/device.py:84 First occurred: 11 augustus 2022 om 22:00:00 (8 occurrences) Last logged: 12:21:30
Switchbot communication failed. Stopping trying Traceback (most recent call last): File “/usr/local/lib/python3.10/site-packages/bleak_retry_connector/init.py”, line 112, in establish_connection await client.connect(timeout=BLEAK_TIMEOUT) File “/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/client.py”, line 167, in connect assert_reply(reply) File “/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/utils.py”, line 22, in assert_reply raise BleakDBusError(reply.error_name, reply.body) bleak.exc.BleakDBusError: [org.freedesktop.DBus.Error.UnknownObject] Method “Connect” with signature “” on interface “org.bluez.Device1” doesn’t exist
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File “/usr/local/lib/python3.10/site-packages/switchbot/devices/device.py”, line 81, in _sendcommand return await self._send_command_locked(key, command) File “/usr/local/lib/python3.10/site-packages/switchbot/devices/device.py”, line 104, in _send_command_locked client = await establish_connection( File “/usr/local/lib/python3.10/site-packages/bleak_retry_connector/init.py”, line 144, in establish_connection _raise_if_needed(name, exc) File “/usr/local/lib/python3.10/site-packages/bleak_retry_connector/init.py”, line 104, in _raise_if_needed raise BleakNotFoundError(f"{msg}: {DEVICE_MISSING_ADVICE}") from exc bleak_retry_connector.BleakNotFoundError: D9-DF-2D-88-0F-AB (D9:DF:2D:88:0F:AB): Failed to connect: [org.freedesktop.DBus.Error.UnknownObject] Method “Connect” with signature “” on interface “org.bluez.Device1” doesn’t exist : The device disappeared; Try restarting the scanner or moving the device closer
What version of Home Assistant Core has the issue?
2022.8.3
What was the last working version of Home Assistant Core?
2022.7.2
What type of installation are you running?
Home Assistant Supervised
Integration causing the issue
Switchbot
Link to integration documentation on our website
https://www.home-assistant.io/integrations/switchbot/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Logger: switchbot.devices.device
Source: /usr/local/lib/python3.10/site-packages/switchbot/devices/device.py:84
First occurred: 11 augustus 2022 om 22:00:00 (8 occurrences)
Last logged: 12:21:30
Switchbot communication failed. Stopping trying
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/bleak_retry_connector/__init__.py", line 112, in establish_connection
await client.connect(timeout=BLEAK_TIMEOUT)
File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/client.py", line 167, in connect
assert_reply(reply)
File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/utils.py", line 22, in assert_reply
raise BleakDBusError(reply.error_name, reply.body)
bleak.exc.BleakDBusError: [org.freedesktop.DBus.Error.UnknownObject] Method "Connect" with signature "" on interface "org.bluez.Device1" doesn't exist
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/switchbot/devices/device.py", line 81, in _sendcommand
return await self._send_command_locked(key, command)
File "/usr/local/lib/python3.10/site-packages/switchbot/devices/device.py", line 104, in _send_command_locked
client = await establish_connection(
File "/usr/local/lib/python3.10/site-packages/bleak_retry_connector/__init__.py", line 144, in establish_connection
_raise_if_needed(name, exc)
File "/usr/local/lib/python3.10/site-packages/bleak_retry_connector/__init__.py", line 104, in _raise_if_needed
raise BleakNotFoundError(f"{msg}: {DEVICE_MISSING_ADVICE}") from exc
bleak_retry_connector.BleakNotFoundError: D9-DF-2D-88-0F-AB (D9:DF:2D:88:0F:AB): Failed to connect: [org.freedesktop.DBus.Error.UnknownObject] Method "Connect" with signature "" on interface "org.bluez.Device1" doesn't exist
: The device disappeared; Try restarting the scanner or moving the device closer
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 34 (11 by maintainers)
That gave me a hint and I disabled Passive BLE Monitor and Switchbot works now (although it still takes a long time to respond, but that is not related to this issue).
Sounds like this problem https://github.com/home-assistant/core/pull/76945
The solution for me is recharge the Bluetooth integration, then devices works again. Something is wrong here.
Speed and performance will get better with haos 9.x.
It sounds like something is stopping the bluetooth scanner so the device is disappearing from the bluetooth stack, or the adapter has stopped responding for some other reason (usually hardware problem or driver bug).
Additionally, this can happen when you have another integration that is trying to get exclusive use of the bluetooth adapter, or is stopping the scanner when it is done with it. If it stops the scanner all the other bluetooth integrations will stop seeing updates https://www.home-assistant.io/integrations/bluetooth/#integrations-that-require-exclusive-use-of-the-bluetooth-adapter