tuya Matter Device Pairing Instructions

September 26, 2024
Tuya

tuya Matter Device Pairing

Specifications

  • Product Name: Matter Device Pairing
  • Version: 20240514
  • Online Version

FAQs

Q: What is the validity period of the pairing token?

A: The pairing token is valid for 10 minutes and expires immediately after the device is paired.

Q: How can I trust an uncertified device during pairing?

A: Refer to section 13 in the user manual for instructions on trusting uncertified devices and continuing with the pairing process.

Matter device pairing applies to both the Tuya-enabled and third-party Matter devices. The API calls for both types of devices remain consistent, but their pairing behavior differs. Matter device pairing supports auto-discovery, QR code scan, and manual setup code.

Pairing process

Register the pairing type

When the device pairing service is initialized, register the pairing type, which is ThingSmartActivatorTypeMatterModel.

API description

Parameter description

Get a token

The SDK gets a pairing token from the cloud before it can start the pairing process. The token is valid for 10 minutes and expires immediately after the device is paired. A new token must be generated if the device needs to be paired again.

API description

Parameter description

Parse QR code or manual setup code

Read the QR code or manual setup code. If the code is wrong, the device model is not returned.

Parameter description

Start searching

Pass in the registered type list to start searching.

API description

Parameter description

Stop searching

API description

Parameter description

Device search callback

After the device is discovered, the callback returns the device information. If the operation fails, the callback returns the error message.

API description

Parameter description

Activate a device

API description

Parameter description

Matter pairing option callback

The SDK automatically selects the optimal pairing option based on the advertising data. It then sends the selection to the business layer through the callback for displaying on the respective app page. There are three pairing options: Tuya-specific pairing, sharing and pairing, and MatterSupport. To enable MatterSupport, see Prepare for Integration with Matter Device. Matter- Support is available only after you configure it for your project.

Parameter description

PASE session establishment callback

After the Matter device is connected, the completion of Password Authenticated Session Establishment (PASE) will invoke the PASE session success callback.

Parameter description

Create CASE session and connect device to cloud

With the PASE session, some key information such as device type is obtained. If the device needs to connect to the cloud and the parameters required for Certificate Authenticated Session Establishment (CASE) are ready, you can call this method to establish a CASE session.

Parameter description

Device attestation callback

The callback to invoke when an attempt is made to pair a device that is not Mattercertified.  After this callback is invoked, the pairing process will be suspended until the user chooses to continue or cancel.

Parameter description

Trust uncertified device and continue pairing

If the user chooses to add an uncertified Matter device, call this method to continue the pairing process.

Parameter description

Activation result callback

Parameter description

Stop activation

API description

Parameter description

Error codes

ThingSmartActivatorErrorModel is returned if pairing fails or times out.

ThingSmartActivatorDiscoveryError includes the definition of error codes

Example

Search for a device to pair

Swift:

Objective-C:


Scan QR code or enter setup code to pair

Swift:

Objective-C:

Documents / Resources

| tuya Matter Device Pairing [pdf] Instructions
Matter Device Pairing, Device Pairing, Pairing
---|---

Read User Manual Online (PDF format)

Read User Manual Online (PDF format)  >>

Download This Manual (PDF format)

Download this manual  >>

Related Manuals