core: Error communicating with local bluetooth adapter (RPi3)

Home Assistant release with the issue:

0.103.2 & 0.103.3

Last working Home Assistant release (if known): 0.103.1

Operating environment (Hass.io/Docker/Windows/etc.):

arch armv7l
dev false
docker true
hassio true
os_name Linux
python_version 3.7.5
timezone Europe/London
version 0.103.3
virtualenv false

Integration:

https://www.home-assistant.io/integrations/device_tracker/

Description of problem: This might be due the recent upgrade of HassOS to v3 but I don’t understand enough about these things!

My bluetooth device trackers are currently all broken and stuck on away. They sometimes work for a while after a reboot, but will fail at some point

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

- platform: bluetooth_tracker
  interval_seconds: 20
  consider_home: 180
  new_device_defaults:
    track_new_devices: false

Traceback (if applicable):

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/src/homeassistant/homeassistant/components/bluetooth_tracker/device_tracker.py", line 140, in perform_bluetooth_update
    devices = await hass.async_add_executor_job(discover_devices, device_id)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/bluetooth_tracker/device_tracker.py", line 62, in discover_devices
    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

Additional information:

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 53 (4 by maintainers)

Commits related to this issue

Most upvoted comments

Raspberry Pi 3B+ HassOS 3.9 and 0.105.2 still not solved problem - bluetooth just not start

> systemctl status bluetooth 
> Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
> Active: inactive (dead)
> Docs: man:bluetoothd(8)

and bluetoothctl just freezes even > systemctl start bluetooth does not ressolve problem, but changes to > Active: active (running) but bluetoothctl says: > No default controller available

You can revert to 4.13 with ha os update --version 4.13 This issue will be fixed in 4.15 -> https://github.com/home-assistant/operating-system/issues/910

I’ve upgraded to a rpi4 since I opened this issue, so can’t comment personally, but thank you very much @lucagiove

We running: HassOS 3.12 Supervisor 214 Home Assistant 0.107.4

On a Pi 4. Using the bluetooth to track our iPhones and only get “home” / “away” alternating throughout the day. Have been following various threads with no luck. Though upgrading to the latest might have a firmware fix. See people are having luck with the Pi 4? I did but that was almost 6 months ago.

I downgraded back to HassOS 2.12 and ble communication with MiFlora worked great again. I’m still using 105.3

On Wed, 12 Feb 2020 at 11:23 pm, Stone notifications@github.com wrote:

I had the same problem with Home Assistant Core 0.104.3 and HassOS 2.12. Then I tried to downgrade to 0.101.2 via command line, but that failed (it told me OK, but after rebooting I was at 0.104.4 again). Since than everything working fine. My Mi Floras has no problems at all. Weird.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/home-assistant/home-assistant/issues/30147?email_source=notifications&email_token=AC3OWLKYZOZP4LPQZY6AORLRCQIAHA5CNFSM4J6MQMA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELRFHZA#issuecomment-585257956, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC3OWLMTCC6K4G2FDWUJRX3RCQIAHANCNFSM4J6MQMAQ .

I continue to keep having this issue with BT tracking crashing with any version of HassOS 3.x on a RP3b. BT tracking is solid on HassOS 2.12. I have a wired network connection and wifi not configured.

To easily roll back to HassOS 2.12, run the following command from SSH. hassio os update --version 2.12

It looks like a problem with HassOS 3.7 - I’ve no problems with Bluetooth with versions 0.103.x till OS update… (I’ve had HassOS 2.12 before and BT was working normal)

We use Bluetooth exclusively but ended up installing HACS and this little gem so now we track using both Wifi and Bluetooth until this is fixed