This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2530: How to control percentage based operations in curtain controller with CC2530

Part Number: CC2530

Hi,

I am using CC2530  as my ZCD and I have Zigbee Curtain Controller which is added with ZCD. Now I am trying to control the Curtain controller through Z-tool application with below mentioned parameters.

For your reference:

<TX>10:59:12.03 COM5 AF_DATA_REQUEST (0x2401)

DstAddr: 0x09CA
DestEndpoint: 0x01
SrcEndpoint: 0x07
ClusterID: 0x0102
TransID: 0x01
Options: 0x02
Radius: 0x07
Len: 0x03
Data: ... (0x01, 0x01, 0x00)

1) Now I want to control the percentage in Curtain Controller, what command should I use for it.

Thanks & Regards

Pavithran J

 

  • You should send simple descriptor request to endpoint 1 on your Curtain device to know what clusters it supports first. After you confirm what clusters it supports, you can refer to ZCL spec to send control command.

  • Hi chen,

    My ZED supports following cluster IDs

    <RX>01:51:08.74 COM5 ZDO_SIMPLE_DESC_RSP (0x4584)
    SrcAddr: 0x09CA
    Status: ZDP_SUCCESS (0x0)
    NwkAddr: 0x09CA
    Len: 0x16
    Endpoint: 0x01
    ProfileID: 0x0104
    DeviceID: 0x0202
    DeviceVersion: VER_100 (0x0)
    NumInClusters: 0x06
    InClusterList: 0x0000, 0x0003, 0x0004, 0x0005, 0x0006, 0x0102
    NumOutClusters: 0x01
    OutClusterList: 0x0003

    I have tried "ClusterID: 0x0102" in AF_DATA_REQUEST and I can control Open, Close, Stop  in ZED with below parameters

    <TX>01:50:43.98 COM5 AF_DATA_REQUEST (0x2401)
    DstAddr: 0x09CA
    DestEndpoint: 0x01
    SrcEndpoint: 0x07
    ClusterID: 0x0102
    TransID: 0x01
    Options: 0x02
    Radius: 0x07
    Len: 0x03
    Data: ... (0x01, 0x01, 0x00)  By changing the marked value  0x00 - open, 0x01-close, 0x02-stop = these functions are working fine for me. But I don't know how to frame data for Percentage based controls in AF_DATA_REQUEST.

    Thanks & Regards

    Pavithran J

  • You can refer to section 7.4.2.2 Commands Received in ZCL spec.

  • As per document, for first three functions like ON,OFF,STOP  has no payload. But  for percentage control we need to provide Payload value.

    1)  I have increased the length to 4 and add "0x05 - Go to Lift Percentage" in AF_Data_request. Is this correct?

    <TX>02:47:57.24 COM5 AF_DATA_REQUEST (0x2401)
    DstAddr: 0x09CA
    DestEndpoint: 0x01
    SrcEndpoint: 0x07
    ClusterID: 0x0102
    TransID: 0x01
    Options: 0x02
    Radius: 0x07
    Len: 0x04
    Data: .... (0x01, 0x01, 0x00, 0x05)

    <RX>02:47:57.26 COM5 AF_DATA_REQUEST_SRSP (0x6401)
    Status: afStatus_SUCCESS (0x0)

    <RX>02:47:57.47 COM5 AF_DATA_CONFIRM (0x4480)
    Status: afStatus_SUCCESS (0x0)
    Endpoint: 0x07
    TransID: 0x01

    2) And where should I enter the Payload value in Z-tool.

    Thanks & Regards

    Pavithran J

  • For "0x05 - Go to Lift Percentage", I suppose it should be

    Len: 0x04
    Data: .... (0x01, 0x01, 0x05, 0xXX)

    The latest 0xFF should be replaced with your Lift Percentage.

  • Hi chen,

    I have tried it as you mentioned, But it not performing any percentage based functions.

    Right now my Curtain Controller device has default open/close time of 120 seconds which is working fine. But Now I am trying to reduced time interval to 10%(percentage), so I gave "0x0A" as my lift percentage. It only works as normal open command, there is no change in timing interval what I gave

    <TX>04:45:15.22 COM5 AF_DATA_REQUEST (0x2401)
    DstAddr: 0xB9B4
    DestEndpoint: 0x01
    SrcEndpoint: 0x07
    ClusterID: 0x0102
    TransID: 0x01
    Options: 0x02
    Radius: 0x07
    Len: 0x04
    Data: .... (0x01, 0x01, 0x05, 0x0A)

    <RX>04:45:15.24 COM5 AF_DATA_REQUEST_SRSP (0x6401)
    Status: afStatus_SUCCESS (0x0)

    <RX>04:45:15.24 COM5 AF_DATA_CONFIRM (0x4480)
    Status: afStatus_SUCCESS (0x0)
    Endpoint: 0x07
    TransID: 0x01

  • I suggest you to setup sniffer to check if there’s correct command sent over the air.