Skip to content

Commit

Permalink
chef-add-batery2nrf-324031858
Browse files Browse the repository at this point in the history
  • Loading branch information
stingchang committed Apr 9, 2024
1 parent 774f6c4 commit c499d0e
Show file tree
Hide file tree
Showing 4 changed files with 904 additions and 18 deletions.
22 changes: 18 additions & 4 deletions examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2114,6 +2114,7 @@ endpoint 0 {
}
}
endpoint 1 {
device type ma_powersource = 17, version 1;
device type ma_contactsensor = 21, version 1;


Expand All @@ -2122,11 +2123,13 @@ endpoint 1 {
ram attribute identifyType default = 0x0;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 2;

handle command Identify;
handle command TriggerEffect;
}

server cluster Descriptor {
Expand All @@ -2136,28 +2139,39 @@ endpoint 1 {
callback attribute partsList;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
callback attribute featureMap;
callback attribute clusterRevision;
}

server cluster PowerSource {
ram attribute status;
ram attribute order;
ram attribute description;
ram attribute status default = 1;
ram attribute order default = 1;
ram attribute description default = "Battery";
ram attribute batVoltage;
ram attribute batPercentRemaining;
ram attribute batTimeRemaining;
ram attribute batChargeLevel;
ram attribute batReplacementNeeded;
ram attribute batReplaceability;
ram attribute batPresent;
ram attribute batChargeState;
ram attribute batFunctionalWhileCharging;
callback attribute endpointList;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute featureMap default = 0x06;
ram attribute clusterRevision default = 1;
}

server cluster BooleanState {
ram attribute stateValue default = 0;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;
Expand Down
220 changes: 214 additions & 6 deletions examples/chef/devices/rootnode_contactsensor_27f76aeaf5.zap
Original file line number Diff line number Diff line change
Expand Up @@ -2316,13 +2316,21 @@
"profileId": 259,
"label": "MA-contactsensor",
"name": "MA-contactsensor"
},
{
"code": 17,
"profileId": 259,
"label": "MA-powersource",
"name": "MA-powersource"
}
],
"deviceVersions": [
1,
1
],
"deviceIdentifiers": [
21
21,
17
],
"deviceTypeName": "MA-contactsensor",
"deviceTypeCode": 21,
Expand All @@ -2343,6 +2351,14 @@
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "TriggerEffect",
"code": 64,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
}
],
"attributes": [
Expand Down Expand Up @@ -2410,6 +2426,22 @@
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "EventList",
"code": 65530,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AttributeList",
"code": 65531,
Expand Down Expand Up @@ -2564,6 +2596,22 @@
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "EventList",
"code": 65530,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AttributeList",
"code": 65531,
Expand Down Expand Up @@ -2632,7 +2680,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand All @@ -2648,7 +2696,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand All @@ -2664,6 +2712,150 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "Battery",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "BatVoltage",
"code": 11,
"mfgCode": null,
"side": "server",
"type": "int32u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "BatPercentRemaining",
"code": 12,
"mfgCode": null,
"side": "server",
"type": "int8u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "BatTimeRemaining",
"code": 13,
"mfgCode": null,
"side": "server",
"type": "int32u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "BatChargeLevel",
"code": 14,
"mfgCode": null,
"side": "server",
"type": "BatChargeLevelEnum",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "BatReplacementNeeded",
"code": 15,
"mfgCode": null,
"side": "server",
"type": "boolean",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "BatReplaceability",
"code": 16,
"mfgCode": null,
"side": "server",
"type": "BatReplaceabilityEnum",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "BatPresent",
"code": 17,
"mfgCode": null,
"side": "server",
"type": "boolean",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "BatChargeState",
"code": 26,
"mfgCode": null,
"side": "server",
"type": "BatChargeStateEnum",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "BatFunctionalWhileCharging",
"code": 28,
"mfgCode": null,
"side": "server",
"type": "boolean",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
Expand Down Expand Up @@ -2760,7 +2952,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"defaultValue": "0x06",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -2803,7 +2995,7 @@
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 1,
"reportable": 0,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
Expand Down Expand Up @@ -2840,6 +3032,22 @@
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "EventList",
"code": 65530,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AttributeList",
"code": 65531,
Expand Down Expand Up @@ -4525,7 +4733,7 @@
{
"endpointTypeName": "Anonymous Endpoint Type",
"endpointTypeIndex": 1,
"profileId": 260,
"profileId": 259,
"endpointId": 1,
"networkId": 0,
"parentEndpointIdentifier": null
Expand Down
Loading

0 comments on commit c499d0e

Please sign in to comment.