Hello,
I have been scouring the forums, using AI assisted troubleshooting, and tearing my hair out (not literally thankfully) trying to figure out what is going on with my Home Assistant OS install and why it won’t retain the Matter configuration for any paired devices.
I run Home Assistant OS within a TrueNAS 25.4.10 VM. Has been setup and working for ~2 years without issues, and previously had Apple HomeKit Bridge devices paired with Home Assistant even, and all was seemingly working great. I ended up creating my own custom router and after doing so the Apple HomeKit stuff stopped working with it, so I just removed it thinking that was likely just a router side issue and would get to it later. After that, I then just recently purchased the new Aqara W200 Thermostat that supposedly uses “Matter over WiFi” and therefore wouldn’t require a Thread radio in order to pair it… so I setup the Matter Server and started to pair it, and that did work (after some troubleshooting) and the device was working inside Home Assistant as well as paired with Apple Home and controlled fully… only to reboot Home Assistant and discover the device drops off of the config and never reconnects to the Matter Server.
In troubleshooting with AI and reviewing the forums, I haven’t been able to find other people having this issue, but according to the logs the device does pair, and shows an fe80 IPv6 Link-Local address even though I use IPv4 as my primary network config and don’t have IPv6 enabled on my router, just allow IPv6 packets to traverse the network. The path it says that the configuration files are being saved to ( /data/chip.json or other /data/chip* ini files) has never had the files saved to it and it says in the logs that it saved it, but it is clearly ONLY writing to memory and it will retain the config and the Thermostat works great… until I reboot, and then it’s back to having to re-pair the device every single time to Home Assistant.
I don’t know if there is something incorrect about the way the Home Assistant OS VM was installed (excuse my moderate knowledge, but from memory basically just used the qcow file and extracted it out to the zvol that was made in my VM datasets in TrueNAS), or if something along the way has somehow either lost permissions or what…
Using the AI recommendations, I had attempted to use touch to create the files and then change their permissions, but not even sure I did that part right… either way, it didn’t fix it, and I have uninstalled and re-installed Matter Server (and the device integration) several times to no avail.
This is what it shows when the device is paired:
(MainThread) INFO [chip.storage] Initializing persistent storage from file: /data/chip.json
(MainThread) INFO [chip.storage] Loading configuration from /data/chip.json...
(MainThread) INFO [chip.CertificateAuthority] Loading certificate authorities from storage...
(MainThread) INFO [chip.CertificateAuthority] New CertificateAuthority at index 1
(MainThread) INFO [chip.CertificateAuthority] Loading fabric admins from storage...
(MainThread) INFO [chip.FabricAdmin] New FabricAdmin: FabricId: 0x0000000000000002, VendorId = 0x134B
(MainThread) INFO [matter_server.server.stack] CHIP Controller Stack initialized.
(MainThread) INFO [matter_server.server.server] Matter Server initialized
(MainThread) INFO [matter_server.server.server] Using 'enp0s3' as primary interface (for link-local addresses)
(MainThread) INFO [matter_server.server.server] Starting the Matter Server...
(MainThread) INFO [matter_server.server.helpers.paa_certificates] Skip fetching certificates (already fetched within the last 24h).
(MainThread) INFO [chip.FabricAdmin] Allocating new controller with CaIndex: 1, FabricId: 0x0000000000000002, NodeId: 0x000000000001B669, CatTags: []
(MainThread) INFO [matter_server.server.vendor_info] Loading vendor info from storage.
(MainThread) INFO [matter_server.server.vendor_info] Loaded 414 vendors from storage.
(MainThread) INFO [matter_server.server.vendor_info] Fetching the latest vendor info from DCL.
(MainThread) INFO [matter_server.server.vendor_info] Fetched 413 vendors from DCL.
(MainThread) INFO [matter_server.server.vendor_info] Saving vendor info to storage.
(MainThread) INFO [matter_server.server.device_controller] Loaded 0 nodes from stored configuration
(MainThread) INFO [matter_server.server.server] Matter Server successfully initialized.
(MainThread) INFO [matter_server.server.device_controller] Starting Matter commissioning with code using Node ID 1.
(Dummy-2) INFO [chip.ChipDeviceCtrl] Established secure session with Device
(Dummy-2) INFO [chip.ChipDeviceCtrl] Commissioning complete
(MainThread) INFO [matter_server.server.device_controller] Commissioned Node ID: 1 vs 1
(MainThread) INFO [matter_server.server.device_controller] Matter commissioning of Node ID 1 successful.
(MainThread) INFO [matter_server.server.device_controller] Interviewing node: 1
(MainThread) INFO [matter_server.server.device_controller] <Node:1> Setting-up node...
(MainThread) INFO [matter_server.server.device_controller] <Node:1> Setting up attributes and events subscription.
(MainThread) INFO [matter_server.server.device_controller] <Node:1> Subscription succeeded with report interval [1, 60]
(MainThread) INFO [matter_server.server.device_controller] Commissioning of Node ID 1 completed.
(MainThread) INFO [matter_server.server.device_controller] <Node:1> Node could not be discovered on the network, returning cached IP's
(MainThread) INFO [matter_server.server.device_controller] <Node:1> Node could not be discovered on the network, returning cached IP's
(MainThread) INFO [matter_server.server.device_controller] <Node:1> Node could not be discovered on the network, returning cached IP's
(MainThread) INFO [matter_server.server.device_controller] <Node:1> Node could not be discovered on the network, returning cached IP's
(MainThread) INFO [matter_server.server.device_controller] <Node:1> Node could not be discovered on the network, returning cached IP's
(MainThread) INFO [matter_server.server.device_controller] <Node:1> The SDK is communicating with the device using fe80::56ef:44ff:fe9a:a24f
And then I saw this on a subsequent event:
(MainThread) INFO [chip.storage] Initializing persistent storage from file: /data/chip.json
(MainThread) ERROR [chip.storage] [Errno 2] No such file or directory: '/data/chip.json'
(MainThread) CRITICAL [chip.storage] Could not load configuration from /data/chip.json - resetting configuration...
(MainThread) WARNING [chip.storage] No valid SDK configuration present - clearing out configuration
(MainThread) WARNING [chip.storage] No valid REPL configuration present - clearing out configuration
I REALLY do not want to redo my entire VM and potentially lose anything here, but if anybody has any idea what has gone on here, and how I might fix it… that would be a huge help, and enable me to get things working properly.
EDIT: So for future people who may have TrueNAS VM issues with Home Assistant… I went back at it with the AI troubleshooting and discovered that the issue regarding the data retention with the chip.json file was actually (for whatever reason) that the Home Assistant OS VM was somehow giving the wrong write permissions to the folder / files and wasn’t retaining what was being written from the pairing. I was able to resolve the file retention / writing issues within the Matter Server with this command in the TrueNAS VM’s Serial Shell:
chmod 644 /mnt/data/supervisor/addons/data/core_matter_server/chip_*.ini
chmod 644 /mnt/data/supervisor/addons/data/core_matter_server/chip.json
It appears that Aqara has hardcoded something in the firmware for the Matter Hub side of the W200 Thermostat it is just ignoring the IPv4 address assigned to the device via the LAN (WiFi) DHCP settings it has been statically assigned, and refusing to pair with ANYTHING but the fe80 IPv6 link-local address… so the device still drops off of my Matter Server every reboot until / unless I can get Aqara to update that in their firmware.
I have contacted Aqara about all of that prior to this original posting, but so far they have not updated the firmware to allow for this (or allow toggling of IPv6 if you only want the pairing side of it and not the Matter Hub in it)