I’m new to home assistant and I’m struggling to work out why person tracking with a BT Smarthub isn’t working.
I’ve installed Hass.io on a Raspberrypi 4 and most things seem to be working. To enable device tracking I installed the Configurator add on and used it to edit configuration.yaml to add the following lines
device_tracker:
- platform: bt_smarthub
Devices now appear in my overview page as away, but none of them ever appear as here/home/whatever the opposite of away is. I see the mac address of my mobile phone in the routers device list but home-assistant doesn’t think it’s ever here.
I’m struggling with this, dispaite reading various posts and trying various config.
My log is:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/device_tracker/setup.py", line 64, in async_setup_legacy
self.platform.get_scanner, hass, {DOMAIN: self.config}
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/bt_smarthub/device_tracker.py", line 35, in get_scanner
scanner = BTSmartHubScanner(smarthub_client)
File "/usr/src/homeassistant/homeassistant/components/bt_smarthub/device_tracker.py", line 50, in __init__
data = self.get_bt_smarthub_data()
File "/usr/src/homeassistant/homeassistant/components/bt_smarthub/device_tracker.py", line 88, in get_bt_smarthub_data
data = self.smarthub.get_devicelist(only_active_devices=True)
File "/usr/local/lib/python3.7/site-packages/btsmarthub_devicelist/__init__.py", line 61, in get_devicelist
devicelist = self.get_devicelist_smarthub_2(only_active_devices=only_active_devices)
File "/usr/local/lib/python3.7/site-packages/btsmarthub_devicelist/__init__.py", line 286, in get_devicelist_smarthub_2
devices = json.loads(cleaned_jscript_array)
File "/usr/local/lib/python3.7/json/__init__.py", line 348, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.7/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.7/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Invalid control character at: line 1 column 63299 (char 63298)
Also I not in the Hub XML file it is reporting IP6 devices, I was wondering this what is upsetting the script? Hence the JSON invalid control character error?