2022.9 causing issues with my Bluetooth and devices

The only way I could fix it was to restore from a back up before Bluetooth was in home assistant Then I manually updated everything to get current and everything worked fine

Same issue here on 2022.9.0 and still on 2022.9.4.
I hope this will be fixed in future updates. I don’t have a backup from July, nor would I want to loose all the data I’ve collected in this time.







After upgrading to version 2022.9.2 I am getting the notification after every restart. And also I am not able to add BLUETOOTH integration. But earlier to v2022.9.2, there was no such error. Also the backup option is gone from “SYSTEM” option. When I click on settings->system, I am not able to find the backup option. Kindly help

None of the people that have posted so far, have actually said HOW Home Assistant is installed? Are you running HAOS? Are you running Home Assistant in a container? Are you running Home Assistant native?

I m running in a virtual environment

Which still doesn’t quite answer the question.

Do you mean venv or do you mean a virtual machine?

venv on raspberry pi 4b running on 64 bit bullseye

OK, so next we need to know if you have all the required components installed on the host.

Does this help?

It looks like you have a custom component that is setting up the service_uuid as a list instead of a string.

Here is an example of valid matchers

I installed the dbus-broker restarted rasp-pi but still getting the same error. What’s to do next ?

I’d suggest adding the logger to your config for the bluetooth component, set it to as verbose as you can, and then paste the actual log here - in a code block, so it is properly readable.

logger:
  logs:
    homeassistant.components.bluetooth: debug

I have pasted the lines in the configuration.yaml. Restarted HA now from where do I get the logs?

It’s concerning that you would ask that. It’s assumed that since you have chosen the most complicated way to run Home Assistant, that you would have a lot more technical understanding about how to maintain it and do troubleshooting.

I don’t actually know where the logs are stored when you run homeassistant this way, because I’ve never done it. But it’s the same logs that you get when you go to settings > system > logs

Will post the logs soon.

Same problem. Logs:

2022-09-18 16:34:59.776 ERROR (MainThread) [homeassistant.setup] Error during setup of component bluetooth
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 235, in _async_setup_component
result = await task
File "/usr/src/homeassistant/homeassistant/components/bluetooth/__init__.py", line 224, in async_setup
adapters = await manager.async_get_bluetooth_adapters()
File "/usr/src/homeassistant/homeassistant/components/bluetooth/manager.py", line 199, in async_get_bluetooth_adapters
self._adapters = await async_get_bluetooth_adapters()
File "/usr/src/homeassistant/homeassistant/components/bluetooth/util.py", line 49, in async_get_bluetooth_adapters
hw_version=adapter1["Modalias"],
KeyError: 'Modalias'

Home Assistant runs in a docker container (homeassistant/home-assistant:stable). Present image is Home Assistant 2022.9.4.

Please let me know what additional information I can provide or tests I can run to help diagnose this issue.

Many thanks!

EDIT: verified that bluetoothctl works correctly (scan on) lists the devices I’d like to add to home assistant.

Which version of BlueZ are you running on the host?

bluez 5.46-r0 5.64

Sorry, that wasn’t correct. The host has bluez5 version 5.64.

Thanks. Looks like ModAlias is missing for some reason.

Will add a solution for that in the next patch release

2 Likes

Hello,

I came to this thread via google…
I set up HA today as docker container.

“io.hass.base.version”: “2023.10.4”,
“io.hass.version”: “2023.12.1”,
“org.opencontainers.image.version”: “2023.12.1”

Host system is a synology without bluetooh interface. I played around with HA ignoring this error and it seems to work so far (not using any bluetooth stuff).
However, from the first start of the container, logs show the same error that have been discussed here before:

Home Assistant Core

Setup failed for ‘default_config’: (DependencyError(…), ‘Could not setup dependencies: bluetooth’)

15:51:59 – (FEHLER) setup.py

Unable to set up dependencies of ‘default_config’. Setup failed for dependencies: bluetooth

15:51:59 – (FEHLER) setup.py

Error during setup of component bluetooth

15:51:55 – (FEHLER) setup.py

These are the details of the first error log entry:

Protokolldetails (FEHLER)
Logger: homeassistant.setup
Source: setup.py:332
First occurred: 15:51:55 (1 occurrences)
Last logged: 15:51:55

Error during setup of component bluetooth
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/setup.py”, line 332, in _async_setup_component
result = await task
^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/bluetooth/init.py”, line 145, in async_setup
await manager.async_setup()
File “/usr/src/homeassistant/homeassistant/components/bluetooth/manager.py”, line 242, in async_setup
await self._bluetooth_adapters.refresh()
File “/usr/local/lib/python3.11/site-packages/bluetooth_adapters/systems/linux.py”, line 36, in refresh
await self._bluez.load()
File “/usr/local/lib/python3.11/site-packages/bluetooth_adapters/dbus.py”, line 30, in load
self._packed_managed_objects = await _get_dbus_managed_objects()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/bluetooth_adapters/dbus.py”, line 94, in _get_dbus_managed_objects
bus = await MessageBus(bus_type=BusType.SYSTEM).connect()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/dbus_fast/aio/message_bus.py”, line 198, in init
super().init(bus_address, bus_type, ProxyObject, negotiate_unix_fd)
File “src/dbus_fast/message_bus.py”, line 161, in dbus_fast.message_bus.BaseMessageBus.init
File “src/dbus_fast/message_bus.py”, line 714, in dbus_fast.message_bus.BaseMessageBus._setup_socket
File “src/dbus_fast/message_bus.py”, line 687, in dbus_fast.message_bus.BaseMessageBus._setup_socket
NotADirectoryError: [Errno 20] Not a directory

Anyone knows how to fix this or should I just ignore it?

Thanks!