Core: Device tracker error in 0.67.0b0

Created on 8 Apr 2018  路  7Comments  路  Source: home-assistant/core

Home Assistant release with the issue:
0.67.0b0

Last working Home Assistant release (if known):
0.66.1b-something (I've missed at least one, been too busy this week!!)

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

Component/platform:
Device tracker

Description of problem:
Since upgrade I get this error on every restart (see trace)

PLEASE NOTE - it's 11pm here so I can't say whether this is actually affecting presence detection, but the device tracker.see service is present in the services tab.

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

device_tracker:
  - platform: bluetooth_tracker
    new_device_defaults:
      track_new_devices: false

  - platform: gpslogger

ios:

Traceback (if applicable):

Sun Apr 08 2018 22:50:13 GMT+0100 (GMT Daylight Time)

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/device_tracker/__init__.py", line 332, in async_see
    yield from device.set_vendor_for_mac()
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/device_tracker/__init__.py", line 573, in set_vendor_for_mac
    self.vendor = yield from self.get_vendor_for_mac()
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/device_tracker/__init__.py", line 593, in get_vendor_for_mac
    oui = '{:02x}:{:02x}:{:02x}'.format(*[int(b, 16) for b in oui_bytes])
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/device_tracker/__init__.py", line 593, in <listcomp>
    oui = '{:02x}:{:02x}:{:02x}'.format(*[int(b, 16) for b in oui_bytes])
ValueError: invalid literal for int() with base 16: '_AC'

Additional information:

None yet, but will try an add to this when I can do some tests in daylight hours.

Most helpful comment

Looks like it has to do with the MAC address that is being passed in, it chokes in our mac resolver. I am going to remove the mac resolver as we're leaking info on device vendors.

All 7 comments

Just to confirm that presence detection appears to be working fine on the ios devices, in spite of the error.

Bluetooth isn't working.

Will have to wait to see about gpslogger, but I would guess that isn't either as the error message is talking about mac addresses, where the ios devices don't use that.

(pressed the wrong button!)

I can confirm same behaviour. Deleted known_devices.yaml, restarted HA and when BT-device is found, it generates this error without adding the device to known_devices.yaml:

`2018-04-09 19:20:40 DEBUG (SyncWorker_9) [homeassistant.components.device_tracker.bluetooth_tracker] Scanning 40:xx:xx:xx:xx:DB

2018-04-09 19:20:41 ERROR (SyncWorker_17) [homeassistant.core] Error doing job: Task was destroyed but it is pending!
2018-04-09 19:20:42 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/homeassistant/components/device_tracker/__init__.py", line 332, in async_see
yield from device.set_vendor_for_mac()
File "/usr/lib/python3.6/site-packages/homeassistant/components/device_tracker/__init__.py", line 573, in set_vendor_for_mac
self.vendor = yield from self.get_vendor_for_mac()
File "/usr/lib/python3.6/site-packages/homeassistant/components/device_tracker/__init__.py", line 593, in get_vendor_for_mac
oui = '{:02x}:{:02x}:{:02x}'.format([int(b, 16) for b in oui_bytes])
File "/usr/lib/python3.6/site-packages/homeassistant/components/device_tracker/__init__.py", line 593, in
oui = '{:02x}:{:02x}:{:02x}'.format(
[int(b, 16) for b in oui_bytes])
ValueError: invalid literal for int() with base 16: '_40'`

I am running 0.67b0 through hassio beta channel.

Yeah, only Bluetooth is affected, gpslogger is working fine.

Can also confirm bluetooth tracker error in 0.67. Using latest hassio. Status on devices never updates.

Looks like it has to do with the MAC address that is being passed in, it chokes in our mac resolver. I am going to remove the mac resolver as we're leaking info on device vendors.

Possibly unrelated but since updating to 0.67.0b1 bluetooth device mac addresses in known_devices.yaml are being prefixed with a double underscore, which then throws an error as it thinks the second underscore is part of the mac address...

mac: BT__00:11:22:33:AA:BB
Was this page helpful?
0 / 5 - 0 ratings

Related issues

raccettura picture raccettura  路  142Comments

grantalewis picture grantalewis  路  145Comments

kdschlosser picture kdschlosser  路  374Comments

sagilo picture sagilo  路  130Comments

soldag picture soldag  路  143Comments