Bluetooth LE Tracker Issues with HASSbian Image

I’m running HA 0.35.2 and trying to get the bluetooth LE tracker going. I followed the configuration docs for the bluetooth LE tracker and I can run: sudo hcitool lescan successfully.

In my HA log, I see devices being recognized, for example… INFO:homeassistant.components.device_tracker.bluetooth_le_tracker:Discovered Bluetooth LE device 28:FD:80:81:0A:59 is reported.

However, there’s no entry in my known_devices.yaml that corresponds with this MAC address. I also get the following errors in the log:

Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/tasks.py", line 237, in _step
    result = next(coro)
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/device_tracker/__init__.py", line 285, in async_see
    yield from device.set_vendor_for_mac()
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/device_tracker/__init__.py", line 479, in set_vendor_for_mac
    self.vendor = yield from self.get_vendor_for_mac()
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/device_tracker/__init__.py", line 496, in get_vendor_for_mac
    oui = '{:02x}:{:02x}:{:02x}'.format(*[int(b, 16) for b in oui_bytes])
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/device_tracker/__init__.py", line 496, in <listcomp>
    oui = '{:02x}:{:02x}:{:02x}'.format(*[int(b, 16) for b in oui_bytes])
ValueError: invalid literal for int() with base 16: 'BLE_14'
16-12-21 21:02:25 homeassistant.core: Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/tasks.py", line 237, in _step
    result = next(coro)
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/device_tracker/__init__.py", line 285, in async_see
    yield from device.set_vendor_for_mac()
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/device_tracker/__init__.py", line 479, in set_vendor_for_mac
    self.vendor = yield from self.get_vendor_for_mac()
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/device_tracker/__init__.py", line 496, in get_vendor_for_mac
    oui = '{:02x}:{:02x}:{:02x}'.format(*[int(b, 16) for b in oui_bytes])
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/device_tracker/__init__.py", line 496, in <listcomp>
    oui = '{:02x}:{:02x}:{:02x}'.format(*[int(b, 16) for b in oui_bytes])
ValueError: invalid literal for int() with base 16: 'BLE_C8'
16-12-21 21:02:25 homeassistant.core: Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/tasks.py", line 237, in _step
    result = next(coro)
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/device_tracker/__init__.py", line 285, in async_see
    yield from device.set_vendor_for_mac()
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/device_tracker/__init__.py", line 479, in set_vendor_for_mac
    self.vendor = yield from self.get_vendor_for_mac()
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/device_tracker/__init__.py", line 496, in get_vendor_for_mac
    oui = '{:02x}:{:02x}:{:02x}'.format(*[int(b, 16) for b in oui_bytes])
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/device_tracker/__init__.py", line 496, in <listcomp>
    oui = '{:02x}:{:02x}:{:02x}'.format(*[int(b, 16) for b in oui_bytes])
ValueError: invalid literal for int() with base 16: 'BLE_D5'

Any suggestions?

Had this same problem, there is some sort of issue but the workaround I found was to manually add the device to the know_devices.yaml with the MAC and prefix it with “BLE_”

Opened a PR for a fix. https://github.com/home-assistant/home-assistant/pull/5036

Everything seems to work by entering the details manually into known_devices.yaml.

Do you also get the numerous error messages? Is it anything I should be concerned about?

The performance is horrible though, making the BLE tracker virtually unusable. I see there’s already an issue logged #4442 regarding sluggish performance. Hope this gets addressed in a reasonable amount of time.

Thanks.

I agree the performance is awful, I stopped using it because if that. Increasing the scan time helps.