Skip to content

Commit

Permalink
TBD update-matter-repo.py script run from Apple extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
suveshpratapa committed Oct 15, 2024
1 parent fdc8a0b commit 6705728
Show file tree
Hide file tree
Showing 14 changed files with 817 additions and 102 deletions.
21 changes: 21 additions & 0 deletions examples/lock-app/lock-common/lock-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2403,6 +2403,20 @@ cluster DoorLock = 257 {
timed command access(invoke: administer) ClearAliroReaderConfig(): DefaultSuccess = 41;
}

/** This cluster provides Apple-specific information about the device. */
cluster AppleDeviceInformation = 323615744 {
revision 1;

readonly attribute optional boolean supportsTapToUnlock = 0;
readonly attribute optional boolean supportsWED = 1;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
readonly attribute attrib_id attributeList[] = 65531;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;
}

endpoint 0 {
device type ma_rootdevice = 22, version 1;
device type ma_powersource = 17, version 1;
Expand Down Expand Up @@ -2784,6 +2798,13 @@ endpoint 0 {
ram attribute featureMap default = 0x0000;
ram attribute clusterRevision default = 2;
}

server cluster AppleDeviceInformation {
ram attribute supportsTapToUnlock default = 1;
ram attribute supportsWED default = 1;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;
}
}
endpoint 1 {
device type ma_powersource = 17, version 1;
Expand Down
76 changes: 76 additions & 0 deletions examples/lock-app/lock-common/lock-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -4821,6 +4821,82 @@
"reportableChange": 0
}
]
},
{
"mfgCode": null,
"side": "server",
"enabled": 1,
"commands": [],
"attributes": [
{
"mfgCode": null,
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"reportable": 1,
"minInterval": 0,
"maxInterval": 1,
"reportableChange": 0,
"name": "SupportsTapToUnlock",
"side": "server",
"code": 0,
"type": "boolean",
"defaultValue": "1"
},
{
"mfgCode": null,
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"reportable": 1,
"minInterval": 0,
"maxInterval": 1,
"reportableChange": 0,
"name": "SupportsWED",
"side": "server",
"code": 1,
"type": "boolean",
"defaultValue": "1"
},
{
"mfgCode": null,
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"reportable": 1,
"minInterval": 0,
"maxInterval": 1,
"reportableChange": 0,
"name": "ClusterRevision",
"side": "server",
"code": 65533,
"type": "int16u",
"defaultValue": "1"
},
{
"mfgCode": null,
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"reportable": 1,
"minInterval": 0,
"maxInterval": 1,
"reportableChange": 0,
"name": "FeatureMap",
"side": "server",
"code": 65532,
"type": "bitmap32",
"defaultValue": "0"
}
],
"events": [],
"name": "Apple Device Information",
"code": 323615744,
"define": "APPLE_DEVICE_INFORMATION_CLUSTER"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
* Copyright (c) 2023 Apple Inc. All rights reserved.
*
* Apple Matter Extensions is licensed under Apple Inc.'s MFi Sample Code
* License Agreement, which is contained in the LICENSE file distributed with
* the Apple Matter Extensions, and only to those who accept that license.
*/

void MatterAppleDeviceInformationPluginServerInitCallback()
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0"?>
<!--
Copyright (c) 2023 Apple Inc. All rights reserved.
Apple Matter Extensions is licensed under Apple Inc.'s MFi Sample Code
License Agreement, which is contained in the LICENSE file distributed with
the Apple Matter Extensions, and only to those who accept that license.
-->
<configurator>
<domain name="CHIP"/>

<cluster>
<name>Apple Device Information</name>
<domain>CHIP</domain>
<code>0x1349FC00</code>
<define>APPLE_DEVICE_INFORMATION_CLUSTER</define>
<description>This cluster provides Apple-specific information about the device.</description>
<globalAttribute side="either" code="0xFFFD" value="1"/>

<!-- Whether this device supports tap to unlock. -->
<attribute side="server" code="0x0000" define="SUPPORTS_TAP_TO_UNLOCK" type="boolean" optional="true">SupportsTapToUnlock</attribute>
<attribute side="server" code="0x0001" define="SUPPORTS_WED" type="boolean" optional="true">SupportsWED</attribute>

</cluster>
</configurator>
98 changes: 77 additions & 21 deletions src/app/zap-templates/zcl/zcl.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
".",
"./data-model/chip/",
"./data-model/draft/",
"./data-model/silabs/"
"./data-model/silabs/",
"./data-model/apple/"
],
"_comment": "Ensure access-control-definitions.xml is first in xmlFile array",
"xmlFile": [
Expand Down Expand Up @@ -127,14 +128,21 @@
"sample-mei-cluster.xml",
"types/door-lock.xml",
"types/occupancy-sensing.xml",
"types/thermostat-user-interface-configuration.xml"
"types/thermostat-user-interface-configuration.xml",
"apple-device-information-cluster.xml"
],
"manufacturersXml": "../../../../src/app/zap-templates/zcl/data-model/manufacturers.xml",
"options": {
"text": {
"defaultResponsePolicy": ["Always", "Conditional", "Never"]
"defaultResponsePolicy": [
"Always",
"Conditional",
"Never"
]
},
"bool": ["commandDiscovery"]
"bool": [
"commandDiscovery"
]
},
"defaults": {
"text": {
Expand Down Expand Up @@ -180,8 +188,13 @@
"SpecificationVersion",
"MaxPathsPerInvoke"
],
"Bridged Device Basic Information": ["ProductAppearance"],
"Descriptor": ["ClusterRevision", "FeatureMap"],
"Bridged Device Basic Information": [
"ProductAppearance"
],
"Descriptor": [
"ClusterRevision",
"FeatureMap"
],
"Device Energy Management": [
"ESAType",
"ESACanGenerate",
Expand Down Expand Up @@ -224,7 +237,11 @@
"SessionEnergyDischarged",
"FeatureMap"
],
"Energy EVSE Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
"Energy EVSE Mode": [
"SupportedModes",
"CurrentMode",
"FeatureMap"
],
"Ethernet Network Diagnostics": [
"PHYRate",
"FullDuplex",
Expand Down Expand Up @@ -363,14 +380,21 @@
"CurrentMaxRate",
"OverrunCount"
],
"Channel": ["Lineup", "CurrentChannel"],
"Channel": [
"Lineup",
"CurrentChannel"
],
"Media Playback": [
"SampledPosition",
"ActiveAudioTrack",
"ActiveTextTrack"
],
"Application Launcher": ["CurrentApp"],
"Application Basic": ["Application"],
"Application Launcher": [
"CurrentApp"
],
"Application Basic": [
"Application"
],
"Time Synchronization": [
"TrustedTimeSource",
"DefaultNTP",
Expand All @@ -382,15 +406,21 @@
"TimeZoneListMaxSize",
"DSTOffsetListMaxSize"
],
"Temperature Control": ["SupportedTemperatureLevels"],
"Temperature Control": [
"SupportedTemperatureLevels"
],
"Dishwasher Mode": [
"SupportedModes",
"CurrentMode",
"StartUpMode",
"OnMode",
"FeatureMap"
],
"Microwave Oven Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
"Microwave Oven Mode": [
"SupportedModes",
"CurrentMode",
"FeatureMap"
],
"Microwave Oven Control": [
"CookTime",
"MaxCookTime",
Expand All @@ -417,8 +447,16 @@
"OnMode",
"FeatureMap"
],
"RVC Clean Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
"RVC Run Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
"RVC Clean Mode": [
"SupportedModes",
"CurrentMode",
"FeatureMap"
],
"RVC Run Mode": [
"SupportedModes",
"CurrentMode",
"FeatureMap"
],
"Operational State": [
"OperationalState",
"OperationalError",
Expand Down Expand Up @@ -595,8 +633,13 @@
"LevelValue",
"FeatureMap"
],
"Air Quality": ["AirQuality", "FeatureMap"],
"Thermostat": ["QueuedPreset"],
"Air Quality": [
"AirQuality",
"FeatureMap"
],
"Thermostat": [
"QueuedPreset"
],
"Electrical Energy Measurement": [
"Accuracy",
"CumulativeEnergyImported",
Expand Down Expand Up @@ -628,16 +671,29 @@
"NeutralCurrent",
"FeatureMap"
],
"Power Topology": ["FeatureMap"],
"Valve Configuration and Control": ["RemainingDuration"],
"Boolean State Configuration": ["CurrentSensitivityLevel"]
"Power Topology": [
"FeatureMap"
],
"Valve Configuration and Control": [
"RemainingDuration"
],
"Boolean State Configuration": [
"CurrentSensitivityLevel"
]
},
"defaultReportingPolicy": "mandatory",
"ZCLDataTypes": ["ARRAY", "BITMAP", "ENUM", "NUMBER", "STRING", "STRUCT"],
"ZCLDataTypes": [
"ARRAY",
"BITMAP",
"ENUM",
"NUMBER",
"STRING",
"STRUCT"
],
"fabricHandling": {
"automaticallyCreateFields": true,
"indexFieldId": 254,
"indexFieldName": "FabricIndex",
"indexType": "fabric_idx"
}
}
}
Loading

0 comments on commit 6705728

Please sign in to comment.