Tuya-logo

Tuya SDK Smart App

Tuya-SDK-Smart-App-product

Specifications

  • Pairing Method: QR Code
  • Version: 20250704
  • Online Version

This pairing mode only applies to devices that are supplied with a QR code and connected to the internet.

Get device UUID

parseQRCode is a method used for parsing the QR code on the device. It can scan the device’s QR code to get the URL and device UUID.

Parameter Description

  • content : The content of the QR code.
  • success : Callback function after the QR code is successfully parsed. You can use actionName to find the pairing mode and proceed to the next step.
  • failure : Callback function when an error occurs while parsing the QR code.

Example Code

Objective-C:

Tuya-SDK-Smart-App-fig-1

Swift:

Tuya-SDK-Smart-App-fig-2

The “yourQRCodeContent” in the examples should be replaced with your QR code content.

Pair with QR code on device

Get pairing token

Tuya-SDK-Smart-App-fig-3

Example

Objective-C:

Tuya-SDK-Smart-App-fig-4

Swift:

Tuya-SDK-Smart-App-fig-5

Start pairing

Tuya-SDK-Smart-App-fig-6

Example

Objective-C:

Tuya-SDK-Smart-App-fig-7

Swift:

Tuya-SDK-Smart-App-fig-8

Callback delegate for getting device information

Tuya-SDK-Smart-App-fig-9

Example

Objective-C:

Tuya-SDK-Smart-App-fig-9

Swift:

Tuya-SDK-Smart-App-fig-11

Frequently Asked Questions

  • Q: What if I encounter an error during the pairing process?
    A: If you encounter an error during pairing, check the error message provided in the callback delegate and follow the troubleshooting steps recommended in the manual.
  • Q: Can I pair the device without using a QR code?
    A: No, this pairing mode specifically requires the use of a QR code provided with the device.

Documents / Resources

Tuya SDK Smart App [pdf] User Guide
SDK Smart App, SDK, Smart App, App
Tuya SDK Smart App [pdf] User Manual
SDK Smart App, SDK, Smart App, App

References

Leave a comment

Your email address will not be published. Required fields are marked *