Zigbee Connection Standard for Smoke Detector

Last Updated on : 2024-06-24 03:22:30download

A Zigbee smoke detector is a low-power device that is used to detect whether there is smoke in the detection range of the sensor and send a remote alert.

Use the IAS ZONE device in the Zigbee 3.0 standard to achieve this feature.

Terms and definitions

Term
Description
Zigbee SDK The Zigbee SDK is developed based on the Silicon Labs Zigbee 3.0 protocol stack and tailored, optimized, and encapsulated to create a Tuya Zigbee module SDK.
Attribute A data value that reflects the physical quantity or status.
Cluster Each cluster contains one or more attributes.
Endpoint The entry point for the application layer of the protocol stack. Each endpoint can be regarded as the location where the application object exists. It is defined as a cluster that is used to implement a device description.
Device ID The serial number that is defined for each Zigbee device.
ELV (extra-low voltage) device A battery-powered device, which is called a sleep end device in the Zigbee protocol.
Electrical device A device powered by mains electricity or stabilized voltage supply from mains electricity, which is called a router device in the Zigbee protocol.
Product ID (PID) It represents product ID. Each product created in the Tuya Developer Platform will generate a unique product identifier. This ID is associated with specific data points of the product, app control panel, shipping information, and other information related to the product
SoC System On Chip (SoC). The hardware does not have an MCU, and the control program is written into the cloud module.
SDK A software development kit (SDK) contains the documents, examples, and tools required to develop software. In order to encourage developers to use their system or language, many SDKs are provided for free, such as Tuya.
Firmware The programs that are written to the erasable programmable read-only memory (EROM) or electrically erasable programmable read-only memory (EEPROM). Firmware is used to drive programs that are embedded in devices, such as CD-ROM and CD-R. The firmware enables operating systems to drive devices based on standard device drivers. Firmware is the software that completes the most basic bottom-layer tasks of a system.
OTA It means firmware update over the air. Tuya supports OTA.

Functional description of Zigbee devices

Zigbee protocol version

The product is developed based on the Zigbee 3.0 standard protocol.

Profile ID 0x0104
Device ID 0x0402

Endpoint

Endpoint Description
1 The unique device endpoint.

Supported clusters

Input cluster (server)**** Output cluster (client)
Basic (0x0000) OTA (0x0019)
Power configuration (0x0001) -
IAS zone (0x0500) -

Supported attributes and commands

Each gateway can read and write specific attributes of Zigbee devices to get the device information.

Basic cluster

Attributes

ID Name Data type
Range
Default value
0x0000 ZCLVersion uint8 -0x20 0x00–0xFF 0x03
0x0001 ApplicationVersion uint8 -0x20 0x00–0xFF For example, 0b 01 00 0001 = 1.0.1, where 0x41 is 1.0.1. The OTA function uses this version number. At the beginning of OTA, the gateway reads the version number of the OTA package and pushes it to the device. Once the device is restarted after OTA updates, the gateway reads the version number to check whether the update is successful. Only updates to a later version are supported.
0x0002 StackVersion uint8 -0x20 0x00–0xFF 0x02
0x0003 HWVersion uint8 -0x20 0x00–0xFF 0x01
0x0004 Manufacturer name string -0x42 0-32 bytes XXX…XXX (16 bytes in length, including an 8-byte prefix and an 8-byte PID). No. 0-7 bytes: TZ3000 and No. 8-16 bytes: PID (created on the Tuya Developer Platform). Default PID: 2szo322m. This field determines the UI experience and functions of the app. If no specific PID is required, the default one can be used.
0x0005 Module identifier string -0x42 0-32 bytes TS0205. This field is used by the gateway to quickly identify the device type and improve the experience.
0x0007 PowerSource enum8 - 0x30 0x00–0xFF 0x03
0xfffd ClusterRevision uint16 -0x21 0x0000 - 0xffff 0x0001

Power configuration

Attributes

ID name Data type Range Default value
0x0000 Mains voltage uint16 -0x21 0x0000 to 0xffff 0x03
0x0020 Battery voltage uint8 -0x20 24–30 (2.4V–3.0V) 30
0x0021 Remaining battery level uint8 -0x20 0–200 (0–100%) 200

IAS zone

Attributes

ID Name Data type
Range
Default value
0x0000 Zone state enum8 - 0x30 All 0
0x0001 Zone type enum16 - 0x31 All 0x0028
0x0002 Zone status map16 - 0x19 All 0x00. Alarm1 + bit (0): smoke alarm.
Alarm1 + bit (2): tamper alarm.
Alarm1 + bit (3): low voltage alarm.
Alarm1 + bit (6): device fault alarm.
0x0010 IAS CIE address EUI64 - 0xF0 - -
0x0011 Zone ID uint8 -0x20 0x00–0xFF 0xFF: not registered.
0xFFFD ClusterRevision uint16 -0x21 0x0000 - 0xFFFF 0x0001

Commands:

ID name Direction Description
0x00 Zone status change notification Server->Client Report alert info
0x01 Zone enroll request Server->Client Request Zone ID information from the gateway
0x00 Zone enroll response Client->Server The gateway responds to the zone ID request of the device.

Over The Air Upgrade

Attributes

ID name Data type Range Default value
0x0000 UpgradeServerID EUI64 - 0xF0 0xffffffffffffffff
0x0001 FileOffset uint32 - 0x23 All 0x00000000
0x0002 CurrentFileVersion uint32 - 0x23 All 0x21050002
0x0006 ImageUpgradeStatus enum8 - 0x30 All 0x00
0x0007 Manufacturer ID uint16 -0x21 All 0x1002
0x0008 Image type ID uint16 -0x21 All 0x1602
0x0009 MinimumBlockPeriod uint16 -0x21 All 0x0000
0xfffd ClusterRevision uint16 -0x21 0x0000 - 0xffff 0x0001

Commands:

ID name Direction Description
0x00 Image Notify Server->Client -
0x01 Query Next Image Request Client->Server -
0x02 Query next image response Server->Client -
0x03 Image Block Request Client->Server -
0x05 Image block response Server->Client -
0x06 Upgrade End Request Client->Server -
0x07 Update end response Server->Client -

Zigbee device management requirements

Networking requirements

  • Beacon request channels are scanned at an interval of greater than 150 ms. Important channels are to be scanned in priority.

  • The timeout value for each scanning task is 30 seconds.

  • If a data report of initial alarm status value and initial battery level (100%) is required after Zigbee devices are networked, data is reported at a random interval of 5s, 10s, or more seconds.

Device restart after power off

  • After the device is powered off and started, it needs to synchronize the necessary data with the gateway, such as battery level and alarm status.

Link maintenance

  • The battery level information is reported every 4 hours. The battery level report is used as a heartbeat packet, which is the basis for judging whether the device is offline. If there is no data interaction with the gateway within 12 hours, the gateway will determine that the device is offline.

Data reporting

  • If data retransmission is enabled for the application support sublayer (APS), we recommend that you set Disable Default Response to 1 to avoid excessive acknowledgments (ACKs).

  • The Transaction Sequence Number attribute cannot be modified during data transmission.

  • The retransmission interval must be greater than 250 ms. We recommend that you set the retransmission duration to less than three seconds.

  • The data reporting interval should be at least 100 milliseconds to prevent frequent reporting, which will cause the app to display disorderly.

Special instructions

  • Low-battery warning conversion

    Since the low-battery warning is sent by the underlying structure through instructions, the low-battery instruction alarm needs to be converted into a Zigbee power report.

Development method

  1. Developed based on Tuya Zigbee SDK:

    • You only need to modify the module model and hardware configuration of the demo sample to complete the above functions, including groups and scenes.
    • Tuya provides complete flashing, authorization, production testing process, software and hardware tools
  2. Self-developed with non-Tuya Zigbee module:

    • Need to fully implement the above technical details
    • Complete device authorization
  3. Authorize by using Tuya’s complete authorization tool

  4. Self-developed with Tuya Zigbee module:

    • Only need to implement firmware function details.
    • Purchase the authorized Tuya Zigbee module.