This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

ZCL commands

Hi, I'm developing a Zigbee coordinator starting from CLI agent example on nRF5_SDK_for_Thread_and_Zigbee_v3.2.0_9fade31.
The end node I tried to connect is Ikea TRADFRI ambience sensor light (pir). I'm be able to connect the node and see main details (cluster list, attribute list...).
My question: the Ikea sensor node broadcast ZCL OnOff with timed off command. How can I intercept it? Or best, how can I redirect it to my coordinator endpoint?
Here attached a pcap log file from nRf Sniffer on Wireshark that show the ZCL broadcast command.
Many thanks for help
A.Barbieri

ZCL_cmd.pcapng

Parents Reply Children
  • Hi Edvin,

    the thread devzone.nordicsemi.com/.../zigbee-commissioning-issue you link is not for the same issue. The issue quoted in that thread needs to be further investigated.
    In this issue the Ikea TRADFRI ambience sensor light is right connected (see log) and send the ZCL broadcast command "ON with timed off" every time the PIR sensor detect a movement on the ambience. The command specifications are described on paragraph 3.8.2.3 of the Zigbee Cluster Library Specification document n. 075123.
    My questions:
    - how can my coordinator application intercept this command?
    - How can coordinator program the PIR end node to change the ZCL command from broadcast to unicast address?

  • abe said:
    - how can my coordinator application intercept this command?

     What do you mean? Are you asking what this protocol means according to the specification?

     

    abe said:
    How can coordinator program the PIR end node to change the ZCL command from broadcast to unicast address?

     This is a cluster that belongs to the PIR. If you want another node to receive these values, you have to bind and subscribe that device to it. Look at how it is done for the multisensor example with the CLI coordinator. You want to bind the device with the unicast address to this cluster, and enable subscription.

    Note that you need to change the address from the coordinator itself to the device that you want to have the messages.

    BR,

    Edvin

  • Edvin, all you said is about the "attribute report" that I have already tried in other cases.
    The case here is for a ZCL Command, and it's not possible to subscribe it.

  • Hello,
    Sorry for the late reply.

    Many IKEA smart home products use something called group addresses. 

    I spoke to some engineers from our Zigbee team. I'll try to summarize it:

    1) If you want to know when the sensor sees something, attribute reporting is the way to go.

    2) If you want to be controlled directly by the sensor, then you need to participate in a group that the sensor sends the command to.

    So the IKEA use case is probably like this: The sensor controls goup 0, if you want a light bulb to be controlled by it, you simply add it to the group. That is why we see an "ON" command with a timeout. So whenever the sensor detects movement it will turn on the light for 180 seconds.

    For case 1) CLI and binding + subscribing is the solution. For case 2) please look at the light switch with groups example (examples\zigbee\experimental\light_control\light_switch_groups), change the DEFAULT_GROUP_ID" to 0, flash 3 examples (light bulb + switch + coordinator) and add the sensor to the network. It is ecpected that the bulb will respond to both, light switch and the sensor. I have not tested this, but I don't have access to the device you are testing against.

    So try to implement a device with an on/off cluster, and add it to a group with group address 0x0000, and it should be handled by the stack. 

Related