From 02f5ccdbc0df6f4eafceae15a8751bc31bde5c48 Mon Sep 17 00:00:00 2001 From: Alex Pygin Date: Fri, 10 Feb 2023 11:14:59 -0600 Subject: [PATCH 1/4] Adding required fields for Switch --- examples/lighting-app/lighting-common/lighting-app.matter | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 64eba579efc7f0..5b1bacafffd9e8 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -1215,6 +1215,8 @@ server cluster Switch = 59 { INT8U totalNumberOfPressesCounted = 1; } + readonly attribute int8u numberOfPositions = 0; + readonly attribute int8u currentPosition = 1; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; } @@ -1947,6 +1949,8 @@ endpoint 0 { } server cluster Switch { + ram attribute numberOfPositions default = 2; + ram attribute currentPosition; ram attribute featureMap; ram attribute clusterRevision default = 1; } @@ -2079,5 +2083,3 @@ endpoint 1 { ram attribute clusterRevision default = 3; } } - - From 6e7f8822ca480d6e27035a5e41cfa4e6b81c9180 Mon Sep 17 00:00:00 2001 From: Alex Pygin Date: Fri, 10 Feb 2023 12:11:32 -0600 Subject: [PATCH 2/4] Adding changes to .zap file --- .../lighting-common/lighting-app.matter | 2 + .../lighting-common/lighting-app.zap | 69 ++++++++++++++++++- 2 files changed, 70 insertions(+), 1 deletion(-) diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 5b1bacafffd9e8..d37f71dce4b93d 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -2083,3 +2083,5 @@ endpoint 1 { ram attribute clusterRevision default = 3; } } + + diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index 98ff42499eac14..ee5cac22fdac78 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -4540,7 +4540,42 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "client", - "enabled": 0 + "enabled": 0, + "attributes": [ + + { + "name": "NumberOfPositions", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] }, { "name": "Switch", @@ -4550,6 +4585,38 @@ "side": "server", "enabled": 1, "attributes": [ + { + "name": "NumberOfPositions", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, From 295492675fe21fd0661758f4a1d38da288b3ef98 Mon Sep 17 00:00:00 2001 From: Alex Pygin Date: Fri, 10 Feb 2023 13:47:48 -0600 Subject: [PATCH 3/4] Removing lint ignore for failure fixed in this PR --- .github/workflows/lint.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1e0ae2f0e508c3..2acff6d98983ab 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -64,7 +64,6 @@ jobs: for idl_file in $(find . -name '*.matter'); do # TODO: all these conformance failures should be fixed # Issues exist for most of them: - # https://github.com/project-chip/connectedhomeip/issues/19180 # https://github.com/project-chip/connectedhomeip/issues/19176 # https://github.com/project-chip/connectedhomeip/issues/19175 # https://github.com/project-chip/connectedhomeip/issues/19173 @@ -90,7 +89,6 @@ jobs: if [ "$idl_file" = './examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter' ]; then continue; fi if [ "$idl_file" = './examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter' ]; then continue; fi if [ "$idl_file" = './examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter' ]; then continue; fi - if [ "$idl_file" = './examples/lighting-app/lighting-common/lighting-app.matter' ]; then continue; fi if [ "$idl_file" = './examples/log-source-app/log-source-common/log-source-app.matter' ]; then continue; fi if [ "$idl_file" = './examples/placeholder/linux/apps/app1/config.matter' ]; then continue; fi if [ "$idl_file" = './examples/placeholder/linux/apps/app2/config.matter' ]; then continue; fi From b4c29e93c1e56ff0c99c4e9341be6a4a7d43c170 Mon Sep 17 00:00:00 2001 From: Alex Pygin Date: Fri, 10 Feb 2023 16:35:42 -0600 Subject: [PATCH 4/4] Regenerated lighting-app.matter --- examples/lighting-app/lighting-common/lighting-app.matter | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index cb59de6e9a90e5..fdb7fc4944321c 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -1291,6 +1291,8 @@ server cluster Switch = 59 { INT8U totalNumberOfPressesCounted = 1; } + readonly attribute int8u numberOfPositions = 0; + readonly attribute int8u currentPosition = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2189,3 +2191,5 @@ endpoint 1 { ram attribute clusterRevision default = 3; } } + +