Skip to content

Commit

Permalink
Make CHEF DimmableLight be spec compliant (or at least pass linter) (#…
Browse files Browse the repository at this point in the history
…26085)

* Fix dimmablelight for chef

* Fix the noip dimmable light

* Remove seemingly duplicated line
  • Loading branch information
andy31415 authored and pull[bot] committed Jan 18, 2024
1 parent 25cdc24 commit 4201865
Show file tree
Hide file tree
Showing 5 changed files with 344 additions and 7 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand All @@ -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;
Expand All @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down
133 changes: 131 additions & 2 deletions examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"featureLevel": 92,
"featureLevel": 95,
"creator": "zap",
"keyValuePairs": [
{
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -7386,5 +7514,6 @@
"endpointVersion": 1,
"deviceIdentifier": 257
}
]
],
"log": []
}
18 changes: 18 additions & 0 deletions examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand All @@ -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;
Expand All @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down
Loading

0 comments on commit 4201865

Please sign in to comment.