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.

Door lock cluster specification pin code

Hi, 

In the ZigBee Cluster Library it says that the lock/unlock command has no payload - but we do send the pin code.

My question is where this change is specified, I know that I've seen this mentioned in some document. But unfortunately I don't know which one and my search-terms are wrong so I haven't found it again.

If someone knows where I can find this it would be great (even more awesome if there is a collection of these changes that aren't in the specifications).

Thanks and regards

Fredrik

  • You can refer to the red code in zclSampleDoorLockController_HandleKeys of SampleDoorLockController example.

    static void zclSampleDoorLockController_HandleKeys( byte shift, byte keys )
    {
      uint8 numBuff;   // used to convert decimal to ASCII

      if ( keys & HAL_KEY_SW_1 )
      {
        // increase PIN number
        if ( giDoorLockScreenMode == DOORLOCK_PINMODE )
        {
          if ( giDoorLockPINColumnCount < 4 )
          {
            if ( giDoorLockPINCount > 8 )
            {
              giDoorLockPINCount = 0;
            }
            else
            {
              giDoorLockPINCount++;
            }
          }
        }
        // for all other modes, lock/unlock door
        else
        {
          zclDoorLock_t cmd;

          cmd.pPinRfidCode = aiDoorLockPIN;

          static bool locked = TRUE;

          giDoorLockScreenMode = DOORLOCK_MAINMODE;

          if ( locked )
          {
            zclClosures_SendDoorLockUnlockDoor( SAMPLEDOORLOCKCONTROLLER_ENDPOINT, &zclSampleDoorLockController_DstAddr, &cmd, TRUE, zclSampleDoorLockControllerSeqNum++ );
            locked = FALSE;
          }
          else
          {
            zclClosures_SendDoorLockLockDoor( SAMPLEDOORLOCKCONTROLLER_ENDPOINT, &zclSampleDoorLockController_DstAddr, &cmd, TRUE, zclSampleDoorLockControllerSeqNum++ );
            locked = TRUE;
          }
        }
      }

  • Thank you for the input.

    I have found the code; but what I'm interested in is the ZigBee specification explaining this, I couldn't find it in the cluster library specification which caused some confusion for me. The cluster specification says that the command has no payload. I haven't seen that the Door lock cluster command have a string as payload.

    So the question is; where does this come from?
  • It's in section 10.1 Door Lock Cluster Extensions of latest Zigbe HA profile spec.
  • Thank you very much, I knew that I had seen it somewhere!
  • You are welcome.