I wish to ask for some assistance in trying to figure what happened to my ble integrations. It was working up to a few days ago when I had to power down the server due to a storm then i had to reboot serveral times due to a nvidia issue which was unrelated. I didn’t take much notice when it booted back up as my Ha runs in docker on ubtunu (using official image). As i logged in to check today the BLE sensors were not picked up.
Now as i see it i was on 2021.8 and i saw a support post about having to run some commands if the python was above 3.8. This was all working before. Being dumb i thought i might update to 2021.10.6 to see if a new image would help but it made things a little worse.
So now I deleted ble_monitor from my config.yaml and re added it to my integrations. I notice now the ble integration is added but nothing is configured. The configuration picks up the mac address of the BT adapter. Scan does nothing in the config. The errors are
HCIdump thread: Runtime error while sending scan request on hci0: Event loop stopped before Future completed.
8:25:45 PM – (ERROR) Passive BLE monitor (custom integration) - message first occurred at 7:54:43 PM and shows up 11 times
HCIdump thread: Runtime error while stop scan request on hci0: Event loop stopped before Future completed.
8:24:45 PM – (ERROR) Passive BLE monitor (custom integration) - message first occurred at 7:56:43 PM and shows up 9 times
Googling this it seems the BT adapter isnt being detected by the system.
A log file shows it is being detected by the container at least .
[133492.409160] usb 2-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[133492.409162] usb 2-1.5: Product: BCM20702A0
[133492.409164] usb 2-1.5: Manufacturer: Broadcom Corp
[133492.409165] usb 2-1.5: SerialNumber:
Now though when i use the BT commands it shows no devices.
hcitool lescan
Could not open device: No such device
This is most liekly the issue. I how ever can not run the following commands via the shell in the container to see if anything works.
sudo hciconfig hci0 down
sudo hciconfig hci0 up
if this doesn't work or it hangs in DOWN status, try:
sudo service bluetooth restart
sudo service dbus restart
What is the result of this command?
sudo getcap `readlink -f \`which python3\``
and
hcitool dev
hciconfig hci0 up gives - Can’t init device hci0: No error information (132)
getcap doesnt exist on the container to run.
hcitool shows nothing
So Anything else i can try here or am I doomed for now?