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
disc_info)
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?
Privledged gives the container more access to the system. This should expose all the hardware on your machine. You can use the --privileged option or add privileged: true to your docker-compose.yaml file.
Some information here that explains it better (LINK).
Here is my docker compose entry for Home Assistant if it helps.
root@nuc:/usr/src/app# apt-get install python-bluez bluetooth libbluetooth-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python-bluez
root@nuc:/usr/src/app# apt search bluez
Sorting... Done
Full Text Search... Done
bluetooth/now 5.43-2+deb9u1 all [installed,local]
Bluetooth support
bluez/now 5.43-2+deb9u1 amd64 [installed,local]
Bluetooth tools and daemons
libbluetooth-dev/now 5.43-2+deb9u1 amd64 [installed,local]
Development files for using the BlueZ Linux Bluetooth library
libbluetooth3/now 5.43-2+deb9u1 amd64 [installed,local]
Library to use the BlueZ Linux Bluetooth stack
bluetooth inside Docker HA used to work all fine until the 0.94 update. I tried downgrading to 0.93 but it still didnt work.
I cannot work it out if its my NUC which I updated recently (sudo apt-get update && sudo apt-get upgrade) that has caused problems. Bluetoothctl works fine