-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
Unable to connect to a test device with keys in SDK, but not in DCL #108324
Comments
Hey there @home-assistant/matter, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) matter documentation |
Did you restart the server before commisisoning ? The certs are only refreshed at startup. |
The keys were added to the SDK about 8 months back and I have been trying to add this device for more than a month now. So I am not sure if restarting would have done anything differently. |
The device still does not work |
The device in question is a device that isn't currently in the DCL, I can't go further than that on other details. I will say however, that I have successfully commissioned the device using iOS and Android as the app platforms, and Homekit, Smartthings, Alexa, and Google Home as the eco systems with no problems. I have a fresh ODroid HA setup that I brought online today, that is perfectly capable of matter commissioning devices that are in the DCL and certified. The differences appear to be, Home Assistant as the Eco System while the device is not in the DCL. Unfortunately I cannot give any more information than that. |
It would help me if you can give me some more details. As you know we are based on the official Matter SDK, just like every platform you mention. But the other platforms seem to still accept devices with invalid attestation certificates where we do not. You need a valid certificate either on DCL (prod) or github (dev/test). So far we have tested with many, many devices, also ones still in development and this has worked every single time. Where are the certificates currently placed ? |
The certificates are in Github/SDK, not in DCL. It was already mentioned in the first comment. Sorry if it was unclear. |
The PAA's are in the DCL and the SDK, but there is no Cert Decl recorded yet in the DCL (obviously since it hasn't been certified yet, we have a test one we generated for development) and the product id isn't recorded in the DCL. Our DAC's and PAI's are production ones (same method for being generated as other products we've released and certified, and we've verified that HA can indeed matter commission those certified released products). We aren't really sure what's happening other than the logs are showing that Home Assistant isn't finding the appropriate PAA when everyone else is, and that's the only other difference we can think of (something to do with the DCL and HA). SDK version is 1.2. |
Is it perhaps the issue that according to the code you are only loading
So anything else in the Github is not being loaded? I have both matter server and home assistant running in containers and will try tomorrow with the device in question to validate my hypothesis. |
I forked this repo and rewrote the certificate fetching helper to prefer git certs
|
FWIW, it is able to connect to other devices in the same network like an Echo Dot, so it is not likely an mDNS issue. |
@aleksrozman/ @drempelg - Could you try the modified matter-server addon on your side and see if you have more success than me. Once you install it, configure the integration to use port 5581
|
I've tried similar code and ran into the same mDNS looking issue. I haven't
made much progress yet to narrow down as it looked like I needed to debug
on the CHIP code.
…On Wed, Jan 31, 2024, 10:22 AM priyankub ***@***.***> wrote:
@aleksrozman/ @drempelg <https://github.com/drempelg> - Could you try the modified
matter-server addon <https://github.com/priyankub/hassio-addons> on your
side and see if you have more success than me. Once you install it,
configure the integration to use port 5581
Looking at the logs, it is downloading all Git certificates, and since
that is downloaded the last, it would rewrite other certs:
2024-01-31 11:17:36 78653e92-matter-server-test matter_server.server.helpers.paa_certificates[126] INFO Fetched 122 PAA root certificates from DCL.
2024-01-31 11:17:36 78653e92-matter-server-test matter_server.server.helpers.paa_certificates[126] INFO Fetching the latest PAA root certificates from Git.
2024-01-31 11:17:57 78653e92-matter-server-test matter_server.server.helpers.paa_certificates[126] INFO Fetched 90 PAA root certificates from Git.
2024-01-31 11:17:57 78653e92-matter-server-test FabricAdmin[126] WARNING Allocating new controller with CaIndex: 1, FabricId: 0x0000000000000002, NodeId: 0x000000000001B669, CatTags: []
2024-01-31 11:17:57 78653e92-matter-server-test matter_server.server.device_controller[126] INFO Loaded 0 nodes from stored configuration
2024-01-31 11:17:57 78653e92-matter-server-test matter_server.server.vendor_info[126] INFO Loading vendor info from storage.
2024-01-31 11:17:57 78653e92-matter-server-test matter_server.server.vendor_info[126] INFO Loaded 156 vendors from storage.
2024-01-31 11:17:57 78653e92-matter-server-test matter_server.server.vendor_info[126] INFO Fetching the latest vendor info from DCL.
2024-01-31 11:17:58 78653e92-matter-server-test matter_server.server.vendor_info[126] INFO Fetched 155 vendors from DCL.
2024-01-31 11:17:58 78653e92-matter-server-test matter_server.server.vendor_info[126] INFO Saving vendor info to storage.
—
Reply to this email directly, view it on GitHub
<#108324 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAH2PJVYCNG4UZGFBBINPMLYRJVVDAVCNFSM6AAAAABCA7TMOCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJZGQ2TAMRRHE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
There are 2 issues in this report. mdns issues have NOTHING to do with certificates but networking. Make sure you have IPv6 enabled on your local network and the Home Assistant host and make sure you have a FLAT network. So no vLANS and especially no mdns forwarders. Also some network gear have flaky implementations of IGMP/MLD snooping causing havoc with the IPv6 based multicast traffic from matter. @priyankub sounds like you discovered a bug in the certificates retrieval ? Are you planning on doing a PR to the matter server ? BTW: was it really needed to push your own fork to pypi ? May I ask you friendly to remove that again to avoid confusion? Thanks! Let's work together and not against eachother, that would be nice |
@marcelveldt - I am a novice/part time/hobby developer, and mostly re-engineer code! Sorry I did not know of another way other than push to pypi. I had no intention of working against. The mdns error is strange because I am able to pair this device to an Echo in the same network. I will continue to debug when I can |
This report can be closed, thanks to your own contribution. Thanks for identifying and fixing the issue @priyankub |
The problem
I tried connecting to a test device with keys in the SDK (Github PAA) via different methods, but it keeps failing with error 101, because the matter server seems to not update certs from SDK, if it is already in DCL.
The device works with Matter integration in Alexa, Homekit and SmartThings, but not with HA, because HA likely prioritizes DCL over SDK for certs.
Logs:
Scan the QR using an iPad running the HA companion app -
HA companion app in an Android device:
What version of Home Assistant Core has the issue?
core-2024.1.3
What was the last working version of Home Assistant Core?
No response
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
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: