#Homekit configuration not being persisted in HK with rebuilt container

1 messages · Page 1 of 1 (latest)

brazen lantern
#

A weird corner case, but would love to have this solved regardless!

I run HA in Container on a RPi 4 8Gb. It runs well! However, I've often run into file system stability issues during power loss. This usually forces me to re-flash my SD card. This isn't a huge hassle, as the Pi & Containers are fully provisioned using Ansible, and I'm usually able to grab the relevant files from my docker mount points. After copying the files to the new card, almost everything is back to normal!

EXCEPT...

HomeKit isn't. While I still have the bridge showing up, it asks me to re-add it to my home, and then I have the pleasure of moving, renaming, and hiding 60+ devices on my iPhone. It all works in the end, but this is a headache.

However, last "big failure", I tried a different method of restoring my container. Rather than just copying the mounts, I copied all my container volumes to the new install. This time, everything showed up as it did before the power loss, and no additional config was necessary.

This leads me to believe there is something outside of /config, either a file or a folder, I could be persisting in the container to avoid unnecessary Homekit Setups. I've since added a UPS in front of my Pi, so this isn't as pressing anymore, but if I want to switch to a new host, it would be. What file am I missing here?

TIA!

faint shuttle
brazen lantern
# faint shuttle two tips: 1. stop using an SD card. its probably the source of most of your prob...

Thanks for the tips. I am planning a switch to either an NVMe drive, or an entirely new computer in the coming months.

Regarding the backups, I have, and I could use the backup tool. However, this flies in the face of best practices for containerization. Containers should be ephemeral as possible. If I include the correct volumes, networks, and prerequisite services, deleting and recreating the container should have no side effects. Both professionally (i do devops), and in my home-lab, this is how all of my services are setup. For the most part, HA doesn't have a problem with this, the only thing that breaks for me is HomeKit. All I need to know is where these additional files are stored so I can persist them.

brazen lantern
#

Jumped in the source code, looks like the files are being stored in the .storage directory, I might have not copied that to my new installs if I didn’t add the -a argument. So my fault maybe? I guess this is solved for now.