Failed to start Bluetooth: [org.bluez.Error.NotReady] Resource Not Ready

I ran into this error on Home Assistant Container, on Docker.

Failed to start Bluetooth: [org.bluez.Error.NotReady] Resource Not Ready

To resolve this, I opened a terminal into my Home Assistant Container, using Portainer and ran the following command

bluetoothctl power on

Unfortunately, each time I restarted my Home Assistant container, the problem came back, so I had to find a way to make it persistent. The solution I came up with was to run this command automatically in my Docker Compose yaml file when the container restarted.

You can do this with the command... command. Take a look at this sample of my Docker Compose file.

homeassistant:
    container_name: home-assistant
    image: homeassistant/home-assistant:stable
    volumes:
      - /opt/hass/config:/config
      - /etc/localtime:/etc/localtime:ro
      - /run/dbus:/run/dbus:ro
    privileged: true

    command: /bin/bash -c "bluetoothctl power on && hass -c /config/"
    environment:
      - TZ=Europe/London
    restart: always
    network_mode: host

This will run the bluetoothctl power on command, and then start Home Assistant with the hass -c /config/ command.

For more information, check out my video on Bluetooth in Home Assistant Container!


Previous
Previous

Automatic smart light brightness and color temperature based on the sun

Next
Next

Upgrade BlueZ on Ubuntu for use with Home Assistant Bluetooth