2022.9 causing issues with my Bluetooth and devices

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!