home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.92k stars 30.15k forks source link

Matter attestation Issue during commissing #89009

Closed mdrileynyc closed 1 year ago

mdrileynyc commented 1 year ago

The problem

I am unable to commission a Meross (MSS115) smart plug using Home Assistant. I AM able to commission it with my Google Home. In both cases using my Pixel phone.

For Home Assistant case, matter intergration starts fine, when commissioning hangs, logs show error in some AttestationVerification step (see matter server logs section below). I am using the latest:

Home Assistant core (2023.3.0), Matter server: 3.1.0 Chip Set Clusters and Core (2023.2.2)

What version of Home Assistant Core has the issue?

2023.3.0

What was the last working version of Home Assistant Core?

n/a

What type of installation are you running?

Home Assistant Core

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?

Mar 01 20:15:33 nero matter-server[801546]: 2023-03-01 20:15:33 nero chip.IN[801546] INFO (S) Sending msg 155209838 on secure session with LSID: 10959
Mar 01 20:15:33 nero matter-server[801546]: 2023-03-01 20:15:33 nero chip.EM[801546] INFO >>> [E:62261i M:141670657 (Ack:155209837)] (S) Msg RX from 0:FFFF\
FFFB00000000 [0000] --- Type 0000:10 (SecureChannel:StandaloneAck)
Mar 01 20:15:33 nero matter-server[801546]: 2023-03-01 20:15:33 nero chip.EM[801546] INFO >>> [E:62261i M:141670658 (Ack:155209837)] (S) Msg RX from 0:FFFF\
FFFB00000000 [0000] --- Type 0001:09 (IM:InvokeCommandResponse)
Mar 01 20:15:33 nero matter-server[801546]: 2023-03-01 20:15:33 nero chip.DMG[801546] INFO Received Command Response Data, Endpoint=0 Cluster=0x0000_003E C\
ommand=0x0000_0001
Mar 01 20:15:33 nero matter-server[801546]: 2023-03-01 20:15:33 nero chip.CTL[801546] INFO Received Attestation Information from the device
Mar 01 20:15:33 nero matter-server[801546]: 2023-03-01 20:15:33 nero chip.CTL[801546] INFO Successfully finished commissioning step 'SendAttestationRequest\
'
Mar 01 20:15:33 nero matter-server[801546]: 2023-03-01 20:15:33 nero chip.CTL[801546] INFO Commissioning stage next step: 'SendAttestationRequest' -> 'Atte\
stationVerification'
Mar 01 20:15:33 nero matter-server[801546]: 2023-03-01 20:15:33 nero chip.CTL[801546] INFO Performing next commissioning step 'AttestationVerification'
Mar 01 20:15:33 nero matter-server[801546]: 2023-03-01 20:15:33 nero chip.CTL[801546] INFO Verifying attestation
Mar 01 20:15:33 nero matter-server[801546]: 2023-03-01 20:15:33 nero chip.CTL[801546] ERROR Failed in verifying 'Attestation Information' command received \
from the device: err 101. Look at AttestationVerificationResult enum to understand the errors
Mar 01 20:15:33 nero matter-server[801546]: 2023-03-01 20:15:33 nero chip.CTL[801546] INFO Error on commissioning step 'AttestationVerification': '../src/c\
ontroller/CHIPDeviceController.cpp:1075: CHIP Error 0x000000AC: Internal error'
Mar 01 20:15:33 nero matter-server[801546]: 2023-03-01 20:15:33 nero chip.CTL[801546] ERROR Failed to perform commissioning step 8

Additional information

Just repeating - works fine with Google Home commissioning so problem is with HomeAssistant/python matter server. I completely factory reset the smart plug between trials.

I know all of this is in beta. Just wanted to give you a heads up.

home-assistant[bot] commented 1 year ago

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.

(message by CodeOwnersMention)


matter documentation matter source (message by IssueLinks)

marcelveldt commented 1 year ago

Thanks for the report. We will release a new version of the add-on with the latest Attestation certificates included.

mdrileynyc commented 1 year ago

Thanks. Is there a way to see the currently supported devices short of failure when commissioning? Would be a useful feature IMO to have and document.

marcelveldt commented 1 year ago

No, at this time it is just trial and error. Every device available (which are not a lot) should work but in this case you grabbed a very recent device

marcelveldt commented 1 year ago

A new version has been released some time ago with updated certificates. Did you manage to test if the device commissioning now works ?

mdrileynyc commented 1 year ago

Thanks. I run HA core and installed python matter server manually. The github repositories for the server and chipwheels don't appear updated in weeks (since before my commissioning issue). I figured I had to wait until they are updated (or is there another lib involved?)

On Mon, Mar 20, 2023, 10:37 AM Marcel van der Veldt < @.***> wrote:

A new version has been released some time ago with updated certificates. Did you manage to test if the device commissioning now works ?

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/89009#issuecomment-1475900470, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM5VVM3O65XWEO3T2HL6NY3W5AQMDANCNFSM6AAAAAAVM2MPRA . You are receiving this because you authored the thread.Message ID: @.***>

marcelveldt commented 1 year ago

Sorry, no support for running the Matter server manually, that is only for development. The only supported scenario right now is running the add-on, we are busy enough with that, I hope you understand that.

The add-on pulls the attestation certificates from CSA so you could try to pull the attestation certificate yourself but you are completely on your own.

mdrileynyc commented 1 year ago

I didn't realize the current restriction to addons. No problem. I can look into what you suggest or bide my time.

On Mon, Mar 20, 2023, 2:04 PM Marcel van der Veldt @.***> wrote:

Closed #89009 https://github.com/home-assistant/core/issues/89009 as not planned.

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/89009#event-8794299028, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM5VVMYDVACLFIREM5WA6STW5BIWZANCNFSM6AAAAAAVM2MPRA . You are receiving this because you authored the thread.Message ID: @.***>

marcelveldt commented 1 year ago

Yeah sorry, we kind of only support the happy flow now so to keep our minds sane :-) If you look at the docker file and the add-on init script I think you will see where it's pulling the certs from.

mdrileynyc commented 1 year ago

Just a note to say my matter smart plug works just fine now with the newest HA and python-matter-server versions even though I run HA core and matter server separately. Thanks for the updates.

-m

On Mon, Mar 20, 2023 at 9:12 AM Marcel van der Veldt < @.***> wrote:

Yeah sorry, we kind of only support the happy flow now so keep our minds sane :-) If you look at the docker file and the add-on init script I think you will see where its pulling the certs from.

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/89009#issuecomment-1476211707, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM5VVMZSFVG4WZEIX2JUJ5LW5BJVPANCNFSM6AAAAAAVM2MPRA . You are receiving this because you authored the thread.Message ID: @.***>