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
File "/usr/local/lib/python3.10/site-packages/pyhap/accessory_driver.py", line 655, in load
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
File "/usr/local/lib/python3.10/json/__init__.py", line 346, in loads
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)
Post your YAML configuration, specifically for the HomeKit integration.
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:
# Name of the location where Home Assistant is running
# Configure a default setup of Home Assistant (frontend, api, etc)
# Discover some devices automatically
# Weather prediction
- platform: openweathermap
# Text to speech
- platform: google_translate
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
- REDACTED 3 IPs
- platform: harmony
name: Kitchen Cable
activity: Watch TV
# - sensor
# # - light
# - light
# - binary_sensor.attic_multi_door
# - sensor.openweathermap*
# - switch.outdoor_light_over_garage
# - light.front_walk
# - switch.attic_fan
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?
I’m using HA Supervised that I just set up this summer on top of Raspbian Bullseye using approximately these instructions.
It reports as Healthy and Supported right now.
And to answer the other question which I totally missed, I’ve done everything from rebooting HA core to rebooting the whole box.
You have a corrupt json file in
.storage that starts with
Months later but that was indeed it. Had to set the Homekit stuff up from scratch but at least it all works again.
.storage file was just 0 bytes long, something must have truncated it somehow.