Smart Lock Pro: a fifth Matter fabric cannot be added

SUMMARY

I want to run five Matter fabrics on this lock:

  • Apple Keychain
  • Apple Home
  • Home Assistant
  • Aqara
  • UniFi

It accepts four. Adding the fifth always fails at the last step of commissioning. PASE, attestation, NOC installation and CASE all complete, and then the lock answers GeneralCommissioning.CommissioningComplete with a plain IM FAILURE (0x01) instead of a CommissioningCompleteResponse. No CommissioningErrorEnum comes back, so the controller has nothing to report beyond the fact that it failed.

Removing one of the four existing fabrics first makes the new one commission immediately. Re-adding the fabric I removed then fails the same way. Both units I tried behave identically.

ENVIRONMENT

PRODUCT Nuki Smart Lock Pro
FIRMWARE 4.11.1 (4th gen), 5.10.1 (5th gen Nuki Pro)
MATTER VERSION 1.4.1
SERIAL NUMBERS 46800CDF (hardware 10.12, the unit in the log below), 3A646074
FABRICS WANTED 5 (listed above)
FABRICS ACCEPTED 4

STEPS TO REPRODUCE

  1. Commission the lock into four fabrics.
  2. Add a fifth one using its setup code.
  3. Commissioning gets through PASE, attestation, NOC installation and CASE as normal.
  4. CommissioningComplete is rejected and the pending fabric is rolled back.
  5. Remove one of the four fabrics and repeat step 2. It now succeeds. Re-adding the removed fabric as the fifth fails again.

EXPECTED

CommissioningCompleteResponse with ErrorCode = kOk, and the fabric is added. If it cannot be added, a specific CommissioningErrorEnum and DebugText so the controller can say why.

ACTUAL

A bare IM FAILURE (0x01) on cluster 0x0030, command 0x0004, with no response payload.

IMPACT

The lock advertises SupportedFabrics = 5, so nothing warns you that the fifth fabric is going to fail. The controller can only report a generic error. In UniFi’s case the message blames the setup code, which sends you looking at the passcode, mDNS, IPv6 and Thread rather than the lock.

Workaround: remove an existing fabric before adding a new one. That may be worth giving to support, since the trigger is easy to describe and the error message is not.

LOG

From the UniFi controller during the failed attempt. Everything up to the last two lines succeeds.

15:52:53.169 [CTL] PASE session established with commissionee. Stopping discovery.
15:52:57.817 [CTL] Received ArmFailSafe response errorCode=0
15:53:12.782 [DMG] Received Command Response Status ... Cluster=0x0000_003E Command=0x0000_000B Status=0x0
15:53:13.742 [CTL] Device returned status 0 on receiving the NOC
15:53:17.122 [SC]  Success status report received. Session was established
15:53:17.595 [DMG] Received Command Response Status for Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0004 Status=0x1
15:53:17.595 [CTL] Received failure response: IM Error 0x00000501: General error: 0x01 (FAILURE)
15:53:17.595 [CTL] Error on commissioning step 'SendComplete': 'IM Error 0x00000501: General error: 0x01 (FAILURE)'

Cluster 0x0030 command 0x0004 is GeneralCommissioning.CommissioningComplete, so that is the one coming back as FAILURE. The command went out 19.6 s after the fail-safe was armed, well inside the 60 s window, and the lock answered after 470 ms. It is a rejection rather than a timeout.

WHY THE CONTROLLER, THE FAIL-SAFE AND THE NETWORK ARE NOT AT FAULT

The lock replies with a status rather than a CommissioningCompleteResponse, so none of the causes the spec carries in ErrorCode apply here. The fail-safe was armed and ArmFailSafe had returned errorCode=0 19.6 s before the command. A valid CASE session on the new fabric was up. No other administrator was commissioning. The controller skipped the TC stage for this lock, and for the devices that commissioned successfully on it in the same session.

In the CSA reference implementation this reply shape comes from a CheckSuccess(..., Failure) inside the CommissioningComplete handler, so an internal operation on the lock is failing. That is read off the reference SDK rather than your firmware, so treat it as a hypothesis rather than a conclusion.

WHAT THE LOCK REPORTED AFTERWARDS

Read from one of the existing fabrics after the failed attempt: SupportedFabrics 5, CommissionedFabrics 4, four trusted root certificates, no orphaned fabric and no pending data left behind. The attempt rolls back cleanly and the lock is otherwise a healthy four-fabric device. It only fails when the fifth slot is used.

The 5 it reports is the minimum the spec allows for SupportedFabrics rather than a measured capability, and it is the same on both generations and both firmware branches. That looks more like a fixed value in firmware than a limit enforced by the fabric storage. It would help to know whether the fifth slot has storage behind it.

REQUESTS

  1. Return CommissioningErrorEnum and DebugText instead of a bare FAILURE, so a controller can report the actual cause.
  2. Confirm whether four is the intended maximum, and whether the fifth slot has backing storage.
  3. If four is intended, please correct or document SupportedFabrics so the limit is predictable from the controller side.
1 Like

@Juergen are you able to reproduce the issue internally? It should be easy to test by just adding a lock to five fabrics.

Hello @ingmarstein,

Thanks for the very detailed report! We really appreciate the effort you put into documenting the reproduction steps, logs, and current behavior.

First of all we would like to confirm that, as stated in the document, we are indeed supporting 5 Fabrics ( SupportedFabrics 5).

Our internal tests confirm that the current Matter fabric implementation is working as expected in our test scenarios. However, we haven’t yet reproduced the specific issue you’re experiencing when adding a fifth fabric, so we’ll continue investigating it.

We’re currently looking into the fabric capacity configuration. We’re also investigating whether this could be related to the current Matter SDK version and whether a newer SDK version addresses the issue.

Thanks again for bringing this to our attention and providing such valuable technical details. We’ll continue digging into it and share an update once we have more concrete findings.

1 Like

Thanks, @DanielLO ! Were you able to reproduce the issue in the meantime?
I am able to reproduce this on demand by keeping these fabrics:

  • Apple Keychain
  • Apple Home
  • Home Assistant

If I then add Aqara and UniFi in that order, the last provisioning fails: I can see the notifications from Apple Home that the device was added to UniFi, but it eventually times out.
If I then remove Aqara again, add UniFi, and retry adding to Aqara, the last provisioning also fails with the same symptoms.

The Nuki devices are the only devices with this issue. I was able to add 63 other devices to all the fabrics above.

1 Like

Thanks for the additional details!

We haven’t been able to reproduce the issue yet, but thanks to your feedback we have identified some limitations in our current implementation that may help explaining the described Fabric issue.

In order to continue with our investigation we plan to include some changes and improvements in the upcoming Beta. We would really appreciate if you would be willing to provide feedback on your specific case with respect to the Matter fabrics.

Please stay tuned for the update on our upcoming Beta.

@DanielLO that sounds great. Feel free to ping me here once a beta with the prospective fixes is available so that I can provide timely feedback.

1 Like

Hello @ingmarstein,

Thanks for your patience!
We have just released a new Smart Lock Beta (5.10.2) with the intended changes regarding the Smart Lock Matter fabrics and we would be very grateful if you would consider giving it a try with your specific environment and come back to us for feedback.

More info about our Beta program here.

@DanielLO success! Whatever you did allowed the fifth fabric to be added successfully :slight_smile: Happy to also verify with my second (4th gen) lock.

1 Like

Very happy to be able to support and fix any issues encountered on the field.

Please stay tuned to the upcoming update for our Smart Lock 4th Gen.

Hello again @ingmarstein,

We are happy to share that a new Beta is also available with the proper Matter fabric fix for the Smart Lock 4th Gen.

Please give it a try (latest build 4.11.2). More info here.

1 Like

Great success, again @DanielLO. Both locks are now part of five fabrics. Thanks for the quick fix!

2 Likes