Search code examples
zigbeesmartthings

how to use an zigbee IAS Zone device


I'm handling the Smartthings Zigbee motion sensor and i know this is IAS Zone device. I read an question-answer and they said, "Before you get the information from the sensor, you need to enroll first." (zigbee motion detect sensor usage) so i tried to send 'write attribute command' to the sensor to enroll first on my python code like this,

data='\x00' + '\xaa' + '\x02' + '\x00\x10'+'\xf0'+'my MAC address'

('02' means write attribute command, '0010' means attribute of the Zone setting, 'f0' means data type-IEEE address)

this raw data format is from the 'zigbee cluster library' document. but the sensor gave me 86 status, which means UNSUPPORTED_ATTRIBUTE well, i think the command is wrong and my assumptions are,

-the format is wrong.

-the values i used is wrong.

-or both.

If you have any idea or any little hint, you can help me. thanks to read!


Solution

  • For most Zigbee security devices (IAS) you need to use these steps

    1. You must advertise that you support the IAS cluster client when receiving a MatchDescriptorRequest (this one depends on product)
    2. Write your IEEE address to the IAS CIE Address attribute (cluster 0x0500, attribute 0x0010)
    3. Send a ZoneEnrollResponse with status ENROLLED to the device (some devices may require that you "trip" them and wait for them to send the ZoneEnrollRequest first)

    For your packet format, Zigbee uses network byte order. I think your attributeId should be \x10\x00. This will matter for for the IEEE address as well.