My HA setup uses a combination of OwnTracks and the bluetooth tracker for presence detection, which has always worked pretty well.
After upgrading to 0.44 I also wanted to add the the new Websocket version of the Automatic platform, so I edited my config file like so
device_tracker:
- platform: owntracks
max_gps_accuracy: 200
consider_home: 180
track_new_devices: no
- platform: bluetooth_tracker
- platform: automatic
client_id: !secret AUTOMATIC_CLIENT_ID
secret: !secret AUTOMATIC_SECRET
username: !secret AUTOMATIC_USERNAME
password: !secret AUTOMATIC_PASSWORD
But afterwards HA would no longer start; it would hang while setting up the device_tracker
component and, occasionally, throw this error:
May 08 13:18:28 raspberrypi2 hass[11420]: 2017-05-08 13:18:28 DEBUG (Thread-11) [homeassistant.components.device_tracker.bluetooth_tracker] Scanning REDACTED
May 08 13:18:28 raspberrypi2 hass[11420]: Config directory: /home/hass/.homeassistant
May 08 13:18:33 raspberrypi2 hass[11420]: Traceback (most recent call last):
May 08 13:18:33 raspberrypi2 hass[11420]: File "/srv/hass/hass_venv/bin/hass", line 11, in <module>
May 08 13:18:33 raspberrypi2 hass[11420]: sys.exit(main())
May 08 13:18:33 raspberrypi2 hass[11420]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/__main__.py", line 396, in main
May 08 13:18:33 raspberrypi2 hass[11420]: exit_code = setup_and_run_hass(config_dir, args)
May 08 13:18:33 raspberrypi2 hass[11420]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/__main__.py", line 307, in setup_and_run_hass
May 08 13:18:33 raspberrypi2 hass[11420]: log_rotate_days=args.log_rotate_days)
May 08 13:18:33 raspberrypi2 hass[11420]: File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/bootstrap.py", line 167, in from_config_file
May 08 13:18:33 raspberrypi2 hass[11420]: config_path, hass, verbose, skip_pip, log_rotate_days)
May 08 13:18:33 raspberrypi2 hass[11420]: File "/usr/lib/python3.4/asyncio/base_events.py", line 271, in run_until_complete
May 08 13:18:33 raspberrypi2 hass[11420]: self.run_forever()
May 08 13:18:33 raspberrypi2 hass[11420]: File "/usr/lib/python3.4/asyncio/base_events.py", line 244, in run_forever
May 08 13:18:33 raspberrypi2 hass[11420]: self._run_once()
May 08 13:18:33 raspberrypi2 hass[11420]: File "/usr/lib/python3.4/asyncio/base_events.py", line 1049, in _run_once
May 08 13:18:33 raspberrypi2 hass[11420]: event_list = self._selector.select(timeout)
May 08 13:18:33 raspberrypi2 hass[11420]: File "/usr/lib/python3.4/selectors.py", line 424, in select
May 08 13:18:33 raspberrypi2 hass[11420]: fd_event_list = self._epoll.poll(timeout, max_ev)
May 08 13:18:33 raspberrypi2 hass[11420]: OverflowError: timeout is too large
May 08 13:18:33 raspberrypi2 hass[11420]: 2017-05-08 13:18:33 DEBUG (Thread-11) [homeassistant.components.device_tracker.bluetooth_tracker] Scanning REDACTED
May 08 13:18:38 raspberrypi2 hass[11420]: 2017-05-08 13:18:38 DEBUG (Thread-11) [homeassistant.components.device_tracker.bluetooth_tracker] Scanning REDACTED
I eventually figured out that something about the combination of Automatic and bluetooth tracking produces this issue. That is, HA starts fine if I use only OwnTracks and Automatic, or OwnTracks and bluetooth but it always fails whenever Automatic and bluetooth are present.
I’m wondering if anyone else has encountered this rather specific problem or has any idea as to why it might be happening?