Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matter devices are unavailable in Home Assistant after restoring Home Assistant OS. #121038

Closed
GitCodeStar opened this issue Jul 3, 2024 · 13 comments

Comments

@GitCodeStar
Copy link

The problem

After restoring my Home Assistant OS, all my Matter devices are showing as unavailable. I've tried various troubleshooting steps, but the issue persists. Here are the details of my setup and the steps I've taken:

System Information:

Core: 2024.6.4
Supervisor: 2024.06.2
Operating System: 12.4
Frontend: 20240610.1
Matter Server: 6.1.2
Steps to Reproduce:

Restored Home Assistant OS.
Checked Matter integration configuration.
Restarted the Matter server.
Attempted to re-add Matter devices through the integration page which worked.
Ensured all devices have the latest firmware.
Confirmed Home Assistant and related components are up to date.

Expected Behavior:
Matter devices should reconnect and be available in Home Assistant after OS restore.

Current Behavior:
All Matter devices are showing as unavailable despite following the troubleshooting steps.

Additional Context:

I have confirmed that the Matter integration is correctly configured.
The Matter server has been restarted multiple times with no change.
Network settings have been checked and confirmed correct.
Firmware and software are up to date.

What version of Home Assistant Core has the issue?

2024.6.4

What was the last working version of Home Assistant Core?

2024.6.4

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Matter

Link to integration documentation on our website

https://www.home-assistant.io/integrations/matter/

Diagnostics information

No response

Example YAML snippet

log_level: info
log_level_sdk: detail
beta: false

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

home-assistant bot commented Jul 3, 2024

Hey there @home-assistant/matter, mind taking a look at this issue as it has been labeled with an integration (matter) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of matter can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign matter Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


matter documentation
matter source
(message by IssueLinks)

@imhokyun
Copy link

imhokyun commented Jul 3, 2024

all of the add-ons are not working after restoring the HA.
try force shutdown while running homeassistant and reboot
it will work after that:)

@marcelveldt
Copy link
Member

Did you restore a recent backup of HA (including the addon config) ?
If you restore a backup that is too old or doens't include the Matter addon config, it will not be possible to restore the devices.

Can you clarify if your devices show up in the interface but as unavailable OR they do not show up at all ?

@GitCodeStar
Copy link
Author

GitCodeStar commented Jul 3, 2024

Did you restore a recent backup of HA (including the addon config) ? If you restore a backup that is too old or doens't include the Matter addon config, it will not be possible to restore the devices.

Can you clarify if your devices show up in the interface but as unavailable OR they do not show up at all ?

Thank you for your response. My devices show up in the interface as Unavailable. I restored the most recent backup that I made a few hours before restoring. Everything is working as it was including my addons and integrations, except for matter devices.

Matter Server - 6.1.2

Python Matter Server
FabricId: 2
Compressed FabricId: 10697227529525199000
SDK Wheels Version: 2024.5.2
Schema Version: 9
Node count: 0

Screenshot 2024-07-03 at 13 15 36

Screenshot 2024-07-03 at 13 18 01

config_entry-matter-85af8d1b24fc5e814579d8d70b544f36.json

@marcelveldt
Copy link
Member

I'm a little bit afraid that the backup you restored was too old and that causes some trust/ACL issues but that is just a hunch.
Can you have a look in the log of both Matter server and Home Assistant to hunt for errors ?

@GitCodeStar
Copy link
Author

I'm a little bit afraid that the backup you restored was too old and that causes some trust/ACL issues but that is just a hunch. Can you have a look in the log of both Matter server and Home Assistant to hunt for errors ?

This is what Matter logs show and home assistant logs are attached. I only keep the latest backup.

2024-07-03 13:04:16.402 (Dummy-2) CHIP_DETAIL [chip.native.CTL] StorageAdapter::DeleteKeyValue: Key = g/fs/c
2024-07-03 13:04:16.403 (Dummy-2) CHIP_PROGRESS [chip.native.CTL] Joined the fabric at index 1. Fabric ID is 0x0000000000000002 (Compressed Fabric ID: 94742FC302E0FDDB)
2024-07-03 13:04:16.403 (Dummy-2) CHIP_PROGRESS [chip.native.CTL] *** Missing DeviceAttestationVerifier configuration at DeviceCommissioner init: using global default, consider passing one in CommissionerInitParams.
2024-07-03 13:04:16.403 (Dummy-2) CHIP_PROGRESS [chip.native.SPT] Setting up group data for Fabric Index 1 with Compressed Fabric ID:
2024-07-03 13:04:16.403 (Dummy-2) CHIP_DETAIL [chip.native.SPT] 0x94, 0x74, 0x2f, 0xc3, 0x02, 0xe0, 0xfd, 0xdb,
2024-07-03 13:04:16.403 (Dummy-2) CHIP_DETAIL [chip.native.CTL] StorageAdapter::GetKeyValue: Key = f/1/g, Value = 0x7f817494d8 (128)
2024-07-03 13:04:16.403 (Dummy-2) CHIP_DETAIL [chip.native.CTL] Key Found 23

2024-07-03 13:04:16.403 (Dummy-2) CHIP_DETAIL [chip.native.CTL] StorageAdapter::GetKeyValue: Key = f/1/k/0, Value = 0x7f81749578 (128)
2024-07-03 13:04:16.403 (Dummy-2) CHIP_DETAIL [chip.native.CTL] Key Found 97

2024-07-03 13:04:16.404 (Dummy-2) CHIP_DETAIL [chip.native.CTL] StorageAdapter::SetKeyValue: Key = f/1/k/0, Value = 0x7f81749578 (97)
2024-07-03 13:04:16.405 (Dummy-2) CHIP_ERROR [chip.native.DL] Long dispatch time: 269 ms, for event type 2
2024-07-03 13:04:16.410 (MainThread) INFO [matter_server.server.device_controller] Loaded 0 nodes from stored configuration
2024-07-03 13:04:16.416 (MainThread) INFO [matter_server.server.vendor_info] Loading vendor info from storage.
2024-07-03 13:04:16.420 (MainThread) INFO [matter_server.server.vendor_info] Loaded 219 vendors from storage.
2024-07-03 13:04:16.420 (MainThread) INFO [matter_server.server.vendor_info] Fetching the latest vendor info from DCL.
2024-07-03 13:04:17.111 (MainThread) INFO [matter_server.server.vendor_info] Fetched 217 vendors from DCL.
2024-07-03 13:04:17.111 (MainThread) INFO [matter_server.server.vendor_info] Saving vendor info to storage.

home-assistant_2024-07-03T17-44-17.595Z.log

@marcelveldt
Copy link
Member

OK, my hunch was right - your backup did not include the Matter add-on data.
I guess because you only restored the Home Assistant core config. Do you also have the matter add-on data in the backup ?

@GitCodeStar
Copy link
Author

GitCodeStar commented Jul 3, 2024

OK, my hunch was right - your backup did not include the Matter add-on data. I guess because you only restored the Home Assistant core config. Do you also have the matter add-on data in the backup ?

I used built in backup tool to do full backup. Was there more that I needed to do?

@marcelveldt
Copy link
Member

OK, my hunch was right - your backup did not include the Matter add-on data. I guess because you only restored the Home Assistant core config. Do you also have the matter add-on data in the backup ?

I used built in backup tool to do full backup. Was there more that I needed to do?

OK, interesting - and in the restore process, did you restore the full backup or partial ?
The entire Matter fabric is stored in the Matter add-on's data. I'm starting to feel this may be some sort of race condition where the matter integration manages the addon and ignores the restore somehow.

What you may want to do is restore the backup again but ONLY select Matter in the add-ons.
Leave the rest unchecked.

@GitCodeStar
Copy link
Author

GitCodeStar commented Jul 3, 2024

OK, my hunch was right - your backup did not include the Matter add-on data. I guess because you only restored the Home Assistant core config. Do you also have the matter add-on data in the backup ?

I used built in backup tool to do full backup. Was there more that I needed to do?

OK, interesting - and in the restore process, did you restore the full backup or partial ? The entire Matter fabric is stored in the Matter add-on's data. I'm starting to feel this may be some sort of race condition where the matter integration manages the addon and ignores the restore somehow.

What you may want to do is restore the backup again but ONLY select Matter in the add-ons. Leave the rest unchecked.

I restored the full backup. Thank you very much for the information! I will try that and see what happens.

@marcelveldt
Copy link
Member

OK, please let us know if an additional restore of the backup (for just the matter add-on) solved the issue.

@GitCodeStar
Copy link
Author

OK, please let us know if an additional restore of the backup (for just the matter add-on) solved the issue.

I started using Home Assistant last month and wasn't aware of backup sizes. I checked all my backups, and they were between 30 to 50 MB. After restoring, I noticed that my Matter devices were not restored, so I started with a new Home Assistant instance. I backed up my new instance with a few Matter devices added, and I can see the backup size is now about 600 MB. You were right; the problem was with my backup. Thank you again for your help! I really appreciate it!

@marcelveldt
Copy link
Member

Great thanks for the confirmation - we will take this into consideration of maybe adding a safeguard backup to prevent others running into the same situation as it may not be super clear (especially if you are new) that the Matter data is stored in the add-on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants