Hello, somewhere in my Home Assistant configuration there’s some invalid JSON value that causes the HomeKit integration to always fail to start. Before I go learn how to hook up the debugger and get all that jazz working, does someone know where this JSON value is coming from so I can go fix it?
I’m running Home Assistant 2022.8.7 running on docker/hass.io.
Thank you so much!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/homekit/__init__.py", line 729, in async_start
await self.hass.async_add_executor_job(self.setup, async_zc_instance, uuid)
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/homekit/__init__.py", line 534, in setup
self.driver.load()
File "/usr/local/lib/python3.10/site-packages/pyhap/accessory_driver.py", line 655, in load
self.encoder.load_into(file_handle, self.state)
File "/usr/local/lib/python3.10/site-packages/pyhap/encoder.py", line 92, in load_into
loaded = json.load(fp)
File "/usr/local/lib/python3.10/json/__init__.py", line 293, in load
return loads(fp.read(),
File "/usr/local/lib/python3.10/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
I’ve reduced the Homekit configuration down to just homekit: at this point to see if it would fix it and got no joy.
Here’s the full (lightly redacted) config file:
And you reloaded the config file or rebooted HA after commenting out the HomeKit stuff? I use HomeKit extensively and very similar to your config with all the additional filter options and then some and have not run into an issue. You say you’re using docker but mention the old deprecated name for the supervisor type installation. Are you running HA supervised or HA container?
Months later but that was indeed it. Had to set the Homekit stuff up from scratch but at least it all works again.
The .storage file was just 0 bytes long, something must have truncated it somehow.