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

Zigbee door lock cluster Events

Hi,

1.  Is there an example to show how to send a door lock cluster events command?

2. How to check door lock cluster events by CLI(@coordinator)?

Best Regards

Song

Parents Reply
  • Hi Romero,

      Yes, I am testing zigbee door lock base on this example. The example just demo. lock/unlock command.

    "A door lock implementing all of the optional features provided in this cluster has the ability to push data to a
    controller in three different forms, Alarms, Reports and Events." --- ZigBee Cluster Library Specification Rev6, 7.3.2.1

    I already know how the operation of Reports, I don't know how to implement the Events. And if the door lock implement the Events, how to check it by CLI ?

    Best Regards

    Song

Children
  • Hi Song,

    Unfortunately we don't have an example with door lock events, but it should be possible for you to modify our multiprotocol door lock example and add the optional attributes for the type of event you need when declaring the attribute list of the door lock cluster, see the list of attributes in zb_zcl_door_lock.h:

    /** Event mask used to turn on and off the transmission of keypad operation events. */
      ZB_ZCL_ATTR_DOOR_LOCK_KEYPAD_OPERATION_EVENT_MASK_ID      = 0x0041,
      /** Event mask used to turn on and off the transmission of RF operation events. */
      ZB_ZCL_ATTR_DOOR_LOCK_RF_OPERATION_EVENT_MASK_ID          = 0x0042,
      /** Event mask used to turn on and off manual operation events. */
      ZB_ZCL_ATTR_DOOR_LOCK_MANUAL_OPERATION_EVENT_MASK_ID      = 0x0043,
      /** Event mask used to turn on and off RFID operation events. */
      ZB_ZCL_ATTR_DOOR_LOCK_RFID_OPERATION_EVENT_MASK_ID        = 0x0044,
      /** Event mask used to turn on and off keypad programming events. */
      ZB_ZCL_ATTR_DOOR_LOCK_KEYPAD_PROGRAMMING_EVENT_MASK_ID    = 0x0045,
      /** Event mask used to turn on and off RF programming events. */
      ZB_ZCL_ATTR_DOOR_LOCK_RF_PROGRAMMING_EVENT_MASK_ID        = 0x0046,
      /** Event mask used to turn on and off RFID programming events. */
      ZB_ZCL_ATTR_DOOR_LOCK_RFID_PROGRAMMING_EVENT_MASK_ID      = 0x0047,

    You also need to send either an "Operating Event Notification" or "Programming Event Notification" command from the server cluster to a bounded device, as specified in section 7.3.2.17.27 of the ZCL spec. In the CLI example we have example code for how to perform binding.

    Please let me know if you have any further questions.

    Best regards,

    Marjeris

  • Hi Marjeris,

      Thanks for your reply.

    The further question is CLI. When I check the zigbee reports function, I used CLI command "zdo bind on", then "zcl subscribe on", and nothing happened until I found "log enable info zigbee.report" from this page.

    The CLI Reference never say about that.

    If I send a event command from door lock, how to know I am doing right?

    Another question is, how to send command to binding device?

    I modify the macro "ZB_ZCL_DOOR_LOCK_SEND_LOCK_DOOR_RES" that from "zb_zcl_door_lock.h"  to send events command, but this macro must give address, endpoint...and so on. I think if I send event command to binding device, may be there is a dedicated API(macro or function) for this job, but I can't find it.

    I will have three days of Mid-Autumn Festival holiday,will see your reply later,and bless you.

    Song

  • Hi Song,

    SongSie said:
    If I send a event command from door lock, how to know I am doing right?

    My recommendation is to use the nRF Sniffer for 802.15.4 to sniff the Zigbee traffic and check if the event command is being sent or not.

    I am not sure what is the best way to send the event notification command. Maybe you can take a look at the code in CLI example for sending a generic command to a remote node "zcl cmd" which calls cmd_zb_generic_cmd() in zigbee_cli_cmd_generic_cmd.c. The destination address if you are sending to coordinator will be 0x0000 and I think you can send to any endpoint in CLI but just make sure the endpoint have the door lock cluster.

    You can check if the command is being sent or not using the nRF sniffer.

    I am consulting with our Zigbee team about how you can then modify the CLI example to print the event notification reports.

    Best regards,

    Marjeris

Related