Sub-Device Connectivity with Third-party Modules

Last Updated on : 2024-06-25 04:09:14download

The Integrated SDK allows you to implement sub-device connectivity for your gateway. This enables users to connect sub-devices to the internet and manage them through the gateway. This topic walks you through the process of enabling a gateway to connect to sub-devices using the Integrated SDK.

Background

The gateway acts as a bridge to help sub-devices connect to the internet for accessing cloud services. The SDK provides the implementation of two-way communication between the gateway and sub-devices. How the gateway communicates with its sub-devices is implemented by you. Your implementation refers to the application.

The SDK interacts with the application:

  • The SDK interacts with the application by using callbacks.
  • The application interacts with the SDK by using function interfaces.

Typically, the microcontroller on the gateway communicates with the wireless module through a serial port. The wireless module communicates with sub-devices using specific wireless protocols such as Zigbee and Bluetooth.

Sub-Device Connectivity with Third-party Modules

Prerequisites

You have created a sub-device product on the Tuya Developer Platform. This section takes a 3-gang switch as an example to briefly describe the procedure for product creation.

  1. Log in to the Tuya Developer Platform.

  2. In the Standard Category tab, choose Electrical > Switch.

    Sub-Device Connectivity with Third-party Modules
    • Choose TuyaOS > Custom Solution.

      Sub-Device Connectivity with Third-party Modules
    • Complete the required information and select Zigbee as the protocol.

      The protocol does not determine the actual functionality of the sub-device product. No matter what kind of sub-devices you want to connect to the gateway, you can choose Zigbee by default.

      Sub-Device Connectivity with Third-party Modules
  3. In this example, we create a 3-gang switch, so we add three standard data points used for three separate controls.

    Sub-Device Connectivity with Third-party Modules
  4. In the Device Interaction tab, choose Panel Control and select the desired app panel.

    Sub-Device Connectivity with Third-party Modules

The creation of a 3-gang switch product is completed.