How to use Bluetooth in Home Assistant in a LXC Docker container

Chucktuna

New Member
Oct 22, 2023
9
1
3
Hi all,
I would like to run Bluetooth on my HA running in a Docker container.

I'm running Proxmox on a NUC. According to the lsusb command I do have an Intel Bluetooth internal adapter. I'm running Docker in a LXC containter with HA, Nodered, Mosquitto installed as well.



I've spent several hours reading the threads and Youtube videos. I guess I don't understand what is being said.

The HA documentation says I have to make the Dbus socket available in the Docker container.
I think with the following command:
docker run -v /run/dbus:/run/dbus:ro
Is that correct?

I need to install Bluez on my NUC?
I gather to install the latest version I first have to get the dependencies:

sudo apt install glib2.0 dbus-1-dbg build-essential libdbus-glib-1-dev libgirepository1.0-dev libudev-dev libical-dev libreadline-dev python-docutils

I then have to get the bluez-5.65.tar file:
wget http://www.kernel.org/pub/linux/bluetooth/bluez-5.64.tar.xz
tar xf bluez-5.64.tar.xz

After that I have to:
cd bluez-5.64./configuremake
sudo make install
sudo systemctl unmask bluetooth
sudo systemctl daemon-reloadsudo systemctl restart dbus bluetooth

The Bluez install needs to be done in the Proxmox shell. Is this correct?

This is all over my head, but I still hope to accomplish. :)
 

Attachments

  • lsusb.png
    lsusb.png
    35.6 KB · Views: 7
I have the same problem, but i have the bluetooth recognised in the lxc, but not by home assistant
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!