Skip to content

Unable to complete commission process with Home Assistant #11

Closed

Description

@jdesai61

After modifying the code to make clusterId and attribute Id optional by returning zero when either of the fields are not present), commissioning with Home Assistant progresses further and from node-matter it seems like the device paired - but somehow HA add-on gives up after receiving response from last read... Here is how it looks from the node-matter side:

node build/Main.js
Matter server listening
Pase: Received pairing request from udp://192.168.1.57:60161
Pase: Paired succesfully with udp://192.168.1.57:60161
Received read request from udp://192.168.1.57:60161 on session secure/20610: */49/65532, 0/48/0, 0/48/1, 0/48/2, 0/48/3, 0/40/2, 0/40/4, */49/3
Received invoke request from udp://192.168.1.57:60161 on session secure/20610: 0/48/0
Received invoke request from udp://192.168.1.57:60161 on session secure/20610: 0/48/2
Received invoke request from udp://192.168.1.57:60161 on session secure/20610: 0/62/2
Received invoke request from udp://192.168.1.57:60161 on session secure/20610: 0/62/2
Received invoke request from udp://192.168.1.57:60161 on session secure/20610: 0/62/0
Received invoke request from udp://192.168.1.57:60161 on session secure/20610: 0/62/4
Received invoke request from udp://192.168.1.57:60161 on session secure/20610: 0/62/11
Received invoke request from udp://192.168.1.57:60161 on session secure/20610: 0/62/6
Case: Received pairing request from udp://192.168.1.57:60161
Case: Paired succesfully with udp://192.168.1.57:60161
Received invoke request from udp://192.168.1.57:60161 on session secure/20611: 0/48/4
Received read request from udp://192.168.1.57:60161 on session secure/20611: */undefined/undefined

No further communication from HA to node-matter after this read request. However, HA doesn't complete the full commissioning process. Not sure what is going on, but here are some HA logs...

2022-07-13 17:44:01 77f1785d-matter-server chip.IN[122] INFO Sending encrypted msg 0x7fc7dc0197a8 with MessageCounter:167328143 to 0xFFFFFFFB00000000 (0) at monotonic time: 00000000209E1A50 msec
2022-07-13 17:44:01 77f1785d-matter-server chip.CTL[122] INFO Sent operational certificate to the device
2022-07-13 17:44:01 77f1785d-matter-server chip.IN[122] INFO Prepared secure message 0x7fc7f0c23da8 to 0xFFFFFFFB00000000 (0)  of type 0x10 and protocolId (0, 0) on exchange 15703i with MessageCounter:167328144.
2022-07-13 17:44:01 77f1785d-matter-server chip.IN[122] INFO Sending encrypted msg 0x7fc7f0c23da8 with MessageCounter:167328144 to 0xFFFFFFFB00000000 (0) at monotonic time: 00000000209E1A51 msec
2022-07-13 17:44:01 77f1785d-matter-server chip.EM[122] INFO Received message of type 0x9 with protocolId (0, 1) and MessageCounter:4064267261 on exchange 15704i
2022-07-13 17:44:01 77f1785d-matter-server chip.DMG[122] INFO Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008
2022-07-13 17:44:01 77f1785d-matter-server chip.CTL[122] INFO Device returned status 0 on receiving the NOC
2022-07-13 17:44:01 77f1785d-matter-server chip.CTL[122] INFO Operational credentials provisioned on device 0x7fc7dc02c520
2022-07-13 17:44:01 77f1785d-matter-server chip.CTL[122] INFO Successfully finished commissioning step 'SendNOC'
2022-07-13 17:44:01 77f1785d-matter-server chip.CTL[122] INFO Commissioning stage next step: 'SendNOC' -> 'FindOperational'
2022-07-13 17:44:01 77f1785d-matter-server chip.CTL[122] INFO Performing next commissioning step 'FindOperational'
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO Operational node lookup already in progress. Will NOT start a new one.
2022-07-13 17:44:01 77f1785d-matter-server chip.IN[122] INFO Prepared secure message 0x7fc7f0c23da8 to 0xFFFFFFFB00000000 (0)  of type 0x10 and protocolId (0, 0) on exchange 15704i with MessageCounter:167328145.
2022-07-13 17:44:01 77f1785d-matter-server chip.IN[122] INFO Sending encrypted msg 0x7fc7f0c23da8 with MessageCounter:167328145 to 0xFFFFFFFB00000000 (0) at monotonic time: 00000000209E1A6B msec
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO UDP:192.168.1.28%enp0s18:5540: new best score: 2
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO Checking node lookup status after 8 ms
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO Keeping DNSSD lookup active
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO UDP:192.168.1.28%enp0s18:5540: score has not improved: 2
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO Checking node lookup status after 9 ms
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO Keeping DNSSD lookup active
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO UDP:192.168.1.28%enp0s18:5540: score has not improved: 2
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO Checking node lookup status after 10 ms
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO Keeping DNSSD lookup active
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO UDP:192.168.1.28%hassio:5540: score has not improved: 2
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO Checking node lookup status after 11 ms
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO Keeping DNSSD lookup active
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO UDP:192.168.1.28%hassio:5540: score has not improved: 2
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO Checking node lookup status after 11 ms
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO Keeping DNSSD lookup active
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO UDP:192.168.1.28%hassio:5540: score has not improved: 2
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO Checking node lookup status after 12 ms
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO Keeping DNSSD lookup active
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO UDP:192.168.1.28%enp0s18:5540: score has not improved: 2
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO Checking node lookup status after 18 ms
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO Keeping DNSSD lookup active
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO UDP:192.168.1.28%enp0s18:5540: score has not improved: 2
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO Checking node lookup status after 19 ms
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO Keeping DNSSD lookup active
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO UDP:192.168.1.28%enp0s18:5540: score has not improved: 2
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO Checking node lookup status after 21 ms
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO Keeping DNSSD lookup active
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO UDP:192.168.1.28%hassio:5540: score has not improved: 2
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO Checking node lookup status after 22 ms
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO Keeping DNSSD lookup active
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO UDP:192.168.1.28%hassio:5540: score has not improved: 2
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO Checking node lookup status after 23 ms
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO Keeping DNSSD lookup active
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO UDP:192.168.1.28%hassio:5540: score has not improved: 2
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO Checking node lookup status after 24 ms
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO Keeping DNSSD lookup active
2022-07-13 17:44:01 77f1785d-matter-server chip.DIS[122] INFO Checking node lookup status after 200 ms
2022-07-13 17:44:01 77f1785d-matter-server chip.SC[122] INFO Initiating session on local FabricIndex 1 from 0x0000000000000001 -> 0x00000000000010EF
2022-07-13 17:44:01 77f1785d-matter-server chip.IN[122] INFO Prepared unauthenticated message 0x7fc7dc027818 to 0x0000000000000000 (0)  of type 0x30 and protocolId (0, 0) on exchange 15705i with MessageCounter:12213759.
2022-07-13 17:44:01 77f1785d-matter-server chip.IN[122] INFO Sending unauthenticated msg 0x7fc7dc027818 with MessageCounter:12213759 to 0x0000000000000000 at monotonic time: 00000000209E1B2E msec
2022-07-13 17:44:01 77f1785d-matter-server chip.SC[122] INFO Sent Sigma1 msg
2022-07-13 17:44:01 77f1785d-matter-server chip.EM[122] INFO Received message of type 0x31 with protocolId (0, 0) and MessageCounter:4064267262 on exchange 15705i
2022-07-13 17:44:01 77f1785d-matter-server chip.SC[122] INFO Received Sigma2 msg
2022-07-13 17:44:01 77f1785d-matter-server chip.IN[122] INFO Prepared unauthenticated message 0x7fc7dc02f6b8 to 0x0000000000000000 (0)  of type 0x32 and protocolId (0, 0) on exchange 15705i with MessageCounter:12213760.
2022-07-13 17:44:01 77f1785d-matter-server chip.IN[122] INFO Sending unauthenticated msg 0x7fc7dc02f6b8 with MessageCounter:12213760 to 0x0000000000000000 at monotonic time: 00000000209E1B3F msec
2022-07-13 17:44:01 77f1785d-matter-server chip.SC[122] INFO Sent Sigma3 msg
2022-07-13 17:44:01 77f1785d-matter-server chip.EM[122] INFO Received message of type 0x40 with protocolId (0, 0) and MessageCounter:4064267263 on exchange 15705i
2022-07-13 17:44:01 77f1785d-matter-server chip.SC[122] INFO Success status report received. Session was established
2022-07-13 17:44:01 77f1785d-matter-server root[122] INFO SetSdkKey: f/1/s/00000000000010EF = b'\x150\x03\x10\xbf\x05\x9d\x12W\x97N\xd1}m\xfd\x97\x08\x9c\x87/0\x04 "/\xe0F\xfc\xf8\x9b\xfbEW\xe4\x87\xad)X\xce\x91\xda\x81\x8b\x81<}\xc3\xe2\x13\xe5\xa3\xc7DX\xb90\x05\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18'
2022-07-13 17:44:01 77f1785d-matter-server root[122] INFO SetSdkKey: g/s/vwWdEleXTtF9bf2XCJyHLw== = b'\x15$\x01\x01%\x02\xef\x10\x18'
2022-07-13 17:44:01 77f1785d-matter-server root[122] INFO SetSdkKey: g/sri = b'\x16\x15$\x01\x01%\x02\xef\x10\x18\x18'
2022-07-13 17:44:01 77f1785d-matter-server chip.SC[122] INFO SecureSession[0x7fc7dc0279a0]: Moving from state 'kEstablishing' --> 'kActive'
2022-07-13 17:44:01 77f1785d-matter-server chip.CTL[122] INFO Successfully finished commissioning step 'FindOperational'
2022-07-13 17:44:01 77f1785d-matter-server chip.CTL[122] INFO Commissioning stage next step: 'FindOperational' -> 'SendComplete'
2022-07-13 17:44:01 77f1785d-matter-server chip.CTL[122] INFO Performing next commissioning step 'SendComplete'
2022-07-13 17:44:01 77f1785d-matter-server chip.IN[122] INFO Prepared secure message 0x7fc7dc02f6b8 to 0x00000000000010EF (1)  of type 0x8 and protocolId (0, 1) on exchange 15706i with MessageCounter:157404875.
2022-07-13 17:44:01 77f1785d-matter-server chip.IN[122] INFO Sending encrypted msg 0x7fc7dc02f6b8 with MessageCounter:157404875 to 0x00000000000010EF (1) at monotonic time: 00000000209E1B4B msec
2022-07-13 17:44:01 77f1785d-matter-server chip.IN[122] INFO Prepared unauthenticated message 0x7fc7f0c23de8 to 0x0000000000000000 (0)  of type 0x10 and protocolId (0, 0) on exchange 15705i with MessageCounter:12213761.
2022-07-13 17:44:01 77f1785d-matter-server chip.IN[122] INFO Sending unauthenticated msg 0x7fc7f0c23de8 with MessageCounter:12213761 to 0x0000000000000000 at monotonic time: 00000000209E1B4C msec
2022-07-13 17:44:01 77f1785d-matter-server chip.EM[122] INFO Received message of type 0x9 with protocolId (0, 1) and MessageCounter:4064267264 on exchange 15706i
2022-07-13 17:44:01 77f1785d-matter-server chip.DMG[122] INFO Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005
2022-07-13 17:44:01 77f1785d-matter-server chip.CTL[122] INFO Received CommissioningComplete response, errorCode=0
2022-07-13 17:44:01 77f1785d-matter-server chip.CTL[122] INFO Successfully finished commissioning step 'SendComplete'
2022-07-13 17:44:01 77f1785d-matter-server chip.CTL[122] INFO Commissioning stage next step: 'SendComplete' -> 'Cleanup'
2022-07-13 17:44:01 77f1785d-matter-server chip.CTL[122] INFO Performing next commissioning step 'Cleanup'
2022-07-13 17:44:01 77f1785d-matter-server chip.CTL[122] INFO Successfully finished commissioning step 'Cleanup'
2022-07-13 17:44:01 77f1785d-matter-server chip.IN[122] INFO Prepared secure message 0x7fc7f0c23da8 to 0x00000000000010EF (1)  of type 0x10 and protocolId (0, 0) on exchange 15706i with MessageCounter:157404876.
2022-07-13 17:44:01 77f1785d-matter-server chip.IN[122] INFO Sending encrypted msg 0x7fc7f0c23da8 with MessageCounter:157404876 to 0x00000000000010EF (1) at monotonic time: 00000000209E1B52 msec
2022-07-13 17:44:01 77f1785d-matter-server matter_server.server.server[122] INFO [140496488854960] Deserialized message: CommandMessage(messageId='355dd24ba3044913b6318af120e34980', command='device_controller.ResolveNode', args={'nodeid': 4335})
2022-07-13 17:44:01 77f1785d-matter-server matter_server.server.server[122] INFO [140496488854960] Deserialized message: CommandMessage(messageId='8296edfecec6419499c9ae4db7ced4c7', command='device_controller.Read', args={'nodeid': 4335, 'attributes': '*', 'dataVersionFilters': None, 'events': '*', 'returnClusterObject': True, 'reportInterval': None, 'fabricFiltered': True, 'keepSubscriptions': False})
2022-07-13 17:44:01 77f1785d-matter-server chip.IN[122] INFO Prepared secure message 0x7fc7dc02f6b8 to 0x00000000000010EF (1)  of type 0x2 and protocolId (0, 1) on exchange 15707i with MessageCounter:157404877.
2022-07-13 17:44:01 77f1785d-matter-server chip.IN[122] INFO Sending encrypted msg 0x7fc7dc02f6b8 with MessageCounter:157404877 to 0x00000000000010EF (1) at monotonic time: 00000000209E1B63 msec
2022-07-13 17:44:01 77f1785d-matter-server chip.EM[122] INFO Received message of type 0x5 with protocolId (0, 1) and MessageCounter:4064267265 on exchange 15707i
2022-07-13 17:44:01 77f1785d-matter-server chip.IN[122] INFO Prepared secure message 0x7fc7f0c23da8 to 0x00000000000010EF (1)  of type 0x10 and protocolId (0, 0) on exchange 15707i with MessageCounter:157404878.
2022-07-13 17:44:01 77f1785d-matter-server chip.IN[122] INFO Sending encrypted msg 0x7fc7f0c23da8 with MessageCounter:157404878 to 0x00000000000010EF (1) at monotonic time: 00000000209E1B67 msec

Without specs, it is hard for me to tell what is going on. But HA add-on is also WIP, so will wait till it stabilizes

Originally posted by @jdesai61 in #8 (comment)

Activity

  1. mfucci commented on Aug 4, 2022

    @mfucci
    Owner

    Pull request #13 should fix this issue since this is related to read attribute wildcards not handled.

  2. jdesai61 commented on Aug 4, 2022

    @jdesai61
    CollaboratorAuthor

    Pull request #13 does not completely fix this issue. I see more messages in HA now after the 'Cleanup' line (compared to before)...

    2022-08-03 22:42:56 77f1785d-matter-server chip.CTL[121] INFO Received CommissioningComplete response, errorCode=0
    2022-08-03 22:42:56 77f1785d-matter-server chip.CTL[121] INFO Successfully finished commissioning step 'SendComplete'
    2022-08-03 22:42:56 77f1785d-matter-server chip.CTL[121] INFO Commissioning stage next step: 'SendComplete' -> 'Cleanup'
    2022-08-03 22:42:56 77f1785d-matter-server chip.CTL[121] INFO Performing next commissioning step 'Cleanup'
    2022-08-03 22:42:56 77f1785d-matter-server chip.CTL[121] INFO Successfully finished commissioning step 'Cleanup'
    2022-08-03 22:42:56 77f1785d-matter-server chip.IN[121] INFO Prepared secure message 0x7f5be77fcda8 to 0x00000000000010EF (1)  of type 0x10 and protocolId (0, 0) on exchange 29568i with MessageCounter:27426691.
    2022-08-03 22:42:56 77f1785d-matter-server chip.IN[121] INFO Sending encrypted msg 0x7f5be77fcda8 with MessageCounter:27426691 to 0x00000000000010EF (1) at monotonic time: 00000000125A37B0 msec
    2022-08-03 22:42:56 77f1785d-matter-server matter_server.server.server[121] INFO [140032684332464] Deserialized message: CommandMessage(messageId='f4dc6d1d210e4dcd8c9540367f602086', command='device_controller.ResolveNode', args={'nodeid': 4335})
    2022-08-03 22:42:56 77f1785d-matter-server matter_server.server.server[121] INFO [140032684332464] Deserialized message: CommandMessage(messageId='c79c0d655f7d439f99738b9c0fe5b590', command='device_controller.Read', args={'nodeid': 4335, 'attributes': '*', 'dataVersionFilters': None, 'events': '*', 'returnClusterObject': True, 'reportInterval': None, 'fabricFiltered': True, 'keepSubscriptions': False})
    2022-08-03 22:42:56 77f1785d-matter-server chip.IN[121] INFO Prepared secure message 0x7f5bd402f3d8 to 0x00000000000010EF (1)  of type 0x2 and protocolId (0, 1) on exchange 29569i with MessageCounter:27426692.
    2022-08-03 22:42:56 77f1785d-matter-server chip.IN[121] INFO Sending encrypted msg 0x7f5bd402f3d8 with MessageCounter:27426692 to 0x00000000000010EF (1) at monotonic time: 00000000125A37BD msec
    2022-08-03 22:42:56 77f1785d-matter-server chip.EM[121] INFO Received message of type 0x5 with protocolId (0, 1) and MessageCounter:2746782166 on exchange 29569i
    2022-08-03 22:42:56 77f1785d-matter-server chip.IN[121] INFO Prepared secure message 0x7f5be77fcda8 to 0x00000000000010EF (1)  of type 0x10 and protocolId (0, 0) on exchange 29569i with MessageCounter:27426693.
    2022-08-03 22:42:56 77f1785d-matter-server chip.IN[121] INFO Sending encrypted msg 0x7f5be77fcda8 with MessageCounter:27426693 to 0x00000000000010EF (1) at monotonic time: 00000000125A37CA msec
    

    But I don't see the device in HA... here is what I see from node-matter (don't see any further read requests than before)

    my s0Qname=_S0._sub._matterc._udp.local
    Matter server listening
    Pase: Received pairing request from udp://192.168.1.57:57969
    Pase: Paired succesfully with udp://192.168.1.57:57969
    Received read request from udp://192.168.1.57:57969 on session secure/12390: */49/65532, 0/48/0, 0/48/1, 0/48/2, 0/48/3, 0/40/2, 0/40/4, */49/3
    Received invoke request from udp://192.168.1.57:57969 on session secure/12390: 0/48/0
    Received invoke request from udp://192.168.1.57:57969 on session secure/12390: 0/48/2
    Received invoke request from udp://192.168.1.57:57969 on session secure/12390: 0/62/2
    Received invoke request from udp://192.168.1.57:57969 on session secure/12390: 0/62/2
    Received invoke request from udp://192.168.1.57:57969 on session secure/12390: 0/62/0
    Received invoke request from udp://192.168.1.57:57969 on session secure/12390: 0/62/4
    Received invoke request from udp://192.168.1.57:57969 on session secure/12390: 0/62/11
    Received invoke request from udp://192.168.1.57:57969 on session secure/12390: 0/62/6
    Case: Received pairing request from udp://192.168.1.57:57969
    Case: Paired succesfully with udp://192.168.1.57:57969
    Received invoke request from udp://192.168.1.57:57969 on session secure/12391: 0/48/4
    Received read request from udp://192.168.1.57:57969 on session secure/12391: */*/*
    
  3. jdesai61 commented on Aug 4, 2022

    @jdesai61
    CollaboratorAuthor

    After enabling debug logs on HA, here is what I am seeing. Not sure what ResolveNode does...

    2022-08-04 11:36:49 77f1785d-matter-server chip.CTL[121] INFO Commissioning stage next step: 'SendComplete' -> 'Cleanup'
    2022-08-04 11:36:49 77f1785d-matter-server chip.CTL[121] INFO Performing next commissioning step 'Cleanup'
    2022-08-04 11:36:49 77f1785d-matter-server chip.CTL[121] INFO Successfully finished commissioning step 'Cleanup'
    2022-08-04 11:36:49 77f1785d-matter-server chip.IN[121] INFO Prepared secure message 0x7f64caffbda8 to 0x00000000000010F2 (1)  of type 0x10 and protocolId (0, 0) on exchange 51172i with MessageCounter:246117618.
    2022-08-04 11:36:49 77f1785d-matter-server chip.IN[121] INFO Sending encrypted msg 0x7f64caffbda8 with MessageCounter:246117618 to 0x00000000000010F2 (1) at monotonic time: 00000000151EBB33 msec
    2022-08-04 11:36:49 77f1785d-matter-server matter_server.server.server[121] DEBUG [140070856632400] Sending {"messageId": "30431277a2164fd4bc44ecff4430b96d", "result": {"raw": true}, "_type": "matter_server.common.model.message.SuccessResultMessage"}
    2022-08-04 11:36:49 77f1785d-matter-server matter_server.server.server[121] DEBUG [140070856632400] Received: {"messageId": "4777a91cef454e7aae41d094df987359", "command": "device_controller.ResolveNode", "args": {"nodeid": 4338}, "_type": "matter_server.common.model.message.CommandMessage"}
    2022-08-04 11:36:49 77f1785d-matter-server matter_server.server.server[121] INFO [140070856632400] Deserialized message: CommandMessage(messageId='4777a91cef454e7aae41d094df987359', command='device_controller.ResolveNode', args={'nodeid': 4338})
    2022-08-04 11:36:49 77f1785d-matter-server matter_server.server.server[121] DEBUG [140070856632400] Received CommandMessage(messageId='4777a91cef454e7aae41d094df987359', command='device_controller.ResolveNode', args={'nodeid': 4338})
    2022-08-04 11:36:49 77f1785d-matter-server matter_server.server.server[121] DEBUG [140070856632400] Sending {"messageId": "4777a91cef454e7aae41d094df987359", "result": {"raw": null}, "_type": "matter_server.common.model.message.SuccessResultMessage"}
    2022-08-04 11:36:49 77f1785d-matter-server matter_server.server.server[121] DEBUG [140070856632400] Received: {"messageId": "54429f8a79f84a3c93016617df87c67c", "command": "device_controller.Read", "args": {"nodeid": 4338, "attributes": "*", "dataVersionFilters": null, "events": "*", "returnClusterObject": true, "reportInterval": null, "fabricFiltered": true, "keepSubscriptions": false}, "_type": "matter_server.common.model.message.CommandMessage"}
    2022-08-04 11:36:49 77f1785d-matter-server matter_server.server.server[121] INFO [140070856632400] Deserialized message: CommandMessage(messageId='54429f8a79f84a3c93016617df87c67c', command='device_controller.Read', args={'nodeid': 4338, 'attributes': '*', 'dataVersionFilters': None, 'events': '*', 'returnClusterObject': True, 'reportInterval': None, 'fabricFiltered': True, 'keepSubscriptions': False})
    2022-08-04 11:36:49 77f1785d-matter-server matter_server.server.server[121] DEBUG [140070856632400] Received CommandMessage(messageId='54429f8a79f84a3c93016617df87c67c', command='device_controller.Read', args={'nodeid': 4338, 'attributes': '*', 'dataVersionFilters': None, 'events': '*', 'returnClusterObject': True, 'reportInterval': None, 'fabricFiltered': True, 'keepSubscriptions': False})
    2022-08-04 11:36:49 77f1785d-matter-server chip.IN[121] INFO Prepared secure message 0x7f64b802f858 to 0x00000000000010F2 (1)  of type 0x2 and protocolId (0, 1) on exchange 51173i with MessageCounter:246117619.
    2022-08-04 11:36:49 77f1785d-matter-server chip.IN[121] INFO Sending encrypted msg 0x7f64b802f858 with MessageCounter:246117619 to 0x00000000000010F2 (1) at monotonic time: 00000000151EBB3E msec
    2022-08-04 11:36:49 77f1785d-matter-server chip.EM[121] INFO Received message of type 0x5 with protocolId (0, 1) and MessageCounter:947212581 on exchange 51173i
    2022-08-04 11:36:49 77f1785d-matter-server matter_server.server.server[121] DEBUG [140070856632400] Sending {"messageId": "54429f8a79f84a3c93016617df87c67c", "result": {"attributes": {"0": {"Basic": {"dataModelRevision": null, "vendorName": "node-matter", "vendorID": 65521, "productName": "Matter test device", "productID": 32769, "nodeLabel": null, "location": null, "hardwareVersion": null, "hardwareVersionString": null, "softwareVersion": null, "softwareVersionString": null, "manufacturingDate": null, "partNumber": null, "productURL": null, "productLabel": null, "serialNumber": null, "localConfigDisabled": null, "reachable": null, "uniqueID": null, "capabilityMinima": null, "generatedCommandList": null, "acceptedCommandList": null, "attributeList": null, "featureMap": null, "clusterRevision": null, "_type": "chip.clusters.Objects.Basic"}, "GeneralCommissioning": {"breadcrumb": 4, "basicCommissioningInfo": {"failSafeExpiryLengthSeconds": 60, "maxCumulativeFailsafeSeconds": 0, "_type": "chip.clusters.Objects.GeneralCommissioning.Structs.BasicCommissioningInfo"}, "regulatoryConfig": 0, "locationCapability": 2, "supportsConcurrentConnection": null, "generatedCommandList": null, "acceptedCommandList": null, "attributeList": null, "featureMap": null, "clusterRevision": null, "_type": "chip.clusters.Objects.GeneralCommissioning"}}, "1": {"OnOff": {"onOff": false, "globalSceneControl": null, "onTime": null, "offWaitTime": null, "startUpOnOff": null, "generatedCommandList": null, "acceptedCommandList": null, "attributeList": null, "featureMap": null, "clusterRevision": null, "_type": "chip.clusters.Objects.OnOff"}}}, "events": [], "_type": "chip.clusters.Attribute.AsyncReadTransaction.ReadResponse"}, "_type": "matter_server.common.model.message.SuccessResultMessage"}
    2022-08-04 11:36:49 77f1785d-matter-server chip.IN[121] INFO Prepared secure message 0x7f64caffbda8 to 0x00000000000010F2 (1)  of type 0x10 and protocolId (0, 0) on exchange 51173i with MessageCounter:246117620.
    2022-08-04 11:36:49 77f1785d-matter-server chip.IN[121] INFO Sending encrypted msg 0x7f64caffbda8 with MessageCounter:246117620 to 0x00000000000010F2 (1) at monotonic time: 00000000151EBB4B msec
    2022-08-04 11:37:03 77f1785d-matter-server chip.DIS[121] INFO Checking node lookup status after 15007 ms
    2022-08-04 11:37:03 77f1785d-matter-server chip.DIS[121] ERROR Operational discovery failed for 0x00000000000010F0: ../../src/lib/address_resolve/AddressResolve_DefaultImpl.cpp:174: CHIP Error 0x00000032: Timeout
    2022-08-04 11:37:03 77f1785d-matter-server matter_server.server.server[121] DEBUG [140070856632400] Sending {"messageId": "5ce224fc30964b3abb60014e9db97a63", "errorCode": "CHIP Error 0x00000032: Timeout", "_type": "matter_server.common.model.message.ErrorResultMessage"}
    2022-08-04 11:37:03 77f1785d-matter-server matter_server.server.server[121] DEBUG [140070856632400] Received: {"messageId": "ed88b1b0a2ee4137b9142f3aa6ed6c4c", "command": "device_controller.ResolveNode", "args": {"nodeid": 4337}, "_type": "matter_server.common.model.message.CommandMessage"}
    2022-08-04 11:37:03 77f1785d-matter-server matter_server.server.server[121] INFO [140070856632400] Deserialized message: CommandMessage(messageId='ed88b1b0a2ee4137b9142f3aa6ed6c4c', command='device_controller.ResolveNode', args={'nodeid': 4337})
    2022-08-04 11:37:03 77f1785d-matter-server matter_server.server.server[121] DEBUG [140070856632400] Received CommandMessage(messageId='ed88b1b0a2ee4137b9142f3aa6ed6c4c', command='device_controller.ResolveNode', args={'nodeid': 4337})
    2022-08-04 11:37:03 77f1785d-matter-server chip.DIS[121] INFO Checking node lookup status after 201 ms
    
  4. mfucci commented on Aug 4, 2022

    @mfucci
    Owner

    0/48/4 has been invoked (CommissioningComplete) so the commissioning should have succeeded.
    This might be a MDNS issue now: Operational discovery failed for 0x00000000000010F0

    Can you capture the network packets to check what is going on?

  5. mfucci commented on Aug 9, 2022

    @mfucci
    Owner

    Any chance to get a network capture to investigate this issue?
    Or you can give me some pointers on how to install HA Matter plugin so I can reproduce the issue? (I don't have a HA instance, so I need to install everything from scratch...)

  6. jdesai61 commented on Aug 9, 2022

    @jdesai61
    CollaboratorAuthor
  7. jdesai61 commented on Aug 9, 2022

    @jdesai61
    CollaboratorAuthor

    Here are two pcap files - both captured on home-assistant side. One is with succesful commissioning of ESPDev device that HA tutorial used. The other is almost successful (but not quite) capture with node-matter.
    node-matter-esp-ha.zip
    The HA logs with node-matter are already posted above. But I am attaching HA logs showing succesfull commissioning with
    esp-ha.log
    ESP DevKit device

    Hope Assistant IP: 192.168.1.57 (IPV6: fe80::a199:dcb4:dc7)
    ESP DevKit IP: 192.168.1.165 (IPV6 fe80::86f7:3ff:fe60:ff8)
    Node Matter VM IP: 192.168.1.28

    tcpdump command used to capture (on HA machine):

           tcpdump -ni enp0s18 -w MYFILE.pcap port 5540 or port 5353
    

    Hope this helps.

  8. mfucci commented on Aug 10, 2022

    @mfucci
    Owner

    Thanks!
    Per the logs, it doesn't seem to be a MDNS issue. It more looks like HA Matter plugin doesn't like something that is returned by: read //* request.
    The ESPDev device returns many more attributes.

    I know that many mandatory clusters / attributes are not implemented in node-matter.

    Many if we pinpoint the attributes that HA plugin expects, I can add just those one.

    In matter_server/client/matter.py#L86 can you add a few logs to check if self.client.driver.device_controller.commission_with_code is returning?
    I think the problem happens in "await self._interview_node(node_id)" but I am not sure.

    Does "ERROR Operational discovery failed for" happens each time? Previous log says that it waited for 15s but that doesn't match with the other timestamps in the logs, since logs start less than a second ago.

  9. jdesai61 commented on Aug 11, 2022

    @jdesai61
    CollaboratorAuthor

    Agree the MDNS was only related to discovering commissionable device. The logs and tcpdump capture don't agree on timing, because I failed to capture logs when I was using tcpdump, so they are from a different run.

    I tried to edit the matter_server files to add log statements, but within HA this is not easily done because the matter server is a docker image that I can't easily manipulate. I am out of town for next two weeks so when I return, perhaps I will try to build my own docker container for matter server and insert the debug statements.

  10. javierbarellano4v commented on Aug 17, 2022

    @javierbarellano4v
    Collaborator

    Does the zipped version of node-matter includes all fixes up until to this point?

    Thanks.

  11. mfucci commented on Aug 17, 2022

    @mfucci
    Owner

    Hi Javier,

    If you download the sip of the main branch, it will contain all the latest fixes.
    Alternatively, I just uploaded a new version to npm, so you install the latest version with: npm i node-matter
    Let me know if you run into any issue!

    Thanks,

    • Marco
  12. javierbarellano4v commented on Aug 17, 2022

    @javierbarellano4v
    Collaborator

    Hey Marco,

    It worked (via npm)

    8d2bca48-4f94-42f2-b995-2cf49cdabe4a

    Is there another Cluster (command) I can try to hit the Matter Server so to speak?

    Thanks so much! Greatly appreciate it!!

  13. mfucci commented on Aug 18, 2022

    @mfucci
    Owner

    The last log means that the commissioning was successful.
    The only cluster implemented right now is the On/Off cluster which can be used to turn on / off a light, an appliances, etc.
    You can send command via the Android Matter test app or using Matter test command line tool.

    To turn on/off one LED on a Raspberry Pi, here is the command:

    matter -on "echo 255 > /sys/class/leds/led1/brightness" -off "echo 0 > /sys/class/leds/led1/brightness"

    You can run your own scripts on "on" / "off" to do something more advanced.

    Thanks!

    • Marco
  14. javierbarellano4v commented on Aug 18, 2022

    @javierbarellano4v
    Collaborator

    As a matter of fact, I have Matter deployed on a Raspberry Pi 4. So I ran the chip-tool on it to pair with your Matter server.

    Thanks again.

  15. jdesai61 commented on Aug 18, 2022

    @jdesai61
    CollaboratorAuthor

    As a matter of fact, I have Matter deployed on a Raspberry Pi 4. So I ran the chip-tool on it to pair with your Matter server.

    Thanks again.

    I have previously mentioned that chip-tool can successfully pair with node-matter after the following issue was fixed: #3 (comment). T

    his particular issue is inability to complete pairing process with Home Assistant Matter Add-on.

  16. 140 remaining items

  17. Apollon77 commented on Feb 27, 2023

    @Apollon77
    Collaborator

    Ok the PR that fixes the read response of unknown attributes is in. Please try again and provide a new log. Thank you

  18. jdesai61 commented on Feb 27, 2023

    @jdesai61
    CollaboratorAuthor

    Yes!!!! With this change I am able to commission the node-matter device and control it with HA. We can close the issue now.

  19. Apollon77 commented on Feb 28, 2023

    @Apollon77
    Collaborator

    Can you please (for completeness) post a node-mater log from such a pairing process? Then I close

  20. jdesai61 commented on Feb 28, 2023

    @jdesai61
    CollaboratorAuthor

    For future reference, attached is log from node-matter and corresponding logs from HA Matter server of a successful commissioning and turning the switch on/off from HA a couple of times
    ha-matter-server.log
    nodematter-success-home-assistant.txt

    Hopefully closing this issue for good now.

  21. Apollon77 commented on Feb 28, 2023

    @Apollon77
    Collaborator

    Let's see ... I have one PR that I will merge soon that could get interesting so I would poke again here after merging for a last test if ok for you.

    But interesting ... Hass even registers 3 Fabrics on the devcie which is 1 more then Apple/Google ... no idea why they do that. Seems like the "Google way" plus then one of their own.

  22. jdesai61 commented on Feb 28, 2023

    @jdesai61
    CollaboratorAuthor

    sure

  23. jdesai61 commented on Mar 7, 2023

    @jdesai61
    CollaboratorAuthor

    With latest release of Home Assistant and Matter Add-on, I can no longer commission with node-matter. However, this is not an issue with node-matter. It is an issue with HA because it is now refusing to commit devices with test vendor id (0xfff1). I am still looking for a workaround similar to how you have to add test vendor/product Id to the Google backend for pairing with Google Home.

  24. Apollon77 commented on Mar 8, 2023

    @Apollon77
    Collaborator

    With the infos from above and the "HA companion App" which uses Google in the background please check the readme about the instructions on how to use the Google Developer Console to whitelist this vendor/product id ... I would expect that this helps then?!

  25. jdesai61 commented on Mar 8, 2023

    @jdesai61
    CollaboratorAuthor
  26. Apollon77 commented on Mar 8, 2023

    @Apollon77
    Collaborator

    DId you opened an issue on Homeassistent to get details?

  27. Apollon77 commented on Mar 8, 2023

    @Apollon77
    Collaborator

    Can you please post logs from both parties (node-matter and also HA).
    Are you sure that only HA was updated or did you also updated node-matter? because we now generate correct certificates and not use the "full testing default chain". But chiptool and all othersd are ok with it, so would be interesting to see the logs

  28. jdesai61 commented on Mar 8, 2023

    @jdesai61
    CollaboratorAuthor
  29. Apollon77 commented on Mar 8, 2023

    @Apollon77
    Collaborator

    But sorry when e have not a singel connection request then it CAN NOT be certificates or such ... then it is more network or UDP data flow

  30. jdesai61 commented on Mar 8, 2023

    @jdesai61
    CollaboratorAuthor

    Not sure what happened, but after another upgrade of HA, it started working again... Sorry for the noise.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions