NAT64 and Matter via Thread

Hello and good day.

At the end of last year I installed a “Nuki Smart Lock Gen.4” in my apartment. Compatibility with Smartthings is advertised by the manufacturer Nuki:
“The new Matter communication standard now enables seamless and local integration of your Smart Lock (4th generation) with Apple Home, Google Home and Samsung SmartThings.”

The Matter connection with Smartthings works with one limitation: the app interface only supports opening and closing, while the web interface also shows unlatch in addition to lock and unlock. However, Unlatch is not running here on my.smartthings.com either.

According to the manufacturer, the following requirements must be met for thread support:

You need a suitable smart home hub that Matter via Thread supports. If you want to use not only the Matter integration but also remote access via Thread, the Smart Home Hub must allow internet access and support NAT64. Only when NAT64 is enabled do Thread devices have access to the Internet.

The following smart home hubs currently meet these requirements:

  • Apple TV
  • Apple HomePod
  • Apple HomePod Mini
  • Google Nest Wi-Fi Pro
  • Home Assistant

I use the Aeotec V3_Hub with firmware 53.19 as well as current drivers in SmartThings (including beta). The Nuki-Lock firmware is also up to date. Lock’s matter status is currently 1.2.

My two questions are:

Why doesn’t the SmartThings Matter-Lock driver support the unlatch function?

Can someone here possibly explain what NAT64 is all about and why some Thread Border Routers support it but the Aeotec Hub V3 doesn’t?

NAT64 is not actually needed, it’s just so the device can access the Internet and the Nuki cloud, should you use the Nuki “remote access” service which uses their own control method instead of Matter and your smart home platform.

Before Matter 1.2 it was the only option because the unlatched state was introduced in that version. However, with Matter 1.2 it should be available in SmartThings too, if it is not I guess someone at ST should look at it since the Nuki is also a WWST certified device. Tagging @Luis_Humberto_Medina .

Thank you for the quick and detailed answer.
By the way, I use two of your IKEA drivers, thank you for that too.

Remote access via the Nuki app would only be important to me as long as the unlatch function is not supported by Smartthings. The difference for me is that I can unlock the door without it immediately springing open.

It doesn’t matter whether I can achieve this via one app or the other. The corresponding adaptation of the ST driver would be much more advantageous as it could then also be integrated into routines.
Who should I contact about this?

Glad you find them useful, regarding who to contact, I tagged Luis but you may use the “contact us” option in the SmartThings app menu.

1 Like

I will do that as well. Thanks again and a nice weekend for you.

2 Likes

Hello @grgnhs ,

To better understand the issue, could you please confirm which web interface you are referring to? Is it the SmartThings web interface or the manufacturer’s website? If possible, could you provide a screenshot of that interface?

Thanks !

Can you please post a screenshot of the Commands section for the lock from the Advanced Web App?

Of course, and thank you for reacting so fast.
The web-interface I meant is the Samsung account
As well @h0ckeysk8er here is a screenshot.

So, the unlatch command is present on the Advanced Web App. Sometimes the mobile app does not present all the capabilities and commands defined for a device. Is that the problem? Or are you saying the unlatch command doesn’t perform any function when you click on it?

Yes is the answer for both of your questions.

The mobile app has only one button and shows the current status on it.
Geschützt (locked) or Entsperrt (unlatch)


It’s not possible to choose between the three options here. Tapp on it, changes between lock or unlatch and opens the door immidiatly.
If I unlock manually or within the Nuki app, the unlatch status is shown in the ST mobile app but the door stay closed but unlocked.

Meanwhile tapping on lock or unlock in the Advanced Web App the lock reacts immediately, when tapp on unlatch there is a confirmation displayed but wihout execution on the lock.

The Nuki app has a fourth button lock’n’go in the screenshot. This is for locking with an adjustable delay and is not relevant.

There is one more thing that may be relevant.

While the manufacturer’s app shows the firmware version 4.2.8 and Matter 1.2 has been supported since firmware 4.2.6, Smartthings shows the current and available firmware 4.1.0. (as existing screenshots show)
After the update to 4.2.6, I had already tried to make a change by removing the device, resetting it, setting it up again and integrating it into ST again. But before and after, ST showed the same firmware version 4.1.0.
Is it possible that the SmartThing driver has not yet realized that this Smart Lock already supports “Matter 1.2”? If so, is there a way to change this?

This is the same as my Z-Wave lock. The presentation doesn’t define an “unlatched” state and only defines actions/commands for “Lock” and “Unlock”:

{
    "mnmn": "SmartThingsCommunity",
    "vid": "9822c30c-f9fa-3a16-9568-14e8bcd241de",
    "version": "0.0.1",
    "dashboard": {
        "states": [
            {
                "label": "{{lock.value}}",
                "alternatives": [
                    {
                        "key": "locked",
                        "value": "___PO_CODE_CAPABILITY.SMARTTHINGS.LOCK_DEFAULT_ATTRIBUTES_LOCK_LOCKED",
                        "type": "inactive"
                    },
                    {
                        "key": "unlocked",
                        "value": "___PO_CODE_CAPABILITY.SMARTTHINGS.LOCK_DEFAULT_ATTRIBUTES_LOCK_UNLOCKED",
                        "type": "active"
                    },
                    {
                        "key": "unknown",
                        "value": "___PO_CODE_CAPABILITY.SMARTTHINGS.LOCK_DEFAULT_ATTRIBUTES_LOCK_UNKNOWN",
                        "type": "inactive"
                    },
                    {
                        "key": "unlocked with timeout",
                        "value": "___PO_CODE_CAPABILITY.SMARTTHINGS.LOCK_DEFAULT_ATTRIBUTES_LOCK_UNLOCKED_WITH_TIMEOUT",
                        "type": "active"
                    }
                ],
                "capability": "lock",
                "version": 1,
                "component": "main",
                "composite": false,
                "group": "main",
                "transient": false
            }
        ],
        "actions": [
            {
                "displayType": "toggleSwitch",
                "toggleSwitch": {
                    "command": {
                        "on": "lock",
                        "off": "unlock"
                    },
                    "state": {
                        "value": "lock.value",
                        "on": "locked",
                        "off": "unlocked",
                        "valueType": "string"
                    }
                },
                "group": "main",
                "capability": "lock",
                "version": 1,
                "component": "main"
            }
        ],
        "basicPlus": []
    },

However, the main:lock capability defines three commands, lock, unlock, and unlatch:

Laundry Room Door Lock

Components:
─────────────
 1  main     
 2  settings 
─────────────

? Enter component index or id 1

Capabilities:
────────────────────────────────────────
 1  lock                                
 2  platinummassive43262.unlockCodeName 
 3  lockCodes                           
 4  tamperAlert                         
 5  battery                             
 6  refresh                             
────────────────────────────────────────

? Enter capability index or id 1

Commands:
──────────────
 1  unlock()  
 2  unlatch() 
 3  lock()    
──────────────

However, the unlatch command is apparently not implement in the driver:

connecting... connected
2024-08-18T17:48:02.611958167Z TRACE Z-Wave Lock PH BETA  Received event with handler capability
2024-08-18T17:48:02.616939021Z ERROR Z-Wave Lock PH BETA  Front Door Lock thread encountered error: [string "st/driver.lua"]:160: attempt to index a nil value (field '?')

You could do driver logging to see what is happening when you select the unlatch command in the AWA. You do that using the ST CLI on a Linux/Windows/macOS computer using the command “smartthings edge:drivers:logcat” and selecting the matter-lock driver.

Now, as to why the device is showing the wrong firmware version in the AWA, I’d want to see driver logging from doing a refresh command or during the onboarding of the device to see what the device is reporting to ST.

OK, I can run the command line, but is the log file saved automatically and if so, where?

So far I can only copy the contents of the terminal and save it in the editor. The result then looks like this.

In the first step I executed the “unlatch” command in AWA:

connecting… connected
2024-08-19T08:50:49.876976162Z TRACE Matter Lock Received event with handler capability
2024-08-19T08:50:49.886588537Z INFO Matter Lock <MatterDevice: e96b69bb-7a26-44aa-885f-fe85d1f1661a [4CDF2DBBC0F1F999-220337DE19126EE1] (Wohnungstür)> received command: {“args”:{},“capability”:“lock”,“command”:“unlatch”,“component”:“main”,“positional_args”:{}}
2024-08-19T08:50:49.895292662Z DEBUG Matter Lock Wohnungstür device thread event handled

Then I executed the same command in the “Nuki Smart Lock” app and here is the entry in the log file:

2024-08-19T08:52:14.227620797Z TRACE Matter Lock Received event with handler matter
2024-08-19T08:52:14.343536881Z INFO Matter Lock <MatterDevice: e96b69bb-7a26-44aa-885f-fe85d1f1661a [4CDF2DBBC0F1F999-220337DE19126EE1] (Wohnungstür)> received InteractionResponse: <InteractionResponse || type: REPORT_DATA, response_blocks: [<InteractionResponseInfoBlock || status: SUCCESS, <InteractionInfoBlock || endpoint: 0x01, cluster: DoorLock, attribute: LockState, data: DlLockState: UNLOCKED>>, <InteractionResponseInfoBlock || status: SUCCESS, <InteractionInfoBlock || endpoint: 0x01, cluster: PowerSource, attribute: BatPercentRemaining, data: Uint8: \x60>>]>
2024-08-19T08:52:14.465857089Z TRACE Matter Lock Found MatterMessageDispatcher handler in matter-lock
2024-08-19T08:52:14.529011131Z INFO Matter Lock Executing AttributeReportHandler: cluster: DoorLock, attribute: LockState
2024-08-19T08:52:14.550459297Z INFO Matter Lock <MatterDevice: e96b69bb-7a26-44aa-885f-fe85d1f1661a [4CDF2DBBC0F1F999-220337DE19126EE1] (Wohnungstür)> emitting event: {“attribute_id”:“lock”,“capability_id”:“lock”,“component_id”:“main”,“state”:{“value”:“unlocked”}}
2024-08-19T08:52:14.579966506Z DEBUG Matter Lock Wohnungstür device thread event handled
2024-08-19T08:52:14.613065839Z TRACE Matter Lock Found MatterMessageDispatcher handler in matter-lock
2024-08-19T08:52:14.645711631Z INFO Matter Lock Executing AttributeReportHandler: cluster: PowerSource, attribute: BatPercentRemaining
2024-08-19T08:52:14.665272006Z INFO Matter Lock <MatterDevice: e96b69bb-7a26-44aa-885f-fe85d1f1661a [4CDF2DBBC0F1F999-220337DE19126EE1] (Wohnungstür)> emitting event: {“attribute_id”:“battery”,“capability_id”:“battery”,“component_id”:“main”,“state”:{“value”:48}}
2024-08-19T08:52:14.712406547Z DEBUG Matter Lock Wohnungstür device thread event handled

I’m not sure if that’s right or sufficient. I quickly reach my limits when it comes to using the command line. I’m keen to learn but need a little help.

Turns out the Matter Lock driver does not handle unlatch command, only lock and unlock.

    [capabilities.lock.ID] = {
      [capabilities.lock.commands.lock.NAME] = handle_lock,
      [capabilities.lock.commands.unlock.NAME] = handle_unlock,
    },

That’s why it does nothing.

2 Likes

Ok, I understand that. What is necessary and possible to change this?

I guess @Luis_Humberto_Medina can notify the issue to the dev team, looks like they implemented the unlatched event but not the unlatch command.

Thank you very much again, I am excited to see what happens next.

Hi @grgnhs,

Regarding your questions:

  1. Unlatch Function: The current SmartThings Matter-Lock driver does not support the unlatch function. While Matter introduced this feature, we have not yet implemented it in our platform. Therefore, the functionality is not available at this time.
  2. NAT64 Support: NAT64 is not required for the basic operation of the Nuki Smart Lock. It is only necessary if you intend to use the Nuki remote access service, which relies on their cloud rather than Matter and your smart home platform.

If you need further assistance, feel free to reach out.

We apologize for any inconvenience this may cause and appreciate your patience as we work to improve the integration of these features.

Thank you for your understanding!

1 Like

Hallo @Luis_Humberto_Medina

it is good to read that an implementation of this function is planned and that work is being done on it.

The Nuki Smart Lock itself does not offer remote access without an additional bridge. Of course, I would have liked to have solved the remote access using the existing hardware. That’s why I asked about NAT64. But opening and locking already works remotely using SmartThings. The unlatch function is more interesting for use in routines.

Thank you again for your commitment and if I can help at any time, for example by testing, I would be happy to do so!

1 Like