| # Copyright (c) 2021 Project CHIP Authors |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| name: 111.2.2. [TC-DRLK-2.2] Verification for Door lock command[DUT-Server] |
| |
| config: |
| nodeId: 0x12344321 |
| cluster: "Door Lock" |
| endpoint: 1 |
| |
| tests: |
| - label: "Wait for the commissioned device to be retrieved" |
| cluster: "DelayCommands" |
| command: "WaitForCommissionee" |
| arguments: |
| values: |
| - name: "nodeId" |
| value: nodeId |
| |
| - label: "Create new user" |
| command: "SetUser" |
| timedInteractionTimeoutMs: 10000 |
| arguments: |
| values: |
| - name: "operationType" |
| value: 0 |
| - name: "userIndex" |
| value: 1 |
| - name: "userName" |
| value: "xxx" |
| - name: "userUniqueId" |
| value: 6452 |
| - name: "userStatus" |
| value: 1 |
| - name: "userType" |
| value: 0 |
| - name: "credentialRule" |
| value: 0 |
| |
| - label: "Read the user back and verify its fields" |
| command: "GetUser" |
| arguments: |
| values: |
| - name: "userIndex" |
| value: 1 |
| response: |
| values: |
| - name: "userIndex" |
| value: 1 |
| - name: "userName" |
| value: "xxx" |
| - name: "userUniqueId" |
| value: 6452 |
| - name: "userStatus" |
| value: 1 |
| - name: "userType" |
| value: 0 |
| - name: "credentialRule" |
| value: 0 |
| - name: "credentials" |
| value: null |
| - name: "creatorFabricIndex" |
| value: 1 |
| - name: "lastModifiedFabricIndex" |
| value: 1 |
| - name: "nextUserIndex" |
| value: null |
| |
| - label: "Create new PIN credential and lock/unlock user" |
| command: "SetCredential" |
| timedInteractionTimeoutMs: 10000 |
| arguments: |
| values: |
| - name: "operationType" |
| value: 0 |
| - name: "credential" |
| value: { CredentialType: 1, CredentialIndex: 1 } |
| - name: "credentialData" |
| value: "123456" |
| - name: "userIndex" |
| value: 1 |
| - name: "userStatus" |
| value: null |
| - name: "userType" |
| value: null |
| response: |
| values: |
| - name: "status" |
| value: 0 |
| - name: "userIndex" |
| value: null |
| - name: "nextCredentialIndex" |
| value: 2 |
| |
| - label: "Verify created PIN credential" |
| command: "GetCredentialStatus" |
| arguments: |
| values: |
| - name: "credential" |
| value: { CredentialType: 1, CredentialIndex: 1 } |
| response: |
| values: |
| - name: "credentialExists" |
| value: true |
| - name: "userIndex" |
| value: 1 |
| - name: "creatorFabricIndex" |
| value: 1 |
| - name: "lastModifiedFabricIndex" |
| value: 1 |
| - name: "nextCredentialIndex" |
| value: null |
| |
| - label: |
| "TH writes the RequirePINforRemoteOperation attribute value as False |
| on the DUT" |
| PICS: DRLK.S.A0033 |
| command: "writeAttribute" |
| attribute: "RequirePINforRemoteOperation" |
| arguments: |
| value: false |
| |
| - label: |
| "TH writes the RequirePINforRemoteOperation attribute value as False |
| on the DUT and Verify DUT responds with UNSUPPORTED_WRITE" |
| PICS: "!DRLK.S.A0033" |
| command: "writeAttribute" |
| attribute: "RequirePINforRemoteOperation" |
| arguments: |
| value: false |
| response: |
| error: UNSUPPORTED_WRITE |
| |
| - label: "TH reads the RequirePINforRemoteOperation attribute from the DUT" |
| PICS: DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033 |
| command: "readAttribute" |
| attribute: "RequirePINforRemoteOperation" |
| response: |
| value: false |
| |
| - label: "TH sends Lock Door Command to the DUT without PINCode" |
| PICS: DRLK.S.C00.Rsp |
| command: "LockDoor" |
| timedInteractionTimeoutMs: 10000 |
| response: |
| error: 0x00 |
| |
| - label: "TH sends Lock Door Command to the DUT with valid PINCode" |
| PICS: DRLK.S.C00.Rsp |
| command: "LockDoor" |
| timedInteractionTimeoutMs: 10000 |
| arguments: |
| values: |
| - name: "pinCode" |
| value: "123456" |
| |
| - label: |
| "TH writes the RequirePINforRemoteOperation attribute value as True on |
| the DUT" |
| PICS: DRLK.S.A0033 |
| command: "writeAttribute" |
| attribute: "RequirePINforRemoteOperation" |
| arguments: |
| value: true |
| |
| - label: |
| "TH writes the RequirePINforRemoteOperation attribute value as True on |
| the DUT and Verify DUT responds with UNSUPPORTED_WRITE" |
| PICS: "!DRLK.S.A0033" |
| command: "writeAttribute" |
| attribute: "RequirePINforRemoteOperation" |
| arguments: |
| value: true |
| response: |
| error: UNSUPPORTED_WRITE |
| |
| - label: "TH reads the RequirePINforRemoteOperation attribute from the DUT" |
| PICS: DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033 |
| command: "readAttribute" |
| attribute: "RequirePINforRemoteOperation" |
| response: |
| value: true |
| |
| - label: "TH sends Lock Door Command to the DUT with valid PINCode" |
| PICS: DRLK.S.C00.Rsp && DRLK.S.A0033 |
| command: "LockDoor" |
| timedInteractionTimeoutMs: 10000 |
| arguments: |
| values: |
| - name: "pinCode" |
| value: "123456" |
| |
| - label: "TH sends Lock Door Command to the DUT without valid PINCode" |
| PICS: DRLK.S.C00.Rsp && DRLK.S.A0033 |
| command: "LockDoor" |
| timedInteractionTimeoutMs: 10000 |
| arguments: |
| values: |
| - name: "pinCode" |
| value: "645321" |
| response: |
| error: FAILURE |
| |
| - label: |
| "TH sends Lock Door Command to the DUT without any argument PINCode" |
| PICS: DRLK.S.C00.Rsp && DRLK.S.A0033 |
| command: "LockDoor" |
| timedInteractionTimeoutMs: 10000 |
| response: |
| error: FAILURE |
| |
| - label: |
| "TH writes WrongCodeEntryLimit attribute value as 3 on the DUT and |
| Verify that the DUT sends Success response" |
| PICS: DRLK.S.A0030 |
| command: "writeAttribute" |
| attribute: "WrongCodeEntryLimit" |
| arguments: |
| value: 3 |
| |
| - label: |
| "TH writes WrongCodeEntryLimit attribute value as 3 on the DUT and |
| verify DUT responds with UNSUPPORTED_WRITE" |
| PICS: "!DRLK.S.A0030" |
| command: "writeAttribute" |
| attribute: "WrongCodeEntryLimit" |
| arguments: |
| value: 3 |
| response: |
| error: UNSUPPORTED_WRITE |
| |
| - label: |
| "TH writes UserCodeTemporaryDisableTime attribute value as 15 seconds |
| on the DUT and Verify that the DUT send the Success response" |
| PICS: DRLK.S.A0031 |
| command: "writeAttribute" |
| attribute: "UserCodeTemporaryDisableTime" |
| arguments: |
| value: 15 |
| |
| - label: |
| "TH writes UserCodeTemporaryDisableTime attribute value as 15 seconds |
| on the DUT and Verify DUT responds with UNSUPPORTED_WRITE" |
| PICS: "!DRLK.S.A0031" |
| command: "writeAttribute" |
| attribute: "UserCodeTemporaryDisableTime" |
| arguments: |
| value: 15 |
| response: |
| error: UNSUPPORTED_WRITE |
| |
| - label: "TH sends Lock Door Command to the DUT with invalid PINCode" |
| PICS: DRLK.S.C00.Rsp |
| command: "LockDoor" |
| timedInteractionTimeoutMs: 10000 |
| arguments: |
| values: |
| - name: "pinCode" |
| value: "123458" |
| response: |
| error: FAILURE |
| |
| - label: "TH sends Lock Door Command to the DUT with invalid PINCode" |
| PICS: DRLK.S.C00.Rsp |
| command: "LockDoor" |
| timedInteractionTimeoutMs: 10000 |
| arguments: |
| values: |
| - name: "pinCode" |
| value: "123458" |
| response: |
| error: FAILURE |
| |
| - label: "TH sends Lock Door Command to the DUT with invalid PINCode" |
| PICS: DRLK.S.C00.Rsp |
| command: "LockDoor" |
| timedInteractionTimeoutMs: 10000 |
| arguments: |
| values: |
| - name: "pinCode" |
| value: "123458" |
| response: |
| error: FAILURE |
| |
| - label: "TH sends Lock Door Command to the DUT with invalid PINCode" |
| PICS: DRLK.S.C00.Rsp |
| command: "LockDoor" |
| timedInteractionTimeoutMs: 10000 |
| arguments: |
| values: |
| - name: "pinCode" |
| value: "123458" |
| response: |
| error: FAILURE |
| |
| - label: |
| "TH reads UserCodeTemporaryDisableTime attribute from DUT and After |
| sending 3 failure responses verify that UserCodeTemporaryDisableTime |
| attribute is triggered" |
| verification: | |
| ./chip-tool doorlock read user-code-temporary-disable-time 1 1 |
| |
| On TH, verify the UserCodeTemporaryDisableTime value as 15 |
| |
| [1657867358.396037][2551:2556] CHIP:DMG: |
| [1657867358.396067][2551:2556] CHIP:DMG: SuppressResponse = true, |
| [1657867358.396099][2551:2556] CHIP:DMG: InteractionModelRevision = 1 |
| [1657867358.396129][2551:2556] CHIP:DMG: } |
| [1657867358.396286][2551:2556] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Attribute 0x0000_0031 DataVersion: 2082875948 |
| [1657867358.396378][2551:2556] CHIP:TOO: UserCodeTemporaryDisableTime: 15 |
| cluster: "LogCommands" |
| command: "UserPrompt" |
| PICS: PICS_USER_PROMPT && DRLK.S.A0031 |
| arguments: |
| values: |
| - name: "message" |
| value: "Please enter 'y' for success" |
| - name: "expectedValue" |
| value: "y" |
| |
| - label: |
| "TH sends Lock Command to the DUT with valid PINCode before |
| UserCodeTemporaryDisableTime attribute time expires" |
| verification: | |
| Verify that DUT sends failure response to the TH |
| cluster: "LogCommands" |
| command: "UserPrompt" |
| PICS: PICS_USER_PROMPT && DRLK.S.C00.Rsp |
| arguments: |
| values: |
| - name: "message" |
| value: "Please enter 'y' for success" |
| - name: "expectedValue" |
| value: "y" |
| |
| - label: "Clean the created user" |
| command: "ClearUser" |
| timedInteractionTimeoutMs: 10000 |
| arguments: |
| values: |
| - name: "userIndex" |
| value: 1 |
| |
| - label: "Cleanup the created credential" |
| PICS: DRLK.S.C26.Rsp |
| command: "ClearCredential" |
| timedInteractionTimeoutMs: 10000 |
| arguments: |
| values: |
| - name: "credential" |
| value: { CredentialType: 1, CredentialIndex: 1 } |