-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bluetooth integration constant state of initializing / retrying setup (bluetooth is broken with some adapters on newer linux kernels, kernel must be manually patched, workaround is to switch to ESPHome proxies instead) #92379
Comments
Hey there @bdraco, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) bluetooth documentation |
This issue seems to have begun in 2023.05 release. Logs enclosed.
|
I've been having the same problem for a week |
Same issue after may update !? |
The solution for me was BLUETOOTH LOW ENERGY MONITOR |
Same here, I'm also getting the following, not sure if related. OS Version: Home Assistant OS 10.1
|
+1
|
Same issue on my Home Assistant Yellow after updating. |
Same issue here. |
I fixed this by restoring my Raspberry Pi's /boot/config.txt file back to defaults. |
I'm using the Supervised version of HA. I can find a config file in the boot folder, but I don't know what the defaults are. I'm using a debian installation on a Thin Client by the way. Does anybody know how to fix this? |
Same issue for me after upgrading to latest HA v2023.5.2 on HA Yellow |
Same :( HA Supervised |
Could you please upload here a copy of your /boot/config.txt file? There shouldn't be anything private in it. |
Automatically generated file; DO NOT EDIT.Linux/x86 5.10.178 Kernel ConfigurationCONFIG_CC_VERSION_TEXT="gcc-10 (Debian 10.2.1-6) 10.2.1 20210110" |
3c3
< # Linux/x86 5.10.162 Kernel Configuration
---
> # Linux/x86 5.10.178 Kernel Configuration
9a10,11
> CONFIG_AS_IS_GNU=y
> CONFIG_AS_VERSION=23502
26c28
< CONFIG_BUILD_SALT="5.10.0-21-amd64"
---
> CONFIG_BUILD_SALT="5.10.0-22-amd64"
415c417
< # CONFIG_MICROCODE_OLD_INTERFACE is not set
---
> # CONFIG_MICROCODE_LATE_LOADING is not set
1693d1694
< CONFIG_NET_CLS_TCINDEX=m
just a diff between the 2 boot configs i have in place (standard debian)
[bootconf.txt](https://github.com/home-assistant/core/files/11468300/bootconf.txt)
and here the complete file |
Seems like it's fixed here in the latest update from yesterday... mine is not flapping after the update restart 👍 |
That's correct. After last weeks update the issue is fixed here too. |
Mine worked for a couple days, then this week's update seemed to break.
|
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
Same issue for me: Could not reset the power state of the Bluetooth adapter hci0 due to timeout after 5 seconds Home Assistant 2023.7.2 |
The same for me on 2023.7.2, Fedora 38, HA running in a container. I've tried it with multiple different BT adapters as well. |
Same issue for me, using an adapter from the recommended documentation: Warmstor WBT-AD01 (CSR8510A10) Home Assistant 2023.8.1 Error 1
Error 2
Error 3
|
Newer linux kernels broke bluetooth. HAOS has some patches that will fix some of the adapters but unless you want to patch the kernel, local adapters won't work. The best option right now is to switch to https://esphome.github.io/bluetooth-proxies/ |
Yeah I didn't see this issue when I was running Raspberry Pi OS Debian 10 until I upgraded to Debian 11 was when I started getting this problem. |
So no? |
Dunno, didn't read the changelog. But it works now, so I'm happy. |
Running HA OS as a VM on Debian 12: Bluetooth works flawlessly on the host, but haos 11.5 and 12.0.rc1 always report
Using 11.5 supervised on Debian 12 works when installing bluez (making the installation unhealthy). EDIT: Got it running by blacklisting btintel and btusb on the host machine. |
Adding how I was finally able to get HA Yellow running HAOS to correctly use the on-board bluetooth.
Props / thanks to @hughobrien for the above. While my specific issue was not directly fixed in the same way, it was useful to be able to log in via SSH, and |
Please elaborate...what is this "BLUETOOTH LOW ENERGY MONITOR" ?? |
I used my usb bluetooth dongle for almost 2 years happily on my odroid c2 with home assistant os. I always upgrade to the latest available version, when it notifies me. I started having this BT issue 1-2 month ago. If I go to devices and hit the 3 dots menu on the bluetooth device, and select "reload", then it usually works again for 6-15 hours, but eventually my BT adapter shuts down again. So I always have to reload manually daily. I thought it's a hardware issue (it's an old asus dongle), so I bought another BT dongle (realtek), but I'm having the same issue with the new one as well, so I'm pretty sure it's not the dongle's fault. Any workarounds/fixes on the corner? |
For the record, it seems the issue was hardware related afterall, the USB ports on my odroid c2 were disconnecting more and more frequently... I ended up buying a new rPi 5, and all these problems are gone now for me |
Could you please explain a little more about BLUETOOTH LOW ENERGY MONITOR - should I turn it on or off and how exactly do I do it? |
I have tried with the built-in (older) BT device as well as a brand new BT 5.0 USB device. Same problem with both. |
Gentlemen, my 2c. I have HA running on some old Mac Pro (5,1 if I remember correctly), I tried to pass both built-in bluetooth and some cheap Chineese USB BT 5.1 sticks without any success. I plugged in another USB device - CSR 4.0 (if I remember correctly) and it worked well. |
It seems to be hit-or-miss for what works and what does not. I bought this adapter https://www.startech.com/en-us/networking-io/usba-bluetooth-v5-c2 but it fails in a similar fashion to the built-in unit. |
Just an update, the cheap ones that didn't work: https://www.aliexpress.com/item/1005005721208212.html or anything like that
(I think this one even doesn't support 5.x, only 4.x). Guest kernel: 6.8.0-31-generic |
Looks like I was toooo optimistic:
|
Here is the one I use that I have zero issues with on my Blue, Green, and Yellows running HAOS https://www.aliexpress.us/item/2255800893640297.html |
Same issue: cycling retries on the bluetooth device. Fixed it on my Raspberry 3 B simply by unblocking it: user@raspberrypi:~ $ rfkill list
0: hci0: Bluetooth
Soft blocked: yes
Hard blocked: no
1: phy0: Wireless LAN
Soft blocked: yes
Hard blocked: no
user@raspberrypi:~ $ rfkill unblock 0
user@raspberrypi:~ $ rfkill list
0: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
1: phy0: Wireless LAN
Soft blocked: yes
Hard blocked: no After that I could use |
Had been holding back on the System Update for a couple of versions. Then ran into this issue. Post upgrades.
Fixed on my Raspberry Pi 3B using built-in Bluetooth. I just needed to do a full reboot (not just a restart). HTH |
Does this fix the issue consistently? For me, a reboot (or unplugging the power) temporarily fixes the symptoms/issue for 1-3 days. EDIT: After that time I start getting the following errors again (and active scanning devices do not work anymore): |
Same issue. Hassio on RPi 5 |
Having same issue on Intel N100 NUC running Ubuntu Server and Newest Home Assistant |
Some personal experiences on a Pi 4 8 GB with HA OS 13.1 now with an uptime of more than 30 days (host/HA OS and HA Core):
Overview
[*1]
So current summary for me:
So what does a final solution look like?!?As I only have roughly 12 hours left to decide if it's a good idea to NOT reboot the host now prior to leaving for holiday for some time, it would be very helpful to get the information if trying to let it run for a bit longer and/or gathering specific logs might be helpful and desired or not. |
Mod Issue Summary - Read First
See https://lore.kernel.org/linux-bluetooth/0de3f0d0d5eb6d83cfc8d90cbb2b1ba1@agner.ch/T/#mb094e06d495879436ce9a8722ad7ad87527ea74b
A summary:
- The recommended workaround if you can't run HAOS or patch the kernel manually is to use an ESPHome proxy instead https://esphome.github.io/bluetooth-proxies/
The problem
Bluetooth integration in perpetual state of initializing / retrying setup.
Deleting integration, restarting HA and configuring after auto discovered, several times, does not resolve.
What version of Home Assistant Core has the issue?
core-2023.4.6
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
https://www.home-assistant.io/integrations/bluetooth
Diagnostics information
home-assistant_bluetooth_2023-05-02T22-28-03.303Z.log
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
Home Assistant Yellow
System Information
Home Assistant Community Store
Home Assistant Cloud
Home Assistant Supervisor
Dashboards
Recorder
The text was updated successfully, but these errors were encountered: