Cannot get HomeAssistant Docker Container to see Raspberry Pi 3 Bluetooth

I’ve followed all the steps on Bluetooth - Home Assistant

My docker compose looks like this

version: '3.8'
services:
  homeassistant:
    image: homeassistant/raspberrypi3-homeassistant:stable
    container_name: homeassistant
    hostname: homeassistant
    env_file: ../.env
    network_mode: host # exposes all ports, needed for multicast DNS
    privileged: true # new since 2021.07 release
    restart: always
    volumes:
      - ./config:/config
      - /run/dbus:/run/dbus:ro
    devices:
      - /dev/ttyUSB0:/dev/ttyUSB0:rwm
      - /dev/ttyUSB1:/dev/ttyUSB1:rwm

I followed the steps to install dbus-broker: Home · bus1/dbus-broker Wiki · GitHub

❯ sudo apt-get install dbus-broker
❯ systemctl enable dbus-broker.service
❯ systemctl --global enable dbus-broker.service

And i have BlueZ installed

❯ sudo apt-get install bluez
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
bluez is already the newest version (5.55-3.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

❯ bluetoothctl --version
bluetoothctl: 5.55

I even added this to my configuration file

# Loads default set of integrations. Do not remove.
default_config:

bluetooth:

But when i go to Settings → Integrations → Add Integration → Bluetooth

I see a popup saying

“No unconfigured Bluetooth adapters found”

I’m at a loss here! This is after I already fixed two other issues

  1. SAP error on bluetooth service status
  2. “Failed to set privacy: Rejected (0x0b)”

thanks to this article

I dont know what to do…

My docker container doesnt even seem to see the dbus after i explicitly mapped the volume

on the pi i see

❯ ls /run/dbus
system_bus_socket

but if i go into the docker container i dont see it

❯ docker exec -it homeassistant bash
bash-5.1# ls /run/dbus/
bash-5.1#

I did notice that the home assistant docker is using a newer version of BlueZ

Pi Version

❯ bluetoothctl --version
bluetoothctl: 5.55

Home Assistant Docker version

❯ docker exec -it homeassistant bash
bash-5.1# bluetoothctl --version
bluetoothctl: 5.65

But when i look for updates i’m told i’m on the latest (as shown above in this post)

Please help! Im going out of my mind!

Solved this, it was docker stupidity

from docker compose restart | Docker Documentation
If you make changes to your compose.yml configuration, these changes are not reflected after running this command.

I was using docker container homeassistant restart which was not seeing the new compose file edits. I realized this when i seriously considered why the heck dbus wasn’t being seen at all even when the volume was mapped.

so instead i did the classic docker compose -f homeassistant.yaml down and then docker compose -f homeassistant.yaml up -d

and now the blueooth device is seen

1 Like

I have this very same issue. I’m new to docker, and i can not find the compose.yml either inside the existing container for home assistant or in my os files. How do i add the config from the error message i get in the HASS bluetooth log. " docker config may be missing -v /run/dbus:/run/dbus:ro