Skip to content
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

Onboard Bluetooth not working in HA 2023.8 #98461

Closed
techman25 opened this issue Aug 15, 2023 · 24 comments
Closed

Onboard Bluetooth not working in HA 2023.8 #98461

techman25 opened this issue Aug 15, 2023 · 24 comments
Assignees
Labels
integration: bluetooth problem in device Issue lies within the device, such firmware, software, or user customization/config stale

Comments

@techman25
Copy link

The problem

After installing 2023.8.2 and earlier the onboard RPi4 Bluetooth does not work. It is detected and shows in the devices and integrations panel but after pressing Configure, it just gets into a loop of installing but never does. Rolling back to 2023.7 brings it back so this is not a hardware issue. This has been reported before but I didn’t receive a response.

What version of Home Assistant Core has the issue?

2023.8.2

What was the last working version of Home Assistant Core?

2023.7.3

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

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@cel-dev
Copy link

cel-dev commented Aug 18, 2023

I also have issues with Bluetooth in all versions of 2023.8 so far. I updated to 2023.8.2 and since then it doesn’t work at all anymore. In the other versions of 2023.8 it seemed to work not reliably. I use an Intel NUC. The Bluetooth integration keeps retrying the setup but it simply never works.

@home-assistant
Copy link

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!

Code owner commands

Code owners of bluetooth 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 bluetooth Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


bluetooth documentation
bluetooth source
(message by IssueLinks)

@novygh
Copy link

novygh commented Aug 20, 2023

same here

@JonDeeming
Copy link
Contributor

I’m seeing the same behaviour - for now I’ve disabled the Bluetooth integration.
If I can assist by providing logs/diagnostics, let me know.

@cel-dev
Copy link

cel-dev commented Aug 22, 2023

I just updated to 2023.8.3 and everything works fine now. I had rebooted my Home Assistant host machine at some point. Maybe that's relevant.

@JonDeeming
Copy link
Contributor

I’ve found the same - I did have to mess with the hciuart service, to bring the adapter back online - but that’s not a Home Assistant issue.
Updating to 2023.8.3 has addressed the issue for me.

@JonDeeming
Copy link
Contributor

Just in case this helps anyone else, what I found (after some testing) is that the Pi 4 Bluetooth adapter sometimes fails to initialize cleanly at boot (at least in Ubuntu 22.04).

It appears that there's some kind of race condition and the adapter can intermittently fail to start cleanly (by which I mean it wouldn't show up in either hciconfig -a or bluetoothctl list).

What's worked for me (at least so far), has been delaying the start-up of a couple of services.
In both /lib/systemd/system/hciuart.service and
/lib/systemd/system/bthelper@.service
In the [Service] section, add the line ExecStartPre=/bin/sleep 5.

Pausing the start-up of those two service by 5 seconds has allowed Bluetooth to start reliably on multiple reboots, when it used to fail ~50% of the time.

If you're not on a Pi 4 and Ubuntu 22.04, this may not be a fix - but if you are, it's worth checking if you're hitting this, because it shows up in Home Assistant as an initialization error in Bluetooth (but isn't a HA issue).

@alhemicar86
Copy link

Same for me. On 2023.8.4, and Bluetooth seems broken. Worked few versions ago

@hoo-koo
Copy link

hoo-koo commented Sep 1, 2023

Same here with HA Yellow. 2023.8.4 broke CM4’s integrated BT.

@bdraco
Copy link
Member

bdraco commented Sep 2, 2023

#92379

@yolco
Copy link

yolco commented Sep 8, 2023

Same issue at RPi3, it started to happen in HA 2023.08, but it continues in HA 2023.09.

No possibility for Bluetooth switching on, nor automatically neither manually from settings menu.

Moreover in settings menu, all sensors appear as disabled.

@bdraco
Copy link
Member

bdraco commented Sep 8, 2023

Same issue at RPi3, it started to happen in HA 2023.08, but it continues in HA 2023.09.

The HA version is likely irrelevant for the purposes of trouble-shooting as it doesn't initialize the bluetooth stack itself.

What likely matters is:

  • linux kernel version
  • BlueZ version
  • hardware

Sometimes the RPis need to be unplugged for a few minutes and plugged back in to get the bluetooth reset

@hoo-koo
Copy link

hoo-koo commented Sep 9, 2023

Sometimes the RPis need to be unplugged for a few minutes and plugged back in to get the bluetooth reset

Thanks, this got the BT working on my HA Yellow. I shutdown the system, unplugged power cord for 10s and started it again.

This is good as a workaround. BT was working before without any tricks so there definitely is still something wrong with software.

@alhemicar86
Copy link

Same issue at RPi3, it started to happen in HA 2023.08, but it continues in HA 2023.09.

The HA version is likely irrelevant for the purposes of trouble-shooting as it doesn't initialize the bluetooth stack itself.

What likely matters is:

  • linux kernel version
  • BlueZ version
  • hardware

Sometimes the RPis need to be unplugged for a few minutes and plugged back in to get the bluetooth reset

Than You very much. Turning off my Gigabyte mini PC helped. Bluetooth works again after shutdown and leaving the box for a short period without power.

@bdraco bdraco added the problem in device Issue lies within the device, such firmware, software, or user customization/config label Sep 10, 2023
@mpartington
Copy link

mpartington commented Sep 11, 2023

RRPi4 started to happen in HA 2023.09. Only way to bring it back is to power cycle the Pi, even then it quickly (within few hours) stops receiving data and reloading the integration gives the 'Failed to set up' error.

However I find if I enable BLE Monitor, this different integration immediately picks up the Bluetooth devices, so seems to me this is more likely a software issue.

Also, once BLE Monitor is running, reloading the Bluetooth integration succeeds

Edit 12/09 - turning on passive scanning seems to have made it significantly better

@federicosantolini
Copy link

Guys, are there news about this issue? We're still facing with the same problem with 2023.10.5 as well.

@Whizzykid
Copy link

Second to the above, do we have any timelines?

Am I right to say that the best options are to setup a Bluetooth Proxy via ESPHome or downgrade to 2023.09? Anything to consider when downgrading?

@bdraco
Copy link
Member

bdraco commented Oct 23, 2023 via email

@bdraco
Copy link
Member

bdraco commented Oct 23, 2023

@kylepyke
Copy link

Having the same issue here

@Avatar1976
Copy link

Stumbled upon this post as I have observed some odd issues lately with my Raspberry pi4 HA Bluetooth integration. I found placing the Bluetooth is passive scanning mode seems to help it initialise properly.
Screenshot_20231228_072641_Home Assistant

@Avatar1976
Copy link

And just to follow up disabled passive setting and hard reset rp4 and works without passive setting turned on.

@DahlPatric
Copy link

Let's say that we using Bluetooth Proxy via ESPHome instead, when in an application how do we associate this same we do for build-in (hci0)?

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@issue-triage-workflows issue-triage-workflows bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 23, 2024
@github-actions github-actions bot locked and limited conversation to collaborators May 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
integration: bluetooth problem in device Issue lies within the device, such firmware, software, or user customization/config stale
Projects
None yet
Development

No branches or pull requests