Closed Blaise75 closed 5 months ago
Anything in the logs?
Hey there @bdraco, mind taking a look at this issue as it has been labeled with an integration (bluetooth
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
bluetooth documentation bluetooth source (message by IssueLinks)
Anything in the logs?
2024-03-17 17:41:33.933 WARNING (Recorder) [homeassistant.components.recorder.util] The system could not validate that the sqlite3 database at //config/home-assistant_v2.db was shutdown cleanly 2024-03-17 17:41:33.988 WARNING (Recorder) [homeassistant.components.recorder.util] Ended unfinished session (id=3 from 2024-03-17 15:22:11.585787) 2024-03-17 18:42:14.321 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 350, in data_received messages, upgraded, tail = self._request_parser.feed_data(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "aiohttp/_http_parser.pyx", line 557, in aiohttp._http_parser.HttpParser.feed_data aiohttp.http_exceptions.BadStatusLine: 400, message: Invalid method encountered:
b'\x16\x03\x01\x02z\x01'
^
2024-03-17 18:42:26.654 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 350, in data_received messages, upgraded, tail = self._request_parser.feed_data(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "aiohttp/_http_parser.pyx", line 557, in aiohttp._http_parser.HttpParser.feed_data aiohttp.http_exceptions.BadStatusLine: 400, message: Invalid method encountered:
b'\x16\x03\x01\x02z\x01'
^
2024-03-17 18:46:46.385 DEBUG (MainThread) [homeassistant.components.bluetooth] Triggering bluetooth usb discovery
2024-03-17 18:46:51.395 DEBUG (MainThread) [homeassistant.components.bluetooth] Rediscovered adapters: {'hci0': {'address': '90:27:E4:F4:CC:2D', 'sw_version': 'homeassistant', 'hw_version': 'usb:v1D6Bp0246d0548', 'passive_scan': False, 'manufacturer': 'Apple Inc.', 'product': 'Bluetooth USB Host Controller', 'vendor_id': '05ac', 'product_id': '8218'}}
2024-03-17 18:46:55.082 DEBUG (MainThread) [bluetooth_auto_recovery.recover] Attempting to recover bluetooth adapter hci0 with mac address 90:27:E4:F4:CC:2D
2024-03-17 18:46:55.083 DEBUG (MainThread) [bluetooth_auto_recovery.recover] Attempting to power cycle bluetooth adapter hci0 [90:27:E4:F4:CC:2D]
2024-03-17 18:46:55.087 DEBUG (MainThread) [bluetooth_auto_recovery.recover] Found adapters from hci: {0: {'dev_id': 0, 'name': 'hci0', 'bdaddr': '90:27:E4:F4:CC:2D', 'flags': 5, 'type': 1, 'features': <ifaddr._shared.c_ubyte_Array_8 object at 0x7f804ad122d0>, 'pkt_type': 52472, 'link_policy': 15, 'link_mode': 32768, 'acl_mtu': 1021, 'acl_pkts': 8, 'sco_mtu': 64, 'sco_pkts': 1, 'stat': <bluetooth_adapters.systems.linux_hci.hci_dev_stats object at 0x7f804ad116d0>}}
2024-03-17 18:46:55.087 DEBUG (MainThread) [bluetooth_auto_recovery.recover] Found adapter 90:27:E4:F4:CC:2D in hci device as 0
2024-03-17 18:46:55.087 DEBUG (MainThread) [bluetooth_auto_recovery.recover] hci0 (90:27:E4:F4:CC:2D) idx is 0
2024-03-17 18:46:55.092 DEBUG (MainThread) [bluetooth_auto_recovery.recover] rfkill_idx of hci0 is 1
2024-03-17 18:46:55.092 DEBUG (MainThread) [bluetooth_auto_recovery.recover] Attempting to power cycle bluetooth adapter hci0 [90:27:E4:F4:CC:2D]
2024-03-17 18:46:55.093 DEBUG (MainThread) [btsocket.btmgmt_protocol] Encoding cmd_code as type CmdCode
2024-03-17 18:46:55.093 DEBUG (MainThread) [btsocket.btmgmt_protocol] Encoding controller_idx as type Controller
2024-03-17 18:46:55.093 DEBUG (MainThread) [btsocket.btmgmt_protocol] Encoding param_len as type ParamLen
2024-03-17 18:46:55.096 DEBUG (MainThread) [btsocket.btmgmt_protocol] Decoding event_code as type EvtCode
2024-03-17 18:46:55.097 DEBUG (MainThread) [btsocket.btmgmt_protocol] Decoding controller_idx as type Controller
2024-03-17 18:46:55.097 DEBUG (MainThread) [btsocket.btmgmt_protocol] Decoding param_len as type ParamLen
2024-03-17 18:46:55.097 DEBUG (MainThread) [btsocket.btmgmt_protocol] Decoding command_opcode as type CmdCode
2024-03-17 18:46:55.098 DEBUG (MainThread) [btsocket.btmgmt_protocol] Decoding status as type Status
2024-03-17 18:46:55.098 DEBUG (MainThread) [btsocket.btmgmt_protocol] Decoding address as type Address
2024-03-17 18:46:55.098 DEBUG (MainThread) [btsocket.btmgmt_protocol] Decoding bluetooth_version as type IntUL
2024-03-17 18:46:55.099 DEBUG (MainThread) [btsocket.btmgmt_protocol] Decoding manufacturer as type IntUL
2024-03-17 18:46:55.101 DEBUG (MainThread) [btsocket.btmgmt_protocol] Decoding supported_settings as type IntUL
2024-03-17 18:46:55.101 DEBUG (MainThread) [btsocket.btmgmt_protocol] Decoding current_settings as type CurrentSettings
2024-03-17 18:46:55.102 DEBUG (MainThread) [btsocket.btmgmt_protocol] Decoding class_of_device as type IntUL
2024-03-17 18:46:55.102 DEBUG (MainThread) [btsocket.btmgmt_protocol] Decoding name as type Name
2024-03-17 18:46:55.102 DEBUG (MainThread) [btsocket.btmgmt_protocol] Decoding short_name as type IntUL
2024-03-17 18:46:55.102 DEBUG (MainThread) [btsocket.btmgmt_protocol] Socket Read:
I am facing the same issue. My Bluetooth environment stopped working. Reconfiguration of the Bluetooth adapter doesn't solve the issue.
It appears immediately after upgrading to 2024.3.1
This error is in the logs:
`Logger: habluetooth.scanner Quelle: /usr/local/lib/python3.12/asyncio/events.py:88 Erstmals aufgetreten: 17. März 2024 um 12:39:06 (29 Vorkommnisse) Zuletzt protokolliert: 17. März 2024 um 21:45:44
hci0 (D8:3A:DD:CD:42:34): Failed to restart Bluetooth scanner: hci0 (D8:3A:DD:CD:42:34): Failed to start Bluetooth: [org.bluez.Error.NotReady] Resource Not Ready; Try power cycling the Bluetooth hardware. Traceback (most recent call last): File "src/habluetooth/scanner.py", line 249, in habluetooth.scanner.HaScanner._async_start File "src/habluetooth/scanner.py", line 250, in habluetooth.scanner.HaScanner._async_start File "/usr/local/lib/python3.12/site-packages/bleak/init.py", line 198, in start await self._backend.start() File "/usr/local/lib/python3.12/site-packages/bleak/backends/bluezdbus/scanner.py", line 185, in start self._stop = await manager.active_scan( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/bleak/backends/bluezdbus/manager.py", line 405, in active_scan assert_reply(reply) File "/usr/local/lib/python3.12/site-packages/bleak/backends/bluezdbus/utils.py", line 22, in assert_reply raise BleakDBusError(reply.error_name, reply.body) bleak.exc.BleakDBusError: [org.bluez.Error.NotReady] Resource Not Ready
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "src/habluetooth/scanner.py", line 381, in habluetooth.scanner.HaScanner._async_restart_scanner File "src/habluetooth/scanner.py", line 333, in _async_start habluetooth.scanner.ScannerStartError: hci0 (D8:3A:DD:CD:42:34): Failed to start Bluetooth: [org.bluez.Error.NotReady] Resource Not Ready; Try power cycling the Bluetooth hardware. ` This warning is also in the log:
`Logger: bluetooth_auto_recovery.recover Quelle: runner.py:188 Erstmals aufgetreten: 17. März 2024 um 12:38:58 (123 Vorkommnisse) Zuletzt protokolliert: 00:12:05
Could not reset the power state of the Bluetooth adapter hci0 [D8:3A:DD:CD:42:34] due to timeout after 5 seconds Could not cycle the Bluetooth adapter hci0 [D8:3A:DD:CD:42:34]: [Errno 110] Operation timed out Bluetooth adapter hci0 [D8:3A:DD:CD:42:34] could not be reset: Bluetooth adapter hci0 [D8:3A:DD:CD:42:34] successfully turned back ON`
It's an internal bluetooth adapter on a CM4
Same issue here as well. Using a Home Assistant Yellow. Stopped working when I updated to the latest HA version
Did you try power cycling the Bluetooth hardware?
Power cycling does not solve it. My bluetooth environment is currently dead.
Can you turn it on/off in bluetoothctl
manually or does that fail as well?
Power cycling does not solve it. My bluetooth environment is currently dead.
Did you remove power for a few seconds or only reboot it ?
I have same problem. My HA core is still in version 2024.2.5, but i upgraded OS to 12.1. I think that caused the problem, but not sure. I did not find problem immediately, because bt is not so important in my envinroment and i have bt proxies. I have external usb dongle.
HA is installed on Proxmox server
edit: my BT is now working again. I reinstalled my bt dongle and after that module start working.. so maybe this was not same issue.
Power cycling does not solve it. My bluetooth environment is currently dead.
Did you remove power for a few seconds or only reboot it ?
I have rebooted the host. In This case a HA Yellow with a CM4 with an integrated Bluetooth module. My Switchbot devices are no longer controllable although i have additionally some ESP bluetooth proxyies in my house.
Same issue. Yellow with CM4. I think it was also 12.1
Also experiencing the problem with Yellow CM4 HAOS version 12.1. It was working fine a couple of days until it suddenly stopped working
Same issue. Blue with LogiLink Bluetooth Adapter. Stopped working around March, 3rd. It's a remote installation and I do not have physical access at the moment. Did several reboots including reinstallation of the Bluetooth integration. Installation is up-to-date. Core 2024.3.3 Supervisor 2024.03.0 Operating System 12.1 Frontend 20240306.0
Same issue on Raspberry Pi installation OS 12.1. Fixed it by downgrading OS to 12.0
Core: 2024.3.3 Supervisor: 2024.03.1 Operating System: 12.1 Frontend: 20240307.0
I have the same issue, BUT with a RTL8761B BT 5.0 USB adapter on a Pi 3.
HOWEVER, I have a temporary, if slightly irritating.. workaround:
Here is the log:
2024-03-28 13:26:07.451 RPI3Homeassistant kernel: usb 1-1.1.2: USB disconnect, device number 4 2024-03-28 13:26:14.804 RPI3Homeassistant kernel: usb 1-1.1.2: new full-speed USB device number 9 using dwc_otg 2024-03-28 13:26:14.895 RPI3Homeassistant kernel: usb 1-1.1.2: New USB device found, idVendor=0bda, idProduct=8771, bcdDevice= 2.00 2024-03-28 13:26:14.902 RPI3Homeassistant kernel: usb 1-1.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 2024-03-28 13:26:14.904 RPI3Homeassistant kernel: usb 1-1.1.2: Product: Bluetooth Radio 2024-03-28 13:26:14.906 RPI3Homeassistant kernel: usb 1-1.1.2: Manufacturer: Realtek 2024-03-28 13:26:14.908 RPI3Homeassistant kernel: usb 1-1.1.2: SerialNumber: 00E04C239987 2024-03-28 13:26:14.913 RPI3Homeassistant kernel: Bluetooth: hci0: RTL: examining hci_ver=0a hci_rev=000b lmp_ver=0a lmp_subver=8761 2024-03-28 13:26:14.914 RPI3Homeassistant kernel: Bluetooth: hci0: RTL: rom_version status=0 version=1 2024-03-28 13:26:14.923 RPI3Homeassistant kernel: Bluetooth: hci0: RTL: loading rtl_bt/rtl8761bu_fw.bin 2024-03-28 13:26:14.924 RPI3Homeassistant kernel: Bluetooth: hci0: RTL: loading rtl_bt/rtl8761bu_config.bin 2024-03-28 13:26:14.927 RPI3Homeassistant kernel: Bluetooth: hci0: RTL: cfg_sz 6, total sz 30210 2024-03-28 13:26:15.022 RPI3Homeassistant systemd[1]: Starting Configure Bluetooth Modems connected by UART... 2024-03-28 13:26:15.106 RPI3Homeassistant systemd[1]: hciuart.service: Skipped due to 'exec-condition'. 2024-03-28 13:26:15.121 RPI3Homeassistant systemd[1]: Condition check resulted in Configure Bluetooth Modems connected by UART being skipped. 2024-03-28 13:26:15.130 RPI3Homeassistant systemd[1]: Starting Raspberry Pi bluetooth helper... 2024-03-28 13:26:15.143 RPI3Homeassistant systemd[1]: bthelper@hci0.service: Skipped due to 'exec-condition'. 2024-03-28 13:26:15.144 RPI3Homeassistant systemd[1]: Condition check resulted in Raspberry Pi bluetooth helper being skipped. 2024-03-28 13:26:17.036 RPI3Homeassistant kernel: Bluetooth: hci0: command 0xfc20 tx timeout 2024-03-28 13:26:25.228 RPI3Homeassistant kernel: Bluetooth: hci0: RTL: download fw command failed (-110) 2024-03-28 13:26:25.229 RPI3Homeassistant kernel: 2024-03-28 13:26:25.230 RPI3Homeassistant kernel: WARN::dwc_otg_hcd_urb_dequeue:638: Timed out waiting for FSM NP transfer to complete on 5 2024-03-28 13:29:05.374 RPI3Homeassistant kernel: usb 1-1.1.2: USB disconnect, device number 9 2024-03-28 13:29:59.318 RPI3Homeassistant kernel: usb 1-1.1.2: new full-speed USB device number 10 using dwc_otg 2024-03-28 13:29:59.409 RPI3Homeassistant kernel: usb 1-1.1.2: New USB device found, idVendor=0bda, idProduct=8771, bcdDevice= 2.00 2024-03-28 13:29:59.413 RPI3Homeassistant kernel: usb 1-1.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 2024-03-28 13:29:59.420 RPI3Homeassistant kernel: usb 1-1.1.2: Product: Bluetooth Radio 2024-03-28 13:29:59.422 RPI3Homeassistant kernel: usb 1-1.1.2: Manufacturer: Realtek 2024-03-28 13:29:59.424 RPI3Homeassistant kernel: usb 1-1.1.2: SerialNumber: 00E04C239987 2024-03-28 13:29:59.427 RPI3Homeassistant kernel: Bluetooth: hci0: RTL: examining hci_ver=0a hci_rev=000b lmp_ver=0a lmp_subver=8761 2024-03-28 13:29:59.427 RPI3Homeassistant kernel: Bluetooth: hci0: RTL: rom_version status=0 version=1 2024-03-28 13:29:59.428 RPI3Homeassistant kernel: Bluetooth: hci0: RTL: loading rtl_bt/rtl8761bu_fw.bin 2024-03-28 13:29:59.428 RPI3Homeassistant kernel: Bluetooth: hci0: RTL: loading rtl_bt/rtl8761bu_config.bin 2024-03-28 13:29:59.428 RPI3Homeassistant kernel: Bluetooth: hci0: RTL: cfg_sz 6, total sz 30210 2024-03-28 13:29:59.499 RPI3Homeassistant systemd[1]: Starting Configure Bluetooth Modems connected by UART... 2024-03-28 13:29:59.585 RPI3Homeassistant systemd[1]: hciuart.service: Skipped due to 'exec-condition'. 2024-03-28 13:29:59.586 RPI3Homeassistant systemd[1]: Condition check resulted in Configure Bluetooth Modems connected by UART being skipped. 2024-03-28 13:29:59.605 RPI3Homeassistant systemd[1]: Starting Raspberry Pi bluetooth helper... 2024-03-28 13:29:59.624 RPI3Homeassistant systemd[1]: bthelper@hci0.service: Skipped due to 'exec-condition'. 2024-03-28 13:29:59.626 RPI3Homeassistant systemd[1]: Condition check resulted in Raspberry Pi bluetooth helper being skipped. 2024-03-28 13:29:59.697 RPI3Homeassistant kernel: Bluetooth: hci0: RTL: fw version 0xdfc6d922 2024-03-28 13:29:59.891 RPI3Homeassistant kernel: Bluetooth: MGMT ver 1.22 2024-03-28 13:29:59.941 RPI3Homeassistant bluetoothd[443]: Battery Provider Manager created 2024-03-28 13:30:00.085 RPI3Homeassistant bluetoothd[443]: profiles/audio/bap.c:bap_adapter_probe() BAP requires ISO Socket which is not enabled 2024-03-28 13:30:00.086 RPI3Homeassistant bluetoothd[443]: bap: Operation not supported (95) 2024-03-28 13:30:00.105 RPI3Homeassistant bluetoothd[443]: Adv Monitor Manager created with supported features:0x00000000, enabled features:0x00000000, max number of supported monitors:32, max number of supported patterns:16 2024-03-28 13:30:00.241 RPI3Homeassistant bluetoothd[443]: Endpoint registered: sender=:1.31 path=/MediaEndpoint/A2DPSink/sbc 2024-03-28 13:30:00.242 RPI3Homeassistant bluetoothd[443]: Endpoint registered: sender=:1.31 path=/MediaEndpoint/A2DPSource/sbc 2024-03-28 13:30:00.242 RPI3Homeassistant bluetoothd[443]: Endpoint registered: sender=:1.31 path=/MediaEndpoint/A2DPSink/sbc_xq_453 2024-03-28 13:30:00.242 RPI3Homeassistant bluetoothd[443]: Endpoint registered: sender=:1.31 path=/MediaEndpoint/A2DPSource/sbc_xq_453 2024-03-28 13:30:00.243 RPI3Homeassistant bluetoothd[443]: Endpoint registered: sender=:1.31 path=/MediaEndpoint/A2DPSink/sbc_xq_512 2024-03-28 13:30:00.243 RPI3Homeassistant bluetoothd[443]: Endpoint registered: sender=:1.31 path=/MediaEndpoint/A2DPSource/sbc_xq_512 2024-03-28 13:30:00.244 RPI3Homeassistant bluetoothd[443]: Endpoint registered: sender=:1.31 path=/MediaEndpoint/A2DPSink/sbc_xq_552 2024-03-28 13:30:00.244 RPI3Homeassistant bluetoothd[443]: Endpoint registered: sender=:1.31 path=/MediaEndpoint/A2DPSource/sbc_xq_552
I'm also having this problem. It's a fresh install today, on Home Assistant Yellow.
Same here.
Same in a Proxmox VM.
Same in HA-Core
Same on Raspi 5 with HA Running as Docker Container. Core Version: 2024.3.0
Same with Raspi 4 with HA OS using built-in bluetooth. was 12.2, and downgrading to 12.0 fixes it.
Good thing I noticed this. I just converted my HA Core to HA Supervised and it got upgraded ate the same. My bluetooth worked fine in Core 2024.2.1 but now on Supervised 2024.4.3 it doesn't.
Whatever I do the adapter is in "Failed Setup, will retry".
Edit: My host system (kvm host) was missing bluez. Installed bluez and HA Supervised now got Bluetooth working.
Having the same issue, after last update, integrated RPi4 bt stopped working, bought a adapter and is also not recognized
Same here. Running HA Yellow with a RPi CM4.
Latest beta update fixed BT from RPi4... after I got an external dongle that never worked. But BT is working now.
As we haven't heard back from the op in a while, and the other me too comments aren't providing any actionable information, I'm going to close this issue. If there is still a problem and its not an OS level problem (https://github.com/home-assistant/operating-system/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+bluetooth), please start a fresh issue with logs.
Also please check https://github.com/home-assistant/core/issues/92379 in case you have a kernel level issue.
The problem
My Bluetooth device doesn't work. Home assistant work on Macbook
What version of Home Assistant Core has the issue?
core-2024.3.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
Bluetooth
Link to integration documentation on our website
No response
Diagnostics information
home-assistant_bluetooth_2024-03-17T17-47-51.325Z.log
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response