#All Matter devices are unavailable after a power outage

1 messages · Page 1 of 1 (latest)

tranquil osprey
#

I have a 26 Matter devices commissioned in the HA (25 lights and 1 switch).
Today we had a power outage due to an electrical accident when renovating one of the rooms.
When the HA came back online all Matter devices were unavailable - Matter server Web UI shows 0 nodes.
In the NanoLeaf app I can see that all light are still in the Thread network.

In the Matter server logs i noticed this:
2024-11-26 20:12:41.236 (MainThread) ERROR [chip.storage] Expecting ',' delimiter: line 29 column 111 (char 4111)
2024-11-26 20:12:41.236 (MainThread) CRITICAL [chip.storage] Could not load configuration from /data/chip.json - resetting configuration...
2024-11-26 20:12:41.236 (MainThread) WARNING [chip.storage] No valid SDK configuration present - clearing out configuration
2024-11-26 20:12:41.236 (MainThread) WARNING [chip.storage] No valid REPL configuration present - clearing out configuration

Is my configuration gone or can I restore it somehow?

bold kraken
#

dang, it sounds like the disk on your home assistant machine has gotten corrupted.

#

your best bet might be to restore from a backup which includes the matter add-on

#

what sort of hardware do you have HA running on anyways?

tranquil osprey
#

Thanks. I will try to restore it from a backup.
I am running it as a VM on the Linux machine.

#

I restored it from the latest backup and my configuration works again. Thank you for the hint.

bold kraken
#

might be worth double-checking what disk cache mode is in use on the vm - make sure you haven't selected an unsafe option.

#

hmm, i just took a look at the home assistant matter server code, and it looks like it's not actually doing writes to the "chip.json" file in a way that's safe over power loss.

bold kraken
bold kraken
umbral meadow
#

Storage is a combination of a json file written by the sdk and a json file managed by matter server. Regardless of changing the code to duplicate writes, you should make sure to backup your HA server. You can not make this 100% fail proof, imagine a power loss at the exact time while copying backupfile. Imo there is one trick, which is reverting to a previous file at startup if corruption is detected. But still.... backup, backup, backup!

bold kraken
#

Yeah - with the changes I recommend, there will never be a power loss situation that results in a missing or partially written config file (assuming your storage device works correctly; some sd cards can be problematic...), but there are still other possible bugs or problems that could result in configuration getting lost even without power loss.