Bluetooth on HassOS not working

Did unfortunately not work for me. I’m still getting this error message:

Error setting up platform bluetooth_tracker
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/bluetooth/bluez.py”, line 31, in discover_devices
lookup_class=lookup_class, device_id=device_id)
_bluetooth.error: (110, ‘Operation timed out’)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/device_tracker/init.py”, line 184, 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/local/lib/python3.6/site-packages/homeassistant/components/device_tracker/bluetooth_tracker.py”, line 73, in setup_scanner
for dev in discover_devices():
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/device_tracker/bluetooth_tracker.py”, line 51, in discover_devices
lookup_class=False)
File “/usr/local/lib/python3.6/site-packages/bluetooth/bluez.py”, line 34, in discover_devices
raise BluetoothError ("error communicating with local "
bluetooth.btcommon.BluetoothError: error communicating with local bluetooth adapter

What else can I do to debug the situation?

Edit Edit: Bluetooth seems to have crashed again overnight. Seems to be some stability issues there by the looks of things.

Edit: Looks like issuing a ‘hassio host reboot’ triggered it to work again. Not sure why it dies all of a sudden.

I am having same issue on 0.82.1 (HassOS 32bit RaspberryPi 3) - Bluetooth is broken again :frowning:


Error setting up platform bluetooth_tracker
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/bluetooth/bluez.py", line 31, in discover_devices
    lookup_class=lookup_class, device_id=device_id)
_bluetooth.error: (110, 'Operation timed out')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/device_tracker/__init__.py", line 184, 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/local/lib/python3.6/site-packages/homeassistant/components/device_tracker/bluetooth_tracker.py", line 73, in setup_scanner
    for dev in discover_devices():
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/device_tracker/bluetooth_tracker.py", line 51, in discover_devices
    lookup_class=False)
  File "/usr/local/lib/python3.6/site-packages/bluetooth/bluez.py", line 34, in discover_devices
    raise BluetoothError ("error communicating with local "
bluetooth.btcommon.BluetoothError: error communicating with local bluetooth adapter```

I keep getting the same problem, but on mine, a restart only fixes the problem for about a minute. All the devices are then away forever :frowning:

RaspberryPi 3
HA version: 0.82
HassOS 1.13 (32 bit)

Annoying I only recently switch from hassio 64bit to 32bit as it was causing problems with GPIO. On the 64bit hassio worked fine for months.

2018-11-29 10:18:20 ERROR (SyncWorker_8) [homeassistant.components.device_tracker.bluetooth_tracker] Error looking up Bluetooth device
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/bluetooth/bluez.py", line 31, in discover_devices
    lookup_class=lookup_class, device_id=device_id)
_bluetooth.error: (110, 'Operation timed out')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/device_tracker/bluetooth_tracker.py", line 93, in update_bluetooth_once
    for dev in discover_devices():
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/device_tracker/bluetooth_tracker.py", line 51, in discover_devices
    lookup_class=False)
  File "/usr/local/lib/python3.6/site-packages/bluetooth/bluez.py", line 34, in discover_devices
    raise BluetoothError ("error communicating with local "
bluetooth.btcommon.BluetoothError: error communicating with local bluetooth adapter

hi, i have HA service restarts when:

device_tracker:
platform: bluetooth_tracker

(exists in configuration)
some time it takes for few hour to reboot, some time few minutes.

anywhere there are many instances in known_devices file, and tracking works, but restarts :frowning:

RaspberryPi 3 b+
HA version: 0.86.4
HassOS 1.13 (32 bit)

Any solution for this? Getting the same error.

It was working flawlessly for over a year, today without any updates or changes it decided to give up…

2019-03-13 13:18:30 ERROR (SyncWorker_1) [homeassistant.components.device_tracker.bluetooth_tracker] Error looking up Bluetooth device
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/bluetooth/bluez.py", line 31, in discover_devices
    lookup_class=lookup_class, device_id=device_id)
_bluetooth.error: (110, 'Operation timed out')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/device_tracker/bluetooth_tracker.py", line 101, in update_bluetooth_once
    for dev in discover_devices():
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/device_tracker/bluetooth_tracker.py", line 59, in discover_devices
    lookup_class=False, device_id=device_id)
  File "/usr/local/lib/python3.7/site-packages/bluetooth/bluez.py", line 34, in discover_devices
    raise BluetoothError ("error communicating with local "
bluetooth.btcommon.BluetoothError: error communicating with local bluetooth adapter

Reboot the host. That did it for me, a homeassistant restart will not be enough (RP3B+).

Not to kidnap this thread, but I just added the

device_tracker:
  - platform: bluetooth_tracker

to my config file, and my phone did show up in my known devices, with my BT mac, so THAT … worked, but when i then looked at the page where i have the gps tracking and battery status of all the phones in this household, they all had changed from working well to just saying : Away, on location, and on battery status they said : Unknown.
Anyone seen this happen before? I use gps tracking and battery state via google maps.

I know if you have the iOS app installed AND the BT tracker enabled, that it will switch between gps and BT when you look at the dev-states page. example below…

 device_tracker.my_iphone           home	    source_type: bluetooth
 device_tracker.her_iphone          not_home	source_type: gps

Did you solve this issue? I got the exact same problem right now.

not, but, i switch to iphone present checking.

Try the command:

hciconfig -a

I would get these same errors and the communication timeout shows up when running this command. To fix (use the hci interface for bluetooth reported by the prior command):

sudo hciconfig hci0 up

Check your /etc/bluetooth/main.conf in the [Policy] section: you should have AutoEnable=true. This was already present on my system.

I still get periodic errors in my log but the bluetooth trackers seem to work and my RPi now survives reboots with working bluetooth. Good luck!