English
English
简体中文
Contact Us
Register
Log In
Language
English
English
简体中文
Contact Us
Log In
Register
Go to main website
App Develop

App Development Platform

App development platform provides multiple development methods such as no-code or IoT App SDK development to maximize the monetization of IoT apps.
layoutIndex

Smart Gateway

Last Updated on : 2021-04-22 10:51:20download

The basic function of a gateway is to convert the communication protocols to achieve communication between devices with different protocols. Cloud connection capability and protocol type are two basic attributes of the gateway. For example, Zigbee gateways and Bluetooth gateways are widely used in the Internet of Things (IoT). Zigbee and Bluetooth are not capable of connecting to the cloud, so a gateway is required to convert the protocols. And then, the device can be connected to the cloud.

Introduction to solutions

Tuya custom gateway development solution helps you from development to mass production of smart gateway products. The downstream protocol type of the gateway developed by this solution is fully defined and developed by you. Therefore, the developed gateway can only connect to your self-developed sub-devices and cannot integrate with the sub-devices in the Tuya ecosystem. Custom development solutions are divided into two types, gateway MCU and SDK connection.

  • Gateway MCU: A Tuya module communicates with your MCU through serial ports. The Tuya module provides capabilities of cloud connection and sub-device management. The development of gateway services and protocol types is implemented by your MCU.

    Note: The Zigbee gateway does not support the gateway MCU solution.

  • SDK connection: You can develop a smart gateway by embedding Tuya’s lightweight gateway SDK in the device.

Selection of solutions

When you develop a product in the IoT Platform, in Step 3 Hardware Develop, you can choose either Cloud Connection Mode or Gateway Protocol Connection Mode.

Smart Gateway

According to the connection mode you choose, the solution options are shown in the following table:

Cloud connection Gateway protocol connection Applicable solution
Tuya standard module + MCU Not manage Tuya device Gateway MCU solution
Connect with gateway SDK Not manage Tuya device Networking SDK solution
Connect with gateway SDK Tuya module of gateway protocol Extension SDK solution

Gateway MCU solution

Overview

  • Tuya provides a Wi-Fi module that is programmed with standard gateway firmware. This module outputs gateway capabilities through the Tuya Gateway MCU Access Communication Protocol. You need to develop the master control MCU program according to the serial port protocol. For rapid development, Tuya also provides mcu_sdk, so you can quickly complete the integration development of the serial port protocol.

  • The upstream cloud connection capability of the gateway is provided by the Tuya standard gateway Wi-Fi module, and the downstream protocol type of the gateway is implemented by your MCU.

    Smart Gateway

Features

  • Add sub-devices ready for pairing, and batch adding is supported.
  • Remove the connected sub-devices.
  • Manage the heartbeat of sub-devices.
  • Integrate the group and scenario control functions.
  • Remote update (Wi-Fi modules, gateway MCU, and sub-devices).

Networking SDK solution

Overview

  • Tuya provides tuya_link_gw_sdk based on the standard Linux system. You can integrate it into the device software to complete the gateway development.

  • tuya_link_gw_sdk runs on your cloud connection chip to implement the upstream cloud connection capability of the gateway. You can implement the downstream protocol type of the gateway.

  • tuya_link_gw_sdk encapsulates the general interface of Tuya’s standard gateway. The specific functions must be developed by yourself.

  • The downstream protocol type of the gateway developed by this solution is fully defined and developed by you. Therefore, the developed gateway can only connect to your self-developed sub-devices and cannot integrate with the sub-devices in the Tuya ecosystem.

    Smart Gateway

Features

  • Reliable and easy-to-use Tuya standard data point protocol (DP protocol) to develop various logic functions of the device.
  • Tuya cloud connection is secured by a one-key-per-device authentication mechanism.
  • The well-established gateway, sub-device firmware management, and remote upgrade (OTA) services facilitate the later maintenance of device software.
  • Timing execution capabilities of devices that are disconnected from the cloud.
  • Safe and reliable device LAN control.
  • Local scenario linkage and execution capabilities of the gateway.
  • Online status management of the sub-devices.
  • Gateway log management facilitates after-sales troubleshooting.

Extension SDK solution

Overview

  • Tuya provides standard Linux-based tuya_zigbee_gw_ext_sdk and Zigbee modules. You can integrate them into the device to complete the gateway development.

  • Compared with the networking SDK integration solution of the gateway, in this solution, Tuya provides a Zigbee module that is programmed with Tuya gateway firmware. The module acts as a Zigbee network coordinator and can directly connect to Zigbee sub-devices in the Tuya ecosystem. Also, you can develop and connect self-developed devices of Zigbee and other protocols. This solution is more powerful and flexible.

    Smart Gateway

Features

Besides the functions of the gateway networking SDK, the extended functions are as follows:

  • There are a large number of Zigbee sub-devices on the market, and Tuya Zigbee gateway cannot be compatible with Zigbee sub-devices of all manufacturers. Extended functions allow you to integrate third-party Zigbee sub-devices that are not compatible with the Tuya ecosystem.
  • Extended functions allow you to develop multi-protocol convergence gateways, such as Zigbee + 443, Zigbee + Z-Wave, and other multi-protocol combinations, and connect non-Zigbee protocol sub-devices to Tuya Cloud.
  • Extended functions allow you to develop multi-functional gateways to connect to peripherals such as night lights, siren alarms, and achieve multiple smart scenarios with sensors.

Reference

This section contains the following topics to help you quickly understand related concepts and how-to guides: