English
English
简体中文
Contact Us
Register
Log In
layoutIndex

Zigbee Connection Standard for Motion Sensor

Last Updated on : 2022-06-16 07:18:52download

Zigbee basics

Parameter Value
Profile ID 0x0104
Device ID 0x0402

Supported clusters

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

Supported attributes and commands

Basic cluster

Attributes

ID Name Data type (ID)
Range
Default value
0x0000 ZCL Version uint8 (0x20) 0x00 to 0xff 0x03, used for connection to Tuya-enabled Zigbee gateways.
0x0001 ApplicationVersion uint8 (0x20) 0x00 to 0xff 0x40
0x40 in hex is 0100 0000 in binary. 0100 0000 represents version 1.0.0, so 0x40 represents 1.0.0.
0x0002 Stack Version uint8 (0x20) 0x00 to 0xff 0x02
0x0003 Hardware Version uint8 (0x20) 0x00 to 0xff 0x01
0x0004 Manufacturer Name string (0x42) 0 to 32 bytes For example, _TZ3000_l6web2ir.
The value of this attribute is 16 bytes in length, containing 8-byte prefix of capability value and 8-byte PID. The PID is the unique identifier of the Zigbee product you create on the Tuya IoT Development Platform. The capability value can be obtained from the Zigbee development documentation.
0x0005 Module Identifier string (0x42) 0 to 32 bytes TS0202, used for connection to Tuya-enabled Zigbee gateways.
0x0007 Power Source enum8 (0x30) 0x00 to 0xff 0x03, used for connection to Tuya-enabled Zigbee gateways.
0xFFFD Cluster Revision uint16 (0x21) 0x0000 to 0xffff 0x0001

Commands

ID Name Direction Description
0x00 Reset to factory defaults Client to Server /

Power configuration cluster

Attributes

ID Name Data type (ID) Range Default value
0x0020 Battery Voltage uint8 (0x20) 0x00 to 0xff 0x00
0x0021 Battery Percentage Remaining uint8 (0x20) 0x00 to 0xff 0x00
0xFFFD Cluster Revision uint16 (0x21) 0x0000 to 0xffff 0x0001

IAS zone cluster

Attributes

ID Name Data type (ID) Range Default value
0x0000 Zone State enum8 (0x30) 0x00 to 0xff 0x00
0x0001 Zone Type enum16 (0x31) 0x0000 to 0xffff 0x000D
0x0002 Zone Status bitmap16 (0x19) 0x0000 to 0xffff 0x0000
0x0010 IAS CIE Address EUI64 (0xF0) 8 bytes NULL
0x0011 Zone ID uint8 (0x20) 0x00 to 0xff 0x0000
0xFFFD Cluster Revision uint16 (0x21) 0x0000 to 0xffff 0x0001

OTA upgrade cluster

Attributes

ID Name Data type (ID) Range Default value
0x0000 Upgrade Server ID EUI64 (0xF0) / 0xffffffffffffffff
0x0001 File Offset uint32 (0x23) / 0x00000000
0x0002 Current File Version uint32 (0x23) / 0x00000000
0x0006 Image Upgrade Status enum8 (0x30) / 0x00
0x0007 Manufacturer ID uint16 (0x21) / 0x1002
0x0008 Image Type ID uint16 (0x21) / 0x1602
0x0009 Minimum Block Request Period uint16 (0x21) / 0x0000
0xFFFD Cluster Revision uint16 (0x21) 0x0000 to 0xffff 0x0001

Commands

ID Name Direction Description
0x00 Image Notify Server to Client /
0x01 Query Next Image Request Client to Server /
0x03 Image Block Request Client to Server /
0x06 Upgrade End Request Client to Server /

Mapping between DPs and clusters

DP ID DP description Standard command
1 Human motion detection status Yes
4 Battery level Yes
5 Tamper alarm Yes

DP1 Human motion detection status

Direction Cluster ID Attribute ID Value
Report 0x0500 0x0002 (ZoneStatus) Bit0 (alarm1).
  • 0: no alarm
  • 1: alarm

The sensor reports the alarm status when the sensor detects human motion and reports no alarm when it does not detect human motion.

DP4 Battery level

Direction Cluster ID Attribute ID Value
Report 0x0001 0x0020 (BatteryVoltage) 0x00 to 0xff
Report 0x0001 0x0021 (BatteryPercentageRemaining) 0x00 to 0xff

If the reported value of BatteryVoltage is 30, it indicates 3.0V voltage. If the reported value of BatteryPercentageRemaining is 180, it indicates a battery level of 90%.

DP5 Tamper alarm

Direction Cluster ID Attribute ID Value
Report 0x0500 0x0002 (ZoneStatus) Bit2 (tamper).
  • 0: no alarm
  • 1: alarm

The sensor reports the alarm status when the sensor detects tampering and reports no alarm when the alarm is canceled.

Default heartbeat (4 hours, report battery level)

For more information, see DP4 Battery level.