Solutions provided by @EthanBezz is working on docker based instalation. As he wrote this is for docker based installation. Probably this will not work on haos or debian supervised installation. If some manage to make it work on those installations feel free to post solution for others.
It doesnt work on supervised installation.
I found no way - no Idea how to manipulate the homeassistant.json, where the image is defined. Maybe there is a way to change the entrypoint for the container ā¦
So i have to change the container on every update and install gcc etcā¦
After update to 2023.6.1 I got error
Platform error device_tracker.bluetooth_tracker - Requirements for bluetooth_tracker not found: ['PyBluez==0.30'].
As @miky_italy suggested I done inside homeassistant container
apk add gcc musl-dev bluez-dev
but this didnāt resolve the issue.
It was working with 6.0 update.
But bluetooth_le_tracker is working .
device_tracker:
- platform: bluetooth_le_tracker
interval_seconds: 60
consider_home: 180
track_new_devices: yes
Got this working yesterday in docker, discovered today the Pybluez==0.30 error. Re-read the post and saw the updated changes. Edited my docker-compose file, did all the other steps, and now the error is gone. Thank you!
Strangely, I now get a new error -
2023-06-09 16:24:23.983 ERROR (SyncWorker_0) [custom_components.bluetooth_tracker.device_tracker] Couldn't discover bluetooth devices: [Errno 16] Error communicating with local bluetooth adapter: Resource busy
Repeating every minute. Not sure why. From within the container console Iām able to see the bluetooth adapter (āhcitool devā) and bluetoothctl scans and sees devices. So clearly, from within the container the operating system has access to the bluetooth controller.
More info: Running bluetoothctl either on the host or in the container displays endless [CHG] records, which are normally seen when you do a scan from within bluetoothctl. But you canāt stop them - āscan offā fails:
[bluetooth]# scan off
Failed to stop discovery: org.bluez.Error.Failed
One reason for this spam may happen also inadvertently if gnome-control-center bluetooth GUI is open as well, which is continuously scanning for devices. In my case, this isnāt running.
$systemctl restart bluetoothctl
doesnāt help.
Stopping the home assistant container immediately stops the spamming and Iām able to get control back running bluetoothctl on the host. This tells me thereās something happening in the container thatās causing non-stop scanning.
I would expect the bluetooth_tracker.device_tracker component to be turning on the bluetooth scan, but if thatās what itās doing itās having trouble since itās the one reporting the error. Perhaps itās failing to disable the first scan, and any subsequent scan attempts fail because the first one is still in progress.
On a suspicion I plugged in a bluetooth dongle I had lying around and disabled the built-in one. Rebooted, and no errors in the log now. Thereās now a bluetooth integration thingie appearing, so thatās good. It hasnāt found? done anything? with the devices it must be scanning though. Not that any of them are likely to be known devices. But at least it shows up now so thatās good.
Thatās unfortunate then. I use a composite person for tracking and BT was always reliable within the house.
Wish this was more visible, earlier, so we could figure out an alternative.
So, no more BT tracking all of a sudden? Without mention in the breaking changes? Coolā¦
Same problem here using HassOS. Does this affect bluetooth proxies?
Yeah, not sure how this wasnāt listed under the breaking changes.
Have a workaround for debian supervised installation.
Wrote a simple script that starts after homeassistant starts (after an upgradeā¦)
Check if pybluez is installed (pip list |grep PyBluez)
If not, then do the following 3 steps:
url="http://localhost:8123/api/services/homeassistant/restart"
pip list|grep PyBluez
RC=$?
if [ "$RC" -ne "0" ]
then
apk add gcc musl-dev bluez-dev
pip install git+https://github.com/pybluez/pybluez.git#egg=pybluez
[ "$?" -ne "0" ] && (exit 1)
curl -X POST -H "Authorization: Bearer $token" -H "content-type: application/json" $url
fi
Dont found a better way to restart Homeassistent from the container as the curl callā¦
No, my bluetooth proxy is still working, once I removed the bluetooth_tracker entry in my configuration.yaml
It looks like even in the new patch thereās no fix for the BTā¦
I donāt have installed it, Iāve just read the changelog on the main page.
Iām not sure that theyāll fix that, probably few people use it?
I installed the 2023.6.2 hoping it would fix the Bluetooth issue also.
It does not fix the issue, still does not see my cellphone as home.
I have alot of automations that run based on if my cellphone is home or not.
Does anyone know if their is an open ticket for this issue?
When I run the Configuration Check Validation this is the error message:
Platform error device_tracker.bluetooth_tracker - Requirements for bluetooth_tracker not found: [āpybluez==0.22ā].
You find the solution in this thread.
The workaround works.
There is no other solution at the moment.
My bluetooth tracker works with pybluez 0.30
No problems.
I saw the fix.
Running on Raspberry PI HassOS.
Last time I did a workaround it caused more problems.
I just rolled back to a version that worked and will wait for official fix.
Thanksā¦
Did exactly the same. And I think that thereās no other solution atm.
How about for HA OS?
Noticed a update to Home Assistant Operating System 10.3
Read the release notes and didnāt see anything specific to this issue.
Something about BLE so just installed to see if I got lucky and issue was fixed.
Installed and did reboot, did not fix the issue.
For anyone hoping for a fix.
Installed 2023.6.3 and problem is still there.
Iāve removed a step from my solution above as itās now been fixed by the Home Assistant devs and no longer needs to be done.
However, that was only 1 of the fixes that were needed to solve this problem, so it still remands an issue.
āWell then why didnāt they fix it completely?ā, I hear you ask!
The answer to that is here.