From 42018650e2280d530e320699e06eb577da288646 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 13 Apr 2023 09:29:19 -0400 Subject: [PATCH] Make CHEF DimmableLight be spec compliant (or at least pass linter) (#26085) * Fix dimmablelight for chef * Fix the noip dimmable light * Remove seemingly duplicated line --- .github/workflows/lint.yml | 3 - ...p_rootnode_dimmablelight_bCwGYSDpoe.matter | 16 ++ ...noip_rootnode_dimmablelight_bCwGYSDpoe.zap | 133 ++++++++++++- .../rootnode_dimmablelight_bCwGYSDpoe.matter | 18 ++ .../rootnode_dimmablelight_bCwGYSDpoe.zap | 181 +++++++++++++++++- 5 files changed, 344 insertions(+), 7 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9b5de4ac637f40..5125f69106bef0 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -79,10 +79,7 @@ jobs: # https://github.com/project-chip/connectedhomeip/issues/19169 # https://github.com/project-chip/connectedhomeip/issues/22640 if [ "$idl_file" = './examples/all-clusters-app/all-clusters-common/all-clusters-app.matter' ]; then continue; fi - if [ "$idl_file" = './examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter' ]; then continue; fi - if [ "$idl_file" = './examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO' ]; then continue; fi if [ "$idl_file" = './examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter' ]; then continue; fi - if [ "$idl_file" = './examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter' ]; then continue; fi if [ "$idl_file" = './examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter' ]; then continue; fi if [ "$idl_file" = './examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter' ]; then continue; fi if [ "$idl_file" = './examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter' ]; then continue; fi diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index 0123dcc0301281..ebfed65a08b58a 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -365,6 +365,9 @@ server cluster AccessControl = 31 { attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -416,6 +419,7 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -578,6 +582,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { standards. As such, Nodes that visually or audibly convey information need a mechanism by which they can be configured to use a user’s preferred language, units, etc */ server cluster LocalizationConfiguration = 43 { + attribute char_string<35> activeLocale = 0; readonly attribute CHAR_STRING supportedLocales[] = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -648,6 +653,7 @@ server cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; readonly attribute RegulatoryLocationType regulatoryConfig = 2; readonly attribute RegulatoryLocationType locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1179,6 +1185,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; @@ -1496,6 +1504,9 @@ endpoint 0 { emits event AccessControlExtensionChanged; callback attribute acl; callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1524,6 +1535,7 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; ram attribute reachable default = 1; callback attribute uniqueID; + callback attribute capabilityMinima; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -1541,6 +1553,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { + callback attribute activeLocale; callback attribute supportedLocales; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1559,6 +1572,7 @@ endpoint 0 { callback attribute basicCommissioningInfo; callback attribute regulatoryConfig default = 0; callback attribute locationCapability default = 0; + callback attribute supportsConcurrentConnection default = 1; ram attribute featureMap default = 0; ram attribute clusterRevision default = 0x0001; } @@ -1696,6 +1710,8 @@ endpoint 0 { } server cluster Switch { + ram attribute numberOfPositions default = 2; + ram attribute currentPosition; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap index f6fe54c34229d7..bb927e9cdc822d 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap @@ -1,5 +1,5 @@ { - "featureLevel": 92, + "featureLevel": 95, "creator": "zap", "keyValuePairs": [ { @@ -1034,6 +1034,54 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -1438,6 +1486,22 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -1820,6 +1884,22 @@ "side": "server", "enabled": 1, "attributes": [ + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "SupportedLocales", "code": 1, @@ -2184,6 +2264,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -4548,6 +4644,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": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPosition", + "code": 1, + "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, @@ -7386,5 +7514,6 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index d55d5d4ce828bd..9aa81192def114 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -365,6 +365,9 @@ server cluster AccessControl = 31 { attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -416,6 +419,7 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -578,6 +582,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { standards. As such, Nodes that visually or audibly convey information need a mechanism by which they can be configured to use a user’s preferred language, units, etc */ server cluster LocalizationConfiguration = 43 { + attribute char_string<35> activeLocale = 0; readonly attribute CHAR_STRING supportedLocales[] = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -648,6 +653,7 @@ server cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; readonly attribute RegulatoryLocationType regulatoryConfig = 2; readonly attribute RegulatoryLocationType locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1043,6 +1049,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; @@ -1360,6 +1368,11 @@ endpoint 0 { emits event AccessControlExtensionChanged; callback attribute acl; callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1388,6 +1401,7 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; ram attribute reachable default = 1; callback attribute uniqueID; + callback attribute capabilityMinima; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -1405,6 +1419,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { + ram attribute activeLocale; callback attribute supportedLocales; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1423,6 +1438,7 @@ endpoint 0 { callback attribute basicCommissioningInfo; callback attribute regulatoryConfig default = 0; callback attribute locationCapability default = 0; + callback attribute supportsConcurrentConnection default = 1; ram attribute featureMap default = 0; ram attribute clusterRevision default = 0x0001; } @@ -1470,6 +1486,8 @@ endpoint 0 { } server cluster Switch { + ram attribute numberOfPositions default = 2; + ram attribute currentPosition; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap index dad71db6903b2f..67b075fe349bf9 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap @@ -1,5 +1,5 @@ { - "featureLevel": 92, + "featureLevel": 95, "creator": "zap", "keyValuePairs": [ { @@ -1034,6 +1034,102 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -1438,6 +1534,22 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -1820,6 +1932,22 @@ "side": "server", "enabled": 1, "attributes": [ + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "SupportedLocales", "code": 1, @@ -2184,6 +2312,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -4525,6 +4669,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": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPosition", + "code": 1, + "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, @@ -7363,5 +7539,6 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ] + ], + "log": [] } \ No newline at end of file