Home Assistant Community

Bluetooth not working on NUC in HA Docker


Hi, I recently upgraded my HA setup to NUC via Docker on Ubuntu 18 system. Everything seems to work the way I want it to except Bluetooth device tracker.
I have looked at quite a few threads here and none seem to be able to solve my problem. Not sure what is going on with the NUC.

Here are some of the things which I have tried already.

  • NUC Bluetooth is working absolutely fine, trying the bluetoothctl shows all of my connected devices.
  • HA network is set to host.
  • Tried restarting HA container a few times but the device tracker never comes on.

Following is the error I see in the logs

Error setting up platform bluetooth_tracker
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/components/device_tracker/__init__.py", line 183, in async_setup_platform
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/device_tracker/bluetooth_tracker.py", line 42, in setup_scanner
    import bluetooth
ModuleNotFoundError: No module named 'bluetooth'

Can anyone help me figure out what is wrong with the setup?



Make sure your image is privledged. This gives it access to everything. Also, on the host system, try installing these:

sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev libusb-1.0-0-dev



Any luck sorting this out? Same issue here, sadly.