|
| 1 | +# Copyright (c) 2024 Project CHIP Authors |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +name: 4.2.4. [TC-LVL-9.1] Scenes Management Cluster Interaction (DUT as Server) |
| 16 | + |
| 17 | +PICS: |
| 18 | + - LVL.S |
| 19 | + - S.S |
| 20 | + |
| 21 | +config: |
| 22 | + nodeId: 0x12344321 |
| 23 | + cluster: "Scenes Management" |
| 24 | + endpoint: 1 |
| 25 | + G1: |
| 26 | + type: group_id |
| 27 | + defaultValue: 0x0001 |
| 28 | + |
| 29 | +tests: |
| 30 | + - label: "Wait for the commissioned device to be retrieved" |
| 31 | + cluster: "DelayCommands" |
| 32 | + command: "WaitForCommissionee" |
| 33 | + arguments: |
| 34 | + values: |
| 35 | + - name: "nodeId" |
| 36 | + value: nodeId |
| 37 | + |
| 38 | + - label: |
| 39 | + "Step 0a :TH sends KeySetWrite command in the GroupKeyManagement |
| 40 | + cluster to DUT using a key that is pre-installed on the TH. |
| 41 | + GroupKeySet fields are as follows:" |
| 42 | + cluster: "Group Key Management" |
| 43 | + endpoint: 0 |
| 44 | + command: "KeySetWrite" |
| 45 | + arguments: |
| 46 | + values: |
| 47 | + - name: "GroupKeySet" |
| 48 | + value: |
| 49 | + { |
| 50 | + GroupKeySetID: 0x01a1, |
| 51 | + GroupKeySecurityPolicy: 0, |
| 52 | + EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", |
| 53 | + EpochStartTime0: 1110000, |
| 54 | + EpochKey1: "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf", |
| 55 | + EpochStartTime1: 1110001, |
| 56 | + EpochKey2: "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf", |
| 57 | + EpochStartTime2: 1110002, |
| 58 | + } |
| 59 | + |
| 60 | + - label: |
| 61 | + "Step 0b: TH binds GroupIds 0x0001 and 0x0002 with GroupKeySetID |
| 62 | + 0x01a1 in the GroupKeyMap attribute list on GroupKeyManagement cluster |
| 63 | + by writing the GroupKeyMap attribute with two entries as follows:" |
| 64 | + cluster: "Group Key Management" |
| 65 | + endpoint: 0 |
| 66 | + command: "writeAttribute" |
| 67 | + attribute: "GroupKeyMap" |
| 68 | + arguments: |
| 69 | + value: [{ FabricIndex: 1, GroupId: G1, GroupKeySetID: 0x01a1 }] |
| 70 | + |
| 71 | + - label: "Step 0c: TH sends a RemoveAllGroups command to DUT." |
| 72 | + cluster: "Groups" |
| 73 | + endpoint: endpoint |
| 74 | + command: "RemoveAllGroups" |
| 75 | + |
| 76 | + - label: |
| 77 | + "Step 1a: TH sends a AddGroup command to DUT with the GroupID field |
| 78 | + set to G1." |
| 79 | + cluster: "Groups" |
| 80 | + command: "AddGroup" |
| 81 | + arguments: |
| 82 | + values: |
| 83 | + - name: "GroupID" |
| 84 | + value: G1 |
| 85 | + - name: "GroupName" |
| 86 | + value: "Group1" |
| 87 | + response: |
| 88 | + values: |
| 89 | + - name: "Status" |
| 90 | + value: 0 |
| 91 | + - name: "GroupID" |
| 92 | + value: G1 |
| 93 | + |
| 94 | + - label: |
| 95 | + "Step 1b: TH sends a RemoveAllScenes command to DUT with the GroupID |
| 96 | + field set to G1." |
| 97 | + command: "RemoveAllScenes" |
| 98 | + arguments: |
| 99 | + values: |
| 100 | + - name: "GroupID" |
| 101 | + value: G1 |
| 102 | + response: |
| 103 | + values: |
| 104 | + - name: "Status" |
| 105 | + value: 0x00 |
| 106 | + - name: "GroupID" |
| 107 | + value: G1 |
| 108 | + - label: |
| 109 | + "Step 1c: TH sends a GetSceneMembership command to DUT with the |
| 110 | + GroupID field set to G1." |
| 111 | + command: "GetSceneMembership" |
| 112 | + arguments: |
| 113 | + values: |
| 114 | + - name: "GroupID" |
| 115 | + value: G1 |
| 116 | + response: |
| 117 | + values: |
| 118 | + - name: "Status" |
| 119 | + value: 0x00 |
| 120 | + - name: "GroupID" |
| 121 | + value: G1 |
| 122 | + - name: "SceneList" |
| 123 | + value: [] |
| 124 | + |
| 125 | + - label: |
| 126 | + "Step 2a: TH sends a MoveToLevel command to DUT, with Level =0 and |
| 127 | + TransitionTime =0 (immediate)" |
| 128 | + cluster: "Level Control" |
| 129 | + command: "MoveToLevel" |
| 130 | + arguments: |
| 131 | + values: |
| 132 | + - name: "Level" |
| 133 | + value: 0 |
| 134 | + - name: "TransitionTime" |
| 135 | + value: 0 |
| 136 | + - name: "OptionsMask" |
| 137 | + value: 1 |
| 138 | + - name: "OptionsOverride" |
| 139 | + value: 1 |
| 140 | + |
| 141 | + - label: "Step 2b: TH reads the MinLevel attribute from the DUT" |
| 142 | + cluster: "Level Control" |
| 143 | + command: "readAttribute" |
| 144 | + attribute: "MinLevel" |
| 145 | + response: |
| 146 | + saveAs: MinLevelValue |
| 147 | + constraints: |
| 148 | + type: int8u |
| 149 | + |
| 150 | + - label: "Step 2c: TH reads the CurrentLevel attribute from DUT" |
| 151 | + cluster: "Level Control" |
| 152 | + command: "readAttribute" |
| 153 | + attribute: "CurrentLevel" |
| 154 | + response: |
| 155 | + value: MinLevelValue |
| 156 | + |
| 157 | + - label: |
| 158 | + "Step 3: TH sends a StoreScene command to DUT with the GroupID field |
| 159 | + set to G1 and the SceneID field set to 0x01." |
| 160 | + command: "StoreScene" |
| 161 | + arguments: |
| 162 | + values: |
| 163 | + - name: "GroupID" |
| 164 | + value: G1 |
| 165 | + - name: "SceneID" |
| 166 | + value: 0x01 |
| 167 | + response: |
| 168 | + values: |
| 169 | + - name: "Status" |
| 170 | + value: 0x00 |
| 171 | + - name: "GroupID" |
| 172 | + value: G1 |
| 173 | + - name: "SceneID" |
| 174 | + value: 0x01 |
| 175 | + |
| 176 | + - label: "Step 4: TH sends a AddScene command to DUT with the GroupID field |
| 177 | + set to G1, the SceneID field set to 0x02, the TransitionTime field set |
| 178 | + to 0 and the ExtensionFieldSets set to: '[{ ClusterID: 0x0008, |
| 179 | + AttributeValueList: [{ AttributeID: 0x0000, ValueUnsigned8: 0x64 }]}]' |
| 180 | + " |
| 181 | + command: "AddScene" |
| 182 | + arguments: |
| 183 | + values: |
| 184 | + - name: "GroupID" |
| 185 | + value: G1 |
| 186 | + - name: "SceneID" |
| 187 | + value: 0x02 |
| 188 | + - name: "TransitionTime" |
| 189 | + value: 0 |
| 190 | + - name: "SceneName" |
| 191 | + value: "Scene1" |
| 192 | + - name: "ExtensionFieldSets" |
| 193 | + value: |
| 194 | + [ |
| 195 | + { |
| 196 | + ClusterID: 0x0008, |
| 197 | + AttributeValueList: |
| 198 | + [{ AttributeID: 0x0000, ValueUnsigned8: 0x64 }], |
| 199 | + }, |
| 200 | + ] |
| 201 | + response: |
| 202 | + values: |
| 203 | + - name: "Status" |
| 204 | + value: 0x00 |
| 205 | + - name: "GroupID" |
| 206 | + value: G1 |
| 207 | + - name: "SceneID" |
| 208 | + value: 0x02 |
| 209 | + |
| 210 | + - label: |
| 211 | + "Step 5a: TH sends a RecallScene command to DUT with the GroupID field |
| 212 | + set to G1 and the SceneID field set to 0x02." |
| 213 | + command: "RecallScene" |
| 214 | + arguments: |
| 215 | + values: |
| 216 | + - name: "GroupID" |
| 217 | + value: G1 |
| 218 | + - name: "SceneID" |
| 219 | + value: 0x02 |
| 220 | + |
| 221 | + - label: "Step 5b: TH reads the CurrentLevel attribute from DUT" |
| 222 | + cluster: "Level Control" |
| 223 | + command: "readAttribute" |
| 224 | + attribute: "CurrentLevel" |
| 225 | + response: |
| 226 | + value: 0x64 |
| 227 | + |
| 228 | + - label: |
| 229 | + "Step 6a: TH sends a RecallScene command to DUT with the GroupID field |
| 230 | + set to G1 and the SceneID field set to 0x01." |
| 231 | + command: "RecallScene" |
| 232 | + arguments: |
| 233 | + values: |
| 234 | + - name: "GroupID" |
| 235 | + value: G1 |
| 236 | + - name: "SceneID" |
| 237 | + value: 0x01 |
| 238 | + |
| 239 | + - label: "Step 6c: TH reads the CurrentLevel attribute from DUT" |
| 240 | + cluster: "Level Control" |
| 241 | + command: "readAttribute" |
| 242 | + attribute: "CurrentLevel" |
| 243 | + response: |
| 244 | + value: MinLevelValue |
| 245 | + |
| 246 | + - label: |
| 247 | + "Cleanup: TH sends a RemoveAllScenes command to DUT with the GroupID |
| 248 | + field set to G1." |
| 249 | + command: "RemoveAllScenes" |
| 250 | + arguments: |
| 251 | + values: |
| 252 | + - name: "GroupID" |
| 253 | + value: G1 |
| 254 | + response: |
| 255 | + values: |
| 256 | + - name: "Status" |
| 257 | + value: 0x00 |
| 258 | + - name: "GroupID" |
| 259 | + value: G1 |
| 260 | + |
| 261 | + - label: "Cleanup: TH sends a RemoveAllGroups command to DUT." |
| 262 | + cluster: "Groups" |
| 263 | + endpoint: endpoint |
| 264 | + command: "RemoveAllGroups" |
0 commit comments