macless-haystack配置好后显示没有设备或实体,调试日志如下,请dscao大佬过目
2025-06-10 10:23:36.424 DEBUG (MainThread) [custom_components.cloud_gps] ['1234567']
2025-06-10 10:23:36.424 DEBUG (MainThread) [custom_components.cloud_gps] Data macless_haystack , ['1234567'] will be update every 0:10:00
2025-06-10 10:23:36.424 DEBUG (MainThread) [custom_components.cloud_gps.macless_haystack_data_fetcher] ['1234567'] Loaded persisted data: {}
2025-06-10 10:23:36.425 DEBUG (SyncWorker_2) [custom_components.cloud_gps.macless_haystack_data_fetcher] XXXXXX_devices.json: {'accessoryId': 1234567, 'ids': None, 'days': 1}
2025-06-10 10:23:36.432 WARNING (MainThread) [custom_components.cloud_gps.macless_haystack_data_fetcher] ['1234567'] No new data available, using persisted data
2025-06-10 10:23:36.432 ERROR (MainThread) [custom_components.cloud_gps] [['1234567']]Unexpected error updating data: 'trackerdata'
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/requests/models.py", line 974, in json
return complexjson.loads(self.text, **kwargs)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/simplejson/__init__.py", line 514, in loads
return _default_decoder.decode(s)
~~~~~~~~~~~~~~~~~~~~~~~^^^
File "/usr/local/lib/python3.13/site-packages/simplejson/decoder.py", line 386, in decode
obj, end = self.raw_decode(s)
~~~~~~~~~~~~~~~^^^
File "/usr/local/lib/python3.13/site-packages/simplejson/decoder.py", line 416, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/config/custom_components/cloud_gps/macless_haystack_data_fetcher.py", line 384, in get_data
devicesinfodata = await self.hass.async_add_executor_job(self._get_devices_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/cloud_gps/macless_haystack_data_fetcher.py", line 99, in _get_devices_info
resp = requests.post(url, headers=headers, json=p_data).json()
File "/usr/local/lib/python3.13/site-packages/requests/models.py", line 978, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/config/custom_components/cloud_gps/__init__.py", line 246, in _async_update_data
data = await self._fetcher.get_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/cloud_gps/macless_haystack_data_fetcher.py", line 391, in get_data
self.trackerdata[imei] = self._persisted_data["trackerdata"][imei] or {}
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
KeyError: 'trackerdata'
2025-06-10 10:23:36.436 DEBUG (MainThread) [custom_components.cloud_gps] Finished fetching cloud_gps data in 0.012 seconds (success: True)
2025-06-10 10:23:36.437 DEBUG (MainThread) [custom_components.cloud_gps.sensor] coordinator sensors: {}
2025-06-10 10:23:36.437 DEBUG (MainThread) [custom_components.cloud_gps.sensor] enabled_sensors: ['lastseen', 'address', 'status', 'battery_status']
2025-06-10 10:23:36.438 DEBUG (MainThread) [custom_components.cloud_gps.switch] coordinator switchs: {}
2025-06-10 10:23:36.438 DEBUG (MainThread) [custom_components.cloud_gps.switch] enabled_switchs: []
2025-06-10 10:23:36.438 DEBUG (MainThread) [custom_components.cloud_gps.button] coordinator buttons: {}
2025-06-10 10:23:36.438 DEBUG (MainThread) [custom_components.cloud_gps.button] enabled_buttons: []
|