Hello,
I have Home Assistant OS installed as a virtual machine (virsh) on an Intel NUC 8i5BEH. This has been working quite well for about 6 months now.
I will soon need to add an integration that relies on Bluetooth connectivity (Switchbot) and noticed that the integrated Bluetooth adapter does not passthrough automatically to the guest, so I have no working Bluetooth integration.
I have tried to pass the integrated adapter through by editing my homeassistant VMs XML config.
I found the vendor and product IDs using lsusb
:
Bus 001 Device 003: ID 8087:0aaa Intel Corp. Bluetooth 9460/9560 Jefferson Peak (JfP)
Then updated my VM XML config (using virsh edit homeassistant
) as follows:
<!-- within domain.devices -->
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<vendor id='0x8087'/>
<product id='0x0aaa'/>
</source>
<address type='usb' bus='0' port='6'/>
</hostdev>
Unfortunately when restarting the VM with this configuration, the Bluetooth hardware is not detected. After reading some threads, it seems that it’s not possible to pass it through and that I would need to purchase a compatible Bluetooth adapter and then configure that in the XML instead.
I checked the documentation on Bluetooth adapters here: Bluetooth - Home Assistant and purchased a SABRENT BT-UB40 (CSR8510A10) which has just arrived.
I have plugged this into the host and I can see the new vendor and product ID in lsusb
:
Bus 001 Device 005: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
And I have updated the VM XML:
<!-- within domain.devices -->
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<vendor id='0x0a12'/>
<product id='0x0001'/>
</source>
<address type='usb' bus='0' port='6'/>
</hostdev>
And then rebooted the VM.
Unfortunately Home Assistant OS still does not see this hardware. I am checking in the UI in http://homeassistant.local:8123/config/hardware and cannot see anything for 0a12
or 0001
.
I should note that I have been able to successfully passthrough a Zigbee coordinator (zzh) using this same method (updating the XML with the hostdev block and the vendor and product ID for that device) and this was detected in the hardware section immediately, so I believe I am at least doing the XML editing part correctly!
Any advice much appreciated. Hopefully I can get this up and running before my Bluetooth devices arrive next week