I’ve configured the Bluetooth LE Tracker component and it works for a few hours (between 2 and 12), after which I get these kind of errors, any idea why they might be happening?
-
Unexpected error when scanning:
-
Error doing job: Future exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/pexpect/spawnbase.py”, line 166, in read_nonblocking
s = os.read(self.child_fd, size)
OSError: [Errno 5] I/O error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/pexpect/expect.py”, line 111, in expect_loop
incoming = spawn.read_nonblocking(spawn.maxread, timeout)
File “/usr/local/lib/python3.6/site-packages/pexpect/pty_spawn.py”, line 485, in read_nonblocking
return super(spawn, self).read_nonblocking(size)
File “/usr/local/lib/python3.6/site-packages/pexpect/spawnbase.py”, line 171, in read_nonblocking
raise EOF(‘End Of File (EOF). Exception style platform.’)
pexpect.exceptions.EOF: End Of File (EOF). Exception style platform.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/pygatt/backends/gatttool/gatttool.py”, line 315, in scan
scan.expect(‘foooooo’, timeout=timeout)
File “/usr/local/lib/python3.6/site-packages/pexpect/spawnbase.py”, line 341, in expect
timeout, searchwindowsize, async_)
File “/usr/local/lib/python3.6/site-packages/pexpect/spawnbase.py”, line 369, in expect_list
return exp.expect_loop(timeout)
File “/usr/local/lib/python3.6/site-packages/pexpect/expect.py”, line 117, in expect_loop
return self.eof(e)
File “/usr/local/lib/python3.6/site-packages/pexpect/expect.py”, line 63, in eof
raise EOF(msg)
pexpect.exceptions.EOF: End Of File (EOF). Exception style platform.
<pexpect.pty_spawn.spawn object at 0x7f4a3dc9a5c0>
command: /usr/bin/hcitool
args: [’/usr/bin/hcitool’, ‘-i’, ‘hci0’, ‘lescan’]
buffer (last 100 chars): b’’
after: <class ‘pexpect.exceptions.EOF’>
match: None
match_index: None
exitstatus: None
flag_eof: True
pid: 2322
child_fd: 56
closed: False
timeout: 30
delimiter: <class ‘pexpect.exceptions.EOF’>
logfile: None
logfile_read: None
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1
searcher: searcher_re:
0: re.compile(b’foooooo’)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
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_le_tracker.py”, line 96, in update_ble
devs = discover_ble_devices()
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/device_tracker/bluetooth_le_tracker.py”, line 58, in discover_ble_devices
devs = adapter.scan()
File “/usr/local/lib/python3.6/site-packages/pygatt/backends/gatttool/gatttool.py”, line 326, in scan
raise BLEError(message)
pygatt.exceptions.BLEError: Unexpected error when scanning: