diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
index 0cd7708285ae79..913d86d67dbfbf 100644
--- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
+++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
@@ -138,7 +138,7 @@ server cluster Scenes = 5 {
struct AttributeValuePair {
optional attrib_id attributeID = 0;
- int8u attributeValue[] = 1;
+ int32u attributeValue = 1;
}
struct ExtensionFieldSet {
@@ -151,6 +151,9 @@ server cluster Scenes = 5 {
readonly attribute group_id currentGroup = 2;
readonly attribute boolean sceneValid = 3;
readonly attribute bitmap8 nameSupport = 4;
+ readonly attribute nullable node_id lastConfiguredBy = 5;
+ readonly attribute int16u sceneTableSize = 6;
+ readonly attribute int8u remainingCapacity = 7;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
@@ -5048,6 +5051,9 @@ endpoint 1 {
ram attribute currentGroup default = 0x0000;
ram attribute sceneValid default = 0x00;
ram attribute nameSupport;
+ ram attribute lastConfiguredBy;
+ ram attribute sceneTableSize;
+ ram attribute remainingCapacity;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 4;
}
diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
index 310a5e6b0a8797..a0b8b9b9c95682 100644
--- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
+++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
@@ -9532,6 +9532,54 @@
"maxInterval": 65344,
"reportableChange": 0
},
+ {
+ "name": "LastConfiguredBy",
+ "code": 5,
+ "mfgCode": null,
+ "side": "server",
+ "type": "node_id",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "SceneTableSize",
+ "code": 6,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "RemainingCapacity",
+ "code": 7,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
{
"name": "FeatureMap",
"code": 65532,
diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter
index 02bd957ba4145c..07f74cdb9e7b77 100644
--- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter
+++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter
@@ -132,7 +132,7 @@ server cluster Scenes = 5 {
struct AttributeValuePair {
optional attrib_id attributeID = 0;
- int8u attributeValue[] = 1;
+ int32u attributeValue = 1;
}
struct ExtensionFieldSet {
@@ -145,6 +145,9 @@ server cluster Scenes = 5 {
readonly attribute group_id currentGroup = 2;
readonly attribute boolean sceneValid = 3;
readonly attribute bitmap8 nameSupport = 4;
+ readonly attribute nullable node_id lastConfiguredBy = 5;
+ readonly attribute int16u sceneTableSize = 6;
+ readonly attribute int8u remainingCapacity = 7;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
@@ -4171,6 +4174,9 @@ endpoint 1 {
ram attribute currentGroup default = 0x0000;
ram attribute sceneValid default = 0x00;
ram attribute nameSupport;
+ ram attribute lastConfiguredBy;
+ ram attribute sceneTableSize;
+ ram attribute remainingCapacity;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 4;
}
diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap
index ad57bb3ccb1c7e..b02e910590df29 100644
--- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap
+++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap
@@ -9003,6 +9003,54 @@
"maxInterval": 65344,
"reportableChange": 0
},
+ {
+ "name": "LastConfiguredBy",
+ "code": 5,
+ "mfgCode": null,
+ "side": "server",
+ "type": "node_id",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "SceneTableSize",
+ "code": 6,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "RemainingCapacity",
+ "code": 7,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
{
"name": "FeatureMap",
"code": 65532,
diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter
index 83f73393327354..5159a1b6b2f60d 100644
--- a/examples/light-switch-app/light-switch-common/light-switch-app.matter
+++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter
@@ -186,7 +186,7 @@ client cluster Scenes = 5 {
struct AttributeValuePair {
optional attrib_id attributeID = 0;
- int8u attributeValue[] = 1;
+ int32u attributeValue = 1;
}
struct ExtensionFieldSet {
@@ -200,6 +200,8 @@ client cluster Scenes = 5 {
readonly attribute boolean sceneValid = 3;
readonly attribute bitmap8 nameSupport = 4;
readonly attribute optional nullable node_id lastConfiguredBy = 5;
+ readonly attribute int16u sceneTableSize = 6;
+ readonly attribute int8u remainingCapacity = 7;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter
index b7b0c5fbd4151d..bffde23c79ead7 100644
--- a/examples/placeholder/linux/apps/app1/config.matter
+++ b/examples/placeholder/linux/apps/app1/config.matter
@@ -138,7 +138,7 @@ server cluster Scenes = 5 {
struct AttributeValuePair {
optional attrib_id attributeID = 0;
- int8u attributeValue[] = 1;
+ int32u attributeValue = 1;
}
struct ExtensionFieldSet {
diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter
index 0f3d9c42f424b1..3043fa328c04be 100644
--- a/examples/placeholder/linux/apps/app2/config.matter
+++ b/examples/placeholder/linux/apps/app2/config.matter
@@ -138,7 +138,7 @@ server cluster Scenes = 5 {
struct AttributeValuePair {
optional attrib_id attributeID = 0;
- int8u attributeValue[] = 1;
+ int32u attributeValue = 1;
}
struct ExtensionFieldSet {
diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter
index a314a026656bec..e8dd4cb1fb3cfa 100644
--- a/examples/thermostat/thermostat-common/thermostat.matter
+++ b/examples/thermostat/thermostat-common/thermostat.matter
@@ -186,7 +186,7 @@ server cluster Scenes = 5 {
struct AttributeValuePair {
optional attrib_id attributeID = 0;
- int8u attributeValue[] = 1;
+ int32u attributeValue = 1;
}
struct ExtensionFieldSet {
diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter
index 9b19d19aba3980..a2bffdc911cc30 100644
--- a/examples/window-app/common/window-app.matter
+++ b/examples/window-app/common/window-app.matter
@@ -138,7 +138,7 @@ server cluster Scenes = 5 {
struct AttributeValuePair {
optional attrib_id attributeID = 0;
- int8u attributeValue[] = 1;
+ int32u attributeValue = 1;
}
struct ExtensionFieldSet {
diff --git a/src/app/clusters/scenes/SceneTableImpl.h b/src/app/clusters/scenes/SceneTableImpl.h
index c0453b5e9da58d..d601e607dac39d 100644
--- a/src/app/clusters/scenes/SceneTableImpl.h
+++ b/src/app/clusters/scenes/SceneTableImpl.h
@@ -64,24 +64,9 @@ class DefaultSceneHandlerImpl : public scenes::SceneHandler
auto pair_iterator = extensionFieldSet.attributeValueList.begin();
while (pair_iterator.Next())
{
- aVPair = pair_iterator.GetValue();
- mAVPairs[pairCount].attributeID = aVPair.attributeID;
- size_t valueBytesTotal = 0;
- uint8_t valueBytesCount = 0;
-
- ReturnErrorOnFailure(aVPair.attributeValue.ComputeSize(&valueBytesTotal));
- VerifyOrReturnError(valueBytesTotal <= ArraySize(mValueBuffer[0]), CHIP_ERROR_BUFFER_TOO_SMALL);
-
- auto value_iterator = aVPair.attributeValue.begin();
- while (value_iterator.Next())
- {
- mValueBuffer[pairCount][valueBytesCount] = value_iterator.GetValue();
- valueBytesCount++;
- }
- ReturnErrorOnFailure(value_iterator.GetStatus());
-
- mAVPairs[pairCount].attributeValue = mValueBuffer[pairCount];
- mAVPairs[pairCount].attributeValue.reduce_size(valueBytesCount);
+ aVPair = pair_iterator.GetValue();
+ mAVPairs[pairCount].attributeID = aVPair.attributeID;
+ mAVPairs[pairCount].attributeValue = aVPair.attributeValue;
pairCount++;
}
ReturnErrorOnFailure(pair_iterator.GetStatus());
@@ -132,25 +117,9 @@ class DefaultSceneHandlerImpl : public scenes::SceneHandler
auto pair_iterator = attributeValueList.begin();
while (pair_iterator.Next())
{
- decodePair = pair_iterator.GetValue();
- mAVPairs[pairCount].attributeID = decodePair.attributeID;
- size_t valueBytesTotal = 0;
- uint8_t valueBytesCount = 0;
-
- // Verify size of attribute value
- ReturnErrorOnFailure(decodePair.attributeValue.ComputeSize(&valueBytesTotal));
- VerifyOrReturnError(valueBytesTotal <= ArraySize(mValueBuffer[0]), CHIP_ERROR_BUFFER_TOO_SMALL);
-
- auto value_iterator = decodePair.attributeValue.begin();
- while (value_iterator.Next())
- {
- mValueBuffer[pairCount][valueBytesCount] = value_iterator.GetValue();
- valueBytesCount++;
- }
- ReturnErrorOnFailure(value_iterator.GetStatus());
-
- mAVPairs[pairCount].attributeValue = mValueBuffer[pairCount];
- mAVPairs[pairCount].attributeValue.reduce_size(valueBytesCount);
+ decodePair = pair_iterator.GetValue();
+ mAVPairs[pairCount].attributeID = decodePair.attributeID;
+ mAVPairs[pairCount].attributeValue = decodePair.attributeValue;
pairCount++;
};
ReturnErrorOnFailure(pair_iterator.GetStatus());
@@ -164,7 +133,6 @@ class DefaultSceneHandlerImpl : public scenes::SceneHandler
private:
app::Clusters::Scenes::Structs::AttributeValuePair::Type mAVPairs[kMaxAvPair];
- uint8_t mValueBuffer[kMaxAvPair][kMaxValueSize];
};
/**
diff --git a/src/app/tests/TestSceneTable.cpp b/src/app/tests/TestSceneTable.cpp
index c4e09b2b83e3e1..82f11edef04fa6 100644
--- a/src/app/tests/TestSceneTable.cpp
+++ b/src/app/tests/TestSceneTable.cpp
@@ -466,23 +466,20 @@ void TestHandlerFunctions(nlTestSuite * aSuite, void * aContext)
TLV::TLVType outer;
TLV::TLVType outerRead;
- static const uint8_t OO_av_payload[1] = { 0x01 };
- static const uint8_t LC_av_payload[2][2] = { { 0x40, 0x00 }, { 0x01, 0xF0 } };
- static const uint8_t CC_av_payload[8][2] = { { 0x00, 0x00 }, { 0x00, 0x00 }, { 0x00, 0x00 }, { 0x00, 0x00 },
- { 0x00, 0x00 }, { 0x00, 0x00 }, { 0x00, 0x00 }, { 0x00, 0x00 } };
+ static const uint8_t OO_av_payload = 0x01;
+ static const uint16_t LC_av_payload[2] = { 0x64, 0x01F0 };
+ static const uint16_t CC_av_payload[8] = { 0 };
OOPairs[0].attributeID.SetValue(kOnOffAttId);
OOPairs[0].attributeValue = OO_av_payload;
LCPairs[0].attributeID.SetValue(kCurrentLevelId);
LCPairs[0].attributeValue = LC_av_payload[0];
- LCPairs[0].attributeValue.reduce_size(1);
LCPairs[1].attributeID.SetValue(kCurrentFrequencyId);
LCPairs[1].attributeValue = LC_av_payload[1];
CCPairs[0].attributeID.SetValue(kCurrentSaturationId);
CCPairs[0].attributeValue = CC_av_payload[0];
- CCPairs[0].attributeValue.reduce_size(1);
CCPairs[1].attributeID.SetValue(kCurrentXId);
CCPairs[1].attributeValue = CC_av_payload[1];
CCPairs[2].attributeID.SetValue(kCurrentYId);
@@ -493,10 +490,8 @@ void TestHandlerFunctions(nlTestSuite * aSuite, void * aContext)
CCPairs[4].attributeValue = CC_av_payload[4];
CCPairs[5].attributeID.SetValue(kColorLoopActiveId);
CCPairs[5].attributeValue = CC_av_payload[5];
- CCPairs[5].attributeValue.reduce_size(1);
CCPairs[6].attributeID.SetValue(kColorLoopDirectionId);
CCPairs[6].attributeValue = CC_av_payload[6];
- CCPairs[6].attributeValue.reduce_size(1);
CCPairs[7].attributeID.SetValue(kColorLoopTimeId);
CCPairs[7].attributeValue = CC_av_payload[7];
@@ -658,21 +653,17 @@ void TestHandlerFunctions(nlTestSuite * aSuite, void * aContext)
app::Clusters::Scenes::Structs::ExtensionFieldSet::Type extensionFieldFailTestOut;
app::Clusters::Scenes::Structs::ExtensionFieldSet::DecodableType extensionFieldFailTestIn;
app::Clusters::Scenes::Structs::AttributeValuePair::Type TooManyPairs[16];
- app::Clusters::Scenes::Structs::AttributeValuePair::Type TooManyBytesPairs[1];
TLV::TLVType failWrite;
TLV::TLVType failRead;
- uint8_t payloadOk[1] = { 0 };
- uint8_t payloadTooBig[5] = { 0 };
+ uint8_t payloadOk = 0;
for (uint8_t i = 0; i < 16; i++)
{
TooManyPairs[i].attributeValue = payloadOk;
}
- TooManyBytesPairs[0].attributeValue = payloadTooBig;
-
extensionFieldFailTestOut.clusterID = kColorControlClusterId;
extensionFieldFailTestOut.attributeValueList = TooManyPairs;
@@ -708,39 +699,6 @@ void TestHandlerFunctions(nlTestSuite * aSuite, void * aContext)
memset(failBuffer, 0, fail_list.size());
memset(buffer, 0, buff_span.size());
-
- extensionFieldFailTestOut.clusterID = kColorControlClusterId;
- extensionFieldFailTestOut.attributeValueList = TooManyBytesPairs;
-
- // Serialize Extension Field sets as if they were recovered from memory
- writer.Init(failBuffer);
- writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, failWrite);
- NL_TEST_ASSERT(aSuite,
- CHIP_NO_ERROR ==
- app::DataModel::Encode(writer,
- TLV::ContextTag(to_underlying(
- app::Clusters::Scenes::Structs::ExtensionFieldSet::Fields::kAttributeValueList)),
- extensionFieldFailTestOut.attributeValueList));
- writer.EndContainer(failWrite);
-
- // Setup the On Off Extension field set in the expected state from a command
- reader.Init(fail_list);
- extensionFieldFailTestIn.clusterID = kColorControlClusterId;
- NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == reader.Next());
- NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == reader.EnterContainer(failRead));
- NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == reader.Next());
- NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == extensionFieldFailTestIn.attributeValueList.Decode(reader));
- NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == reader.ExitContainer(failRead));
-
- // Verify failure on both serialize and deserialize
- NL_TEST_ASSERT(aSuite,
- CHIP_ERROR_BUFFER_TOO_SMALL == sHandler.SerializeAdd(kTestEndpoint1, extensionFieldFailTestIn, buff_span));
- NL_TEST_ASSERT(aSuite,
- CHIP_ERROR_BUFFER_TOO_SMALL ==
- sHandler.Deserialize(kTestEndpoint1, kColorControlClusterId, fail_list, extensionFieldFailTestOut));
-
- memset(failBuffer, 0, fail_list.size());
- memset(buffer, 0, buff_span.size());
};
void TestStoreScenes(nlTestSuite * aSuite, void * aContext)
diff --git a/src/app/tests/suites/certification/PICS.yaml b/src/app/tests/suites/certification/PICS.yaml
index 56aea7c1c2416d..98049533f8ec8f 100644
--- a/src/app/tests/suites/certification/PICS.yaml
+++ b/src/app/tests/suites/certification/PICS.yaml
@@ -5585,6 +5585,12 @@ PICS:
- label: "Does the device implement the LastConfiguredBy attribute?"
id: S.S.A0005
+ - label: "Does the device implement the SceneTableSize attribute?"
+ id: S.S.A0006
+
+ - label: "Does the device implement the RemainingCapacity attribute?"
+ id: S.S.A0007
+
#
# server / commandsReceived
#
diff --git a/src/app/tests/suites/certification/Test_TC_S_2_1.yaml b/src/app/tests/suites/certification/Test_TC_S_2_1.yaml
index 950ccb32380c94..31d1618c7061ba 100644
--- a/src/app/tests/suites/certification/Test_TC_S_2_1.yaml
+++ b/src/app/tests/suites/certification/Test_TC_S_2_1.yaml
@@ -22,45 +22,88 @@ PICS:
config:
nodeId: 0x12344321
- cluster: "Basic Information"
- endpoint: 0
+ cluster: "Scenes"
+ endpoint: 1
tests:
- - label: "Commission DUT to TH"
- verification: |
+ - label: "Wait for the commissioned device to be retrieved"
+ cluster: "DelayCommands"
+ command: "WaitForCommissionee"
+ arguments:
+ values:
+ - name: "nodeId"
+ value: nodeId
- disabled: true
+ - label: "TH reads from the DUT the (0x0000) SceneCount attribute"
+ PICS: S.S.A0000
+ command: "readAttribute"
+ attribute: "SceneCount"
+ response:
+ constraints:
+ type: int8u
- - label: "TH reads all mandatory attributes from DUT one at a time."
- verification: |
- The data type in each command must match the value listed in the specification(s). The data value in each command for the attribute must fall within the valid range described in the specification(s).
- disabled: true
+ - label: "TH reads from the DUT the (0x0001) CurrentScene attribute"
+ PICS: S.S.A0001
+ command: "readAttribute"
+ attribute: "CurrentScene"
+ response:
+ constraints:
+ type: int8u
- - label:
- "TH writes the respective default value to all mandatory attributes to
- DUT one at a time."
- verification: |
- If the access control of DUT is set to READ, the DUT response will indicate that the attribute write command was not a SUCCESS. If the access control of DUT is set to READ/WRITE, the DUT response will indicate that the write command was a SUCCESS.
- disabled: true
+ - label: "TH reads from the DUT the (0x0002) CurrentGroup attribute"
+ PICS: S.S.A0002
+ command: "readAttribute"
+ attribute: "CurrentGroup"
+ response:
+ constraints:
+ type: groupid
- - label: "TH reads back all attributes written in step 3a."
- verification: |
- If the Status field of the write attributes response command frame was equal to SUCCESS, the updated value is read back. If the Status field of the write attributes response command frame was not equal to SUCCESS the value is not updated when read back.
- disabled: true
+ - label: "TH reads from the DUT the (0x0003) SceneValid attribute"
+ PICS: S.S.A0003
+ command: "readAttribute"
+ attribute: "SceneValid"
+ response:
+ constraints:
+ type: uint8
- - label: "TH reads each optional attributes from DUT one at a time."
- verification: |
- If the DUT implements the attribute, the Status field will be equal to SUCCESS and the command will contain the requested attribute. If the DUT does not implement the attribute, the Status field will not be equal to SUCCESS. The data type in each command must match the value listed in the specification(s). The data value in each command for the attribute must fall within the valid range described in the specification(s).
- disabled: true
+ - label: "TH reads from the DUT the (0x0004) NameSupport attribute"
+ PICS: S.S.A0003 && S.S.F00
+ command: "readAttribute"
+ attribute: "NameSupport"
+ response:
+ value: 0x80
+ constraints:
+ type: uint8
- - label:
- "TH writes the respective default value to each optional attributes to
- DUT one at a time."
- verification: |
- If the attribute is not implemented or the access control of DUT is set to READ, the DUT response will indicate that the attribute write command was not a SUCCESS. If the attribute is implemented and the access control of DUT is set to READ/WRITE, the DUT response will indicate that the write command was a SUCCESS.
- disabled: true
+ - label: "TH reads from the DUT the (0x0004) NameSupport attribute"
+ PICS: S.S.A0004 && (!S.S.F00)
+ command: "readAttribute"
+ attribute: "NameSupport"
+ response:
+ value: 0x00
+ constraints:
+ type: uint8
- - label: "TH reads back all attributes written in step 5a."
- verification: |
- If the Status field of the write attributes response command frame was equal to SUCCESS, the updated value is read back. If the Status field of the write attributes response command frame was not equal to SUCCESS the value is not updated when read back.
- disabled: true
+ - label: "TH reads from the DUT the (0x0005) LastConfiguredBy attribute"
+ PICS: S.S.A0005
+ command: "readAttribute"
+ attribute: "LastConfiguredBy"
+ response:
+ constraints:
+ type: nodeId
+
+ - label: "TH reads from the DUT the (0x0006) SceneTableSize attribute"
+ PICS: S.S.A0006
+ command: "readAttribute"
+ attribute: "SceneTableSize"
+ response:
+ constraints:
+ type: uint16
+
+ - label: "TH reads from the DUT the (0x0007) RemainingCapacity attribute"
+ PICS: S.S.A0007
+ command: "readAttribute"
+ attribute: "RemainingCapacity"
+ response:
+ constraints:
+ type: uint8
diff --git a/src/app/tests/suites/certification/Test_TC_S_2_2.yaml b/src/app/tests/suites/certification/Test_TC_S_2_2.yaml
index 651a61c2a4d8f4..52143ae602f2e0 100644
--- a/src/app/tests/suites/certification/Test_TC_S_2_2.yaml
+++ b/src/app/tests/suites/certification/Test_TC_S_2_2.yaml
@@ -20,273 +20,980 @@ PICS:
config:
nodeId: 0x12344321
- cluster: "Basic Information"
- endpoint: 0
+ cluster: "Scenes"
+ endpoint: 1
tests:
+ - label: "Wait for the commissioned device to be retrieved"
+ cluster: "DelayCommands"
+ command: "WaitForCommissionee"
+ arguments:
+ values:
+ - name: "nodeId"
+ value: nodeId
+
- label: "TH sends a RemoveAllGroups command to DUT."
PICS: G.S.C04.Rsp
- verification: |
- If a status response is expected, DUT sends a response to TH with the Status field equal to 0x00 (SUCCESS).
- disabled: true
-
- - label:
- "preparation step for using commands from Groups cluster: TH generates
- fabric-unique GroupID, GroupName, random key, EpochKey0 and
- GroupKeySetID. TH sets GroupKeySecurityPolicy = TrustFirst (1)
- GroupKeyMulticastPolicy = PerGroupID (0) EpochStartTime0 = 0"
- verification: |
-
- disabled: true
+ cluster: "Groups"
+ endpoint: "1"
+ command: "RemoveAllGroups"
+
+ - label: "TH reads from the DUT the (0x0006) SceneTableSize attribute"
+ PICS: S.S.A0006
+ command: "readAttribute"
+ attribute: "SceneTableSize"
+ response:
+ values:
+ - name: "SceneTableSize"
+ saveAs: maxScenes
+ constraints:
+ type: uint16
+
+ - label:
+ "preparation step for using commands from Groups cluster: Add KeySet"
+ cluster: "Group Key Management"
+ endpoint: 0
+ command: "KeySetWrite"
+ arguments:
+ values:
+ - name: "GroupKeySet"
+ value:
+ {
+ GroupKeySetID: 0x01a1,
+ GroupKeySecurityPolicy: 0,
+ EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf",
+ EpochStartTime0: 0,
+ EpochKey1: "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf",
+ EpochStartTime1: 0,
+ EpochKey2: "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
+ EpochStartTime2: 0,
+ }
+
+ - label:
+ "Preparation step for using commands from Groups cluster: Write Group
+ Keys"
+ cluster: "Group Key Management"
+ endpoint: 0
+ command: "writeAttribute"
+ attribute: "GroupKeyMap"
+ arguments:
+ value:
+ [
+ { FabricIndex: 1, GroupId: 0x0001, GroupKeySetID: 0x01a1 },
+ { FabricIndex: 1, GroupId: 0x0002, GroupKeySetID: 0x01a1 },
+ ]
- label:
"TH sends a AddGroup command to DUT with the GroupID field set to
0x0001."
PICS: G.S.C00.Rsp
- verification: |
- DUT sends a AddGroupResponse command to TH with the Status field set to 0x00 (SUCCESS) and the GroupID field set to 0x0001.
- disabled: true
+ cluster: "Groups"
+ command: "AddGroup"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: 0x0001
+ - name: "GroupName"
+ value: "Group1"
+ response:
+ values:
+ - name: "Status"
+ value: 0
+ - name: "GroupID"
+ value: 0x0001
- label:
"TH sends a RemoveAllScenes command to DUT with the GroupID field set
to 0x0001."
PICS: S.S.C03.Rsp
- verification: |
- DUT sends a RemoveAllScenesResponse command to TH with the Status field set to 0x00 (SUCCESS) and GroupID field set to 0x0001.
- disabled: true
+ command: "RemoveAllScenes"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: 0x0001
+ response:
+ values:
+ - name: "Status"
+ value: 0
+ - name: "GroupID"
+ value: 0x0001
- label:
"TH sends a GetSceneMembership command to DUT with the GroupID field
set to 0x0001."
PICS: S.S.C06.Rsp
- verification: |
- DUT sends a GetSceneMembershipResponse command to TH with the Status field set to 0x00 (SUCCESS), the Capacity field set to the value SC0, the GroupID field set to 0x0001 and the SceneCount field set to 0x00.
- disabled: true
+ command: "GetSceneMembership"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: 0x0001
+ response:
+ values:
+ - name: "Status"
+ value: 0x00
+ - name: "Capacity"
+ value: (maxScenes/2)
+ - name: "GroupID"
+ value: 0x0001
+
+ - label:
+ "TH configures AC1 on DUT for all implemented application clusters
+ supporting scenes."
+ PICS: PICS_SDK_CI_ONLY
+ cluster: "Level Control"
+ command: "MoveToLevelWithOnOff"
+ arguments:
+ values:
+ - name: "Level"
+ value: 100
+ - name: "TransitionTime"
+ value: 0
+ - name: "OptionsMask"
+ value: 0
+ - name: "OptionsOverride"
+ value: 0
- label:
"TH configures AC1 on DUT for all implemented application clusters
supporting scenes."
verification: |
- DUT is configured with AC1.
- disabled: true
+ Is DUT configured with AC1?
+ cluster: "LogCommands"
+ command: "UserPrompt"
+ PICS: PICS_SKIP_SAMPLE_APP
+ arguments:
+ values:
+ - name: "message"
+ value:
+ "Please configure AC1 on DUT and enter 'y' after the
+ configuration is complete"
+ - name: "expectedValue"
+ value: "y"
- label:
"TH sends a StoreScene command to DUT with the GroupID field set to
0x0001 and the SceneID field set to 0x01."
PICS: S.S.C04.Rsp
- verification: |
- DUT sends a StoreSceneResponse command to TH with the Status field set to 0x00 (SUCCESS), the GroupID field set to 0x0001 and the SceneID field set to 0x01.
- disabled: true
+ command: "StoreScene"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: 0x0001
+ - name: "SceneID"
+ value: 0x01
+ response:
+ values:
+ - name: "Status"
+ value: 0x00
+ - name: "GroupID"
+ value: 0x0001
+ - name: "SceneID"
+ value: 0x01
+
+ - label:
+ "TH configures AC2 on DUT for all implemented application clusters
+ supporting scenes."
+ cluster: "Level Control"
+ PICS: PICS_SDK_CI_ONLY
+ command: "MoveToLevelWithOnOff"
+ arguments:
+ values:
+ - name: "Level"
+ value: 200
+ - name: "TransitionTime"
+ value: 0
+ - name: "OptionsMask"
+ value: 0
+ - name: "OptionsOverride"
+ value: 0
- label:
"TH configures AC2 on DUT for all implemented application clusters
supporting scenes."
verification: |
- DUT is configured with AC2 which is different from AC1.
- disabled: true
+ Is DUT configured with AC2?
+ cluster: "LogCommands"
+ command: "UserPrompt"
+ PICS: PICS_SKIP_SAMPLE_APP
+ arguments:
+ values:
+ - name: "message"
+ value:
+ "Please configure AC2 on DUT and enter 'y' after the
+ configuration is complete"
+ - name: "expectedValue"
+ value: "y"
- label:
"TH sends a RecallScene command to DUT with the GroupID field set to
0x0001 and the SceneID field set to 0x01."
PICS: S.S.C05.Rsp
- verification: |
- If a status response is expected, DUT sends a response to TH with the Status field equal to 0x00 (SUCCESS). DUT returns to AC1.
- disabled: true
-
- - label:
- "TH reads attributes SceneCount, CurrentScene, CurrentGroup and
- SceneValid from DUT."
+ command: "RecallScene"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: 0x0001
+ - name: "SceneID"
+ value: 0x01
+
+ - label: "TH reads the SceneCount attribute from DUT."
PICS: S.S.A0000 && S.S.A0001 && S.S.A0002 && S.S.A0003
- verification: |
- DUT provides these attribute values: SceneCount attribute has the value (PIXIT.S.SceneTableEntriesOnFactoryNew + 1) CurrentScene attribute has the value 0x01 CurrentGroup attribute has the value G1 SceneValid attribute has the value TRUE.
- disabled: true
-
- - label: "By application specific means, remove the power source from DUT."
- verification: |
- DUT is powered off.
- disabled: true
+ command: "readAttribute"
+ attribute: "SceneCount"
+ response:
+ value: 1
+ constraints:
+ type: int8u
+
+ - label: "TH reads the CurrentScene attribute from DUT."
+ PICS: S.S.A0000 && S.S.A0001 && S.S.A0002 && S.S.A0003
+ command: "readAttribute"
+ attribute: "CurrentScene"
+ response:
+ value: 0x01
+ constraints:
+ type: int8u
+
+ - label: "TH reads the CurrentGroup attribute from DUT."
+ PICS: S.S.A0000 && S.S.A0001 && S.S.A0002 && S.S.A0003
+ command: "readAttribute"
+ attribute: "CurrentGroup"
+ response:
+ value: 0x0001
+ constraints:
+ type: groupid
+
+ - label: "TH reads the SceneValid attribute from DUT."
+ PICS: S.S.A0000 && S.S.A0001 && S.S.A0002 && S.S.A0003
+ command: "readAttribute"
+ attribute: "SceneValid"
+ response:
+ value: true
+ constraints:
+ type: uint8
+
+ - label: "Reboot target device"
+ PICS: PICS_SDK_CI_ONLY
+ cluster: "SystemCommands"
+ endpoint: 0
+ command: "Reboot"
+
+ - label: "Reboot target device(DUT)"
+ verification: |
+ Did the DUT successfully reboot?
+ cluster: "LogCommands"
+ command: "UserPrompt"
+ PICS: PICS_SKIP_SAMPLE_APP
+ arguments:
+ values:
+ - name: "message"
+ value: "Please reboot the DUT and enter 'y' after DUT starts"
+ - name: "expectedValue"
+ value: "y"
- - label: "By application specific means, return the power source to DUT."
- verification: |
- DUT is powered on.
- disabled: true
+ - label:
+ "TH configures AC2 on DUT for all implemented application clusters
+ supporting scenes."
+ cluster: "Level Control"
+ PICS: PICS_SDK_CI_ONLY
+ command: "MoveToLevelWithOnOff"
+ arguments:
+ values:
+ - name: "Level"
+ value: 200
+ - name: "TransitionTime"
+ value: 0
+ - name: "OptionsMask"
+ value: 0
+ - name: "OptionsOverride"
+ value: 0
- label:
"TH configures AC2 on DUT for all implemented application clusters
supporting scenes."
verification: |
- DUT is configured with AC2 which is different from AC1.
- disabled: true
+ Is DUT configured with AC2?
+ cluster: "LogCommands"
+ command: "UserPrompt"
+ PICS: PICS_SKIP_SAMPLE_APP
+ arguments:
+ values:
+ - name: "message"
+ value:
+ "Please configure AC2 on DUT and enter 'y' after the
+ configuration is complete"
+ - name: "expectedValue"
+ value: "y"
- label:
"TH sends a RecallScene command to DUT with the GroupID field set to
0x0001 and the SceneID field set to 0x01."
PICS: S.S.C05.Rsp
- verification: |
- If a status response is expected, DUT sends a response to TH with the Status field equal to 0x00 (SUCCESS). DUT returns to AC1.
- disabled: true
+ command: "RecallScene"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: 0x0001
+ - name: "SceneID"
+ value: 0x01
- label:
"TH sends a ViewScene command to DUT with the GroupID field set to
0x0001 and the SceneID field set to 0x01."
- PICS: S.S.C01.Rsp
- verification: |
- DUT sends a ViewSceneResponse command to TH with the Status field set to 0x00 (SUCCESS), the GroupID field set to 0x0001, the SceneID field set to 0x01, the TransitionTime field set to 0x0000 and a set of extension fields appropriate to AC1.
- disabled: true
+ PICS: S.S.C01.Rsp && PICS_SDK_CI_ONLY
+ command: "ViewScene"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: 0x0001
+ - name: "SceneID"
+ value: 0x01
+ response:
+ values:
+ - name: "Status"
+ value: 0x00
+ - name: "GroupID"
+ value: 0x0001
+ - name: "SceneID"
+ value: 0x01
+ - name: "TransitionTime"
+ value: 0x0000
+ - name: "ExtensionFieldSets"
+ value:
+ [
+ {
+ ClusterID: 0x0006,
+ AttributeValueList:
+ [{ AttributeID: 0x0000, AttributeValue: 0x01 }],
+ },
+ {
+ ClusterID: 0x0008,
+ AttributeValueList:
+ [
+ {
+ AttributeID: 0x0000,
+ AttributeValue: 0x64,
+ },
+ {
+ AttributeID: 0x0001,
+ AttributeValue: 0x00,
+ },
+ ],
+ },
+ ]
+
+ - label:
+ "TH sends a ViewScene command to DUT with the GroupID field set to
+ 0x0001 and the SceneID field set to 0x01."
+ PICS: S.S.C01.Rsp && PICS_SKIP_SAMPLE_APP
+ command: "ViewScene"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: 0x0001
+ - name: "SceneID"
+ value: 0x01
+ response:
+ values:
+ - name: "Status"
+ value: 0x00
+ - name: "GroupID"
+ value: 0x0001
+ - name: "SceneID"
+ value: 0x01
+ - name: "TransitionTime"
+ value: 0x0000
- label:
"TH sends a GetSceneMembership command to DUT with the GroupID field
set to 0x0001."
PICS: S.S.C06.Rsp
- verification: |
- DUT sends a GetSceneMembershipResponse command to TH with the Status field set to 0x00 (SUCCESS), the Capacity field set to one of the values (SC0 - 1), 0xfe or null, the GroupID field set to 0x0001, the SceneCount field set to 0x01 and the SceneList field containing only the scene ID 0x01.
- disabled: true
+ command: "GetSceneMembership"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: 0x0001
+ response:
+ values:
+ - name: "Status"
+ value: 0x00
+ - name: "Capacity"
+ value: (maxScenes/2) - 1
+ - name: "GroupID"
+ value: 0x0001
+ - name: "SceneList"
+ value: [0x01]
- label:
"TH sends a RemoveAllScenes command to DUT with the GroupID field set
to 0x0001."
PICS: S.S.C03.Rsp
- verification: |
- DUT sends a RemoveAllScenesResponse command to TH with the Status field set to 0x00 (SUCCESS) and GroupID field set to 0x0001.
- disabled: true
+ command: "RemoveAllScenes"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: 0x0001
+ response:
+ values:
+ - name: "Status"
+ value: 0
+ - name: "GroupID"
+ value: 0x0001
- label:
"TH sends a GetSceneMembership command to DUT with the GroupID field
set to 0x0001."
PICS: S.S.C06.Rsp
- verification: |
- DUT sends a GetSceneMembershipResponse command to TH with the Status field set to 0x00 (SUCCESS), the Capacity field set to one of the values SC0, 0xfe or null, the GroupID field set to 0x0001 and the SceneCount field set to 0x00.
- disabled: true
+ command: "GetSceneMembership"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: 0x0001
+ response:
+ values:
+ - name: "Status"
+ value: 0x00
+ - name: "Capacity"
+ value: (maxScenes/2)
+ - name: "GroupID"
+ value: 0x0001
+ # TODO : For Capacity, replace "value: (maxScenes/2)" by following lines when new backend for test is used in CI
+ # constraints:
+ # anyOf: [(maxScenes/2), 0xfe ,0x89]
+
+ - label:
+ "TH sends a AddScene command to DUT with the GroupID field set to
+ 0x0001, the SceneID field set to 0x01, the TransitionTime field set to
+ 0x0001 and a set of extension fields appropriate to AC1."
+ PICS: S.S.C00.Rsp && && PICS_SDK_CI_ONLY
+ command: "AddScene"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: 0x0001
+ - name: "SceneID"
+ value: 0x0001
+ - name: "TransitionTime"
+ value: 0x0001
+ - name: "SceneName"
+ value: "Scene1"
+ - name: "ExtensionFieldSets"
+ value:
+ [
+ {
+ ClusterID: 0x0006,
+ AttributeValueList:
+ [{ AttributeID: 0x0000, AttributeValue: 0x01 }],
+ },
+ {
+ ClusterID: 0x0008,
+ AttributeValueList:
+ [
+ {
+ AttributeID: 0x0000,
+ AttributeValue: 0x64,
+ },
+ {
+ AttributeID: 0x0001,
+ AttributeValue: 0x00,
+ },
+ ],
+ },
+ ]
+ response:
+ values:
+ - name: "Status"
+ value: 0x00
+ - name: "GroupID"
+ value: 0x0001
+ - name: "SceneID"
+ value: 0x01
- label:
"TH sends a AddScene command to DUT with the GroupID field set to
0x0001, the SceneID field set to 0x01, the TransitionTime field set to
0x0001 and a set of extension fields appropriate to AC1."
- PICS: S.S.C00.Rsp
verification: |
- DUT sends a AddSceneResponse command to TH with the Status field set to 0x00 (SUCCESS), the GroupID field set to 0x0001 and the SceneID field set to 0x01.
- disabled: true
+ Execute the following command in TH to generate the pre-condition to execute this test case:
+
+ ./chip-tool scenes add-scene 0x0001 1 1 "Test Name" '[{"clusterId": value, "attributeValueList":[{"attributeId": value, "attributeValue": value}]}' nodeId endpointId
+
+ Note: The number of ExtensionFieldSets, the value of clusterId of each ExtensionFieldSet, the number of attributes in attributeValueList and their values varies for each application
+
+ Verify the "status is success" on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform:
+ [1670970505.887060][5742:5744] CHIP:DMG: InvokeResponseMessage =
+ [1670970505.887118][5742:5744] CHIP:DMG: {
+ [1670970505.887172][5742:5744] CHIP:DMG: suppressResponse = false,
+ [1670970505.887231][5742:5744] CHIP:DMG: InvokeResponseIBs =
+ [1670970505.887307][5742:5744] CHIP:DMG: [
+ [1670970505.887366][5742:5744] CHIP:DMG: InvokeResponseIB =
+ [1670970505.887444][5742:5744] CHIP:DMG: {
+ [1670970505.887507][5742:5744] CHIP:DMG: CommandDataIB =
+ [1670970505.887576][5742:5744] CHIP:DMG: {
+ [1670970505.887713][5742:5744] CHIP:DMG: CommandPathIB =
+ [1670970505.887804][5742:5744] CHIP:DMG: {
+ [1670970505.887940][5742:5744] CHIP:DMG: EndpointId = 0x1,
+ [1670970505.888093][5742:5744] CHIP:DMG: ClusterId = 0x5,
+ [1670970505.888242][5742:5744] CHIP:DMG: CommandId = 0x0,
+ [1670970505.888385][5742:5744] CHIP:DMG: },
+ [1670970505.888692][5742:5744] CHIP:DMG:
+ [1670970505.888769][5742:5744] CHIP:DMG: CommandFields =
+ [1670970505.888852][5742:5744] CHIP:DMG: {
+ [1670970505.889030][5742:5744] CHIP:DMG: 0x0 = 0,
+ [1670970505.889183][5742:5744] CHIP:DMG: 0x1 = 1,
+ [1670970505.889406][5742:5744] CHIP:DMG: 0x2 = 1,
+ [1670970505.889515][5742:5744] CHIP:DMG: },
+ [1670970505.889603][5742:5744] CHIP:DMG: },
+ [1670970505.889684][5742:5744] CHIP:DMG:
+ [1670970505.889745][5742:5744] CHIP:DMG: },
+ [1670970505.889821][5742:5744] CHIP:DMG:
+ [1670970505.889878][5742:5744] CHIP:DMG: ],
+ [1670970505.889953][5742:5744] CHIP:DMG:
+ [1670970505.890009][5742:5744] CHIP:DMG: InteractionModelRevision = 1
+ [1670970505.890066][5742:5744] CHIP:DMG: },
+ [1670970505.890212][5742:5744] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0005 Command=0x0000_0000
+ [1670970505.890328][5742:5744] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0005 Command 0x0000_0000
+ [1670970505.890458][5742:5744] CHIP:TOO: AddSceneResponse: {
+ [1670970505.890551][5742:5744] CHIP:TOO: status: 0
+ [1670970505.890608][5742:5744] CHIP:TOO: groupId: 1
+ [1670970505.890717][5742:5744] CHIP:TOO: sceneId: 1
+ [1670970505.890774][5742:5744] CHIP:TOO: }
+ cluster: "LogCommands"
+ command: "UserPrompt"
+ PICS: PICS_SKIP_SAMPLE_APP
+ arguments:
+ values:
+ - name: "message"
+ value:
+ "Please execute the add scene command with
+ extensionfieldsets in accordance with AC1 on DUT and enter
+ 'y' if the command is successful"
+ - name: "expectedValue"
+ value: "y"
- label:
"TH sends a GetSceneMembership command to DUT with the GroupID field
set to 0x0001."
PICS: S.S.C06.Rsp
- verification: |
- DUT sends a GetSceneMembershipResponse command to TH with the Status field set to 0x00 (SUCCESS), the Capacity field set to one of the values (SC0 - 1), 0xfe or null, the GroupID field set to 0x0001, the SceneCount field set to 0x01 and the SceneList field containing only the scene ID 0x01.
- disabled: true
+ command: "GetSceneMembership"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: 0x0001
+ response:
+ values:
+ - name: "Status"
+ value: 0x00
+ - name: "Capacity"
+ value: (maxScenes/2) - 1
+ - name: "GroupID"
+ value: 0x0001
+ - name: "SceneList"
+ value: [0x01]
+ # TODO : For Capacity, replace "value: (maxScenes/2)" by following lines when new backend for test is used in CI
+ # constraints:
+ # anyOf: [(maxScenes/2), 0xfe ,0x89]
- label:
"TH sends a RemoveScene command to DUT with the GroupID field set to
0x0001 and the SceneID field set to 0x01."
PICS: S.S.C02.Rsp
- verification: |
- DUT sends a RemoveSceneResponse command to TH with the Status field set to 0x00 (SUCCESS), the GroupID field set to 0x0001 and the SceneID field set to 0x01.
- disabled: true
+ command: "RemoveScene"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: 0x0001
+ - name: "SceneID"
+ value: 0x0001
+ response:
+ values:
+ - name: "Status"
+ value: 0x00
+ - name: "GroupID"
+ value: 0x0001
+ - name: "SceneID"
+ value: 0x01
- label:
"TH sends a GetSceneMembership command to DUT with the GroupID field
set to 0x0001."
PICS: S.S.C06.Rsp
- verification: |
- DUT sends a GetSceneMembershipResponse command to TH with the Status field set to 0x00 (SUCCESS), the Capacity field set to one of the values SC0, 0xfe or null, the GroupID field set to 0x0001 and the SceneCount field set to 0x00.
- disabled: true
+ command: "GetSceneMembership"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: 0x0001
+ response:
+ values:
+ - name: "Status"
+ value: 0x00
+ - name: "Capacity"
+ value: (maxScenes/2)
+ - name: "GroupID"
+ value: 0x0001
+ # TODO : For Capacity, replace "value: (maxScenes/2)" by following lines when new backend for test is used in CI
+ # constraints:
+ # anyOf: [(maxScenes/2), 0xfe ,0x89]
+
+ - label:
+ "TH configures AC2 on DUT for all implemented application clusters
+ supporting scenes."
+ cluster: "Level Control"
+ PICS: PICS_SDK_CI_ONLY
+ command: "MoveToLevelWithOnOff"
+ arguments:
+ values:
+ - name: "Level"
+ value: 200
+ - name: "TransitionTime"
+ value: 0
+ - name: "OptionsMask"
+ value: 0
+ - name: "OptionsOverride"
+ value: 0
- label:
"TH configures AC2 on DUT for all implemented application clusters
supporting scenes."
verification: |
- DUT is configured with AC2 which is different from AC1.
- disabled: true
+ Is DUT configured with AC2?
+ cluster: "LogCommands"
+ command: "UserPrompt"
+ PICS: PICS_SKIP_SAMPLE_APP
+ arguments:
+ values:
+ - name: "message"
+ value:
+ "Please configure AC2 on DUT and enter 'y' after the
+ configuration is complete"
+ - name: "expectedValue"
+ value: "y"
- label:
"TH sends a RecallScene command to DUT with the GroupID field set to
0x0001 and the SceneID field set to 0x01."
PICS: S.S.C05.Rsp
- verification: |
- If a status response is expected, DUT sends a response to TH with the Status field equal to 0x8b (NOT_FOUND).
- disabled: true
+ command: "RecallScene"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: 0x0001
+ - name: "SceneID"
+ value: 0x01
+ response:
+ error: NOT_FOUND
+
+ - label:
+ "TH configures AC1 on DUT for all implemented application clusters
+ supporting scenes."
+ cluster: "Level Control"
+ PICS: PICS_SDK_CI_ONLY
+ command: "MoveToLevelWithOnOff"
+ arguments:
+ values:
+ - name: "Level"
+ value: 100
+ - name: "TransitionTime"
+ value: 0
+ - name: "OptionsMask"
+ value: 0
+ - name: "OptionsOverride"
+ value: 0
- label:
"TH configures AC1 on DUT for all implemented application clusters
supporting scenes."
verification: |
- DUT is configured with AC1.
- disabled: true
+ Is DUT configured with AC1?
+ cluster: "LogCommands"
+ command: "UserPrompt"
+ PICS: PICS_SKIP_SAMPLE_APP
+ arguments:
+ values:
+ - name: "message"
+ value:
+ "Please configure AC1 on DUT and enter 'y' after the
+ configuration is complete"
+ - name: "expectedValue"
+ value: "y"
- label:
"TH sends a StoreScene command to DUT with the GroupID field set to
0x0001 and the SceneID field set to 0x01."
PICS: S.S.C04.Rsp
- verification: |
- DUT sends a StoreSceneResponse command to TH with the Status field set to 0x00 (SUCCESS), the GroupID field set to 0x0001 and the SceneID field set to 0x01.
- disabled: true
+ command: "StoreScene"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: 0x0001
+ - name: "SceneID"
+ value: 0x01
+ response:
+ values:
+ - name: "Status"
+ value: 0x00
+ - name: "GroupID"
+ value: 0x0001
+ - name: "SceneID"
+ value: 0x01
+
+ - label:
+ "TH configures AC2 on DUT for all implemented application clusters
+ supporting scenes."
+ cluster: "Level Control"
+ PICS: PICS_SDK_CI_ONLY
+ command: "MoveToLevelWithOnOff"
+ arguments:
+ values:
+ - name: "Level"
+ value: 200
+ - name: "TransitionTime"
+ value: 0
+ - name: "OptionsMask"
+ value: 0
+ - name: "OptionsOverride"
+ value: 0
- label:
"TH configures AC2 on DUT for all implemented application clusters
supporting scenes."
verification: |
- DUT is configured with AC2 which is different to AC1.
- disabled: true
+ Is DUT configured with AC2?
+ cluster: "LogCommands"
+ command: "UserPrompt"
+ PICS: PICS_SKIP_SAMPLE_APP
+ arguments:
+ values:
+ - name: "message"
+ value:
+ "Please configure AC2 on DUT and enter 'y' after the
+ configuration is complete"
+ - name: "expectedValue"
+ value: "y"
- label:
"TH sends a StoreScene command to DUT with the GroupID field set to
0x0001 and the SceneID field set to 0x02."
PICS: S.S.C04.Rsp
- verification: |
- DUT sends a StoreSceneResponse command to TH with the Status field set to 0x00 (SUCCESS) or 0x89 (INSUFFICIENT_SPACE). If SUCCESS, with the GroupID field set to 0x0001 and the SceneID field set to 0x02. If INSUFFICIENT_SPACE, the following steps SHALL NOT be executed.
- disabled: true
+ command: "StoreScene"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: 0x0001
+ - name: "SceneID"
+ value: 0x02
+ response:
+ values:
+ - name: "Status"
+ value: 0x00
+ - name: "GroupID"
+ value: 0x0001
+ - name: "SceneID"
+ value: 0x02
+ # TODO: For status, replace "- value: 0x00" by following lines when new backend for test is used in CI
+ # saveAs: StoreStatus
+ # constraints:
+ # anyOf: [0x00, 0x89]
+
+ # TODO: Uncomment once the new backend is implemented, allowing the use of EqualityCommands pseudo cluster
+ #- label:
+ # "Verify that the status of previous command was either 0x00 (SUCCESS)
+ # or 0x89 (INSUFFICIENT_SPACE)"
+ # cluster: "EqualityCommands"
+ # command: "UnsignedNumberEquals"
+ # arguments:
+ # values:
+ # - name: "Value1"
+ # value: 0x00
+ # - name: "Value2"
+ # value: StoreStatus
+ # response:
+ # - values:
+ # - name: "Equals"
+ # value: true
+ # saveAs: ContinueTest
- label:
"TH sends a GetSceneMembership command to DUT with the GroupID field
set to 0x0001."
+ # TODO : Uncomment runIf statement once new test backend is implemented
+ #runIf: ContinueTest
PICS: S.S.C06.Rsp
- verification: |
- DUT sends a GetSceneMembershipResponse command to TH with the Status field set to 0x00 (SUCCESS), the Capacity field set to one of the values (SC0 - 2), 0xfe or null, the GroupID field set to 0x0001, the SceneCount field set to 0x02 and the SceneList field containing the scene IDs 0x01 and 0x02.
- disabled: true
+ command: "GetSceneMembership"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: 0x0001
+ response:
+ values:
+ - name: "Status"
+ value: 0x00
+ - name: "Capacity"
+ value: (maxScenes/2) - 2
+ - name: "GroupID"
+ value: 0x0001
+ - name: "SceneList"
+ value: [0x01, 0x02]
- label:
"If capacity allows, TH sends a AddGroup command to DUT with the
GroupID field set to 0x0002."
+ # TODO : Uncomment runIf statement once new test backend is implemented
+ #runIf: ContinueTest
PICS: G.S.C00.Rsp
- verification: |
- DUT sends a AddGroupResponse command to TH with the Status field set to 0x00 (SUCCESS) and the GroupID field set to 0x0002.
- disabled: true
+ cluster: "Groups"
+ command: "AddGroup"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: 0x0002
+ - name: "GroupName"
+ value: "Group2"
+ response:
+ values:
+ - name: "Status"
+ value: 0
+ - name: "GroupID"
+ value: 0x0002
- label:
"TH sends a RemoveAllScenes command to DUT with the GroupID field set
to 0x0002."
+ # TODO : Uncomment runIf statement once new test backend is implemented
+ #runIf: ContinueTest
PICS: S.S.C03.Rsp
- verification: |
- DUT sends a RemoveAllScenesResponse command to TH with the Status field set to 0x00 (SUCCESS) and GroupID field set to 0x0002.
- disabled: true
+ command: "RemoveAllScenes"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: 0x0002
+ response:
+ values:
+ - name: "Status"
+ value: 0
+ - name: "GroupID"
+ value: 0x0002
- label:
"TH sends a GetSceneMembership command to DUT with the GroupID field
set to 0x0002."
+ # TODO : Uncomment runIf statement once new test backend is implemented
+ #runIf: ContinueTest
PICS: S.S.C06.Rsp
- verification: |
- DUT sends a GetSceneMembershipResponse command to TH with the Status field set to 0x00 (SUCCESS), the Capacity field set to the value SC1, the GroupID field set to 0x0002 and the SceneCount field set to 0x00.
- disabled: true
+ command: "GetSceneMembership"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: 0x0002
+ response:
+ values:
+ - name: "Status"
+ value: 0x00
+ - name: "Capacity"
+ value: (maxScenes/2) - 2
+ - name: "GroupID"
+ value: 0x0002
- label:
"TH configures AC3 on DUT for all implemented application clusters
supporting scenes."
- verification: |
- DUT is configured with AC3 which is different to both AC1 and AC2.
- disabled: true
+ # TODO : Uncomment runIf statement once new test backend is implemented
+ #runIf: ContinueTest
+ cluster: "Level Control"
+ PICS: PICS_SDK_CI_ONLY
+ command: "MoveToLevelWithOnOff"
+ arguments:
+ values:
+ - name: "Level"
+ value: 1
+ - name: "TransitionTime"
+ value: 0
+ - name: "OptionsMask"
+ value: 0
+ - name: "OptionsOverride"
+ value: 0
+
+ - label:
+ "TH configures AC3 on DUT for all implemented application clusters
+ supporting scenes."
+ # TODO : Uncomment runIf statement once new test backend is implemented
+ #runIf: ContinueTest
+ verification: |
+ Is DUT configured with AC3?
+ cluster: "LogCommands"
+ command: "UserPrompt"
+ PICS: PICS_SKIP_SAMPLE_APP
+ arguments:
+ values:
+ - name: "message"
+ value:
+ "Please configure AC3 on DUT and enter 'y' after the
+ configuration is complete"
+ - name: "expectedValue"
+ value: "y"
- label:
"TH sends a StoreScene command to DUT with the GroupID field set to
0x0002 and the SceneID field set to 0x03."
+ # TODO : Uncomment runIf statement once new test backend is implemented
+ #runIf: ContinueTest
PICS: S.S.C04.Rsp
- verification: |
- DUT sends a StoreSceneResponse command to TH with the Status field set to 0x00 (SUCCESS) or 0x89 (INSUFFICIENT_SPACE). If SUCCESS, with the GroupID field set to 0x0002 and the SceneID field set to 0x03. IF INSUFFICIENT_SPACE, the following steps SHALL NOT be executed.
- disabled: true
+ command: "StoreScene"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: 0x0002
+ - name: "SceneID"
+ value: 0x03
+ response:
+ values:
+ - name: "Status"
+ value: 0x00
+ - name: "GroupID"
+ value: 0x0002
+ - name: "SceneID"
+ value: 0x03
+ # TODO: For Status, replace "- value: 0x00"by following lines when new backend for test is used in CI
+ # saveAs: StoreStatus
+ # constraints:
+ # anyOf: [0x00, 0x89]
+
+ # TODO: Uncomment once the new backend is implemented, allowing the use of EqualityCommands pseudo cluster
+ #- label:
+ # "Verify that the status of previous command was either 0x00 (SUCCESS)
+ # or 0x89 (INSUFFICIENT_SPACE)"
+ # runIf: ContinueTest
+ # cluster: "EqualityCommands"
+ # command: "UnsignedNumberEquals"
+ # arguments:
+ # values:
+ # - name: "Value1"
+ # value: 0x00
+ # - name: "Value2"
+ # value: StoreStatus
+ # response:
+ # - values:
+ # - name: "Equals"
+ # value: true
+ # saveAs: ContinueTest
- label:
"TH sends a GetSceneMembership command to DUT with the GroupID field
set to 0x0002."
+ #runIf: ContinueTest
PICS: S.S.C06.Rsp
- verification: |
- DUT sends a GetSceneMembershipResponse command to TH with the Status field set to 0x00 (SUCCESS), the Capacity field set to one of the values (SC1 - 3), 0xfe or null, the GroupID field set to 0x0002, the SceneCount field set to 0x01 and the SceneList field containing only the scene ID 0x03.
- disabled: true
+ command: "GetSceneMembership"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: 0x0002
+ response:
+ values:
+ - name: "Status"
+ value: 0x00
+ - name: "Capacity"
+ value: (maxScenes/2) - 3
+ - name: "GroupID"
+ value: 0x0002
+ - name: "SceneList"
+ value: [0x03]
diff --git a/src/app/tests/suites/certification/Test_TC_S_2_3.yaml b/src/app/tests/suites/certification/Test_TC_S_2_3.yaml
index 6abe8540d25882..b0fcf202937831 100644
--- a/src/app/tests/suites/certification/Test_TC_S_2_3.yaml
+++ b/src/app/tests/suites/certification/Test_TC_S_2_3.yaml
@@ -20,99 +20,580 @@ PICS:
config:
nodeId: 0x12344321
- cluster: "Basic Information"
- endpoint: 0
+ cluster: "Scenes"
+ endpoint: 1
+ G1:
+ type: int16u
+ defaultValue: 0x0001
tests:
+ - label: "Wait for the commissioned device to be retrieved"
+ cluster: "DelayCommands"
+ command: "WaitForCommissionee"
+ arguments:
+ values:
+ - name: "nodeId"
+ value: nodeId
+
+ - label: "TH reads from the DUT the (0x0006) SceneTableSize attribute"
+ PICS: S.S.A0006
+ command: "readAttribute"
+ attribute: "SceneTableSize"
+ response:
+ values:
+ - name: "SceneTableSize"
+ saveAs: maxScenes
+ constraints:
+ type: uint16
+
- label:
- "preparation step for using commands from Groups cluster: TH generates
- fabric-unique GroupID, GroupName, random key, EpochKey0 and
- GroupKeySetID. TH sets GroupKeySecurityPolicy = TrustFirst (1)
- GroupKeyMulticastPolicy = PerGroupID (0) EpochStartTime0 = 0"
- verification: |
+ "preparation step for using commands from Groups cluster: Add KeySet"
+ cluster: "Group Key Management"
+ endpoint: 0
+ command: "KeySetWrite"
+ arguments:
+ values:
+ - name: "GroupKeySet"
+ value:
+ {
+ GroupKeySetID: 0x01a1,
+ GroupKeySecurityPolicy: 0,
+ EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf",
+ EpochStartTime0: 0,
+ EpochKey1: "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf",
+ EpochStartTime1: 0,
+ EpochKey2: "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
+ EpochStartTime2: 0,
+ }
- disabled: true
+ - label:
+ "Preparation step for using commands from Groups cluster: Write Group
+ Keys"
+ cluster: "Group Key Management"
+ endpoint: 0
+ command: "writeAttribute"
+ attribute: "GroupKeyMap"
+ arguments:
+ value: [{ FabricIndex: 1, GroupId: G1, GroupKeySetID: 0x01a1 }]
- label:
"TH sends a AddGroup command to DUT with the GroupID field set to G1."
PICS: G.S.C00.Rsp
- verification: |
- DUT sends a AddGroupResponse command to TH with the Status field set to 0x00 (SUCCESS) or 0x8a (DUPLICATE_EXISTS) and the GroupID field set to G1.
- disabled: true
+ cluster: "Groups"
+ command: "AddGroup"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: G1
+ - name: "GroupName"
+ value: "Group1"
+ response:
+ values:
+ - name: "Status"
+ value: 0
+ - name: "GroupID"
+ value: G1
- label:
"TH sends a RemoveAllScenes command to DUT with the GroupID field set
to G1."
PICS: S.S.C03.Rsp
- verification: |
- DUT sends a RemoveAllScenesResponse command to TH with the Status field set to 0x00 (SUCCESS) and GroupID field set to G1.
- disabled: true
+ command: "RemoveAllScenes"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: G1
+ response:
+ values:
+ - name: "Status"
+ value: 0
+ - name: "GroupID"
+ value: G1
- label:
"TH sends a GetSceneMembership command to DUT with the GroupID field
set to G1."
PICS: S.S.C06.Rsp
- verification: |
- DUT sends a GetSceneMembershipResponse command to TH with the Status field set to 0x00 (SUCCESS), the Capacity field set to the value SC0, the GroupID field set to G1 and the SceneCount field set to 0x00.
- disabled: true
+ command: "GetSceneMembership"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: G1
+ response:
+ values:
+ - name: "Status"
+ value: 0x00
+ - name: "Capacity"
+ value: (maxScenes/2)
+ - name: "GroupID"
+ value: G1
+ - name: "SceneList"
+ value: []
- label:
"TH sends a EnhancedAddScene command to DUT with the GroupID field set
to G1, the SceneID field set to 0x01, the TransitionTime field set to
0x000a (1s) and a set of extension fields appropriate to AC1."
- PICS: S.S.C40.Rsp
- verification: |
- DUT sends a EnhancedAddSceneResponse command to TH with the Status field set to 0x00 (SUCCESS), the GroupID field set to G1 and the SceneID field set to 0x01.
- disabled: true
+ PICS: S.S.C40.Rsp && PICS_SDK_CI_ONLY
+ command: "EnhancedAddScene"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: G1
+ - name: "SceneID"
+ value: 0x0001
+ - name: "TransitionTime"
+ value: 0x000a
+ - name: "SceneName"
+ value: "Scene1"
+ - name: "ExtensionFieldSets"
+ value:
+ [
+ {
+ ClusterID: 0x0006,
+ AttributeValueList:
+ [{ AttributeID: 0x0000, AttributeValue: 0x01 }],
+ },
+ {
+ ClusterID: 0x0008,
+ AttributeValueList:
+ [
+ {
+ AttributeID: 0x0000,
+ AttributeValue: 0x64,
+ },
+ {
+ AttributeID: 0x0001,
+ AttributeValue: 0x00,
+ },
+ ],
+ },
+ ]
+ response:
+ values:
+ - name: "Status"
+ value: 0x00
+ - name: "GroupID"
+ value: G1
+ - name: "SceneID"
+ value: 0x01
- label:
"TH sends a AddScene command to DUT with the GroupID field set to G1,
the SceneID field set to 0x01, the TransitionTime field set to 0x0001
(1s) and a set of extension fields appropriate to AC1."
- PICS: S.S.C40.Rsp
+ PICS: (!S.S.C40.Rsp) && PICS_SDK_CI_ONLY
+ command: "AddScene"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: G1
+ - name: "SceneID"
+ value: 0x0001
+ - name: "TransitionTime"
+ value: 0x0001
+ - name: "SceneName"
+ value: "Scene1"
+ - name: "ExtensionFieldSets"
+ value:
+ [
+ {
+ ClusterID: 0x0006,
+ AttributeValueList:
+ [{ AttributeID: 0x0000, AttributeValue: 0x01 }],
+ },
+ {
+ ClusterID: 0x0008,
+ AttributeValueList:
+ [
+ {
+ AttributeID: 0x0000,
+ AttributeValue: 0x64,
+ },
+ {
+ AttributeID: 0x0001,
+ AttributeValue: 0x00,
+ },
+ ],
+ },
+ ]
+ response:
+ values:
+ - name: "Status"
+ value: 0x00
+ - name: "GroupID"
+ value: G1
+ - name: "SceneID"
+ value: 0x01
+
+ - label:
+ "TH sends a EnhancedAddScene command to DUT with the GroupID field set
+ to G1, the SceneID field set to 0x01, the TransitionTime field set to
+ 0x000a and a set of extension fields appropriate to AC1."
verification: |
- DUT sends a AddSceneResponse command to TH with the Status field set to 0x00 (SUCCESS), the GroupID field set to G1 and the SceneID field set to 0x01.
- disabled: true
+ Execute the following command in TH to generate the pre-condition to execute this test case:
+
+ ./chip-tool scenes enhanced-add-scene 0x000a 1 1 "Test Name" '[{"clusterId": value, "attributeValueList":[{"attributeId": value, "attributeValue": value}]}' nodeId endpointId
+
+ Note: The number of ExtensionFieldSets, the value of clusterId of each ExtensionFieldSet, the number of attributes in attributeValueList and their values varies for each application
+
+ Verify the "status is success" on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform:
+ [1670970505.887060][5742:5744] CHIP:DMG: InvokeResponseMessage =
+ [1670970505.887118][5742:5744] CHIP:DMG: {
+ [1670970505.887172][5742:5744] CHIP:DMG: suppressResponse = false,
+ [1670970505.887231][5742:5744] CHIP:DMG: InvokeResponseIBs =
+ [1670970505.887307][5742:5744] CHIP:DMG: [
+ [1670970505.887366][5742:5744] CHIP:DMG: InvokeResponseIB =
+ [1670970505.887444][5742:5744] CHIP:DMG: {
+ [1670970505.887507][5742:5744] CHIP:DMG: CommandDataIB =
+ [1670970505.887576][5742:5744] CHIP:DMG: {
+ [1670970505.887713][5742:5744] CHIP:DMG: CommandPathIB =
+ [1670970505.887804][5742:5744] CHIP:DMG: {
+ [1670970505.887940][5742:5744] CHIP:DMG: EndpointId = 0x1,
+ [1670970505.888093][5742:5744] CHIP:DMG: ClusterId = 0x5,
+ [1670970505.888242][5742:5744] CHIP:DMG: CommandId = 0x40,
+ [1670970505.888385][5742:5744] CHIP:DMG: },
+ [1670970505.888692][5742:5744] CHIP:DMG:
+ [1670970505.888769][5742:5744] CHIP:DMG: CommandFields =
+ [1670970505.888852][5742:5744] CHIP:DMG: {
+ [1670970505.889030][5742:5744] CHIP:DMG: 0x0 = 0,
+ [1670970505.889183][5742:5744] CHIP:DMG: 0x1 = 1,
+ [1670970505.889406][5742:5744] CHIP:DMG: 0x2 = 1,
+ [1670970505.889515][5742:5744] CHIP:DMG: },
+ [1670970505.889603][5742:5744] CHIP:DMG: },
+ [1670970505.889684][5742:5744] CHIP:DMG:
+ [1670970505.889745][5742:5744] CHIP:DMG: },
+ [1670970505.889821][5742:5744] CHIP:DMG:
+ [1670970505.889878][5742:5744] CHIP:DMG: ],
+ [1670970505.889953][5742:5744] CHIP:DMG:
+ [1670970505.890009][5742:5744] CHIP:DMG: InteractionModelRevision = 1
+ [1670970505.890066][5742:5744] CHIP:DMG: },
+ [1670970505.890212][5742:5744] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0005 Command=0x0000_0040
+ [1670970505.890328][5742:5744] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0005 Command 0x0000_0040
+ [1670970505.890458][5742:5744] CHIP:TOO: EnhancedAddSceneResponse: {
+ [1670970505.890551][5742:5744] CHIP:TOO: status: 0
+ [1670970505.890608][5742:5744] CHIP:TOO: groupId: 1
+ [1670970505.890717][5742:5744] CHIP:TOO: sceneId: 1
+ [1670970505.890774][5742:5744] CHIP:TOO: }
+ cluster: "LogCommands"
+ command: "UserPrompt"
+ PICS: S.S.C40.Rsp && PICS_SKIP_SAMPLE_APP
+ arguments:
+ values:
+ - name: "message"
+ value:
+ "Please execute the enhanced add scene command with
+ extensionfieldsets in accordance with AC1 on DUT and enter
+ 'y' if the command is successful"
+ - name: "expectedValue"
+ value: "y"
+
+ - label:
+ "TH sends a AddScene command to DUT with the GroupID field set to G1,
+ the SceneID field set to 0x01, the TransitionTime field set to 0x0001
+ and a set of extension fields appropriate to AC1."
+ verification: |
+ Execute the following command in TH to generate the pre-condition to execute this test case:
+
+ ./chip-tool scenes add-scene 0x0001 1 1 "Test Name" '[{"clusterId": value, "attributeValueList":[{"attributeId": value, "attributeValue": value}]}' nodeId endpointId
+
+ Note: The number of ExtensionFieldSets, the value of clusterId of each ExtensionFieldSet, the number of attributes in attributeValueList and their values varies for each application
+
+ Verify the "status is success" on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform:
+ [1670970505.887060][5742:5744] CHIP:DMG: InvokeResponseMessage =
+ [1670970505.887118][5742:5744] CHIP:DMG: {
+ [1670970505.887172][5742:5744] CHIP:DMG: suppressResponse = false,
+ [1670970505.887231][5742:5744] CHIP:DMG: InvokeResponseIBs =
+ [1670970505.887307][5742:5744] CHIP:DMG: [
+ [1670970505.887366][5742:5744] CHIP:DMG: InvokeResponseIB =
+ [1670970505.887444][5742:5744] CHIP:DMG: {
+ [1670970505.887507][5742:5744] CHIP:DMG: CommandDataIB =
+ [1670970505.887576][5742:5744] CHIP:DMG: {
+ [1670970505.887713][5742:5744] CHIP:DMG: CommandPathIB =
+ [1670970505.887804][5742:5744] CHIP:DMG: {
+ [1670970505.887940][5742:5744] CHIP:DMG: EndpointId = 0x1,
+ [1670970505.888093][5742:5744] CHIP:DMG: ClusterId = 0x5,
+ [1670970505.888242][5742:5744] CHIP:DMG: CommandId = 0x0,
+ [1670970505.888385][5742:5744] CHIP:DMG: },
+ [1670970505.888692][5742:5744] CHIP:DMG:
+ [1670970505.888769][5742:5744] CHIP:DMG: CommandFields =
+ [1670970505.888852][5742:5744] CHIP:DMG: {
+ [1670970505.889030][5742:5744] CHIP:DMG: 0x0 = 0,
+ [1670970505.889183][5742:5744] CHIP:DMG: 0x1 = 1,
+ [1670970505.889406][5742:5744] CHIP:DMG: 0x2 = 1,
+ [1670970505.889515][5742:5744] CHIP:DMG: },
+ [1670970505.889603][5742:5744] CHIP:DMG: },
+ [1670970505.889684][5742:5744] CHIP:DMG:
+ [1670970505.889745][5742:5744] CHIP:DMG: },
+ [1670970505.889821][5742:5744] CHIP:DMG:
+ [1670970505.889878][5742:5744] CHIP:DMG: ],
+ [1670970505.889953][5742:5744] CHIP:DMG:
+ [1670970505.890009][5742:5744] CHIP:DMG: InteractionModelRevision = 1
+ [1670970505.890066][5742:5744] CHIP:DMG: },
+ [1670970505.890212][5742:5744] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0005 Command=0x0000_0000
+ [1670970505.890328][5742:5744] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0005 Command 0x0000_0000
+ [1670970505.890458][5742:5744] CHIP:TOO: AddSceneResponse: {
+ [1670970505.890551][5742:5744] CHIP:TOO: status: 0
+ [1670970505.890608][5742:5744] CHIP:TOO: groupId: 1
+ [1670970505.890717][5742:5744] CHIP:TOO: sceneId: 1
+ [1670970505.890774][5742:5744] CHIP:TOO: }
+ cluster: "LogCommands"
+ command: "UserPrompt"
+ PICS: (!S.S.C40.Rsp) && PICS_SKIP_SAMPLE_APP
+ arguments:
+ values:
+ - name: "message"
+ value:
+ "Please execute the add scene command with
+ extensionfieldsets in accordance with AC1 on DUT and enter
+ 'y' if the command is successful"
+ - name: "expectedValue"
+ value: "y"
- label:
"TH sends a EnhancedViewScene command to DUT with the GroupID field
set to G1 and the SceneID field set to 0x01."
- PICS: S.S.C41.Rsp
+ PICS: S.S.C41.Rsp && PICS_SDK_CI_ONLY
+ command: "EnhancedViewScene"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: G1
+ - name: "SceneID"
+ value: 0x01
+ response:
+ values:
+ - name: "Status"
+ value: 0x00
+ - name: "GroupID"
+ value: G1
+ - name: "SceneID"
+ value: 0x01
+ - name: "TransitionTime"
+ value: 0x000a
+ - name: "ExtensionFieldSets"
+ value:
+ [
+ {
+ ClusterID: 0x0006,
+ AttributeValueList:
+ [{ AttributeID: 0x0000, AttributeValue: 0x01 }],
+ },
+ {
+ ClusterID: 0x0008,
+ AttributeValueList:
+ [
+ {
+ AttributeID: 0x0000,
+ AttributeValue: 0x64,
+ },
+ {
+ AttributeID: 0x0001,
+ AttributeValue: 0x00,
+ },
+ ],
+ },
+ ]
+
+ - label:
+ "TH sends a ViewScene command to DUT with the GroupID field set to G1
+ and the SceneID field set to 0x01."
+ PICS: (!S.S.C41.Rsp) && PICS_SDK_CI_ONLY
+ command: "ViewScene"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: G1
+ - name: "SceneID"
+ value: 0x01
+ response:
+ values:
+ - name: "Status"
+ value: 0x00
+ - name: "GroupID"
+ value: G1
+ - name: "SceneID"
+ value: 0x01
+ - name: "TransitionTime"
+ value: 0x0001
+ - name: "ExtensionFieldSets"
+ value:
+ [
+ {
+ ClusterID: 0x0006,
+ AttributeValueList:
+ [{ AttributeID: 0x0000, AttributeValue: 0x01 }],
+ },
+ {
+ ClusterID: 0x0008,
+ AttributeValueList:
+ [
+ {
+ AttributeID: 0x0000,
+ AttributeValue: 0x64,
+ },
+ {
+ AttributeID: 0x0001,
+ AttributeValue: 0x00,
+ },
+ ],
+ },
+ ]
+
+ - label:
+ "TH sends a EnhancedViewScene command to DUT with the GroupID field
+ set to G1 and the SceneID field set to 0x01."
+ PICS: S.S.C41.Rsp && PICS_SKIP_SAMPLE_APP
verification: |
- DUT sends a EnhancedViewSceneResponse command to TH with the Status field set to 0x00 (SUCCESS), the GroupID field set to G1, the SceneID field set to 0x01, the TransitionTime field set to 0x000a (1s) and a set of extension fields appropriate to AC1.
- disabled: true
+ Execute the following command in TH to generate the pre-condition to execute this test case:
+
+ ./chip-tool scenes enhanced-view-scene GroupId SceneId Node-Id EndpointId
+ Note: The number of ExtensionFieldSets, the value of clusterId of each ExtensionFieldSet, the number of attributes in attributeValueList and their values varies for each application
+
+ Verify that the extension fields in the log match the ones expected and that
+ Status = 0x00
+ GroupID = 0x0001
+ SceneID = 0x01
+ TransitionTime = 0x000a
+ cluster: "LogCommands"
+ command: "UserPrompt"
+ arguments:
+ values:
+ - name: "message"
+ value:
+ "Please execute the ehanced-view-scene command and verify
+ that the extensionfieldsets, status, groupID and SceneID are
+ in accordance with AC1 on DUT and enter 'y' if the command
+ is successful"
+ - name: "expectedValue"
+ value: "y"
- label:
"TH sends a ViewScene command to DUT with the GroupID field set to G1
and the SceneID field set to 0x01."
- PICS: "!S.S.C41.Rsp"
+ PICS: (!S.S.C41.Rsp) && PICS_SKIP_SAMPLE_APP
verification: |
- DUT sends a ViewSceneResponse command to TH with the Status field set to 0x00 (SUCCESS), the GroupID field set to G1 and the SceneID field set to 0x01, the TransitionTime field set to 0x0001 (1s) and a set of extension fields appropriate to AC1.
- disabled: true
+ Execute the following command in TH to generate the pre-condition to execute this test case:
+
+ ./chip-tool scenes view-scene GroupId SceneId Node-Id EndpointId
+
+ Note: The number of ExtensionFieldSets, the value of clusterId of each ExtensionFieldSet, the number of attributes in attributeValueList and their values varies for each application
+
+ Verify that the extension fields in the log match the ones expected and that
+ Status = 0x00
+ GroupID = 0x0001
+ SceneID = 0x01
+ TransitionTime = 0x0001
+ cluster: "LogCommands"
+ command: "UserPrompt"
+ arguments:
+ values:
+ - name: "message"
+ value:
+ "Please execute the view-scene command and verify that the
+ extensionfieldsets, status, groupID and SceneID are in
+ accordance with AC1 on DUT and enter 'y' if the command is
+ successful"
+ - name: "expectedValue"
+ value: "y"
- label:
"TH sends a GetSceneMembership command to DUT with the GroupID field
set to G1."
PICS: S.S.C06.Rsp
- verification: |
- DUT sends a GetSceneMembershipResponse command to TH with the Status field set to 0x00 (SUCCESS), the Capacity field set to one of the values (SC0 - 1), 0xfe or null, the GroupID field set to G1, the SceneCount field set to 0x01 and the SceneList field containing only the scene ID 0x01.
- disabled: true
+ command: "GetSceneMembership"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: G1
+ response:
+ values:
+ - name: "Status"
+ value: 0x00
+ - name: "Capacity"
+ value: (maxScenes/2) - 1
+ - name: "GroupID"
+ value: G1
+ - name: "SceneList"
+ value: [0x01]
+
+ - label:
+ "TH configures AC2 on DUT for all implemented application clusters
+ supporting scenes."
+ cluster: "Level Control"
+ PICS: PICS_SDK_CI_ONLY
+ command: "MoveToLevelWithOnOff"
+ arguments:
+ values:
+ - name: "Level"
+ value: 200
+ - name: "TransitionTime"
+ value: 0
+ - name: "OptionsMask"
+ value: 0
+ - name: "OptionsOverride"
+ value: 0
- label:
"TH configures AC2 on DUT for all implemented application clusters
supporting scenes."
- PICS: S.S.C04.Rsp
verification: |
- DUT is configured with AC2 which is different from AC1.
- disabled: true
+ Is DUT configured with AC2?
+ cluster: "LogCommands"
+ command: "UserPrompt"
+ PICS: PICS_SKIP_SAMPLE_APP
+ arguments:
+ values:
+ - name: "message"
+ value:
+ "Please configure AC2 on DUT and enter 'y' after the
+ configuration is complete"
+ - name: "expectedValue"
+ value: "y"
- label:
"TH sends a RecallScene command to group G1 with the GroupID field set
to G1 and the scene ID field set to 0x01."
PICS: S.S.C05.Rsp
+ command: "RecallScene"
+ groupId: 0x0001
+ arguments:
+ values:
+ - name: "GroupID"
+ value: G1
+ - name: "SceneID"
+ value: 0x01
+
+ - label: "Wait 1s"
+ PICS: PICS_SDK_CI_ONLY
+ cluster: "DelayCommands"
+ command: "WaitForMs"
+ arguments:
+ values:
+ - name: "ms"
+ value: 1000
+
+ - label:
+ "TH confirm the DUT reached AC1 (on level control cluster) after 1s"
+ PICS: PICS_SDK_CI_ONLY
+ cluster: "Level Control"
+ command: "readAttribute"
+ attribute: "CurrentLevel"
+ response:
+ value: 100
+
+ - label: "Verify DUT returns to AC1."
verification: |
- (There is no Status response since this was a groupcast) DUT returns to AC1.
- disabled: true
+ Is DUT configured with AC1?
+ cluster: "LogCommands"
+ command: "UserPrompt"
+ PICS: PICS_SKIP_SAMPLE_APP
+ arguments:
+ values:
+ - name: "message"
+ value: "Please confirm AC1 on DUT and enter 'y'."
+ - name: "expectedValue"
+ value: "y"
- label:
"TH sends a CopyScene command to DUT with the mode field set to 0x00,
@@ -122,12 +603,44 @@ tests:
PICS: S.S.C42.Rsp
verification: |
DUT sends a CopySceneResponse command to TH with the Status field set to 0x00 (SUCCESS), the group identifier from field set to G1 and the scene identifier from field set to 0x01.
- disabled: true
+ command: "CopyScene"
+ arguments:
+ values:
+ - name: "Mode"
+ value: 0x00
+ - name: "GroupIdentifierFrom"
+ value: G1
+ - name: "SceneIdentifierFrom"
+ value: 0x01
+ - name: "GroupIdentifierTo"
+ value: G1
+ - name: "SceneIdentifierTo"
+ value: 0x02
+ response:
+ values:
+ - name: "Status"
+ value: 0x00
+ - name: "GroupIdentifierFrom"
+ value: G1
+ - name: "SceneIdentifierFrom"
+ value: 0x01
- label:
"TH sends a GetSceneMembership command to DUT with the GroupID field
set to G1."
PICS: S.S.C06.Rsp
- verification: |
- DUT sends a GetSceneMembershipResponse command to TH with the Status field set to 0x00 (SUCCESS), the Capacity field set to one of the values (SC0 - 2), 0xfe or null, the GroupID field set to G1, the SceneCount field set to 0x02 and the SceneList field containing the scene IDs 0x01 and 0x02.
- disabled: true
+ command: "GetSceneMembership"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: G1
+ response:
+ values:
+ - name: "Status"
+ value: 0x00
+ - name: "Capacity"
+ value: (maxScenes/2) - 2
+ - name: "GroupID"
+ value: G1
+ - name: "SceneList"
+ value: [0x01, 0x02]
diff --git a/src/app/tests/suites/certification/Test_TC_S_2_4.yaml b/src/app/tests/suites/certification/Test_TC_S_2_4.yaml
new file mode 100644
index 00000000000000..ad1c65b921cfc3
--- /dev/null
+++ b/src/app/tests/suites/certification/Test_TC_S_2_4.yaml
@@ -0,0 +1,414 @@
+# Copyright (c) 2023 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.
+# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default
+
+name: 123.2.4. [TC-S-2.4] Recall scene with transition time functionality
+
+PICS:
+ - S.S
+
+config:
+ nodeId: 0x12344321
+ cluster: "Scenes"
+ endpoint: 1
+
+tests:
+ - label: "Wait for the commissioned device to be retrieved"
+ cluster: "DelayCommands"
+ command: "WaitForCommissionee"
+ arguments:
+ values:
+ - name: "nodeId"
+ value: nodeId
+
+ - label: "TH sends a RemoveAllGroups command to DUT."
+ PICS: G.S.C04.Rsp
+ cluster: "Groups"
+ endpoint: "1"
+ command: "RemoveAllGroups"
+
+ - label:
+ "preparation step for using commands from Groups cluster: Add KeySet"
+ cluster: "Group Key Management"
+ endpoint: 0
+ command: "KeySetWrite"
+ arguments:
+ values:
+ - name: "GroupKeySet"
+ value:
+ {
+ GroupKeySetID: 0x01a1,
+ GroupKeySecurityPolicy: 0,
+ EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf",
+ EpochStartTime0: 0,
+ EpochKey1: "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf",
+ EpochStartTime1: 0,
+ EpochKey2: "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
+ EpochStartTime2: 0,
+ }
+
+ - label:
+ "Preparation step for using commands from Groups cluster: Write Group
+ Keys"
+ cluster: "Group Key Management"
+ endpoint: 0
+ command: "writeAttribute"
+ attribute: "GroupKeyMap"
+ arguments:
+ value: [{ FabricIndex: 1, GroupId: 0x0001, GroupKeySetID: 0x01a1 }]
+
+ - label:
+ "TH sends a AddGroup command to DUT with the GroupID field set to
+ 0x0001."
+ PICS: G.S.C00.Rsp
+ cluster: "Groups"
+ command: "AddGroup"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: 0x0001
+ - name: "GroupName"
+ value: "Group1"
+ response:
+ values:
+ - name: "Status"
+ value: 0
+ - name: "GroupID"
+ value: 0x0001
+
+ - label:
+ "TH sends a RemoveAllScenes command to DUT with the GroupID field set
+ to 0x0001."
+ PICS: S.S.C03.Rsp
+ command: "RemoveAllScenes"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: 0x0001
+ response:
+ values:
+ - name: "Status"
+ value: 0
+ - name: "GroupID"
+ value: 0x0001
+
+ - label:
+ "TH sends a AddScene command to DUT with the GroupID field set to
+ 0x0001, the SceneID field set to 0x01, the TransitionTime field set to
+ 0x0001 and a set of extension fields appropriate to AC1."
+ PICS: S.S.C00.Rsp
+ command: "AddScene"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: 0x0001
+ - name: "SceneID"
+ value: 0x0001
+ - name: "TransitionTime"
+ value: 0x0014
+ - name: "SceneName"
+ value: "Scene1"
+ - name: "ExtensionFieldSets"
+ value: []
+
+ response:
+ values:
+ - name: "Status"
+ value: 0x00
+ - name: "GroupID"
+ value: 0x0001
+ - name: "SceneID"
+ value: 0x01
+
+ - label:
+ "TH configures AC1 on DUT for all implemented application clusters
+ supporting scenes."
+ PICS: PICS_SDK_CI_ONLY
+ cluster: "Level Control"
+ command: "MoveToLevelWithOnOff"
+ arguments:
+ values:
+ - name: "Level"
+ value: 100
+ - name: "TransitionTime"
+ value: 0
+ - name: "OptionsMask"
+ value: 0
+ - name: "OptionsOverride"
+ value: 0
+
+ - label:
+ "TH configures AC1 on DUT for all implemented application clusters
+ supporting scenes."
+ verification: |
+ Is DUT configured with AC1?
+ cluster: "LogCommands"
+ command: "UserPrompt"
+ PICS: PICS_SKIP_SAMPLE_APP
+ arguments:
+ values:
+ - name: "message"
+ value:
+ "Please configure AC1 on DUT and enter 'y' after the
+ configuration is complete"
+ - name: "expectedValue"
+ value: "y"
+
+ - label:
+ "TH sends a StoreScene command to DUT with the GroupID field set to
+ 0x0001 and the SceneID field set to 0x01."
+ PICS: S.S.C04.Rsp
+ command: "StoreScene"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: 0x0001
+ - name: "SceneID"
+ value: 0x01
+ response:
+ values:
+ - name: "Status"
+ value: 0x00
+ - name: "GroupID"
+ value: 0x0001
+ - name: "SceneID"
+ value: 0x01
+
+ - label:
+ "TH configures AC2 on DUT for all implemented application clusters
+ supporting scenes."
+ PICS: PICS_SDK_CI_ONLY
+ cluster: "Level Control"
+ command: "MoveToLevelWithOnOff"
+ arguments:
+ values:
+ - name: "Level"
+ value: 200
+ - name: "TransitionTime"
+ value: 0
+ - name: "OptionsMask"
+ value: 0
+ - name: "OptionsOverride"
+ value: 0
+
+ - label: "Wait 1s for level to change"
+ PICS: PICS_SDK_CI_ONLY
+ cluster: "DelayCommands"
+ command: "WaitForMs"
+ arguments:
+ values:
+ - name: "ms"
+ value: 1000
+
+ - label:
+ "TH confirm the DUT reached AC2 (on level control cluster) after 1s,
+ which is different from AC1"
+ PICS: PICS_SDK_CI_ONLY
+ cluster: "Level Control"
+ command: "readAttribute"
+ attribute: "CurrentLevel"
+ response:
+ value: 200
+
+ - label:
+ "TH configures AC2 on DUT for all implemented application clusters
+ supporting scenes."
+ verification: |
+ Is DUT configured with AC2?
+ cluster: "LogCommands"
+ command: "UserPrompt"
+ PICS: PICS_SKIP_SAMPLE_APP
+ arguments:
+ values:
+ - name: "message"
+ value:
+ "Please configure AC2 on DUT and enter 'y' after the
+ configuration is complete"
+ - name: "expectedValue"
+ value: "y"
+
+ - label:
+ "TH sends a RecallScene command to DUT with the GroupID field set to
+ 0x0001 and the SceneID field set to 0x01 and the TransitionTime field
+ omitted."
+ PICS: S.S.C05.Rsp
+ command: "RecallScene"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: 0x0001
+ - name: "SceneID"
+ value: 0x01
+
+ - label: "Wait 20s"
+ PICS: PICS_SDK_CI_ONLY
+ cluster: "DelayCommands"
+ command: "WaitForMs"
+ arguments:
+ values:
+ - name: "ms"
+ value: 20000
+
+ - label:
+ "TH confirm the DUT reached AC1 (on level control cluster) after 20s"
+ PICS: PICS_SDK_CI_ONLY
+ cluster: "Level Control"
+ command: "readAttribute"
+ attribute: "CurrentLevel"
+ response:
+ value: 100
+
+ - label: "DUT transitions to AC1 over 20s."
+ verification: |
+ Is the transition done over 20s?
+ cluster: "LogCommands"
+ command: "UserPrompt"
+ PICS: PICS_SKIP_SAMPLE_APP
+ arguments:
+ values:
+ - name: "message"
+ value: "Please confirm that transition to AC1 was made over 20s"
+ - name: "expectedValue"
+ value: "y"
+
+ - label:
+ "TH configures AC2 on DUT for all implemented application clusters
+ supporting scenes."
+ PICS: PICS_SDK_CI_ONLY
+ cluster: "Level Control"
+ command: "MoveToLevelWithOnOff"
+ arguments:
+ values:
+ - name: "Level"
+ value: 200
+ - name: "TransitionTime"
+ value: 0
+ - name: "OptionsMask"
+ value: 0
+ - name: "OptionsOverride"
+ value: 0
+
+ - label:
+ "TH configures AC2 on DUT for all implemented application clusters
+ supporting scenes."
+ verification: |
+ Is DUT configured with AC2?
+ cluster: "LogCommands"
+ command: "UserPrompt"
+ PICS: PICS_SKIP_SAMPLE_APP
+ arguments:
+ values:
+ - name: "message"
+ value:
+ "Please configure AC2 on DUT and enter 'y' after the
+ configuration is complete"
+ - name: "expectedValue"
+ value: "y"
+
+ - label:
+ "TH sends a RecallScene command to DUT with the GroupID field set to
+ 0x0001, the SceneID field set to 0x01 and the TransitionTime field set
+ to 0x0032 (5s)."
+ PICS: S.S.C05.Rsp
+ command: "RecallScene"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: 0x0001
+ - name: "SceneID"
+ value: 0x01
+ - name: "TransitionTime"
+ value: 0x0032
+
+ - label: "Wait 5s"
+ PICS: PICS_SDK_CI_ONLY
+ cluster: "DelayCommands"
+ command: "WaitForMs"
+ arguments:
+ values:
+ - name: "ms"
+ value: 5000
+
+ - label:
+ "TH confirm the DUT reached AC2 (on level control cluster) after 5s"
+ PICS: PICS_SDK_CI_ONLY
+ cluster: "Level Control"
+ command: "readAttribute"
+ attribute: "CurrentLevel"
+ response:
+ value: 100
+
+ - label: "DUT transitions to AC1 over 5."
+ verification: |
+ Is the transition done over 5s?
+ cluster: "LogCommands"
+ command: "UserPrompt"
+ PICS: PICS_SKIP_SAMPLE_APP
+ arguments:
+ values:
+ - name: "message"
+ value: "Please confirm that transition to AC1 was made over 5s"
+ - name: "expectedValue"
+ value: "y"
+
+ - label:
+ "TH configures AC2 on DUT for all implemented application clusters
+ supporting scenes."
+ PICS: PICS_SDK_CI_ONLY
+ cluster: "Level Control"
+ command: "MoveToLevelWithOnOff"
+ arguments:
+ values:
+ - name: "Level"
+ value: 200
+ - name: "TransitionTime"
+ value: 0
+ - name: "OptionsMask"
+ value: 0
+ - name: "OptionsOverride"
+ value: 0
+
+ - label:
+ "TH configures AC2 on DUT for all implemented application clusters
+ supporting scenes."
+ verification: |
+ Is DUT configured with AC2?
+ cluster: "LogCommands"
+ command: "UserPrompt"
+ PICS: PICS_SKIP_SAMPLE_APP
+ arguments:
+ values:
+ - name: "message"
+ value:
+ "Please configure AC2 on DUT and enter 'y' after the
+ configuration is complete"
+ - name: "expectedValue"
+ value: "y"
+
+ - label:
+ "TH sends a RecallScene command to DUT with the GroupID field set to
+ 0x0001, the SceneID field set to 0x01 and the TransitionTime field set
+ to null (no transition time override)."
+ PICS: S.S.C05.Rsp
+ command: "RecallScene"
+ arguments:
+ values:
+ - name: "GroupID"
+ value: 0x0001
+ - name: "SceneID"
+ value: 0x01
+ - name: "TransitionTime"
+ value: null
+ response:
+ error: 0x00
diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values
index 3cb6b999f9ea01..a65644227d2a41 100644
--- a/src/app/tests/suites/certification/ci-pics-values
+++ b/src/app/tests/suites/certification/ci-pics-values
@@ -619,6 +619,8 @@ S.S.A0002=0
S.S.A0003=0
S.S.A0004=0
S.S.A0005=0
+S.S.A0006=0
+S.S.A0007=0
S.S.C00.Rsp=0
S.S.C01.Rsp=0
S.S.C02.Rsp=0
diff --git a/src/app/tests/suites/manualTests.json b/src/app/tests/suites/manualTests.json
index b7e47c41445dac..ad01f9f5eb80ec 100644
--- a/src/app/tests/suites/manualTests.json
+++ b/src/app/tests/suites/manualTests.json
@@ -284,6 +284,7 @@
"Test_TC_S_2_1",
"Test_TC_S_2_2",
"Test_TC_S_2_3",
+ "Test_TC_S_2_4",
"Test_TC_S_3_1"
],
"PumpConfigurationControl": [],
diff --git a/src/app/zap-templates/zcl/data-model/chip/scene.xml b/src/app/zap-templates/zcl/data-model/chip/scene.xml
index d8efbe52c7ae35..c05603a8cf77c4 100644
--- a/src/app/zap-templates/zcl/data-model/chip/scene.xml
+++ b/src/app/zap-templates/zcl/data-model/chip/scene.xml
@@ -23,9 +23,7 @@ limitations under the License.
-
-
-
+
@@ -51,7 +49,9 @@ limitations under the License.
SceneValid
NameSupport
LastConfiguredBy
-
+ SceneTableSize
+ RemainingCapacity
+
Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}'
diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter
index c05b40f65022c3..ea82d27ad379d5 100644
--- a/src/controller/data_model/controller-clusters.matter
+++ b/src/controller/data_model/controller-clusters.matter
@@ -146,7 +146,7 @@ client cluster Scenes = 5 {
struct AttributeValuePair {
optional attrib_id attributeID = 0;
- int8u attributeValue[] = 1;
+ int32u attributeValue = 1;
}
struct ExtensionFieldSet {
@@ -160,6 +160,8 @@ client cluster Scenes = 5 {
readonly attribute boolean sceneValid = 3;
readonly attribute bitmap8 nameSupport = 4;
readonly attribute optional nullable node_id lastConfiguredBy = 5;
+ readonly attribute int16u sceneTableSize = 6;
+ readonly attribute int8u remainingCapacity = 7;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
index e8210fe81f5dc4..44feb787102ab3 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
@@ -744,6 +744,8 @@ public enum Attribute {
SceneValid(3L),
NameSupport(4L),
LastConfiguredBy(5L),
+ SceneTableSize(6L),
+ RemainingCapacity(7L),
GeneratedCommandList(65528L),
AcceptedCommandList(65529L),
EventList(65530L),
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
index 94b569becfe308..09cf5141a29be2 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
@@ -265,6 +265,28 @@ private static Map readScenesInteractionInfo() {
readScenesLastConfiguredByCommandParams
);
result.put("readLastConfiguredByAttribute", readScenesLastConfiguredByAttributeInteractionInfo);
+ Map readScenesSceneTableSizeCommandParams = new LinkedHashMap();
+ InteractionInfo readScenesSceneTableSizeAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.ScenesCluster) cluster).readSceneTableSizeAttribute(
+ (ChipClusters.IntegerAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
+ readScenesSceneTableSizeCommandParams
+ );
+ result.put("readSceneTableSizeAttribute", readScenesSceneTableSizeAttributeInteractionInfo);
+ Map readScenesRemainingCapacityCommandParams = new LinkedHashMap();
+ InteractionInfo readScenesRemainingCapacityAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.ScenesCluster) cluster).readRemainingCapacityAttribute(
+ (ChipClusters.IntegerAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
+ readScenesRemainingCapacityCommandParams
+ );
+ result.put("readRemainingCapacityAttribute", readScenesRemainingCapacityAttributeInteractionInfo);
Map readScenesGeneratedCommandListCommandParams = new LinkedHashMap();
InteractionInfo readScenesGeneratedCommandListAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
index da4acdf1eeb54d..5652312cda9d94 100644
--- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
+++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
@@ -455,6 +455,36 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR
}
return value;
}
+ case Attributes::SceneTableSize::Id: {
+ using TypeInfo = Attributes::SceneTableSize::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ std::string valueClassName = "java/lang/Integer";
+ std::string valueCtorSignature = "(I)V";
+ chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(),
+ cppValue, value);
+ return value;
+ }
+ case Attributes::RemainingCapacity::Id: {
+ using TypeInfo = Attributes::RemainingCapacity::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ std::string valueClassName = "java/lang/Integer";
+ std::string valueCtorSignature = "(I)V";
+ chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(),
+ cppValue, value);
+ return value;
+ }
case Attributes::GeneratedCommandList::Id: {
using TypeInfo = Attributes::GeneratedCommandList::TypeInfo;
TypeInfo::DecodableType cppValue;
diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp
index fed93140fc0ac8..8f2d6b7ee78977 100644
--- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp
+++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp
@@ -521,19 +521,11 @@ void CHIPScenesClusterViewSceneResponseCallback::CallbackFn(
newElement_3_attributeID);
}
jobject newElement_3_attributeValue;
- chip::JniReferences::GetInstance().CreateArrayList(newElement_3_attributeValue);
-
- auto iter_newElement_3_attributeValue_5 = entry_3.attributeValue.begin();
- while (iter_newElement_3_attributeValue_5.Next())
- {
- auto & entry_5 = iter_newElement_3_attributeValue_5.GetValue();
- jobject newElement_5;
- std::string newElement_5ClassName = "java/lang/Integer";
- std::string newElement_5CtorSignature = "(I)V";
- chip::JniReferences::GetInstance().CreateBoxedObject(
- newElement_5ClassName.c_str(), newElement_5CtorSignature.c_str(), entry_5, newElement_5);
- chip::JniReferences::GetInstance().AddToList(newElement_3_attributeValue, newElement_5);
- }
+ std::string newElement_3_attributeValueClassName = "java/lang/Long";
+ std::string newElement_3_attributeValueCtorSignature = "(J)V";
+ chip::JniReferences::GetInstance().CreateBoxedObject(newElement_3_attributeValueClassName.c_str(),
+ newElement_3_attributeValueCtorSignature.c_str(),
+ entry_3.attributeValue, newElement_3_attributeValue);
jclass attributeValuePairStructClass_4;
err = chip::JniReferences::GetInstance().GetClassRef(
@@ -544,7 +536,7 @@ void CHIPScenesClusterViewSceneResponseCallback::CallbackFn(
return;
}
jmethodID attributeValuePairStructCtor_4 =
- env->GetMethodID(attributeValuePairStructClass_4, "", "(Ljava/util/Optional;Ljava/util/ArrayList;)V");
+ env->GetMethodID(attributeValuePairStructClass_4, "", "(Ljava/util/Optional;Ljava/lang/Long;)V");
if (attributeValuePairStructCtor_4 == nullptr)
{
ChipLogError(Zcl, "Could not find ChipStructs$ScenesClusterAttributeValuePair constructor");
@@ -1103,19 +1095,11 @@ void CHIPScenesClusterEnhancedViewSceneResponseCallback::CallbackFn(
newElement_3_attributeID);
}
jobject newElement_3_attributeValue;
- chip::JniReferences::GetInstance().CreateArrayList(newElement_3_attributeValue);
-
- auto iter_newElement_3_attributeValue_5 = entry_3.attributeValue.begin();
- while (iter_newElement_3_attributeValue_5.Next())
- {
- auto & entry_5 = iter_newElement_3_attributeValue_5.GetValue();
- jobject newElement_5;
- std::string newElement_5ClassName = "java/lang/Integer";
- std::string newElement_5CtorSignature = "(I)V";
- chip::JniReferences::GetInstance().CreateBoxedObject(
- newElement_5ClassName.c_str(), newElement_5CtorSignature.c_str(), entry_5, newElement_5);
- chip::JniReferences::GetInstance().AddToList(newElement_3_attributeValue, newElement_5);
- }
+ std::string newElement_3_attributeValueClassName = "java/lang/Long";
+ std::string newElement_3_attributeValueCtorSignature = "(J)V";
+ chip::JniReferences::GetInstance().CreateBoxedObject(newElement_3_attributeValueClassName.c_str(),
+ newElement_3_attributeValueCtorSignature.c_str(),
+ entry_3.attributeValue, newElement_3_attributeValue);
jclass attributeValuePairStructClass_4;
err = chip::JniReferences::GetInstance().GetClassRef(
@@ -1126,7 +1110,7 @@ void CHIPScenesClusterEnhancedViewSceneResponseCallback::CallbackFn(
return;
}
jmethodID attributeValuePairStructCtor_4 =
- env->GetMethodID(attributeValuePairStructClass_4, "", "(Ljava/util/Optional;Ljava/util/ArrayList;)V");
+ env->GetMethodID(attributeValuePairStructClass_4, "", "(Ljava/util/Optional;Ljava/lang/Long;)V");
if (attributeValuePairStructCtor_4 == nullptr)
{
ChipLogError(Zcl, "Could not find ChipStructs$ScenesClusterAttributeValuePair constructor");
diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java
index 91b5ea6291f0cb..617763b5f12c31 100644
--- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java
+++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java
@@ -945,6 +945,24 @@ public void subscribeLastConfiguredByAttribute(
subscribeLastConfiguredByAttribute(chipClusterPtr, callback, minInterval, maxInterval);
}
+ public void readSceneTableSizeAttribute(IntegerAttributeCallback callback) {
+ readSceneTableSizeAttribute(chipClusterPtr, callback);
+ }
+
+ public void subscribeSceneTableSizeAttribute(
+ IntegerAttributeCallback callback, int minInterval, int maxInterval) {
+ subscribeSceneTableSizeAttribute(chipClusterPtr, callback, minInterval, maxInterval);
+ }
+
+ public void readRemainingCapacityAttribute(IntegerAttributeCallback callback) {
+ readRemainingCapacityAttribute(chipClusterPtr, callback);
+ }
+
+ public void subscribeRemainingCapacityAttribute(
+ IntegerAttributeCallback callback, int minInterval, int maxInterval) {
+ subscribeRemainingCapacityAttribute(chipClusterPtr, callback, minInterval, maxInterval);
+ }
+
public void readGeneratedCommandListAttribute(GeneratedCommandListAttributeCallback callback) {
readGeneratedCommandListAttribute(chipClusterPtr, callback);
}
@@ -1038,6 +1056,18 @@ private native void subscribeLastConfiguredByAttribute(
int minInterval,
int maxInterval);
+ private native void readSceneTableSizeAttribute(
+ long chipClusterPtr, IntegerAttributeCallback callback);
+
+ private native void subscribeSceneTableSizeAttribute(
+ long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval);
+
+ private native void readRemainingCapacityAttribute(
+ long chipClusterPtr, IntegerAttributeCallback callback);
+
+ private native void subscribeRemainingCapacityAttribute(
+ long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval);
+
private native void readGeneratedCommandListAttribute(
long chipClusterPtr, GeneratedCommandListAttributeCallback callback);
diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java
index 778858d9ac89c6..c9e41acc7b91d3 100644
--- a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java
+++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java
@@ -474,6 +474,12 @@ public static String attributeIdToName(long clusterId, long attributeId) {
if (attributeId == 5L) {
return "LastConfiguredBy";
}
+ if (attributeId == 6L) {
+ return "SceneTableSize";
+ }
+ if (attributeId == 7L) {
+ return "RemainingCapacity";
+ }
if (attributeId == 65528L) {
return "GeneratedCommandList";
}
diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java
index a039df15f6aa64..0fea3804b54e07 100644
--- a/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java
+++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java
@@ -26,10 +26,9 @@
public class ChipStructs {
public static class ScenesClusterAttributeValuePair {
public Optional attributeID;
- public ArrayList