Network Management

Last Updated on : 2023-07-28 10:16:38download

Zigbee local area network, also known as a Zigbee network, establishes a connection with the internet through a gateway. This enables remote access to smart devices within the Zigbee network. A gateway communicates with the internet typically through Wi-Fi, Ethernet, and a cellular network.

A Zigbee network is a mesh network. In theory, a Zigbee network supports over 60,000 device nodes. Therefore, the reach of the network is not simply determined by the radio frequency (RF) performance of a single device.

Join network

Generic pairing

Set power-on behavior parameters or call APIs to get a device ready for pairing and add it to a Zigbee network.

To start generic pairing, users can reset a device, for example, by powering on, or perform a specified action that makes the device ready for pairing. For more information, see Tuya’s Developer Forum.

Network Management

Pairing with QR code

Use the app to scan the QR code on the device. Then, the gateway is notified to enable pairing and scanning for Zigbee sub-devices.

This pairing capability does not require special operations on Zigbee sub-devices. Instead, the gateway proactively discovers Zigbee sub-devices. This increases user-friendliness during the on-site installation.

In this pairing mode, devices are added to the network securely based on the one-key-per-device mechanism to enhance network security and prevent potential risks of key exposure.

Network Management

Touchlink

Touchlink is a type of distributed network that requires routers and endpoints only, without any coordinator. The term Touchlink implies a touch-based connection. It is a networking method defined by the Zigbee Light Link (ZLL) protocol in the Zigbee 3.0 standard. Touchlink was initially used in lighting scenarios but has gradually evolved into a standard pairing method. Compared with typical Zigbee networks, Touchlink further simplifies the networking process and helps users join devices securely and reliably to a network with less effort.

Network Management

Touchlink is a short-range networking method that involves two parties, an initiator and a target.

  • The initiator is responsible to scan for nearby targets. In most cases, an end device is designated as an initiator.

  • The target is responsible to wait for the scan request that is sent by the nearby initiator. A router is a typical target:

    • If the target detects that the initiator does not establish a network, the target establishes one.
    • If the target detects that the initiator runs on a network, the target joins this network.

TuyaOS supports ZLL-compatible development of both initiators like lighting remote controls and targets like lights. In the Touchlink process, TuyaOS allows you to set the signal strength to adjust the maximum distance between the initiator and the target.

However, both devices must be as close to each other as possible to establish a direct connection between them. No gateway or app is required during pairing and in everyday use.

For more information, see Tuya’s Developer Forum.

Local reset

Restore a device to the status prior to pairing. Users can also choose whether to clear data, for example, respecting groups, scenes, and device status.

Network Management

Network leave requested by the gateway

Restore a device to the status prior to pairing after the gateway sends a leave command to remove the device from the network.

Network Management

Installation code

An installation code is a random value preconfigured on a device and used to join the device to a Zigbee network. You can choose whether to use the installation code for pairing. An installation code is 16 bytes in length and unique to each device.

An installation code is related to a QR code printed on the packaging of a sub-device, so the installation code usually works in pairing with QR code.
TuyaOS supports the following ways of using an installation code:

  • Use only an installation code for pairing
  • Use both a global link key and an installation code for pairing

Auto recovery

This capability can prevent a device from leaving a network by unintended operations. When a Zigbee device gets ready for the pairing mode after local reset, if pairing timeout or device restart occurs, the device can automatically restore to the previous networking status. All data such as groups and scenes will be retained after restoration.

Network Management

Support and help

If you have any problems with TuyaOS development, you can post your questions in the Tuya Developer Forum.