diff --git a/config/nrfconnect/chip-module/CMakeLists.txt b/config/nrfconnect/chip-module/CMakeLists.txt index 0001ff78309a53..81f7769ac21094 100644 --- a/config/nrfconnect/chip-module/CMakeLists.txt +++ b/config/nrfconnect/chip-module/CMakeLists.txt @@ -136,12 +136,11 @@ matter_add_gn_arg_bool ("chip_malloc_sys_heap" CONFIG_CHIP_MA matter_add_gn_arg_bool ("chip_enable_wifi" CONFIG_WIFI_NRF700X) matter_add_gn_arg_bool ("chip_system_config_provide_statistics" CONFIG_CHIP_STATISTICS) matter_add_gn_arg_bool ("chip_enable_icd_server" CONFIG_CHIP_ENABLE_ICD_SUPPORT) +matter_add_gn_arg_bool ("chip_enable_factory_data" CONFIG_CHIP_FACTORY_DATA) -if (CONFIG_CHIP_FACTORY_DATA) - matter_add_gn_arg_bool("chip_use_transitional_commissionable_data_provider" FALSE) - matter_add_gn_arg_bool("chip_enable_factory_data" TRUE) -elseif (CONFIG_CHIP_FACTORY_DATA_CUSTOM_BACKEND) - matter_add_gn_arg_bool("chip_use_transitional_commissionable_data_provider" FALSE) +if (CONFIG_CHIP_FACTORY_DATA OR CONFIG_CHIP_FACTORY_DATA_CUSTOM_BACKEND) + matter_add_gn_arg_bool("chip_use_transitional_commissionable_data_provider" FALSE) + matter_add_gn_arg_bool("chip_use_transitional_device_instance_info_provider" FALSE) endif() if (CONFIG_CHIP_ROTATING_DEVICE_ID) diff --git a/data_model/clusters/DiagnosticsGeneral.xml b/data_model/clusters/DiagnosticsGeneral.xml index ea4ce75cd549d9..9200a44cf971c1 100644 --- a/data_model/clusters/DiagnosticsGeneral.xml +++ b/data_model/clusters/DiagnosticsGeneral.xml @@ -258,6 +258,9 @@ Davis, CA 95616, USA + + + diff --git a/data_model/spec_sha b/data_model/spec_sha index d0a25923c7c7b5..bc073c1d35bf52 100644 --- a/data_model/spec_sha +++ b/data_model/spec_sha @@ -1 +1 @@ -8e4f91da4aacda4e799b9979605342a315ac7e43 +0267d8197ec5c00d0220fdef7950750b63e08c1f diff --git a/docs/ci-cd/index.md b/docs/ci-cd/index.md index 3f9f808b7d64b0..3cc36d6ae4765e 100644 --- a/docs/ci-cd/index.md +++ b/docs/ci-cd/index.md @@ -8,12 +8,17 @@ tools/* ## Project Information -- [Build Guide](../guides/BUILDING.html) +- [Build Guide](../guides/BUILDING.md) - Sphinx documentation framework - New directories and individual files must be added to the [tree](https://github.com/project-chip/connectedhomeip/blob/master/docs/index.md) - New files under directories must be added to the tree in the index file; see above. Glob and regular expressions may be used to include all + - The + [documentation page](https://project-chip.github.io/connectedhomeip-doc/) + is the end product + - Links can be relative; links ending in ".md" in the code will be + reflected as ".html" on that page - Pull Requests - Built in style and spelling checks must be satisfied - Larger changes should go through an approval process; reviewers are @@ -31,7 +36,7 @@ Work In Progress ## Tools -- [Daily Fail Summary](tools/daily_fail_summary.html) +- [Daily Fail Summary](tools/daily_fail_summary.md) ## To Do diff --git a/docs/examples/index.md b/docs/examples/index.md index 703bcb5fb3bc7f..03835b1c41ca37 100644 --- a/docs/examples/index.md +++ b/docs/examples/index.md @@ -311,3 +311,12 @@ rvc-app/README air-purifier-app/**/README ``` + +## Network Infrastructure Manager example + +```{toctree} +:glob: +:maxdepth: 1 + +network-manager-app/README +``` diff --git a/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter b/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter index 0e4d5b1fd20c94..2eef432d77f939 100644 --- a/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter +++ b/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -73,6 +75,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -85,7 +88,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -144,7 +147,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -159,7 +162,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -231,14 +234,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -247,10 +252,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -326,7 +333,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -399,11 +406,12 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -442,17 +450,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -463,13 +471,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -550,12 +561,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -568,6 +582,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -587,48 +608,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -663,11 +695,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -751,12 +791,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -775,12 +815,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -817,12 +859,20 @@ server cluster AdministratorCommissioning = 60 { octet_string<32> salt = 4; } + request struct OpenBasicCommissioningWindowRequest { + int16u commissioningTimeout = 0; + } + + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -875,15 +925,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -897,6 +961,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -909,38 +979,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -995,26 +1053,30 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** Attributes for reporting air quality classification */ -server cluster AirQuality = 91 { +cluster AirQuality = 91 { revision 1; // NOTE: Default/not specifically set enum AirQualityEnum : enum8 { @@ -1044,7 +1106,7 @@ server cluster AirQuality = 91 { } /** Attributes and commands for monitoring HEPA filters in a device */ -server cluster HepaFilterMonitoring = 113 { +cluster HepaFilterMonitoring = 113 { revision 1; // NOTE: Default/not specifically set enum ChangeIndicationEnum : enum8 { @@ -1077,12 +1139,12 @@ server cluster HepaFilterMonitoring = 113 { char_string<20> productIdentifierValue = 1; } - readonly attribute percent condition = 0; - readonly attribute DegradationDirectionEnum degradationDirection = 1; + readonly attribute optional percent condition = 0; + readonly attribute optional DegradationDirectionEnum degradationDirection = 1; readonly attribute ChangeIndicationEnum changeIndication = 2; - readonly attribute boolean inPlaceIndicator = 3; - attribute nullable epoch_s lastChangedTime = 4; - readonly attribute ReplacementProductStruct replacementProductList[] = 5; + readonly attribute optional boolean inPlaceIndicator = 3; + attribute optional nullable epoch_s lastChangedTime = 4; + readonly attribute optional ReplacementProductStruct replacementProductList[] = 5; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1090,11 +1152,12 @@ server cluster HepaFilterMonitoring = 113 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reset the condition of the replaceable to the non degraded state */ command ResetCondition(): DefaultSuccess = 0; } /** Attributes and commands for monitoring activated carbon filters in a device */ -server cluster ActivatedCarbonFilterMonitoring = 114 { +cluster ActivatedCarbonFilterMonitoring = 114 { revision 1; // NOTE: Default/not specifically set enum ChangeIndicationEnum : enum8 { @@ -1127,12 +1190,12 @@ server cluster ActivatedCarbonFilterMonitoring = 114 { char_string<20> productIdentifierValue = 1; } - readonly attribute percent condition = 0; - readonly attribute DegradationDirectionEnum degradationDirection = 1; + readonly attribute optional percent condition = 0; + readonly attribute optional DegradationDirectionEnum degradationDirection = 1; readonly attribute ChangeIndicationEnum changeIndication = 2; - readonly attribute boolean inPlaceIndicator = 3; - attribute nullable epoch_s lastChangedTime = 4; - readonly attribute ReplacementProductStruct replacementProductList[] = 5; + readonly attribute optional boolean inPlaceIndicator = 3; + attribute optional nullable epoch_s lastChangedTime = 4; + readonly attribute optional ReplacementProductStruct replacementProductList[] = 5; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1140,11 +1203,12 @@ server cluster ActivatedCarbonFilterMonitoring = 114 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reset the condition of the replaceable to the non degraded state */ command ResetCondition(): DefaultSuccess = 0; } /** An interface for controlling a fan in a heating/cooling system. */ -provisional server cluster FanControl = 514 { +provisional cluster FanControl = 514 { revision 4; enum AirflowDirectionEnum : enum8 { @@ -1200,14 +1264,14 @@ provisional server cluster FanControl = 514 { readonly attribute FanModeSequenceEnum fanModeSequence = 1; attribute nullable percent percentSetting = 2; readonly attribute percent percentCurrent = 3; - readonly attribute int8u speedMax = 4; - attribute nullable int8u speedSetting = 5; - readonly attribute int8u speedCurrent = 6; - readonly attribute RockBitmap rockSupport = 7; - attribute RockBitmap rockSetting = 8; - readonly attribute WindBitmap windSupport = 9; - attribute WindBitmap windSetting = 10; - attribute AirflowDirectionEnum airflowDirection = 11; + readonly attribute optional int8u speedMax = 4; + attribute optional nullable int8u speedSetting = 5; + readonly attribute optional int8u speedCurrent = 6; + readonly attribute optional RockBitmap rockSupport = 7; + attribute optional RockBitmap rockSetting = 8; + readonly attribute optional WindBitmap windSupport = 9; + attribute optional WindBitmap windSetting = 10; + attribute optional AirflowDirectionEnum airflowDirection = 11; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1221,17 +1285,18 @@ provisional server cluster FanControl = 514 { optional boolean lowestOff = 2; } + /** The Step command speeds up or slows down the fan, in steps. */ command Step(StepRequest): DefaultSuccess = 0; } /** Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. */ -server cluster TemperatureMeasurement = 1026 { +cluster TemperatureMeasurement = 1026 { revision 1; // NOTE: Default/not specifically set readonly attribute nullable temperature measuredValue = 0; readonly attribute nullable temperature minMeasuredValue = 1; readonly attribute nullable temperature maxMeasuredValue = 2; - readonly attribute int16u tolerance = 3; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1241,13 +1306,13 @@ server cluster TemperatureMeasurement = 1026 { } /** Attributes and commands for configuring the measurement of relative humidity, and reporting relative humidity measurements. */ -server cluster RelativeHumidityMeasurement = 1029 { +cluster RelativeHumidityMeasurement = 1029 { revision 3; readonly attribute nullable int16u measuredValue = 0; readonly attribute nullable int16u minMeasuredValue = 1; readonly attribute nullable int16u maxMeasuredValue = 2; - readonly attribute int16u tolerance = 3; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1257,7 +1322,7 @@ server cluster RelativeHumidityMeasurement = 1029 { } /** Attributes for reporting carbon monoxide concentration measurements */ -server cluster CarbonMonoxideConcentrationMeasurement = 1036 { +cluster CarbonMonoxideConcentrationMeasurement = 1036 { revision 3; enum LevelValueEnum : enum8 { @@ -1294,17 +1359,17 @@ server cluster CarbonMonoxideConcentrationMeasurement = 1036 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute single uncertainty = 7; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1314,7 +1379,7 @@ server cluster CarbonMonoxideConcentrationMeasurement = 1036 { } /** Attributes for reporting carbon dioxide concentration measurements */ -server cluster CarbonDioxideConcentrationMeasurement = 1037 { +cluster CarbonDioxideConcentrationMeasurement = 1037 { revision 3; enum LevelValueEnum : enum8 { @@ -1351,17 +1416,17 @@ server cluster CarbonDioxideConcentrationMeasurement = 1037 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute single uncertainty = 7; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1371,7 +1436,7 @@ server cluster CarbonDioxideConcentrationMeasurement = 1037 { } /** Attributes for reporting nitrogen dioxide concentration measurements */ -server cluster NitrogenDioxideConcentrationMeasurement = 1043 { +cluster NitrogenDioxideConcentrationMeasurement = 1043 { revision 3; enum LevelValueEnum : enum8 { @@ -1408,17 +1473,17 @@ server cluster NitrogenDioxideConcentrationMeasurement = 1043 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute single uncertainty = 7; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1428,7 +1493,7 @@ server cluster NitrogenDioxideConcentrationMeasurement = 1043 { } /** Attributes for reporting ozone concentration measurements */ -server cluster OzoneConcentrationMeasurement = 1045 { +cluster OzoneConcentrationMeasurement = 1045 { revision 3; enum LevelValueEnum : enum8 { @@ -1465,17 +1530,17 @@ server cluster OzoneConcentrationMeasurement = 1045 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute single uncertainty = 7; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1485,7 +1550,7 @@ server cluster OzoneConcentrationMeasurement = 1045 { } /** Attributes for reporting PM2.5 concentration measurements */ -server cluster Pm25ConcentrationMeasurement = 1066 { +cluster Pm25ConcentrationMeasurement = 1066 { revision 3; enum LevelValueEnum : enum8 { @@ -1522,17 +1587,17 @@ server cluster Pm25ConcentrationMeasurement = 1066 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute single uncertainty = 7; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1542,7 +1607,7 @@ server cluster Pm25ConcentrationMeasurement = 1066 { } /** Attributes for reporting formaldehyde concentration measurements */ -server cluster FormaldehydeConcentrationMeasurement = 1067 { +cluster FormaldehydeConcentrationMeasurement = 1067 { revision 3; enum LevelValueEnum : enum8 { @@ -1579,17 +1644,17 @@ server cluster FormaldehydeConcentrationMeasurement = 1067 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute single uncertainty = 7; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1599,7 +1664,7 @@ server cluster FormaldehydeConcentrationMeasurement = 1067 { } /** Attributes for reporting PM1 concentration measurements */ -server cluster Pm1ConcentrationMeasurement = 1068 { +cluster Pm1ConcentrationMeasurement = 1068 { revision 3; enum LevelValueEnum : enum8 { @@ -1636,17 +1701,17 @@ server cluster Pm1ConcentrationMeasurement = 1068 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute single uncertainty = 7; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1656,7 +1721,7 @@ server cluster Pm1ConcentrationMeasurement = 1068 { } /** Attributes for reporting PM10 concentration measurements */ -server cluster Pm10ConcentrationMeasurement = 1069 { +cluster Pm10ConcentrationMeasurement = 1069 { revision 3; enum LevelValueEnum : enum8 { @@ -1693,17 +1758,17 @@ server cluster Pm10ConcentrationMeasurement = 1069 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute single uncertainty = 7; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1713,7 +1778,7 @@ server cluster Pm10ConcentrationMeasurement = 1069 { } /** Attributes for reporting total volatile organic compounds concentration measurements */ -server cluster TotalVolatileOrganicCompoundsConcentrationMeasurement = 1070 { +cluster TotalVolatileOrganicCompoundsConcentrationMeasurement = 1070 { revision 3; enum LevelValueEnum : enum8 { @@ -1750,17 +1815,17 @@ server cluster TotalVolatileOrganicCompoundsConcentrationMeasurement = 1070 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute single uncertainty = 7; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1770,7 +1835,7 @@ server cluster TotalVolatileOrganicCompoundsConcentrationMeasurement = 1070 { } /** Attributes for reporting radon concentration measurements */ -server cluster RadonConcentrationMeasurement = 1071 { +cluster RadonConcentrationMeasurement = 1071 { revision 3; enum LevelValueEnum : enum8 { @@ -1807,17 +1872,17 @@ server cluster RadonConcentrationMeasurement = 1071 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute single uncertainty = 7; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter index 8f598f4281e4ef..deec044a356255 100644 --- a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter +++ b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -40,11 +40,19 @@ server cluster Identify = 3 { int16u identifyTime = 0; } + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -67,6 +75,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -79,7 +88,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -138,7 +147,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -153,7 +162,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -225,14 +234,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -241,10 +252,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -320,7 +333,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -393,11 +406,12 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -436,17 +450,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -457,13 +471,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -544,12 +561,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -562,6 +582,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -581,48 +608,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -706,12 +744,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -730,12 +768,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -756,10 +796,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -767,11 +807,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ -server cluster ThreadNetworkDiagnostics = 53 { +cluster ThreadNetworkDiagnostics = 53 { revision 1; // NOTE: Default/not specifically set enum ConnectionStatusEnum : enum8 { @@ -868,7 +909,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u panId = 3; readonly attribute nullable int64u extendedPanId = 4; readonly attribute nullable octet_string<17> meshLocalPrefix = 5; - readonly attribute int64u overrunCount = 6; + readonly attribute optional int64u overrunCount = 6; readonly attribute NeighborTableStruct neighborTable[] = 7; readonly attribute RouteTableStruct routeTable[] = 8; readonly attribute nullable int32u partitionId = 9; @@ -876,51 +917,51 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u dataVersion = 11; readonly attribute nullable int16u stableDataVersion = 12; readonly attribute nullable int8u leaderRouterId = 13; - readonly attribute int16u detachedRoleCount = 14; - readonly attribute int16u childRoleCount = 15; - readonly attribute int16u routerRoleCount = 16; - readonly attribute int16u leaderRoleCount = 17; - readonly attribute int16u attachAttemptCount = 18; - readonly attribute int16u partitionIdChangeCount = 19; - readonly attribute int16u betterPartitionAttachAttemptCount = 20; - readonly attribute int16u parentChangeCount = 21; - readonly attribute int32u txTotalCount = 22; - readonly attribute int32u txUnicastCount = 23; - readonly attribute int32u txBroadcastCount = 24; - readonly attribute int32u txAckRequestedCount = 25; - readonly attribute int32u txAckedCount = 26; - readonly attribute int32u txNoAckRequestedCount = 27; - readonly attribute int32u txDataCount = 28; - readonly attribute int32u txDataPollCount = 29; - readonly attribute int32u txBeaconCount = 30; - readonly attribute int32u txBeaconRequestCount = 31; - readonly attribute int32u txOtherCount = 32; - readonly attribute int32u txRetryCount = 33; - readonly attribute int32u txDirectMaxRetryExpiryCount = 34; - readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; - readonly attribute int32u txErrCcaCount = 36; - readonly attribute int32u txErrAbortCount = 37; - readonly attribute int32u txErrBusyChannelCount = 38; - readonly attribute int32u rxTotalCount = 39; - readonly attribute int32u rxUnicastCount = 40; - readonly attribute int32u rxBroadcastCount = 41; - readonly attribute int32u rxDataCount = 42; - readonly attribute int32u rxDataPollCount = 43; - readonly attribute int32u rxBeaconCount = 44; - readonly attribute int32u rxBeaconRequestCount = 45; - readonly attribute int32u rxOtherCount = 46; - readonly attribute int32u rxAddressFilteredCount = 47; - readonly attribute int32u rxDestAddrFilteredCount = 48; - readonly attribute int32u rxDuplicatedCount = 49; - readonly attribute int32u rxErrNoFrameCount = 50; - readonly attribute int32u rxErrUnknownNeighborCount = 51; - readonly attribute int32u rxErrInvalidSrcAddrCount = 52; - readonly attribute int32u rxErrSecCount = 53; - readonly attribute int32u rxErrFcsCount = 54; - readonly attribute int32u rxErrOtherCount = 55; - readonly attribute nullable int64u activeTimestamp = 56; - readonly attribute nullable int64u pendingTimestamp = 57; - readonly attribute nullable int32u delay = 58; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; readonly attribute nullable SecurityPolicy securityPolicy = 59; readonly attribute nullable octet_string<4> channelPage0Mask = 60; readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; @@ -932,11 +973,12 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster WiFiNetworkDiagnostics = 54 { +cluster WiFiNetworkDiagnostics = 54 { revision 1; // NOTE: Default/not specifically set enum AssociationFailureCauseEnum : enum8 { @@ -993,14 +1035,14 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; - readonly attribute nullable int32u beaconLostCount = 5; - readonly attribute nullable int32u beaconRxCount = 6; - readonly attribute nullable int32u packetMulticastRxCount = 7; - readonly attribute nullable int32u packetMulticastTxCount = 8; - readonly attribute nullable int32u packetUnicastRxCount = 9; - readonly attribute nullable int32u packetUnicastTxCount = 10; - readonly attribute nullable int64u currentMaxRate = 11; - readonly attribute nullable int64u overrunCount = 12; + readonly attribute optional nullable int32u beaconLostCount = 5; + readonly attribute optional nullable int32u beaconRxCount = 6; + readonly attribute optional nullable int32u packetMulticastRxCount = 7; + readonly attribute optional nullable int32u packetMulticastTxCount = 8; + readonly attribute optional nullable int32u packetUnicastRxCount = 9; + readonly attribute optional nullable int32u packetUnicastTxCount = 10; + readonly attribute optional nullable int64u currentMaxRate = 11; + readonly attribute optional nullable int64u overrunCount = 12; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1008,11 +1050,12 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 */ command ResetCounts(): DefaultSuccess = 0; } /** The Ethernet Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster EthernetNetworkDiagnostics = 55 { +cluster EthernetNetworkDiagnostics = 55 { revision 1; // NOTE: Default/not specifically set enum PHYRateEnum : enum8 { @@ -1033,15 +1076,15 @@ server cluster EthernetNetworkDiagnostics = 55 { kErrorCounts = 0x2; } - readonly attribute nullable PHYRateEnum PHYRate = 0; - readonly attribute nullable boolean fullDuplex = 1; - readonly attribute int64u packetRxCount = 2; - readonly attribute int64u packetTxCount = 3; - readonly attribute int64u txErrCount = 4; - readonly attribute int64u collisionCount = 5; - readonly attribute int64u overrunCount = 6; - readonly attribute nullable boolean carrierDetect = 7; - readonly attribute int64u timeSinceReset = 8; + readonly attribute optional nullable PHYRateEnum PHYRate = 0; + readonly attribute optional nullable boolean fullDuplex = 1; + readonly attribute optional int64u packetRxCount = 2; + readonly attribute optional int64u packetTxCount = 3; + readonly attribute optional int64u txErrCount = 4; + readonly attribute optional int64u collisionCount = 5; + readonly attribute optional int64u overrunCount = 6; + readonly attribute optional nullable boolean carrierDetect = 7; + readonly attribute optional int64u timeSinceReset = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1049,11 +1092,12 @@ server cluster EthernetNetworkDiagnostics = 55 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the attributes: PacketRxCount, PacketTxCount, TxErrCount, CollisionCount, OverrunCount to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1094,13 +1138,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1153,15 +1200,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1175,6 +1236,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1187,38 +1254,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1273,26 +1328,30 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** Attributes for reporting air quality classification */ -server cluster AirQuality = 91 { +cluster AirQuality = 91 { revision 1; // NOTE: Default/not specifically set enum AirQualityEnum : enum8 { @@ -1322,12 +1381,13 @@ server cluster AirQuality = 91 { } /** Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. */ -server cluster TemperatureMeasurement = 1026 { +cluster TemperatureMeasurement = 1026 { revision 1; // NOTE: Default/not specifically set readonly attribute nullable temperature measuredValue = 0; readonly attribute nullable temperature minMeasuredValue = 1; readonly attribute nullable temperature maxMeasuredValue = 2; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1337,12 +1397,13 @@ server cluster TemperatureMeasurement = 1026 { } /** Attributes and commands for configuring the measurement of relative humidity, and reporting relative humidity measurements. */ -server cluster RelativeHumidityMeasurement = 1029 { +cluster RelativeHumidityMeasurement = 1029 { revision 3; readonly attribute nullable int16u measuredValue = 0; readonly attribute nullable int16u minMeasuredValue = 1; readonly attribute nullable int16u maxMeasuredValue = 2; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1352,7 +1413,7 @@ server cluster RelativeHumidityMeasurement = 1029 { } /** Attributes for reporting carbon monoxide concentration measurements */ -server cluster CarbonMonoxideConcentrationMeasurement = 1036 { +cluster CarbonMonoxideConcentrationMeasurement = 1036 { revision 3; enum LevelValueEnum : enum8 { @@ -1389,9 +1450,17 @@ server cluster CarbonMonoxideConcentrationMeasurement = 1036 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1401,7 +1470,7 @@ server cluster CarbonMonoxideConcentrationMeasurement = 1036 { } /** Attributes for reporting carbon dioxide concentration measurements */ -server cluster CarbonDioxideConcentrationMeasurement = 1037 { +cluster CarbonDioxideConcentrationMeasurement = 1037 { revision 3; enum LevelValueEnum : enum8 { @@ -1438,9 +1507,17 @@ server cluster CarbonDioxideConcentrationMeasurement = 1037 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1450,7 +1527,7 @@ server cluster CarbonDioxideConcentrationMeasurement = 1037 { } /** Attributes for reporting nitrogen dioxide concentration measurements */ -server cluster NitrogenDioxideConcentrationMeasurement = 1043 { +cluster NitrogenDioxideConcentrationMeasurement = 1043 { revision 3; enum LevelValueEnum : enum8 { @@ -1487,9 +1564,17 @@ server cluster NitrogenDioxideConcentrationMeasurement = 1043 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1499,7 +1584,7 @@ server cluster NitrogenDioxideConcentrationMeasurement = 1043 { } /** Attributes for reporting ozone concentration measurements */ -server cluster OzoneConcentrationMeasurement = 1045 { +cluster OzoneConcentrationMeasurement = 1045 { revision 3; enum LevelValueEnum : enum8 { @@ -1536,9 +1621,17 @@ server cluster OzoneConcentrationMeasurement = 1045 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1548,7 +1641,7 @@ server cluster OzoneConcentrationMeasurement = 1045 { } /** Attributes for reporting PM2.5 concentration measurements */ -server cluster Pm25ConcentrationMeasurement = 1066 { +cluster Pm25ConcentrationMeasurement = 1066 { revision 3; enum LevelValueEnum : enum8 { @@ -1585,9 +1678,17 @@ server cluster Pm25ConcentrationMeasurement = 1066 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1597,7 +1698,7 @@ server cluster Pm25ConcentrationMeasurement = 1066 { } /** Attributes for reporting formaldehyde concentration measurements */ -server cluster FormaldehydeConcentrationMeasurement = 1067 { +cluster FormaldehydeConcentrationMeasurement = 1067 { revision 3; enum LevelValueEnum : enum8 { @@ -1634,9 +1735,17 @@ server cluster FormaldehydeConcentrationMeasurement = 1067 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1646,7 +1755,7 @@ server cluster FormaldehydeConcentrationMeasurement = 1067 { } /** Attributes for reporting PM1 concentration measurements */ -server cluster Pm1ConcentrationMeasurement = 1068 { +cluster Pm1ConcentrationMeasurement = 1068 { revision 3; enum LevelValueEnum : enum8 { @@ -1683,9 +1792,17 @@ server cluster Pm1ConcentrationMeasurement = 1068 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1695,7 +1812,7 @@ server cluster Pm1ConcentrationMeasurement = 1068 { } /** Attributes for reporting PM10 concentration measurements */ -server cluster Pm10ConcentrationMeasurement = 1069 { +cluster Pm10ConcentrationMeasurement = 1069 { revision 3; enum LevelValueEnum : enum8 { @@ -1732,9 +1849,17 @@ server cluster Pm10ConcentrationMeasurement = 1069 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1744,7 +1869,7 @@ server cluster Pm10ConcentrationMeasurement = 1069 { } /** Attributes for reporting total volatile organic compounds concentration measurements */ -server cluster TotalVolatileOrganicCompoundsConcentrationMeasurement = 1070 { +cluster TotalVolatileOrganicCompoundsConcentrationMeasurement = 1070 { revision 3; enum LevelValueEnum : enum8 { @@ -1781,9 +1906,17 @@ server cluster TotalVolatileOrganicCompoundsConcentrationMeasurement = 1070 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1793,7 +1926,7 @@ server cluster TotalVolatileOrganicCompoundsConcentrationMeasurement = 1070 { } /** Attributes for reporting radon concentration measurements */ -server cluster RadonConcentrationMeasurement = 1071 { +cluster RadonConcentrationMeasurement = 1071 { revision 3; enum LevelValueEnum : enum8 { @@ -1830,9 +1963,17 @@ server cluster RadonConcentrationMeasurement = 1071 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 0557d6764fb511..fca0caef6be28e 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -74,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** Attributes and commands for scene configuration and manipulation. */ -provisional server cluster Scenes = 5 { +provisional cluster Scenes = 5 { revision 5; bitmap CopyModeBitmap : bitmap8 { @@ -158,8 +166,12 @@ provisional server cluster Scenes = 5 { fabric_idx fabricIndex = 254; } + readonly attribute optional int8u sceneCount = 0; + readonly attribute optional int8u currentScene = 1; + readonly attribute optional group_id currentGroup = 2; + readonly attribute optional boolean sceneValid = 3; readonly attribute NameSupportBitmap nameSupport = 4; - readonly attribute nullable node_id lastConfiguredBy = 5; + readonly attribute optional nullable node_id lastConfiguredBy = 5; readonly attribute int16u sceneTableSize = 6; readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; readonly attribute command_id generatedCommandList[] = 65528; @@ -177,62 +189,17 @@ provisional server cluster Scenes = 5 { ExtensionFieldSet extensionFieldSets[] = 4; } - request struct ViewSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - request struct RemoveSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - request struct RemoveAllScenesRequest { - group_id groupID = 0; - } - - request struct StoreSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - request struct RecallSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - optional nullable int16u transitionTime = 2; - } - - request struct GetSceneMembershipRequest { - group_id groupID = 0; - } - - request struct EnhancedAddSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - int16u transitionTime = 2; - char_string sceneName = 3; - ExtensionFieldSet extensionFieldSets[] = 4; - } - - request struct EnhancedViewSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - request struct CopySceneRequest { - CopyModeBitmap mode = 0; - group_id groupIdentifierFrom = 1; - int8u sceneIdentifierFrom = 2; - group_id groupIdentifierTo = 3; - int8u sceneIdentifierTo = 4; - } - response struct AddSceneResponse = 0 { status status = 0; group_id groupID = 1; int8u sceneID = 2; } + request struct ViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + response struct ViewSceneResponse = 1 { status status = 0; group_id groupID = 1; @@ -242,23 +209,47 @@ provisional server cluster Scenes = 5 { optional ExtensionFieldSet extensionFieldSets[] = 5; } + request struct RemoveSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + response struct RemoveSceneResponse = 2 { status status = 0; group_id groupID = 1; int8u sceneID = 2; } + request struct RemoveAllScenesRequest { + group_id groupID = 0; + } + response struct RemoveAllScenesResponse = 3 { status status = 0; group_id groupID = 1; } + request struct StoreSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + response struct StoreSceneResponse = 4 { status status = 0; group_id groupID = 1; int8u sceneID = 2; } + request struct RecallSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + optional nullable int16u transitionTime = 2; + } + + request struct GetSceneMembershipRequest { + group_id groupID = 0; + } + response struct GetSceneMembershipResponse = 6 { status status = 0; nullable int8u capacity = 1; @@ -266,12 +257,25 @@ provisional server cluster Scenes = 5 { optional int8u sceneList[] = 3; } + request struct EnhancedAddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int16u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; + } + response struct EnhancedAddSceneResponse = 64 { status status = 0; group_id groupID = 1; int8u sceneID = 2; } + request struct EnhancedViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + response struct EnhancedViewSceneResponse = 65 { status status = 0; group_id groupID = 1; @@ -281,26 +285,44 @@ provisional server cluster Scenes = 5 { optional ExtensionFieldSet extensionFieldSets[] = 5; } + request struct CopySceneRequest { + CopyModeBitmap mode = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + group_id groupIdentifierTo = 3; + int8u sceneIdentifierTo = 4; + } + response struct CopySceneResponse = 66 { status status = 0; group_id groupIdentifierFrom = 1; int8u sceneIdentifierFrom = 2; } + /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; + /** Retrieves the requested scene entry from its Scene table. */ fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; + /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; + /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; + /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -client cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -372,7 +394,7 @@ client cluster OnOff = 6 { } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -407,10 +429,10 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; - readonly attribute boolean globalSceneControl = 16384; - attribute int16u onTime = 16385; - attribute int16u offWaitTime = 16386; - attribute access(write: manage) nullable StartUpOnOffEnum startUpOnOff = 16387; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -429,16 +451,22 @@ server cluster OnOff = 6 { int16u offWaitTime = 2; } + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** Attributes and commands for configuring On/Off switching devices. */ -server cluster OnOffSwitchConfiguration = 7 { +cluster OnOffSwitchConfiguration = 7 { revision 1; // NOTE: Default/not specifically set readonly attribute enum8 switchType = 0; @@ -452,7 +480,7 @@ server cluster OnOffSwitchConfiguration = 7 { } /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ -server cluster LevelControl = 8 { +cluster LevelControl = 8 { revision 5; enum MoveModeEnum : enum8 { @@ -477,19 +505,19 @@ server cluster LevelControl = 8 { } readonly attribute nullable int8u currentLevel = 0; - readonly attribute int16u remainingTime = 1; - readonly attribute int8u minLevel = 2; - readonly attribute int8u maxLevel = 3; - readonly attribute int16u currentFrequency = 4; - readonly attribute int16u minFrequency = 5; - readonly attribute int16u maxFrequency = 6; + readonly attribute optional int16u remainingTime = 1; + readonly attribute optional int8u minLevel = 2; + readonly attribute optional int8u maxLevel = 3; + readonly attribute optional int16u currentFrequency = 4; + readonly attribute optional int16u minFrequency = 5; + readonly attribute optional int16u maxFrequency = 6; attribute OptionsBitmap options = 15; - attribute int16u onOffTransitionTime = 16; + attribute optional int16u onOffTransitionTime = 16; attribute nullable int8u onLevel = 17; - attribute nullable int16u onTransitionTime = 18; - attribute nullable int16u offTransitionTime = 19; - attribute nullable int8u defaultMoveRate = 20; - attribute access(write: manage) nullable int8u startUpCurrentLevel = 16384; + attribute optional nullable int16u onTransitionTime = 18; + attribute optional nullable int16u offTransitionTime = 19; + attribute optional nullable int8u defaultMoveRate = 20; + attribute access(write: manage) optional nullable int8u startUpCurrentLevel = 16384; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -551,23 +579,44 @@ server cluster LevelControl = 8 { OptionsBitmap optionsOverride = 1; } + request struct MoveToClosestFrequencyRequest { + int16u frequency = 0; + } + + /** Command description for MoveToLevel */ command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + /** Command description for Move */ command Move(MoveRequest): DefaultSuccess = 1; + /** Command description for Step */ command Step(StepRequest): DefaultSuccess = 2; + /** Command description for Stop */ command Stop(StopRequest): DefaultSuccess = 3; + /** Command description for MoveToLevelWithOnOff */ command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + /** Command description for MoveWithOnOff */ command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + /** Command description for StepWithOnOff */ command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + /** Command description for StopWithOnOff */ command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; + /** Change the currrent frequency to the provided one, or a close + approximation if the exact provided one is not possible. */ + command MoveToClosestFrequency(MoveToClosestFrequencyRequest): DefaultSuccess = 8; } /** An interface for reading the value of a binary measurement and accessing various characteristics of that measurement. */ -server cluster BinaryInputBasic = 15 { +cluster BinaryInputBasic = 15 { revision 1; // NOTE: Default/not specifically set + attribute optional char_string<16> activeText = 4; + attribute optional char_string<16> description = 28; + attribute optional char_string<16> inactiveText = 46; attribute boolean outOfService = 81; + readonly attribute optional enum8 polarity = 84; attribute boolean presentValue = 85; + attribute optional enum8 reliability = 103; readonly attribute bitmap8 statusFlags = 111; + readonly attribute optional int32u applicationType = 256; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -577,7 +626,7 @@ server cluster BinaryInputBasic = 15 { } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -600,7 +649,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; - readonly attribute SemanticTagStruct tagList[] = 4; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -610,7 +659,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -server cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -634,7 +683,7 @@ server cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -693,7 +742,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -706,7 +755,7 @@ server cluster AccessControl = 31 { } /** This cluster provides a standardized way for a Node (typically a Bridge, but could be any Node) to expose action information. */ -server cluster Actions = 37 { +cluster Actions = 37 { revision 1; // NOTE: Default/not specifically set enum ActionErrorEnum : enum8 { @@ -783,19 +832,109 @@ server cluster Actions = 37 { readonly attribute ActionStruct actionList[] = 0; readonly attribute EndpointListStruct endpointLists[] = 1; - readonly attribute long_char_string<512> setupURL = 2; + readonly attribute optional long_char_string<512> setupURL = 2; 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; + + request struct InstantActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct InstantActionWithTransitionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + int16u transitionTime = 2; + } + + request struct StartActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct StartActionWithDurationRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + int32u duration = 2; + } + + request struct StopActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct PauseActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct PauseActionWithDurationRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + int32u duration = 2; + } + + request struct ResumeActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct EnableActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct EnableActionWithDurationRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + int32u duration = 2; + } + + request struct DisableActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct DisableActionWithDurationRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + int32u duration = 2; + } + + /** This command triggers an action (state change) on the involved endpoints. */ + command InstantAction(InstantActionRequest): DefaultSuccess = 0; + /** This command triggers an action (state change) on the involved endpoints, with a specified time to transition from the current state to the new state. */ + command InstantActionWithTransition(InstantActionWithTransitionRequest): DefaultSuccess = 1; + /** This command triggers the commencement of an action on the involved endpoints. */ + command StartAction(StartActionRequest): DefaultSuccess = 2; + /** This command triggers the commencement of an action (with a duration) on the involved endpoints. */ + command StartActionWithDuration(StartActionWithDurationRequest): DefaultSuccess = 3; + /** This command stops the ongoing action on the involved endpoints. */ + command StopAction(StopActionRequest): DefaultSuccess = 4; + /** This command pauses an ongoing action. */ + command PauseAction(PauseActionRequest): DefaultSuccess = 5; + /** This command pauses an ongoing action with a duration. */ + command PauseActionWithDuration(PauseActionWithDurationRequest): DefaultSuccess = 6; + /** This command resumes a previously paused action. */ + command ResumeAction(ResumeActionRequest): DefaultSuccess = 7; + /** This command enables a certain action or automation. */ + command EnableAction(EnableActionRequest): DefaultSuccess = 8; + /** This command enables a certain action or automation with a duration. */ + command EnableActionWithDuration(EnableActionWithDurationRequest): DefaultSuccess = 9; + /** This command disables a certain action or automation. */ + command DisableAction(DisableActionRequest): DefaultSuccess = 10; + /** This command disables a certain action or automation with a duration. */ + command DisableActionWithDuration(DisableActionWithDurationRequest): DefaultSuccess = 11; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -867,15 +1006,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; - readonly attribute ProductAppearanceStruct productAppearance = 20; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -884,10 +1024,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -963,7 +1105,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -1036,6 +1178,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -1043,7 +1186,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -1060,7 +1203,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -1088,8 +1231,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1102,7 +1245,7 @@ server cluster TimeFormatLocalization = 44 { may have differing preferences for the units in which values are conveyed in communication to a user. As such, Nodes that visually or audibly convey measurable values to the user need a mechanism by which they can be configured to use a user’s preferred unit. */ -server cluster UnitLocalization = 45 { +cluster UnitLocalization = 45 { revision 1; enum TempUnitEnum : enum8 { @@ -1115,7 +1258,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute access(write: manage) TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) optional TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1125,7 +1268,7 @@ server cluster UnitLocalization = 45 { } /** This cluster is used to describe the configuration and capabilities of a Device's power system. */ -server cluster PowerSourceConfiguration = 46 { +cluster PowerSourceConfiguration = 46 { revision 1; readonly attribute endpoint_no sources[] = 0; @@ -1138,7 +1281,7 @@ server cluster PowerSourceConfiguration = 46 { } /** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ -server cluster PowerSource = 47 { +cluster PowerSource = 47 { revision 1; // NOTE: Default/not specifically set enum BatApprovedChemistryEnum : enum16 { @@ -1359,9 +1502,34 @@ server cluster PowerSource = 47 { readonly attribute PowerSourceStatusEnum status = 0; readonly attribute int8u order = 1; readonly attribute char_string<60> description = 2; - readonly attribute BatChargeLevelEnum batChargeLevel = 14; - readonly attribute boolean batReplacementNeeded = 15; - readonly attribute BatReplaceabilityEnum batReplaceability = 16; + readonly attribute optional nullable int32u wiredAssessedInputVoltage = 3; + readonly attribute optional nullable int16u wiredAssessedInputFrequency = 4; + readonly attribute optional WiredCurrentTypeEnum wiredCurrentType = 5; + readonly attribute optional nullable int32u wiredAssessedCurrent = 6; + readonly attribute optional int32u wiredNominalVoltage = 7; + readonly attribute optional int32u wiredMaximumCurrent = 8; + readonly attribute optional boolean wiredPresent = 9; + readonly attribute optional WiredFaultEnum activeWiredFaults[] = 10; + readonly attribute optional nullable int32u batVoltage = 11; + readonly attribute optional nullable int8u batPercentRemaining = 12; + readonly attribute optional nullable int32u batTimeRemaining = 13; + readonly attribute optional BatChargeLevelEnum batChargeLevel = 14; + readonly attribute optional boolean batReplacementNeeded = 15; + readonly attribute optional BatReplaceabilityEnum batReplaceability = 16; + readonly attribute optional boolean batPresent = 17; + readonly attribute optional BatFaultEnum activeBatFaults[] = 18; + readonly attribute optional char_string<60> batReplacementDescription = 19; + readonly attribute optional BatCommonDesignationEnum batCommonDesignation = 20; + readonly attribute optional char_string<20> batANSIDesignation = 21; + readonly attribute optional char_string<20> batIECDesignation = 22; + readonly attribute optional BatApprovedChemistryEnum batApprovedChemistry = 23; + readonly attribute optional int32u batCapacity = 24; + readonly attribute optional int8u batQuantity = 25; + readonly attribute optional BatChargeStateEnum batChargeState = 26; + readonly attribute optional nullable int32u batTimeToFullCharge = 27; + readonly attribute optional boolean batFunctionalWhileCharging = 28; + readonly attribute optional nullable int32u batChargingCurrent = 29; + readonly attribute optional BatChargeFaultEnum activeBatChargeFaults[] = 30; readonly attribute endpoint_no endpointList[] = 31; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1372,7 +1540,7 @@ server cluster PowerSource = 47 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -1411,17 +1579,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -1432,13 +1600,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -1519,12 +1690,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1537,6 +1711,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -1556,48 +1737,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -1632,11 +1824,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -1720,12 +1920,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1744,12 +1944,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -1770,10 +1972,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1781,11 +1983,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ -server cluster ThreadNetworkDiagnostics = 53 { +cluster ThreadNetworkDiagnostics = 53 { revision 1; // NOTE: Default/not specifically set enum ConnectionStatusEnum : enum8 { @@ -1882,7 +2085,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u panId = 3; readonly attribute nullable int64u extendedPanId = 4; readonly attribute nullable octet_string<17> meshLocalPrefix = 5; - readonly attribute int64u overrunCount = 6; + readonly attribute optional int64u overrunCount = 6; readonly attribute NeighborTableStruct neighborTable[] = 7; readonly attribute RouteTableStruct routeTable[] = 8; readonly attribute nullable int32u partitionId = 9; @@ -1890,51 +2093,51 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u dataVersion = 11; readonly attribute nullable int16u stableDataVersion = 12; readonly attribute nullable int8u leaderRouterId = 13; - readonly attribute int16u detachedRoleCount = 14; - readonly attribute int16u childRoleCount = 15; - readonly attribute int16u routerRoleCount = 16; - readonly attribute int16u leaderRoleCount = 17; - readonly attribute int16u attachAttemptCount = 18; - readonly attribute int16u partitionIdChangeCount = 19; - readonly attribute int16u betterPartitionAttachAttemptCount = 20; - readonly attribute int16u parentChangeCount = 21; - readonly attribute int32u txTotalCount = 22; - readonly attribute int32u txUnicastCount = 23; - readonly attribute int32u txBroadcastCount = 24; - readonly attribute int32u txAckRequestedCount = 25; - readonly attribute int32u txAckedCount = 26; - readonly attribute int32u txNoAckRequestedCount = 27; - readonly attribute int32u txDataCount = 28; - readonly attribute int32u txDataPollCount = 29; - readonly attribute int32u txBeaconCount = 30; - readonly attribute int32u txBeaconRequestCount = 31; - readonly attribute int32u txOtherCount = 32; - readonly attribute int32u txRetryCount = 33; - readonly attribute int32u txDirectMaxRetryExpiryCount = 34; - readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; - readonly attribute int32u txErrCcaCount = 36; - readonly attribute int32u txErrAbortCount = 37; - readonly attribute int32u txErrBusyChannelCount = 38; - readonly attribute int32u rxTotalCount = 39; - readonly attribute int32u rxUnicastCount = 40; - readonly attribute int32u rxBroadcastCount = 41; - readonly attribute int32u rxDataCount = 42; - readonly attribute int32u rxDataPollCount = 43; - readonly attribute int32u rxBeaconCount = 44; - readonly attribute int32u rxBeaconRequestCount = 45; - readonly attribute int32u rxOtherCount = 46; - readonly attribute int32u rxAddressFilteredCount = 47; - readonly attribute int32u rxDestAddrFilteredCount = 48; - readonly attribute int32u rxDuplicatedCount = 49; - readonly attribute int32u rxErrNoFrameCount = 50; - readonly attribute int32u rxErrUnknownNeighborCount = 51; - readonly attribute int32u rxErrInvalidSrcAddrCount = 52; - readonly attribute int32u rxErrSecCount = 53; - readonly attribute int32u rxErrFcsCount = 54; - readonly attribute int32u rxErrOtherCount = 55; - readonly attribute nullable int64u activeTimestamp = 56; - readonly attribute nullable int64u pendingTimestamp = 57; - readonly attribute nullable int32u delay = 58; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; readonly attribute nullable SecurityPolicy securityPolicy = 59; readonly attribute nullable octet_string<4> channelPage0Mask = 60; readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; @@ -1946,11 +2149,12 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster WiFiNetworkDiagnostics = 54 { +cluster WiFiNetworkDiagnostics = 54 { revision 1; // NOTE: Default/not specifically set enum AssociationFailureCauseEnum : enum8 { @@ -2007,14 +2211,14 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; - readonly attribute nullable int32u beaconLostCount = 5; - readonly attribute nullable int32u beaconRxCount = 6; - readonly attribute nullable int32u packetMulticastRxCount = 7; - readonly attribute nullable int32u packetMulticastTxCount = 8; - readonly attribute nullable int32u packetUnicastRxCount = 9; - readonly attribute nullable int32u packetUnicastTxCount = 10; - readonly attribute nullable int64u currentMaxRate = 11; - readonly attribute nullable int64u overrunCount = 12; + readonly attribute optional nullable int32u beaconLostCount = 5; + readonly attribute optional nullable int32u beaconRxCount = 6; + readonly attribute optional nullable int32u packetMulticastRxCount = 7; + readonly attribute optional nullable int32u packetMulticastTxCount = 8; + readonly attribute optional nullable int32u packetUnicastRxCount = 9; + readonly attribute optional nullable int32u packetUnicastTxCount = 10; + readonly attribute optional nullable int64u currentMaxRate = 11; + readonly attribute optional nullable int64u overrunCount = 12; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2022,11 +2226,12 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 */ command ResetCounts(): DefaultSuccess = 0; } /** The Ethernet Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster EthernetNetworkDiagnostics = 55 { +cluster EthernetNetworkDiagnostics = 55 { revision 1; // NOTE: Default/not specifically set enum PHYRateEnum : enum8 { @@ -2047,15 +2252,15 @@ server cluster EthernetNetworkDiagnostics = 55 { kErrorCounts = 0x2; } - readonly attribute nullable PHYRateEnum PHYRate = 0; - readonly attribute nullable boolean fullDuplex = 1; - readonly attribute int64u packetRxCount = 2; - readonly attribute int64u packetTxCount = 3; - readonly attribute int64u txErrCount = 4; - readonly attribute int64u collisionCount = 5; - readonly attribute int64u overrunCount = 6; - readonly attribute nullable boolean carrierDetect = 7; - readonly attribute int64u timeSinceReset = 8; + readonly attribute optional nullable PHYRateEnum PHYRate = 0; + readonly attribute optional nullable boolean fullDuplex = 1; + readonly attribute optional int64u packetRxCount = 2; + readonly attribute optional int64u packetTxCount = 3; + readonly attribute optional int64u txErrCount = 4; + readonly attribute optional int64u collisionCount = 5; + readonly attribute optional int64u overrunCount = 6; + readonly attribute optional nullable boolean carrierDetect = 7; + readonly attribute optional int64u timeSinceReset = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2063,11 +2268,12 @@ server cluster EthernetNetworkDiagnostics = 55 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the attributes: PacketRxCount, PacketTxCount, TxErrCount, CollisionCount, OverrunCount to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** Accurate time is required for a number of reasons, including scheduling, display and validating security materials. */ -server cluster TimeSynchronization = 56 { +cluster TimeSynchronization = 56 { revision 2; enum GranularityEnum : enum8 { @@ -2158,16 +2364,17 @@ server cluster TimeSynchronization = 56 { readonly attribute nullable epoch_us UTCTime = 0; readonly attribute GranularityEnum granularity = 1; - readonly attribute TimeSourceEnum timeSource = 2; - readonly attribute nullable TrustedTimeSourceStruct trustedTimeSource = 3; - readonly attribute nullable char_string<128> defaultNTP = 4; - readonly attribute TimeZoneStruct timeZone[] = 5; - readonly attribute DSTOffsetStruct DSTOffset[] = 6; - readonly attribute nullable epoch_us localTime = 7; - readonly attribute TimeZoneDatabaseEnum timeZoneDatabase = 8; - readonly attribute int8u timeZoneListMaxSize = 10; - readonly attribute int8u DSTOffsetListMaxSize = 11; - readonly attribute boolean supportsDNSResolve = 12; + readonly attribute optional TimeSourceEnum timeSource = 2; + readonly attribute optional nullable TrustedTimeSourceStruct trustedTimeSource = 3; + readonly attribute optional nullable char_string<128> defaultNTP = 4; + readonly attribute optional TimeZoneStruct timeZone[] = 5; + readonly attribute optional DSTOffsetStruct DSTOffset[] = 6; + readonly attribute optional nullable epoch_us localTime = 7; + readonly attribute optional TimeZoneDatabaseEnum timeZoneDatabase = 8; + readonly attribute optional boolean NTPServerAvailable = 9; + readonly attribute optional int8u timeZoneListMaxSize = 10; + readonly attribute optional int8u DSTOffsetListMaxSize = 11; + readonly attribute optional boolean supportsDNSResolve = 12; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2189,6 +2396,10 @@ server cluster TimeSynchronization = 56 { TimeZoneStruct timeZone[] = 0; } + response struct SetTimeZoneResponse = 3 { + boolean DSTOffsetRequired = 0; + } + request struct SetDSTOffsetRequest { DSTOffsetStruct DSTOffset[] = 0; } @@ -2197,21 +2408,22 @@ server cluster TimeSynchronization = 56 { nullable char_string<128> defaultNTP = 0; } - response struct SetTimeZoneResponse = 3 { - boolean DSTOffsetRequired = 0; - } - + /** This command MAY be issued by Administrator to set the time. */ command access(invoke: administer) SetUTCTime(SetUTCTimeRequest): DefaultSuccess = 0; + /** This command SHALL set TrustedTimeSource. */ fabric command access(invoke: administer) SetTrustedTimeSource(SetTrustedTimeSourceRequest): DefaultSuccess = 1; + /** This command SHALL set TimeZone. */ command access(invoke: manage) SetTimeZone(SetTimeZoneRequest): SetTimeZoneResponse = 2; + /** This command SHALL set DSTOffset. */ command access(invoke: manage) SetDSTOffset(SetDSTOffsetRequest): DefaultSuccess = 4; + /** This command is used to set DefaultNTP. */ command access(invoke: administer) SetDefaultNTP(SetDefaultNTPRequest): DefaultSuccess = 5; } /** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { +cluster Switch = 59 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -2254,6 +2466,7 @@ server cluster Switch = 59 { readonly attribute int8u numberOfPositions = 0; readonly attribute int8u currentPosition = 1; + readonly attribute optional int8u multiPressMax = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2263,7 +2476,7 @@ server cluster Switch = 59 { } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -2304,13 +2517,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -2363,15 +2579,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -2385,6 +2615,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -2397,38 +2633,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -2483,27 +2707,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -2521,7 +2749,7 @@ server cluster FixedLabel = 64 { } /** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ -server cluster UserLabel = 65 { +cluster UserLabel = 65 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -2539,7 +2767,7 @@ server cluster UserLabel = 65 { } /** This cluster provides an interface to a boolean state called StateValue. */ -server cluster BooleanState = 69 { +cluster BooleanState = 69 { revision 1; info event StateChange = 0 { @@ -2556,7 +2784,7 @@ server cluster BooleanState = 69 { } /** Attributes and commands for selecting a mode from a list of supported options. */ -server cluster ModeSelect = 80 { +cluster ModeSelect = 80 { revision 2; bitmap Feature : bitmap32 { @@ -2578,9 +2806,9 @@ server cluster ModeSelect = 80 { readonly attribute nullable enum16 standardNamespace = 1; readonly attribute ModeOptionStruct supportedModes[] = 2; readonly attribute int8u currentMode = 3; - attribute nullable int8u startUpMode = 4; - attribute nullable int8u onMode = 5; - readonly attribute int8u manufacturerExtension = 4293984257; + attribute optional nullable int8u startUpMode = 4; + attribute optional nullable int8u onMode = 5; + readonly attribute optional int8u manufacturerExtension = 4293984257; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2592,11 +2820,14 @@ server cluster ModeSelect = 80 { int8u newMode = 0; } + /** On receipt of this command, if the NewMode field matches the Mode field in an entry of the SupportedModes list, the server SHALL set the CurrentMode attribute to the NewMode value, otherwise, the server SHALL respond with an INVALID_COMMAND status response. */ command ChangeToMode(ChangeToModeRequest): DefaultSuccess = 0; + /** Sample manufacturer specific extension command */ + command SampleMfgExtensionCommand(): DefaultSuccess = 4293984257; } /** Attributes and commands for selecting a mode from a list of supported options. */ -server cluster LaundryWasherMode = 81 { +cluster LaundryWasherMode = 81 { revision 2; enum ModeTag : enum16 { @@ -2623,8 +2854,8 @@ server cluster LaundryWasherMode = 81 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; - attribute nullable int8u startUpMode = 2; - attribute nullable int8u onMode = 3; + attribute optional nullable int8u startUpMode = 2; + attribute optional nullable int8u onMode = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2641,11 +2872,13 @@ server cluster LaundryWasherMode = 81 { optional char_string statusText = 1; } + /** This command is used to change device modes. + On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; } /** Attributes and commands for selecting a mode from a list of supported options. */ -server cluster RefrigeratorAndTemperatureControlledCabinetMode = 82 { +cluster RefrigeratorAndTemperatureControlledCabinetMode = 82 { revision 2; enum ModeTag : enum16 { @@ -2670,8 +2903,8 @@ server cluster RefrigeratorAndTemperatureControlledCabinetMode = 82 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; - attribute nullable int8u startUpMode = 2; - attribute nullable int8u onMode = 3; + attribute optional nullable int8u startUpMode = 2; + attribute optional nullable int8u onMode = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2688,11 +2921,13 @@ server cluster RefrigeratorAndTemperatureControlledCabinetMode = 82 { optional char_string statusText = 1; } + /** This command is used to change device modes. + On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; } /** This cluster supports remotely monitoring and controling the different typs of functionality available to a washing device, such as a washing machine. */ -server cluster LaundryWasherControls = 83 { +cluster LaundryWasherControls = 83 { revision 1; // NOTE: Default/not specifically set enum NumberOfRinsesEnum : enum8 { @@ -2707,10 +2942,10 @@ server cluster LaundryWasherControls = 83 { kRinse = 0x2; } - readonly attribute char_string spinSpeeds[] = 0; - attribute nullable int8u spinSpeedCurrent = 1; - attribute NumberOfRinsesEnum numberOfRinses = 2; - readonly attribute NumberOfRinsesEnum supportedRinses[] = 3; + readonly attribute optional char_string spinSpeeds[] = 0; + attribute optional nullable int8u spinSpeedCurrent = 1; + attribute optional NumberOfRinsesEnum numberOfRinses = 2; + readonly attribute optional NumberOfRinsesEnum supportedRinses[] = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2720,7 +2955,7 @@ server cluster LaundryWasherControls = 83 { } /** Attributes and commands for selecting a mode from a list of supported options. */ -server cluster RvcRunMode = 84 { +cluster RvcRunMode = 84 { revision 2; enum ModeTag : enum16 { @@ -2756,7 +2991,7 @@ server cluster RvcRunMode = 84 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; - attribute nullable int8u onMode = 3; + attribute optional nullable int8u onMode = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2773,11 +3008,13 @@ server cluster RvcRunMode = 84 { optional char_string statusText = 1; } + /** This command is used to change device modes. + On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; } /** Attributes and commands for selecting a mode from a list of supported options. */ -server cluster RvcCleanMode = 85 { +cluster RvcCleanMode = 85 { revision 2; enum ModeTag : enum16 { @@ -2807,7 +3044,7 @@ server cluster RvcCleanMode = 85 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; - attribute nullable int8u onMode = 3; + attribute optional nullable int8u onMode = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2824,11 +3061,13 @@ server cluster RvcCleanMode = 85 { optional char_string statusText = 1; } + /** This command is used to change device modes. + On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; } /** Attributes and commands for configuring the temperature control, and reporting temperature. */ -server cluster TemperatureControl = 86 { +cluster TemperatureControl = 86 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -2837,8 +3076,12 @@ server cluster TemperatureControl = 86 { kTemperatureStep = 0x4; } - readonly attribute int8u selectedTemperatureLevel = 4; - readonly attribute char_string supportedTemperatureLevels[] = 5; + readonly attribute optional temperature temperatureSetpoint = 0; + readonly attribute optional temperature minTemperature = 1; + readonly attribute optional temperature maxTemperature = 2; + readonly attribute optional temperature step = 3; + readonly attribute optional int8u selectedTemperatureLevel = 4; + readonly attribute optional char_string supportedTemperatureLevels[] = 5; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2851,11 +3094,12 @@ server cluster TemperatureControl = 86 { optional int8u targetTemperatureLevel = 1; } + /** Set Temperature */ command SetTemperature(SetTemperatureRequest): DefaultSuccess = 0; } /** Attributes and commands for configuring the Refrigerator alarm. */ -server cluster RefrigeratorAlarm = 87 { +cluster RefrigeratorAlarm = 87 { revision 1; // NOTE: Default/not specifically set bitmap AlarmMap : bitmap32 { @@ -2881,7 +3125,7 @@ server cluster RefrigeratorAlarm = 87 { } /** Attributes and commands for selecting a mode from a list of supported options. */ -server cluster DishwasherMode = 89 { +cluster DishwasherMode = 89 { revision 2; enum ModeTag : enum16 { @@ -2907,8 +3151,8 @@ server cluster DishwasherMode = 89 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; - attribute nullable int8u startUpMode = 2; - attribute nullable int8u onMode = 3; + attribute optional nullable int8u startUpMode = 2; + attribute optional nullable int8u onMode = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2925,11 +3169,13 @@ server cluster DishwasherMode = 89 { optional char_string statusText = 1; } + /** This command is used to change device modes. + On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; } /** Attributes for reporting air quality classification */ -server cluster AirQuality = 91 { +cluster AirQuality = 91 { revision 1; // NOTE: Default/not specifically set enum AirQualityEnum : enum8 { @@ -2959,7 +3205,7 @@ server cluster AirQuality = 91 { } /** This cluster provides an interface for observing and managing the state of smoke and CO alarms. */ -server cluster SmokeCoAlarm = 92 { +cluster SmokeCoAlarm = 92 { revision 1; enum AlarmStateEnum : enum8 { @@ -3047,18 +3293,18 @@ server cluster SmokeCoAlarm = 92 { } readonly attribute ExpressedStateEnum expressedState = 0; - readonly attribute AlarmStateEnum smokeState = 1; - readonly attribute AlarmStateEnum COState = 2; + readonly attribute optional AlarmStateEnum smokeState = 1; + readonly attribute optional AlarmStateEnum COState = 2; readonly attribute AlarmStateEnum batteryAlert = 3; - readonly attribute MuteStateEnum deviceMuted = 4; + readonly attribute optional MuteStateEnum deviceMuted = 4; readonly attribute boolean testInProgress = 5; readonly attribute boolean hardwareFaultAlert = 6; readonly attribute EndOfServiceEnum endOfServiceAlert = 7; - readonly attribute AlarmStateEnum interconnectSmokeAlarm = 8; - readonly attribute AlarmStateEnum interconnectCOAlarm = 9; - readonly attribute ContaminationStateEnum contaminationState = 10; - attribute access(write: manage) SensitivityEnum smokeSensitivityLevel = 11; - readonly attribute epoch_s expiryDate = 12; + readonly attribute optional AlarmStateEnum interconnectSmokeAlarm = 8; + readonly attribute optional AlarmStateEnum interconnectCOAlarm = 9; + readonly attribute optional ContaminationStateEnum contaminationState = 10; + attribute access(write: manage) optional SensitivityEnum smokeSensitivityLevel = 11; + readonly attribute optional epoch_s expiryDate = 12; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3066,11 +3312,12 @@ server cluster SmokeCoAlarm = 92 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** This command SHALL initiate a device self-test. */ command SelfTestRequest(): DefaultSuccess = 0; } /** Attributes and commands for configuring the Dishwasher alarm. */ -server cluster DishwasherAlarm = 93 { +cluster DishwasherAlarm = 93 { revision 1; // NOTE: Default/not specifically set bitmap AlarmMap : bitmap32 { @@ -3094,7 +3341,7 @@ server cluster DishwasherAlarm = 93 { } readonly attribute AlarmMap mask = 0; - readonly attribute AlarmMap latch = 1; + readonly attribute optional AlarmMap latch = 1; readonly attribute AlarmMap state = 2; readonly attribute AlarmMap supported = 3; readonly attribute command_id generatedCommandList[] = 65528; @@ -3112,12 +3359,14 @@ server cluster DishwasherAlarm = 93 { AlarmMap mask = 0; } + /** Reset alarm */ command Reset(ResetRequest): DefaultSuccess = 0; + /** Modify enabled alarms */ command ModifyEnabledAlarms(ModifyEnabledAlarmsRequest): DefaultSuccess = 1; } /** Attributes and commands for selecting a mode from a list of supported options. */ -provisional server cluster MicrowaveOvenMode = 94 { +provisional cluster MicrowaveOvenMode = 94 { revision 1; enum ModeTag : enum16 { @@ -3151,7 +3400,7 @@ provisional server cluster MicrowaveOvenMode = 94 { } /** This cluster supports remotely monitoring and, where supported, changing the operational state of any device where a state machine is a part of the operation. */ -server cluster OperationalState = 96 { +cluster OperationalState = 96 { revision 1; // NOTE: Default/not specifically set enum ErrorStateEnum : enum8 { @@ -3191,7 +3440,7 @@ server cluster OperationalState = 96 { readonly attribute nullable char_string phaseList[] = 0; readonly attribute nullable int8u currentPhase = 1; - readonly attribute nullable elapsed_s countdownTime = 2; + readonly attribute optional nullable elapsed_s countdownTime = 2; readonly attribute OperationalStateStruct operationalStateList[] = 3; readonly attribute OperationalStateEnum operationalState = 4; readonly attribute ErrorStateStruct operationalError = 5; @@ -3206,14 +3455,18 @@ server cluster OperationalState = 96 { ErrorStateStruct commandResponseState = 0; } + /** Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. */ command Pause(): OperationalCommandResponse = 0; + /** Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. */ command Stop(): OperationalCommandResponse = 1; + /** Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it can be started. */ command Start(): OperationalCommandResponse = 2; + /** Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). */ command Resume(): OperationalCommandResponse = 3; } /** This cluster supports remotely monitoring and, where supported, changing the operational state of a Robotic Vacuum. */ -server cluster RvcOperationalState = 97 { +cluster RvcOperationalState = 97 { revision 1; // NOTE: Default/not specifically set enum ErrorStateEnum : enum8 { @@ -3256,7 +3509,7 @@ server cluster RvcOperationalState = 97 { readonly attribute nullable char_string phaseList[] = 0; readonly attribute nullable int8u currentPhase = 1; - readonly attribute nullable elapsed_s countdownTime = 2; + readonly attribute optional nullable elapsed_s countdownTime = 2; readonly attribute OperationalStateStruct operationalStateList[] = 3; readonly attribute enum8 operationalState = 4; readonly attribute ErrorStateStruct operationalError = 5; @@ -3271,12 +3524,18 @@ server cluster RvcOperationalState = 97 { ErrorStateStruct commandResponseState = 0; } + /** Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. */ command Pause(): OperationalCommandResponse = 0; + /** Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. */ + command Stop(): OperationalCommandResponse = 1; + /** Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it can be started. */ + command Start(): OperationalCommandResponse = 2; + /** Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). */ command Resume(): OperationalCommandResponse = 3; } /** Attributes and commands for monitoring HEPA filters in a device */ -server cluster HepaFilterMonitoring = 113 { +cluster HepaFilterMonitoring = 113 { revision 1; // NOTE: Default/not specifically set enum ChangeIndicationEnum : enum8 { @@ -3309,12 +3568,12 @@ server cluster HepaFilterMonitoring = 113 { char_string<20> productIdentifierValue = 1; } - readonly attribute percent condition = 0; - readonly attribute DegradationDirectionEnum degradationDirection = 1; + readonly attribute optional percent condition = 0; + readonly attribute optional DegradationDirectionEnum degradationDirection = 1; readonly attribute ChangeIndicationEnum changeIndication = 2; - readonly attribute boolean inPlaceIndicator = 3; - attribute nullable epoch_s lastChangedTime = 4; - readonly attribute ReplacementProductStruct replacementProductList[] = 5; + readonly attribute optional boolean inPlaceIndicator = 3; + attribute optional nullable epoch_s lastChangedTime = 4; + readonly attribute optional ReplacementProductStruct replacementProductList[] = 5; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3322,11 +3581,12 @@ server cluster HepaFilterMonitoring = 113 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reset the condition of the replaceable to the non degraded state */ command ResetCondition(): DefaultSuccess = 0; } /** Attributes and commands for monitoring activated carbon filters in a device */ -server cluster ActivatedCarbonFilterMonitoring = 114 { +cluster ActivatedCarbonFilterMonitoring = 114 { revision 1; // NOTE: Default/not specifically set enum ChangeIndicationEnum : enum8 { @@ -3359,12 +3619,12 @@ server cluster ActivatedCarbonFilterMonitoring = 114 { char_string<20> productIdentifierValue = 1; } - readonly attribute percent condition = 0; - readonly attribute DegradationDirectionEnum degradationDirection = 1; + readonly attribute optional percent condition = 0; + readonly attribute optional DegradationDirectionEnum degradationDirection = 1; readonly attribute ChangeIndicationEnum changeIndication = 2; - readonly attribute boolean inPlaceIndicator = 3; - attribute nullable epoch_s lastChangedTime = 4; - readonly attribute ReplacementProductStruct replacementProductList[] = 5; + readonly attribute optional boolean inPlaceIndicator = 3; + attribute optional nullable epoch_s lastChangedTime = 4; + readonly attribute optional ReplacementProductStruct replacementProductList[] = 5; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3372,11 +3632,12 @@ server cluster ActivatedCarbonFilterMonitoring = 114 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reset the condition of the replaceable to the non degraded state */ command ResetCondition(): DefaultSuccess = 0; } /** Provides an interface for controlling and adjusting automatic window coverings. */ -server cluster WindowCovering = 258 { +cluster WindowCovering = 258 { revision 5; enum EndProductType : enum8 { @@ -3468,27 +3729,27 @@ server cluster WindowCovering = 258 { } readonly attribute Type type = 0; - readonly attribute int16u physicalClosedLimitLift = 1; - readonly attribute int16u physicalClosedLimitTilt = 2; - readonly attribute nullable int16u currentPositionLift = 3; - readonly attribute nullable int16u currentPositionTilt = 4; - readonly attribute int16u numberOfActuationsLift = 5; - readonly attribute int16u numberOfActuationsTilt = 6; + readonly attribute optional int16u physicalClosedLimitLift = 1; + readonly attribute optional int16u physicalClosedLimitTilt = 2; + readonly attribute optional nullable int16u currentPositionLift = 3; + readonly attribute optional nullable int16u currentPositionTilt = 4; + readonly attribute optional int16u numberOfActuationsLift = 5; + readonly attribute optional int16u numberOfActuationsTilt = 6; readonly attribute ConfigStatus configStatus = 7; - readonly attribute nullable percent currentPositionLiftPercentage = 8; - readonly attribute nullable percent currentPositionTiltPercentage = 9; + readonly attribute optional nullable percent currentPositionLiftPercentage = 8; + readonly attribute optional nullable percent currentPositionTiltPercentage = 9; readonly attribute OperationalStatus operationalStatus = 10; - readonly attribute nullable percent100ths targetPositionLiftPercent100ths = 11; - readonly attribute nullable percent100ths targetPositionTiltPercent100ths = 12; + readonly attribute optional nullable percent100ths targetPositionLiftPercent100ths = 11; + readonly attribute optional nullable percent100ths targetPositionTiltPercent100ths = 12; readonly attribute EndProductType endProductType = 13; - readonly attribute nullable percent100ths currentPositionLiftPercent100ths = 14; - readonly attribute nullable percent100ths currentPositionTiltPercent100ths = 15; - readonly attribute int16u installedOpenLimitLift = 16; - readonly attribute int16u installedClosedLimitLift = 17; - readonly attribute int16u installedOpenLimitTilt = 18; - readonly attribute int16u installedClosedLimitTilt = 19; + readonly attribute optional nullable percent100ths currentPositionLiftPercent100ths = 14; + readonly attribute optional nullable percent100ths currentPositionTiltPercent100ths = 15; + readonly attribute optional int16u installedOpenLimitLift = 16; + readonly attribute optional int16u installedClosedLimitLift = 17; + readonly attribute optional int16u installedOpenLimitTilt = 18; + readonly attribute optional int16u installedClosedLimitTilt = 19; attribute access(write: manage) Mode mode = 23; - readonly attribute SafetyStatus safetyStatus = 26; + readonly attribute optional SafetyStatus safetyStatus = 26; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3512,17 +3773,24 @@ server cluster WindowCovering = 258 { percent100ths tiltPercent100thsValue = 0; } + /** Moves window covering to InstalledOpenLimitLift and InstalledOpenLimitTilt */ command UpOrOpen(): DefaultSuccess = 0; + /** Moves window covering to InstalledClosedLimitLift and InstalledCloseLimitTilt */ command DownOrClose(): DefaultSuccess = 1; + /** Stop any adjusting of window covering */ command StopMotion(): DefaultSuccess = 2; + /** Go to lift value specified */ command GoToLiftValue(GoToLiftValueRequest): DefaultSuccess = 4; + /** Go to lift percentage specified */ command GoToLiftPercentage(GoToLiftPercentageRequest): DefaultSuccess = 5; + /** Go to tilt value specified */ command GoToTiltValue(GoToTiltValueRequest): DefaultSuccess = 7; + /** Go to tilt percentage specified */ command GoToTiltPercentage(GoToTiltPercentageRequest): DefaultSuccess = 8; } /** This cluster provides control of a barrier (garage door). */ -server cluster BarrierControl = 259 { +cluster BarrierControl = 259 { revision 1; // NOTE: Default/not specifically set bitmap BarrierControlCapabilities : bitmap8 { @@ -3539,6 +3807,12 @@ server cluster BarrierControl = 259 { readonly attribute enum8 barrierMovingState = 1; readonly attribute bitmap16 barrierSafetyStatus = 2; readonly attribute bitmap8 barrierCapabilities = 3; + attribute optional int16u barrierOpenEvents = 4; + attribute optional int16u barrierCloseEvents = 5; + attribute optional int16u barrierCommandOpenEvents = 6; + attribute optional int16u barrierCommandCloseEvents = 7; + attribute optional int16u barrierOpenPeriod = 8; + attribute optional int16u barrierClosePeriod = 9; readonly attribute int8u barrierPosition = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -3551,12 +3825,14 @@ server cluster BarrierControl = 259 { int8u percentOpen = 0; } + /** Command to instruct a barrier to go to a percent open state. */ command BarrierControlGoToPercent(BarrierControlGoToPercentRequest): DefaultSuccess = 0; + /** Command that instructs the barrier to stop moving. */ command BarrierControlStop(): DefaultSuccess = 1; } /** An interface for configuring and controlling pumps. */ -server cluster PumpConfigurationAndControl = 512 { +cluster PumpConfigurationAndControl = 512 { revision 3; enum ControlModeEnum : enum8 { @@ -3651,26 +3927,26 @@ server cluster PumpConfigurationAndControl = 512 { readonly attribute nullable int16s maxPressure = 0; readonly attribute nullable int16u maxSpeed = 1; readonly attribute nullable int16u maxFlow = 2; - readonly attribute nullable int16s minConstPressure = 3; - readonly attribute nullable int16s maxConstPressure = 4; - readonly attribute nullable int16s minCompPressure = 5; - readonly attribute nullable int16s maxCompPressure = 6; - readonly attribute nullable int16u minConstSpeed = 7; - readonly attribute nullable int16u maxConstSpeed = 8; - readonly attribute nullable int16u minConstFlow = 9; - readonly attribute nullable int16u maxConstFlow = 10; - readonly attribute nullable int16s minConstTemp = 11; - readonly attribute nullable int16s maxConstTemp = 12; - readonly attribute PumpStatusBitmap pumpStatus = 16; + readonly attribute optional nullable int16s minConstPressure = 3; + readonly attribute optional nullable int16s maxConstPressure = 4; + readonly attribute optional nullable int16s minCompPressure = 5; + readonly attribute optional nullable int16s maxCompPressure = 6; + readonly attribute optional nullable int16u minConstSpeed = 7; + readonly attribute optional nullable int16u maxConstSpeed = 8; + readonly attribute optional nullable int16u minConstFlow = 9; + readonly attribute optional nullable int16u maxConstFlow = 10; + readonly attribute optional nullable int16s minConstTemp = 11; + readonly attribute optional nullable int16s maxConstTemp = 12; + readonly attribute optional PumpStatusBitmap pumpStatus = 16; readonly attribute OperationModeEnum effectiveOperationMode = 17; readonly attribute ControlModeEnum effectiveControlMode = 18; readonly attribute nullable int16s capacity = 19; - readonly attribute nullable int16u speed = 20; - attribute access(write: manage) nullable int24u lifetimeRunningHours = 21; - readonly attribute nullable int24u power = 22; - attribute access(write: manage) nullable int32u lifetimeEnergyConsumed = 23; + readonly attribute optional nullable int16u speed = 20; + attribute access(write: manage) optional nullable int24u lifetimeRunningHours = 21; + readonly attribute optional nullable int24u power = 22; + attribute access(write: manage) optional nullable int32u lifetimeEnergyConsumed = 23; attribute access(write: manage) OperationModeEnum operationMode = 32; - attribute access(write: manage) ControlModeEnum controlMode = 33; + attribute access(write: manage) optional ControlModeEnum controlMode = 33; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3680,7 +3956,7 @@ server cluster PumpConfigurationAndControl = 512 { } /** An interface for configuring and controlling the functionality of a thermostat. */ -server cluster Thermostat = 513 { +cluster Thermostat = 513 { revision 6; enum SetpointAdjustMode : enum8 { @@ -3749,19 +4025,54 @@ server cluster Thermostat = 513 { } readonly attribute nullable int16s localTemperature = 0; - readonly attribute int16s absMinHeatSetpointLimit = 3; - readonly attribute int16s absMaxHeatSetpointLimit = 4; - readonly attribute int16s absMinCoolSetpointLimit = 5; - readonly attribute int16s absMaxCoolSetpointLimit = 6; - attribute int16s occupiedCoolingSetpoint = 17; - attribute int16s occupiedHeatingSetpoint = 18; - attribute access(write: manage) int16s minHeatSetpointLimit = 21; - attribute access(write: manage) int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) int16s minCoolSetpointLimit = 23; - attribute access(write: manage) int16s maxCoolSetpointLimit = 24; - attribute access(write: manage) int8s minSetpointDeadBand = 25; + readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute optional bitmap8 occupancy = 2; + readonly attribute optional int16s absMinHeatSetpointLimit = 3; + readonly attribute optional int16s absMaxHeatSetpointLimit = 4; + readonly attribute optional int16s absMinCoolSetpointLimit = 5; + readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional int8u PICoolingDemand = 7; + readonly attribute optional int8u PIHeatingDemand = 8; + attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; + attribute access(write: manage) optional int8s localTemperatureCalibration = 16; + attribute optional int16s occupiedCoolingSetpoint = 17; + attribute optional int16s occupiedHeatingSetpoint = 18; + attribute optional int16s unoccupiedCoolingSetpoint = 19; + attribute optional int16s unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; + attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; + attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; + attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute access(write: manage) optional int8s minSetpointDeadBand = 25; + attribute access(write: manage) optional bitmap8 remoteSensing = 26; attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; attribute access(write: manage) enum8 systemMode = 28; + readonly attribute optional enum8 thermostatRunningMode = 30; + readonly attribute optional enum8 startOfWeek = 32; + readonly attribute optional int8u numberOfWeeklyTransitions = 33; + readonly attribute optional int8u numberOfDailyTransitions = 34; + attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; + attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; + readonly attribute optional bitmap16 thermostatRunningState = 41; + readonly attribute optional enum8 setpointChangeSource = 48; + readonly attribute optional nullable int16s setpointChangeAmount = 49; + readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; + attribute access(write: manage) optional nullable int8u occupiedSetback = 52; + readonly attribute optional nullable int8u occupiedSetbackMin = 53; + readonly attribute optional nullable int8u occupiedSetbackMax = 54; + attribute access(write: manage) optional nullable int8u unoccupiedSetback = 55; + readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; + readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; + attribute access(write: manage) optional int8u emergencyHeatDelta = 58; + attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional int16u ACCapacity = 65; + attribute access(write: manage) optional enum8 ACRefrigerantType = 66; + attribute access(write: manage) optional enum8 ACCompressorType = 67; + attribute access(write: manage) optional bitmap32 ACErrorCode = 68; + attribute access(write: manage) optional enum8 ACLouverPosition = 69; + readonly attribute optional nullable int16s ACCoilTemperature = 70; + attribute access(write: manage) optional enum8 ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3774,11 +4085,37 @@ server cluster Thermostat = 513 { int8s amount = 1; } + response struct GetWeeklyScheduleResponse = 0 { + int8u numberOfTransitionsForSequence = 0; + DayOfWeek dayOfWeekForSequence = 1; + ModeForSequence modeForSequence = 2; + ThermostatScheduleTransition transitions[] = 3; + } + + request struct SetWeeklyScheduleRequest { + int8u numberOfTransitionsForSequence = 0; + DayOfWeek dayOfWeekForSequence = 1; + ModeForSequence modeForSequence = 2; + ThermostatScheduleTransition transitions[] = 3; + } + + request struct GetWeeklyScheduleRequest { + DayOfWeek daysToReturn = 0; + ModeForSequence modeToReturn = 1; + } + + /** Command description for SetpointRaiseLower */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; + /** Command description for SetWeeklySchedule */ + command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; + /** Command description for GetWeeklySchedule */ + command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; + /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ + command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; } /** An interface for controlling a fan in a heating/cooling system. */ -provisional server cluster FanControl = 514 { +provisional cluster FanControl = 514 { revision 4; enum AirflowDirectionEnum : enum8 { @@ -3834,14 +4171,14 @@ provisional server cluster FanControl = 514 { readonly attribute FanModeSequenceEnum fanModeSequence = 1; attribute nullable percent percentSetting = 2; readonly attribute percent percentCurrent = 3; - readonly attribute int8u speedMax = 4; - attribute nullable int8u speedSetting = 5; - readonly attribute int8u speedCurrent = 6; - readonly attribute RockBitmap rockSupport = 7; - attribute RockBitmap rockSetting = 8; - readonly attribute WindBitmap windSupport = 9; - attribute WindBitmap windSetting = 10; - attribute AirflowDirectionEnum airflowDirection = 11; + readonly attribute optional int8u speedMax = 4; + attribute optional nullable int8u speedSetting = 5; + readonly attribute optional int8u speedCurrent = 6; + readonly attribute optional RockBitmap rockSupport = 7; + attribute optional RockBitmap rockSetting = 8; + readonly attribute optional WindBitmap windSupport = 9; + attribute optional WindBitmap windSetting = 10; + attribute optional AirflowDirectionEnum airflowDirection = 11; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3855,11 +4192,12 @@ provisional server cluster FanControl = 514 { optional boolean lowestOff = 2; } + /** The Step command speeds up or slows down the fan, in steps. */ command Step(StepRequest): DefaultSuccess = 0; } /** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */ -server cluster ThermostatUserInterfaceConfiguration = 516 { +cluster ThermostatUserInterfaceConfiguration = 516 { revision 2; enum KeypadLockoutEnum : enum8 { @@ -3883,7 +4221,7 @@ server cluster ThermostatUserInterfaceConfiguration = 516 { attribute TemperatureDisplayModeEnum temperatureDisplayMode = 0; attribute access(write: manage) KeypadLockoutEnum keypadLockout = 1; - attribute access(write: manage) ScheduleProgrammingVisibilityEnum scheduleProgrammingVisibility = 2; + attribute access(write: manage) optional ScheduleProgrammingVisibilityEnum scheduleProgrammingVisibility = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3893,7 +4231,7 @@ server cluster ThermostatUserInterfaceConfiguration = 516 { } /** Attributes and commands for controlling the color properties of a color-capable light. */ -server cluster ColorControl = 768 { +cluster ColorControl = 768 { revision 6; enum ColorLoopAction : enum8 { @@ -3965,58 +4303,58 @@ server cluster ColorControl = 768 { kColorTemperature = 0x10; } - readonly attribute int8u currentHue = 0; - readonly attribute int8u currentSaturation = 1; - readonly attribute int16u remainingTime = 2; - readonly attribute int16u currentX = 3; - readonly attribute int16u currentY = 4; - readonly attribute enum8 driftCompensation = 5; - readonly attribute char_string<254> compensationText = 6; - readonly attribute int16u colorTemperatureMireds = 7; + readonly attribute optional int8u currentHue = 0; + readonly attribute optional int8u currentSaturation = 1; + readonly attribute optional int16u remainingTime = 2; + readonly attribute optional int16u currentX = 3; + readonly attribute optional int16u currentY = 4; + readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional char_string<254> compensationText = 6; + readonly attribute optional int16u colorTemperatureMireds = 7; readonly attribute enum8 colorMode = 8; attribute bitmap8 options = 15; readonly attribute nullable int8u numberOfPrimaries = 16; - readonly attribute int16u primary1X = 17; - readonly attribute int16u primary1Y = 18; - readonly attribute nullable int8u primary1Intensity = 19; - readonly attribute int16u primary2X = 21; - readonly attribute int16u primary2Y = 22; - readonly attribute nullable int8u primary2Intensity = 23; - readonly attribute int16u primary3X = 25; - readonly attribute int16u primary3Y = 26; - readonly attribute nullable int8u primary3Intensity = 27; - readonly attribute int16u primary4X = 32; - readonly attribute int16u primary4Y = 33; - readonly attribute nullable int8u primary4Intensity = 34; - readonly attribute int16u primary5X = 36; - readonly attribute int16u primary5Y = 37; - readonly attribute nullable int8u primary5Intensity = 38; - readonly attribute int16u primary6X = 40; - readonly attribute int16u primary6Y = 41; - readonly attribute nullable int8u primary6Intensity = 42; - attribute access(write: manage) int16u whitePointX = 48; - attribute access(write: manage) int16u whitePointY = 49; - attribute access(write: manage) int16u colorPointRX = 50; - attribute access(write: manage) int16u colorPointRY = 51; - attribute access(write: manage) nullable int8u colorPointRIntensity = 52; - attribute access(write: manage) int16u colorPointGX = 54; - attribute access(write: manage) int16u colorPointGY = 55; - attribute access(write: manage) nullable int8u colorPointGIntensity = 56; - attribute access(write: manage) int16u colorPointBX = 58; - attribute access(write: manage) int16u colorPointBY = 59; - attribute access(write: manage) nullable int8u colorPointBIntensity = 60; - readonly attribute int16u enhancedCurrentHue = 16384; + readonly attribute optional int16u primary1X = 17; + readonly attribute optional int16u primary1Y = 18; + readonly attribute optional nullable int8u primary1Intensity = 19; + readonly attribute optional int16u primary2X = 21; + readonly attribute optional int16u primary2Y = 22; + readonly attribute optional nullable int8u primary2Intensity = 23; + readonly attribute optional int16u primary3X = 25; + readonly attribute optional int16u primary3Y = 26; + readonly attribute optional nullable int8u primary3Intensity = 27; + readonly attribute optional int16u primary4X = 32; + readonly attribute optional int16u primary4Y = 33; + readonly attribute optional nullable int8u primary4Intensity = 34; + readonly attribute optional int16u primary5X = 36; + readonly attribute optional int16u primary5Y = 37; + readonly attribute optional nullable int8u primary5Intensity = 38; + readonly attribute optional int16u primary6X = 40; + readonly attribute optional int16u primary6Y = 41; + readonly attribute optional nullable int8u primary6Intensity = 42; + attribute access(write: manage) optional int16u whitePointX = 48; + attribute access(write: manage) optional int16u whitePointY = 49; + attribute access(write: manage) optional int16u colorPointRX = 50; + attribute access(write: manage) optional int16u colorPointRY = 51; + attribute access(write: manage) optional nullable int8u colorPointRIntensity = 52; + attribute access(write: manage) optional int16u colorPointGX = 54; + attribute access(write: manage) optional int16u colorPointGY = 55; + attribute access(write: manage) optional nullable int8u colorPointGIntensity = 56; + attribute access(write: manage) optional int16u colorPointBX = 58; + attribute access(write: manage) optional int16u colorPointBY = 59; + attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; + readonly attribute optional int16u enhancedCurrentHue = 16384; readonly attribute enum8 enhancedColorMode = 16385; - readonly attribute int8u colorLoopActive = 16386; - readonly attribute int8u colorLoopDirection = 16387; - readonly attribute int16u colorLoopTime = 16388; - readonly attribute int16u colorLoopStartEnhancedHue = 16389; - readonly attribute int16u colorLoopStoredEnhancedHue = 16390; + readonly attribute optional int8u colorLoopActive = 16386; + readonly attribute optional int8u colorLoopDirection = 16387; + readonly attribute optional int16u colorLoopTime = 16388; + readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; + readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; readonly attribute bitmap16 colorCapabilities = 16394; - readonly attribute int16u colorTempPhysicalMinMireds = 16395; - readonly attribute int16u colorTempPhysicalMaxMireds = 16396; - readonly attribute int16u coupleColorTempToLevelMinMireds = 16397; - attribute access(write: manage) nullable int16u startUpColorTemperatureMireds = 16400; + readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; + readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; + readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; + attribute access(write: manage) optional nullable int16u startUpColorTemperatureMireds = 16400; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4172,29 +4510,48 @@ server cluster ColorControl = 768 { bitmap8 optionsOverride = 6; } + /** Move to specified hue. */ command MoveToHue(MoveToHueRequest): DefaultSuccess = 0; + /** Move hue up or down at specified rate. */ command MoveHue(MoveHueRequest): DefaultSuccess = 1; + /** Step hue up or down by specified size at specified rate. */ command StepHue(StepHueRequest): DefaultSuccess = 2; + /** Move to specified saturation. */ command MoveToSaturation(MoveToSaturationRequest): DefaultSuccess = 3; + /** Move saturation up or down at specified rate. */ command MoveSaturation(MoveSaturationRequest): DefaultSuccess = 4; + /** Step saturation up or down by specified size at specified rate. */ command StepSaturation(StepSaturationRequest): DefaultSuccess = 5; + /** Move to hue and saturation. */ command MoveToHueAndSaturation(MoveToHueAndSaturationRequest): DefaultSuccess = 6; + /** Move to specified color. */ command MoveToColor(MoveToColorRequest): DefaultSuccess = 7; + /** Moves the color. */ command MoveColor(MoveColorRequest): DefaultSuccess = 8; + /** Steps the lighting to a specific color. */ command StepColor(StepColorRequest): DefaultSuccess = 9; + /** Move to a specific color temperature. */ command MoveToColorTemperature(MoveToColorTemperatureRequest): DefaultSuccess = 10; + /** Command description for EnhancedMoveToHue */ command EnhancedMoveToHue(EnhancedMoveToHueRequest): DefaultSuccess = 64; + /** Command description for EnhancedMoveHue */ command EnhancedMoveHue(EnhancedMoveHueRequest): DefaultSuccess = 65; + /** Command description for EnhancedStepHue */ command EnhancedStepHue(EnhancedStepHueRequest): DefaultSuccess = 66; + /** Command description for EnhancedMoveToHueAndSaturation */ command EnhancedMoveToHueAndSaturation(EnhancedMoveToHueAndSaturationRequest): DefaultSuccess = 67; + /** Command description for ColorLoopSet */ command ColorLoopSet(ColorLoopSetRequest): DefaultSuccess = 68; + /** Command description for StopMoveStep */ command StopMoveStep(StopMoveStepRequest): DefaultSuccess = 71; + /** Command description for MoveColorTemperature */ command MoveColorTemperature(MoveColorTemperatureRequest): DefaultSuccess = 75; + /** Command description for StepColorTemperature */ command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76; } /** Attributes and commands for configuring a lighting ballast. */ -provisional server cluster BallastConfiguration = 769 { +provisional cluster BallastConfiguration = 769 { revision 4; bitmap BallastStatusBitmap : bitmap8 { @@ -4208,18 +4565,18 @@ provisional server cluster BallastConfiguration = 769 { readonly attribute int8u physicalMinLevel = 0; readonly attribute int8u physicalMaxLevel = 1; - readonly attribute BallastStatusBitmap ballastStatus = 2; + readonly attribute optional BallastStatusBitmap ballastStatus = 2; attribute access(write: manage) int8u minLevel = 16; attribute access(write: manage) int8u maxLevel = 17; - attribute access(write: manage) nullable int8u intrinsicBallastFactor = 20; - attribute access(write: manage) nullable int8u ballastFactorAdjustment = 21; + attribute access(write: manage) optional nullable int8u intrinsicBallastFactor = 20; + attribute access(write: manage) optional nullable int8u ballastFactorAdjustment = 21; readonly attribute int8u lampQuantity = 32; - attribute access(write: manage) char_string<16> lampType = 48; - attribute access(write: manage) char_string<16> lampManufacturer = 49; - attribute access(write: manage) nullable int24u lampRatedHours = 50; - attribute access(write: manage) nullable int24u lampBurnHours = 51; - attribute access(write: manage) LampAlarmModeBitmap lampAlarmMode = 52; - attribute access(write: manage) nullable int24u lampBurnHoursTripPoint = 53; + attribute access(write: manage) optional char_string<16> lampType = 48; + attribute access(write: manage) optional char_string<16> lampManufacturer = 49; + attribute access(write: manage) optional nullable int24u lampRatedHours = 50; + attribute access(write: manage) optional nullable int24u lampBurnHours = 51; + attribute access(write: manage) optional LampAlarmModeBitmap lampAlarmMode = 52; + attribute access(write: manage) optional nullable int24u lampBurnHoursTripPoint = 53; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4229,7 +4586,7 @@ provisional server cluster BallastConfiguration = 769 { } /** Attributes and commands for configuring the measurement of illuminance, and reporting illuminance measurements. */ -server cluster IlluminanceMeasurement = 1024 { +cluster IlluminanceMeasurement = 1024 { revision 3; enum LightSensorTypeEnum : enum8 { @@ -4240,8 +4597,8 @@ server cluster IlluminanceMeasurement = 1024 { readonly attribute nullable int16u measuredValue = 0; readonly attribute nullable int16u minMeasuredValue = 1; readonly attribute nullable int16u maxMeasuredValue = 2; - readonly attribute int16u tolerance = 3; - readonly attribute nullable LightSensorTypeEnum lightSensorType = 4; + readonly attribute optional int16u tolerance = 3; + readonly attribute optional nullable LightSensorTypeEnum lightSensorType = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4251,13 +4608,13 @@ server cluster IlluminanceMeasurement = 1024 { } /** Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. */ -server cluster TemperatureMeasurement = 1026 { +cluster TemperatureMeasurement = 1026 { revision 1; // NOTE: Default/not specifically set readonly attribute nullable temperature measuredValue = 0; readonly attribute nullable temperature minMeasuredValue = 1; readonly attribute nullable temperature maxMeasuredValue = 2; - readonly attribute int16u tolerance = 3; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4267,7 +4624,7 @@ server cluster TemperatureMeasurement = 1026 { } /** Attributes and commands for configuring the measurement of pressure, and reporting pressure measurements. */ -server cluster PressureMeasurement = 1027 { +cluster PressureMeasurement = 1027 { revision 3; bitmap Feature : bitmap32 { @@ -4277,6 +4634,12 @@ server cluster PressureMeasurement = 1027 { readonly attribute nullable int16s measuredValue = 0; readonly attribute nullable int16s minMeasuredValue = 1; readonly attribute nullable int16s maxMeasuredValue = 2; + readonly attribute optional int16u tolerance = 3; + readonly attribute optional nullable int16s scaledValue = 16; + readonly attribute optional nullable int16s minScaledValue = 17; + readonly attribute optional nullable int16s maxScaledValue = 18; + readonly attribute optional int16u scaledTolerance = 19; + readonly attribute optional int8s scale = 20; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4286,13 +4649,13 @@ server cluster PressureMeasurement = 1027 { } /** Attributes and commands for configuring the measurement of flow, and reporting flow measurements. */ -server cluster FlowMeasurement = 1028 { +cluster FlowMeasurement = 1028 { revision 1; // NOTE: Default/not specifically set readonly attribute nullable int16u measuredValue = 0; readonly attribute nullable int16u minMeasuredValue = 1; readonly attribute nullable int16u maxMeasuredValue = 2; - readonly attribute int16u tolerance = 3; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4302,13 +4665,13 @@ server cluster FlowMeasurement = 1028 { } /** Attributes and commands for configuring the measurement of relative humidity, and reporting relative humidity measurements. */ -server cluster RelativeHumidityMeasurement = 1029 { +cluster RelativeHumidityMeasurement = 1029 { revision 3; readonly attribute nullable int16u measuredValue = 0; readonly attribute nullable int16u minMeasuredValue = 1; readonly attribute nullable int16u maxMeasuredValue = 2; - readonly attribute int16u tolerance = 3; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4318,7 +4681,7 @@ server cluster RelativeHumidityMeasurement = 1029 { } /** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ -server cluster OccupancySensing = 1030 { +cluster OccupancySensing = 1030 { revision 3; enum OccupancySensorTypeEnum : enum8 { @@ -4341,6 +4704,15 @@ server cluster OccupancySensing = 1030 { readonly attribute OccupancyBitmap occupancy = 0; readonly attribute OccupancySensorTypeEnum occupancySensorType = 1; readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2; + attribute access(write: manage) optional int16u PIROccupiedToUnoccupiedDelay = 16; + attribute access(write: manage) optional int16u PIRUnoccupiedToOccupiedDelay = 17; + attribute access(write: manage) optional int8u PIRUnoccupiedToOccupiedThreshold = 18; + attribute access(write: manage) optional int16u ultrasonicOccupiedToUnoccupiedDelay = 32; + attribute access(write: manage) optional int16u ultrasonicUnoccupiedToOccupiedDelay = 33; + attribute access(write: manage) optional int8u ultrasonicUnoccupiedToOccupiedThreshold = 34; + attribute access(write: manage) optional int16u physicalContactOccupiedToUnoccupiedDelay = 48; + attribute access(write: manage) optional int16u physicalContactUnoccupiedToOccupiedDelay = 49; + attribute access(write: manage) optional int8u physicalContactUnoccupiedToOccupiedThreshold = 50; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4350,7 +4722,7 @@ server cluster OccupancySensing = 1030 { } /** Attributes for reporting carbon monoxide concentration measurements */ -server cluster CarbonMonoxideConcentrationMeasurement = 1036 { +cluster CarbonMonoxideConcentrationMeasurement = 1036 { revision 3; enum LevelValueEnum : enum8 { @@ -4387,17 +4759,17 @@ server cluster CarbonMonoxideConcentrationMeasurement = 1036 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute single uncertainty = 7; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4407,7 +4779,7 @@ server cluster CarbonMonoxideConcentrationMeasurement = 1036 { } /** Attributes for reporting carbon dioxide concentration measurements */ -server cluster CarbonDioxideConcentrationMeasurement = 1037 { +cluster CarbonDioxideConcentrationMeasurement = 1037 { revision 3; enum LevelValueEnum : enum8 { @@ -4444,17 +4816,17 @@ server cluster CarbonDioxideConcentrationMeasurement = 1037 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute single uncertainty = 7; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4464,7 +4836,7 @@ server cluster CarbonDioxideConcentrationMeasurement = 1037 { } /** Attributes for reporting nitrogen dioxide concentration measurements */ -server cluster NitrogenDioxideConcentrationMeasurement = 1043 { +cluster NitrogenDioxideConcentrationMeasurement = 1043 { revision 3; enum LevelValueEnum : enum8 { @@ -4501,17 +4873,17 @@ server cluster NitrogenDioxideConcentrationMeasurement = 1043 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute single uncertainty = 7; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4521,7 +4893,7 @@ server cluster NitrogenDioxideConcentrationMeasurement = 1043 { } /** Attributes for reporting ozone concentration measurements */ -server cluster OzoneConcentrationMeasurement = 1045 { +cluster OzoneConcentrationMeasurement = 1045 { revision 3; enum LevelValueEnum : enum8 { @@ -4558,17 +4930,17 @@ server cluster OzoneConcentrationMeasurement = 1045 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute single uncertainty = 7; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4578,7 +4950,7 @@ server cluster OzoneConcentrationMeasurement = 1045 { } /** Attributes for reporting PM2.5 concentration measurements */ -server cluster Pm25ConcentrationMeasurement = 1066 { +cluster Pm25ConcentrationMeasurement = 1066 { revision 3; enum LevelValueEnum : enum8 { @@ -4615,17 +4987,17 @@ server cluster Pm25ConcentrationMeasurement = 1066 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute single uncertainty = 7; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4635,7 +5007,7 @@ server cluster Pm25ConcentrationMeasurement = 1066 { } /** Attributes for reporting formaldehyde concentration measurements */ -server cluster FormaldehydeConcentrationMeasurement = 1067 { +cluster FormaldehydeConcentrationMeasurement = 1067 { revision 3; enum LevelValueEnum : enum8 { @@ -4672,17 +5044,17 @@ server cluster FormaldehydeConcentrationMeasurement = 1067 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute single uncertainty = 7; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4692,7 +5064,7 @@ server cluster FormaldehydeConcentrationMeasurement = 1067 { } /** Attributes for reporting PM1 concentration measurements */ -server cluster Pm1ConcentrationMeasurement = 1068 { +cluster Pm1ConcentrationMeasurement = 1068 { revision 3; enum LevelValueEnum : enum8 { @@ -4729,17 +5101,17 @@ server cluster Pm1ConcentrationMeasurement = 1068 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute single uncertainty = 7; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4749,7 +5121,7 @@ server cluster Pm1ConcentrationMeasurement = 1068 { } /** Attributes for reporting PM10 concentration measurements */ -server cluster Pm10ConcentrationMeasurement = 1069 { +cluster Pm10ConcentrationMeasurement = 1069 { revision 3; enum LevelValueEnum : enum8 { @@ -4786,17 +5158,17 @@ server cluster Pm10ConcentrationMeasurement = 1069 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute single uncertainty = 7; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4806,7 +5178,7 @@ server cluster Pm10ConcentrationMeasurement = 1069 { } /** Attributes for reporting total volatile organic compounds concentration measurements */ -server cluster TotalVolatileOrganicCompoundsConcentrationMeasurement = 1070 { +cluster TotalVolatileOrganicCompoundsConcentrationMeasurement = 1070 { revision 3; enum LevelValueEnum : enum8 { @@ -4843,17 +5215,17 @@ server cluster TotalVolatileOrganicCompoundsConcentrationMeasurement = 1070 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute single uncertainty = 7; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4863,7 +5235,7 @@ server cluster TotalVolatileOrganicCompoundsConcentrationMeasurement = 1070 { } /** Attributes for reporting radon concentration measurements */ -server cluster RadonConcentrationMeasurement = 1071 { +cluster RadonConcentrationMeasurement = 1071 { revision 3; enum LevelValueEnum : enum8 { @@ -4900,17 +5272,17 @@ server cluster RadonConcentrationMeasurement = 1071 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute single uncertainty = 7; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4920,10 +5292,11 @@ server cluster RadonConcentrationMeasurement = 1071 { } /** This cluster provides an interface for managing low power mode on a device that supports the Wake On LAN protocol. */ -server cluster WakeOnLan = 1283 { +cluster WakeOnLan = 1283 { revision 1; // NOTE: Default/not specifically set - readonly attribute char_string<12> MACAddress = 0; + readonly attribute optional char_string<12> MACAddress = 0; + readonly attribute optional octet_string<16> linkLocalAddress = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4933,7 +5306,7 @@ server cluster WakeOnLan = 1283 { } /** This cluster provides an interface for managing low power mode on a device. */ -server cluster LowPower = 1288 { +cluster LowPower = 1288 { revision 1; // NOTE: Default/not specifically set readonly attribute command_id generatedCommandList[] = 65528; @@ -4943,34 +5316,179 @@ server cluster LowPower = 1288 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** This command shall put the device into low power mode. */ command Sleep(): DefaultSuccess = 0; } /** Attributes related to the electrical properties of a device. This cluster is used by power outlets and other devices that need to provide instantaneous data as opposed to metrology data which should be retrieved from the metering cluster.. */ -server cluster ElectricalMeasurement = 2820 { +cluster ElectricalMeasurement = 2820 { revision 3; - readonly attribute bitmap32 measurementType = 0; - readonly attribute int32s totalActivePower = 772; - readonly attribute int16u rmsVoltage = 1285; - readonly attribute int16u rmsVoltageMin = 1286; - readonly attribute int16u rmsVoltageMax = 1287; - readonly attribute int16u rmsCurrent = 1288; - readonly attribute int16u rmsCurrentMin = 1289; - readonly attribute int16u rmsCurrentMax = 1290; - readonly attribute int16s activePower = 1291; - readonly attribute int16s activePowerMin = 1292; - readonly attribute int16s activePowerMax = 1293; + readonly attribute optional bitmap32 measurementType = 0; + readonly attribute optional int16s dcVoltage = 256; + readonly attribute optional int16s dcVoltageMin = 257; + readonly attribute optional int16s dcVoltageMax = 258; + readonly attribute optional int16s dcCurrent = 259; + readonly attribute optional int16s dcCurrentMin = 260; + readonly attribute optional int16s dcCurrentMax = 261; + readonly attribute optional int16s dcPower = 262; + readonly attribute optional int16s dcPowerMin = 263; + readonly attribute optional int16s dcPowerMax = 264; + readonly attribute optional int16u dcVoltageMultiplier = 512; + readonly attribute optional int16u dcVoltageDivisor = 513; + readonly attribute optional int16u dcCurrentMultiplier = 514; + readonly attribute optional int16u dcCurrentDivisor = 515; + readonly attribute optional int16u dcPowerMultiplier = 516; + readonly attribute optional int16u dcPowerDivisor = 517; + readonly attribute optional int16u acFrequency = 768; + readonly attribute optional int16u acFrequencyMin = 769; + readonly attribute optional int16u acFrequencyMax = 770; + readonly attribute optional int16u neutralCurrent = 771; + readonly attribute optional int32s totalActivePower = 772; + readonly attribute optional int32s totalReactivePower = 773; + readonly attribute optional int32u totalApparentPower = 774; + readonly attribute optional int16s measured1stHarmonicCurrent = 775; + readonly attribute optional int16s measured3rdHarmonicCurrent = 776; + readonly attribute optional int16s measured5thHarmonicCurrent = 777; + readonly attribute optional int16s measured7thHarmonicCurrent = 778; + readonly attribute optional int16s measured9thHarmonicCurrent = 779; + readonly attribute optional int16s measured11thHarmonicCurrent = 780; + readonly attribute optional int16s measuredPhase1stHarmonicCurrent = 781; + readonly attribute optional int16s measuredPhase3rdHarmonicCurrent = 782; + readonly attribute optional int16s measuredPhase5thHarmonicCurrent = 783; + readonly attribute optional int16s measuredPhase7thHarmonicCurrent = 784; + readonly attribute optional int16s measuredPhase9thHarmonicCurrent = 785; + readonly attribute optional int16s measuredPhase11thHarmonicCurrent = 786; + readonly attribute optional int16u acFrequencyMultiplier = 1024; + readonly attribute optional int16u acFrequencyDivisor = 1025; + readonly attribute optional int32u powerMultiplier = 1026; + readonly attribute optional int32u powerDivisor = 1027; + readonly attribute optional int8s harmonicCurrentMultiplier = 1028; + readonly attribute optional int8s phaseHarmonicCurrentMultiplier = 1029; + readonly attribute optional int16s instantaneousVoltage = 1280; + readonly attribute optional int16u instantaneousLineCurrent = 1281; + readonly attribute optional int16s instantaneousActiveCurrent = 1282; + readonly attribute optional int16s instantaneousReactiveCurrent = 1283; + readonly attribute optional int16s instantaneousPower = 1284; + readonly attribute optional int16u rmsVoltage = 1285; + readonly attribute optional int16u rmsVoltageMin = 1286; + readonly attribute optional int16u rmsVoltageMax = 1287; + readonly attribute optional int16u rmsCurrent = 1288; + readonly attribute optional int16u rmsCurrentMin = 1289; + readonly attribute optional int16u rmsCurrentMax = 1290; + readonly attribute optional int16s activePower = 1291; + readonly attribute optional int16s activePowerMin = 1292; + readonly attribute optional int16s activePowerMax = 1293; + readonly attribute optional int16s reactivePower = 1294; + readonly attribute optional int16u apparentPower = 1295; + readonly attribute optional int8s powerFactor = 1296; + attribute optional int16u averageRmsVoltageMeasurementPeriod = 1297; + attribute optional int16u averageRmsUnderVoltageCounter = 1299; + attribute optional int16u rmsExtremeOverVoltagePeriod = 1300; + attribute optional int16u rmsExtremeUnderVoltagePeriod = 1301; + attribute optional int16u rmsVoltageSagPeriod = 1302; + attribute optional int16u rmsVoltageSwellPeriod = 1303; + readonly attribute optional int16u acVoltageMultiplier = 1536; + readonly attribute optional int16u acVoltageDivisor = 1537; + readonly attribute optional int16u acCurrentMultiplier = 1538; + readonly attribute optional int16u acCurrentDivisor = 1539; + readonly attribute optional int16u acPowerMultiplier = 1540; + readonly attribute optional int16u acPowerDivisor = 1541; + attribute optional bitmap8 overloadAlarmsMask = 1792; + readonly attribute optional int16s voltageOverload = 1793; + readonly attribute optional int16s currentOverload = 1794; + attribute optional bitmap16 acOverloadAlarmsMask = 2048; + readonly attribute optional int16s acVoltageOverload = 2049; + readonly attribute optional int16s acCurrentOverload = 2050; + readonly attribute optional int16s acActivePowerOverload = 2051; + readonly attribute optional int16s acReactivePowerOverload = 2052; + readonly attribute optional int16s averageRmsOverVoltage = 2053; + readonly attribute optional int16s averageRmsUnderVoltage = 2054; + readonly attribute optional int16s rmsExtremeOverVoltage = 2055; + readonly attribute optional int16s rmsExtremeUnderVoltage = 2056; + readonly attribute optional int16s rmsVoltageSag = 2057; + readonly attribute optional int16s rmsVoltageSwell = 2058; + readonly attribute optional int16u lineCurrentPhaseB = 2305; + readonly attribute optional int16s activeCurrentPhaseB = 2306; + readonly attribute optional int16s reactiveCurrentPhaseB = 2307; + readonly attribute optional int16u rmsVoltagePhaseB = 2309; + readonly attribute optional int16u rmsVoltageMinPhaseB = 2310; + readonly attribute optional int16u rmsVoltageMaxPhaseB = 2311; + readonly attribute optional int16u rmsCurrentPhaseB = 2312; + readonly attribute optional int16u rmsCurrentMinPhaseB = 2313; + readonly attribute optional int16u rmsCurrentMaxPhaseB = 2314; + readonly attribute optional int16s activePowerPhaseB = 2315; + readonly attribute optional int16s activePowerMinPhaseB = 2316; + readonly attribute optional int16s activePowerMaxPhaseB = 2317; + readonly attribute optional int16s reactivePowerPhaseB = 2318; + readonly attribute optional int16u apparentPowerPhaseB = 2319; + readonly attribute optional int8s powerFactorPhaseB = 2320; + readonly attribute optional int16u averageRmsVoltageMeasurementPeriodPhaseB = 2321; + readonly attribute optional int16u averageRmsOverVoltageCounterPhaseB = 2322; + readonly attribute optional int16u averageRmsUnderVoltageCounterPhaseB = 2323; + readonly attribute optional int16u rmsExtremeOverVoltagePeriodPhaseB = 2324; + readonly attribute optional int16u rmsExtremeUnderVoltagePeriodPhaseB = 2325; + readonly attribute optional int16u rmsVoltageSagPeriodPhaseB = 2326; + readonly attribute optional int16u rmsVoltageSwellPeriodPhaseB = 2327; + readonly attribute optional int16u lineCurrentPhaseC = 2561; + readonly attribute optional int16s activeCurrentPhaseC = 2562; + readonly attribute optional int16s reactiveCurrentPhaseC = 2563; + readonly attribute optional int16u rmsVoltagePhaseC = 2565; + readonly attribute optional int16u rmsVoltageMinPhaseC = 2566; + readonly attribute optional int16u rmsVoltageMaxPhaseC = 2567; + readonly attribute optional int16u rmsCurrentPhaseC = 2568; + readonly attribute optional int16u rmsCurrentMinPhaseC = 2569; + readonly attribute optional int16u rmsCurrentMaxPhaseC = 2570; + readonly attribute optional int16s activePowerPhaseC = 2571; + readonly attribute optional int16s activePowerMinPhaseC = 2572; + readonly attribute optional int16s activePowerMaxPhaseC = 2573; + readonly attribute optional int16s reactivePowerPhaseC = 2574; + readonly attribute optional int16u apparentPowerPhaseC = 2575; + readonly attribute optional int8s powerFactorPhaseC = 2576; + readonly attribute optional int16u averageRmsVoltageMeasurementPeriodPhaseC = 2577; + readonly attribute optional int16u averageRmsOverVoltageCounterPhaseC = 2578; + readonly attribute optional int16u averageRmsUnderVoltageCounterPhaseC = 2579; + readonly attribute optional int16u rmsExtremeOverVoltagePeriodPhaseC = 2580; + readonly attribute optional int16u rmsExtremeUnderVoltagePeriodPhaseC = 2581; + readonly attribute optional int16u rmsVoltageSagPeriodPhaseC = 2582; + readonly attribute optional int16u rmsVoltageSwellPeriodPhaseC = 2583; 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; + + response struct GetProfileInfoResponseCommand = 0 { + int8u profileCount = 0; + enum8 profileIntervalPeriod = 1; + int8u maxNumberOfIntervals = 2; + int16u listOfAttributes[] = 3; + } + + response struct GetMeasurementProfileResponseCommand = 1 { + int32u startTime = 0; + enum8 status = 1; + enum8 profileIntervalPeriod = 2; + int8u numberOfIntervalsDelivered = 3; + int16u attributeId = 4; + int8u intervals[] = 5; + } + + request struct GetMeasurementProfileCommandRequest { + int16u attributeId = 0; + int32u startTime = 1; + enum8 numberOfIntervals = 2; + } + + /** A function which retrieves the power profiling information from the electrical measurement server. */ + command GetProfileInfoCommand(): DefaultSuccess = 0; + /** A function which retrieves an electricity measurement profile from the electricity measurement server for a specific attribute Id requested. */ + command GetMeasurementProfileCommand(GetMeasurementProfileCommandRequest): DefaultSuccess = 1; } /** The Test Cluster is meant to validate the generated code */ -internal server cluster UnitTesting = 4294048773 { +internal cluster UnitTesting = 4294048773 { revision 1; // NOTE: Default/not specifically set enum SimpleEnum : enum8 { @@ -5136,6 +5654,7 @@ internal server cluster UnitTesting = 4294048773 { timedwrite attribute boolean timedWriteBoolean = 48; attribute boolean generalErrorBoolean = 49; attribute boolean clusterErrorBoolean = 50; + attribute optional boolean unsupported = 255; attribute nullable boolean nullableBoolean = 16384; attribute nullable Bitmap8MaskMap nullableBitmap8 = 16385; attribute nullable Bitmap16MaskMap nullableBitmap16 = 16386; @@ -5169,7 +5688,7 @@ internal server cluster UnitTesting = 4294048773 { attribute nullable int8s nullableRangeRestrictedInt8s = 16423; attribute nullable int16u nullableRangeRestrictedInt16u = 16424; attribute nullable int16s nullableRangeRestrictedInt16s = 16425; - attribute int8u writeOnlyInt8u = 16426; + attribute optional int8u writeOnlyInt8u = 16426; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5177,31 +5696,128 @@ internal server cluster UnitTesting = 4294048773 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + response struct TestSpecificResponse = 0 { + int8u returnValue = 0; + } + + response struct TestAddArgumentsResponse = 1 { + int8u returnValue = 0; + } + + response struct TestSimpleArgumentResponse = 2 { + boolean returnValue = 0; + } + + response struct TestStructArrayArgumentResponse = 3 { + NestedStructList arg1[] = 0; + SimpleStruct arg2[] = 1; + SimpleEnum arg3[] = 2; + boolean arg4[] = 3; + SimpleEnum arg5 = 4; + boolean arg6 = 5; + } + request struct TestAddArgumentsRequest { int8u arg1 = 0; int8u arg2 = 1; } + response struct TestListInt8UReverseResponse = 4 { + int8u arg1[] = 0; + } + + request struct TestSimpleArgumentRequestRequest { + boolean arg1 = 0; + } + + response struct TestEnumsResponse = 5 { + vendor_id arg1 = 0; + SimpleEnum arg2 = 1; + } + + request struct TestStructArrayArgumentRequestRequest { + NestedStructList arg1[] = 0; + SimpleStruct arg2[] = 1; + SimpleEnum arg3[] = 2; + boolean arg4[] = 3; + SimpleEnum arg5 = 4; + boolean arg6 = 5; + } + + response struct TestNullableOptionalResponse = 6 { + boolean wasPresent = 0; + optional boolean wasNull = 1; + optional int8u value = 2; + optional nullable int8u originalValue = 3; + } + request struct TestStructArgumentRequestRequest { SimpleStruct arg1 = 0; } + response struct TestComplexNullableOptionalResponse = 7 { + boolean nullableIntWasNull = 0; + optional int16u nullableIntValue = 1; + boolean optionalIntWasPresent = 2; + optional int16u optionalIntValue = 3; + boolean nullableOptionalIntWasPresent = 4; + optional boolean nullableOptionalIntWasNull = 5; + optional int16u nullableOptionalIntValue = 6; + boolean nullableStringWasNull = 7; + optional char_string nullableStringValue = 8; + boolean optionalStringWasPresent = 9; + optional char_string optionalStringValue = 10; + boolean nullableOptionalStringWasPresent = 11; + optional boolean nullableOptionalStringWasNull = 12; + optional char_string nullableOptionalStringValue = 13; + boolean nullableStructWasNull = 14; + optional SimpleStruct nullableStructValue = 15; + boolean optionalStructWasPresent = 16; + optional SimpleStruct optionalStructValue = 17; + boolean nullableOptionalStructWasPresent = 18; + optional boolean nullableOptionalStructWasNull = 19; + optional SimpleStruct nullableOptionalStructValue = 20; + boolean nullableListWasNull = 21; + optional SimpleEnum nullableListValue[] = 22; + boolean optionalListWasPresent = 23; + optional SimpleEnum optionalListValue[] = 24; + boolean nullableOptionalListWasPresent = 25; + optional boolean nullableOptionalListWasNull = 26; + optional SimpleEnum nullableOptionalListValue[] = 27; + } + request struct TestNestedStructArgumentRequestRequest { NestedStruct arg1 = 0; } + response struct BooleanResponse = 8 { + boolean value = 0; + } + request struct TestListStructArgumentRequestRequest { SimpleStruct arg1[] = 0; } + response struct SimpleStructResponse = 9 { + SimpleStruct arg1 = 0; + } + request struct TestListInt8UArgumentRequestRequest { int8u arg1[] = 0; } + response struct TestEmitTestEventResponse = 10 { + int64u value = 0; + } + request struct TestNestedStructListArgumentRequestRequest { NestedStructList arg1 = 0; } + response struct TestEmitTestFabricScopedEventResponse = 11 { + int64u value = 0; + } + request struct TestListNestedStructListArgumentRequestRequest { NestedStructList arg1[] = 0; } @@ -5219,6 +5835,21 @@ internal server cluster UnitTesting = 4294048773 { optional nullable int8u arg1 = 0; } + request struct TestComplexNullableOptionalRequestRequest { + nullable int16u nullableInt = 0; + optional int16u optionalInt = 1; + optional nullable int16u nullableOptionalInt = 2; + nullable char_string nullableString = 3; + optional char_string optionalString = 4; + optional nullable char_string nullableOptionalString = 5; + nullable SimpleStruct nullableStruct = 6; + optional SimpleStruct optionalStruct = 7; + optional nullable SimpleStruct nullableOptionalStruct = 8; + nullable SimpleEnum nullableList[] = 9; + optional SimpleEnum optionalList[] = 10; + optional nullable SimpleEnum nullableOptionalList[] = 11; + } + request struct SimpleStructEchoRequestRequest { SimpleStruct arg1 = 0; } @@ -5237,64 +5868,75 @@ internal server cluster UnitTesting = 4294048773 { int8u arg1 = 0; } - response struct TestSpecificResponse = 0 { - int8u returnValue = 0; - } - - response struct TestAddArgumentsResponse = 1 { - int8u returnValue = 0; - } - - response struct TestListInt8UReverseResponse = 4 { - int8u arg1[] = 0; - } - - response struct TestEnumsResponse = 5 { - vendor_id arg1 = 0; - SimpleEnum arg2 = 1; - } - - response struct TestNullableOptionalResponse = 6 { - boolean wasPresent = 0; - optional boolean wasNull = 1; - optional int8u value = 2; - optional nullable int8u originalValue = 3; - } - - response struct SimpleStructResponse = 9 { - SimpleStruct arg1 = 0; - } - - response struct TestEmitTestEventResponse = 10 { - int64u value = 0; - } - - response struct TestEmitTestFabricScopedEventResponse = 11 { - int64u value = 0; - } - + /** Simple command without any parameters and without a specific response */ command Test(): DefaultSuccess = 0; + /** Simple command without any parameters and without a specific response not handled by the server */ command TestNotHandled(): DefaultSuccess = 1; + /** Simple command without any parameters and with a specific response */ command TestSpecific(): TestSpecificResponse = 2; + /** Simple command that should not be added to the server. */ + command TestUnknownCommand(): DefaultSuccess = 3; + /** Command that takes two arguments and returns their sum. */ command TestAddArguments(TestAddArgumentsRequest): TestAddArgumentsResponse = 4; + /** Command that takes an argument which is bool */ + command TestSimpleArgumentRequest(TestSimpleArgumentRequestRequest): TestSimpleArgumentResponse = 5; + /** Command that takes various arguments that are arrays, including an array of structs which have a list member. */ + command TestStructArrayArgumentRequest(TestStructArrayArgumentRequestRequest): TestStructArrayArgumentResponse = 6; + /** Command that takes an argument which is struct. The response echoes the + 'b' field of the single arg. */ command TestStructArgumentRequest(TestStructArgumentRequestRequest): BooleanResponse = 7; + /** Command that takes an argument which is nested struct. The response + echoes the 'b' field of ar1.c. */ command TestNestedStructArgumentRequest(TestNestedStructArgumentRequestRequest): BooleanResponse = 8; + /** Command that takes an argument which is a list of structs. The response + returns false if there is some struct in the list whose 'b' field is + false, and true otherwise (including if the list is empty). */ command TestListStructArgumentRequest(TestListStructArgumentRequestRequest): BooleanResponse = 9; + /** Command that takes an argument which is a list of INT8U. The response + returns false if the list contains a 0 in it, true otherwise (including + if the list is empty). */ command TestListInt8UArgumentRequest(TestListInt8UArgumentRequestRequest): BooleanResponse = 10; + /** Command that takes an argument which is a Nested Struct List. The + response returns false if there is some struct in arg1 (either directly + in arg1.c or in the arg1.d list) whose 'b' field is false, and true + otherwise. */ command TestNestedStructListArgumentRequest(TestNestedStructListArgumentRequestRequest): BooleanResponse = 11; + /** Command that takes an argument which is a list of Nested Struct List. + The response returns false if there is some struct in arg1 (either + directly in as the 'c' field of an entry 'd' list of an entry) whose 'b' + field is false, and true otherwise (including if the list is empty). */ command TestListNestedStructListArgumentRequest(TestListNestedStructListArgumentRequestRequest): BooleanResponse = 12; + /** Command that takes an argument which is a list of INT8U and expects a + response that reverses the list. */ command TestListInt8UReverseRequest(TestListInt8UReverseRequestRequest): TestListInt8UReverseResponse = 13; + /** Command that sends a vendor id and an enum. The server is expected to + echo them back. */ command TestEnumsRequest(TestEnumsRequestRequest): TestEnumsResponse = 14; + /** Command that takes an argument which is nullable and optional. The + response returns a boolean indicating whether the argument was present, + if that's true a boolean indicating whether the argument was null, and + if that' false the argument it received. */ command TestNullableOptionalRequest(TestNullableOptionalRequestRequest): TestNullableOptionalResponse = 15; + /** Command that takes various arguments which can be nullable and/or optional. The + response returns information about which things were received and what + their state was. */ + command TestComplexNullableOptionalRequest(TestComplexNullableOptionalRequestRequest): TestComplexNullableOptionalResponse = 16; + /** Command that takes an argument which is a struct. The response echoes + the struct back. */ command SimpleStructEchoRequest(SimpleStructEchoRequestRequest): SimpleStructResponse = 17; + /** Command that just responds with a success status if the timed invoke + conditions are met. */ timed command TimedInvokeRequest(): DefaultSuccess = 18; + /** Command that takes an optional argument which is bool. It responds with a success value if the optional is set to any value. */ command TestSimpleOptionalArgumentRequest(TestSimpleOptionalArgumentRequestRequest): DefaultSuccess = 19; + /** Command that takes identical arguments to the fields of the TestEvent and logs the TestEvent to the buffer. Command returns an event ID as the response. */ command TestEmitTestEventRequest(TestEmitTestEventRequestRequest): TestEmitTestEventResponse = 20; + /** Command that takes identical arguments to the fields of the TestFabricScopedEvent and logs the TestFabricScopedEvent to the buffer. Command returns an event ID as the response. */ command TestEmitTestFabricScopedEventRequest(TestEmitTestFabricScopedEventRequestRequest): TestEmitTestFabricScopedEventResponse = 21; } /** The Fault Injection Cluster provide a means for a test harness to configure faults(for example triggering a fault in the system). */ -internal server cluster FaultInjection = 4294048774 { +internal cluster FaultInjection = 4294048774 { revision 1; // NOTE: Default/not specifically set enum FaultType : enum8 { @@ -5326,7 +5968,9 @@ internal server cluster FaultInjection = 4294048774 { int8u percentage = 2; } + /** Configure a fault to be triggered deterministically */ command access(invoke: manage) FailAtFault(FailAtFaultRequest): DefaultSuccess = 0; + /** Configure a fault to be triggered randomly, with a given probability defined as a percentage */ command access(invoke: manage) FailRandomlyAtFault(FailRandomlyAtFaultRequest): DefaultSuccess = 1; } diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index 5908594f643e6f..fe03dae5aebe73 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -74,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** Attributes and commands for scene configuration and manipulation. */ -provisional server cluster Scenes = 5 { +provisional cluster Scenes = 5 { revision 5; bitmap CopyModeBitmap : bitmap8 { @@ -158,8 +166,12 @@ provisional server cluster Scenes = 5 { fabric_idx fabricIndex = 254; } + readonly attribute optional int8u sceneCount = 0; + readonly attribute optional int8u currentScene = 1; + readonly attribute optional group_id currentGroup = 2; + readonly attribute optional boolean sceneValid = 3; readonly attribute NameSupportBitmap nameSupport = 4; - readonly attribute nullable node_id lastConfiguredBy = 5; + readonly attribute optional nullable node_id lastConfiguredBy = 5; readonly attribute int16u sceneTableSize = 6; readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; readonly attribute command_id generatedCommandList[] = 65528; @@ -177,25 +189,57 @@ provisional server cluster Scenes = 5 { ExtensionFieldSet extensionFieldSets[] = 4; } + response struct AddSceneResponse = 0 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + request struct ViewSceneRequest { group_id groupID = 0; int8u sceneID = 1; } + response struct ViewSceneResponse = 1 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + request struct RemoveSceneRequest { group_id groupID = 0; int8u sceneID = 1; } + response struct RemoveSceneResponse = 2 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + request struct RemoveAllScenesRequest { group_id groupID = 0; } + response struct RemoveAllScenesResponse = 3 { + status status = 0; + group_id groupID = 1; + } + request struct StoreSceneRequest { group_id groupID = 0; int8u sceneID = 1; } + response struct StoreSceneResponse = 4 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + request struct RecallSceneRequest { group_id groupID = 0; int8u sceneID = 1; @@ -206,56 +250,79 @@ provisional server cluster Scenes = 5 { group_id groupID = 0; } - response struct AddSceneResponse = 0 { + response struct GetSceneMembershipResponse = 6 { status status = 0; - group_id groupID = 1; - int8u sceneID = 2; + nullable int8u capacity = 1; + group_id groupID = 2; + optional int8u sceneList[] = 3; } - response struct ViewSceneResponse = 1 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - optional int16u transitionTime = 3; - optional char_string sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; + request struct EnhancedAddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int16u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; } - response struct RemoveSceneResponse = 2 { + response struct EnhancedAddSceneResponse = 64 { status status = 0; group_id groupID = 1; int8u sceneID = 2; } - response struct RemoveAllScenesResponse = 3 { - status status = 0; - group_id groupID = 1; + request struct EnhancedViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; } - response struct StoreSceneResponse = 4 { + response struct EnhancedViewSceneResponse = 65 { status status = 0; group_id groupID = 1; int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; } - response struct GetSceneMembershipResponse = 6 { + request struct CopySceneRequest { + CopyModeBitmap mode = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + group_id groupIdentifierTo = 3; + int8u sceneIdentifierTo = 4; + } + + response struct CopySceneResponse = 66 { status status = 0; - nullable int8u capacity = 1; - group_id groupID = 2; - optional int8u sceneList[] = 3; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; } + /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; + /** Retrieves the requested scene entry from its Scene table. */ fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; + /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ + fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; + /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ + fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; + /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ + fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -290,10 +357,10 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; - readonly attribute boolean globalSceneControl = 16384; - attribute int16u onTime = 16385; - attribute int16u offWaitTime = 16386; - attribute access(write: manage) nullable StartUpOnOffEnum startUpOnOff = 16387; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -312,16 +379,22 @@ server cluster OnOff = 6 { int16u offWaitTime = 2; } + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ -server cluster LevelControl = 8 { +cluster LevelControl = 8 { revision 5; enum MoveModeEnum : enum8 { @@ -346,10 +419,19 @@ server cluster LevelControl = 8 { } readonly attribute nullable int8u currentLevel = 0; - readonly attribute int16u remainingTime = 1; + readonly attribute optional int16u remainingTime = 1; + readonly attribute optional int8u minLevel = 2; + readonly attribute optional int8u maxLevel = 3; + readonly attribute optional int16u currentFrequency = 4; + readonly attribute optional int16u minFrequency = 5; + readonly attribute optional int16u maxFrequency = 6; attribute OptionsBitmap options = 15; + attribute optional int16u onOffTransitionTime = 16; attribute nullable int8u onLevel = 17; - attribute access(write: manage) nullable int8u startUpCurrentLevel = 16384; + attribute optional nullable int16u onTransitionTime = 18; + attribute optional nullable int16u offTransitionTime = 19; + attribute optional nullable int8u defaultMoveRate = 20; + attribute access(write: manage) optional nullable int8u startUpCurrentLevel = 16384; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -411,18 +493,33 @@ server cluster LevelControl = 8 { OptionsBitmap optionsOverride = 1; } + request struct MoveToClosestFrequencyRequest { + int16u frequency = 0; + } + + /** Command description for MoveToLevel */ command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + /** Command description for Move */ command Move(MoveRequest): DefaultSuccess = 1; + /** Command description for Step */ command Step(StepRequest): DefaultSuccess = 2; + /** Command description for Stop */ command Stop(StopRequest): DefaultSuccess = 3; + /** Command description for MoveToLevelWithOnOff */ command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + /** Command description for MoveWithOnOff */ command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + /** Command description for StepWithOnOff */ command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + /** Command description for StopWithOnOff */ command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; + /** Change the currrent frequency to the provided one, or a close + approximation if the exact provided one is not possible. */ + command MoveToClosestFrequency(MoveToClosestFrequencyRequest): DefaultSuccess = 8; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -445,6 +542,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -454,7 +552,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -server cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -478,7 +576,7 @@ server cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -537,7 +635,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -550,7 +648,7 @@ server cluster AccessControl = 31 { } /** This cluster provides a standardized way for a Node (typically a Bridge, but could be any Node) to expose action information. */ -server cluster Actions = 37 { +cluster Actions = 37 { revision 1; // NOTE: Default/not specifically set enum ActionErrorEnum : enum8 { @@ -627,18 +725,109 @@ server cluster Actions = 37 { readonly attribute ActionStruct actionList[] = 0; readonly attribute EndpointListStruct endpointLists[] = 1; + readonly attribute optional long_char_string<512> setupURL = 2; 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; + + request struct InstantActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct InstantActionWithTransitionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + int16u transitionTime = 2; + } + + request struct StartActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct StartActionWithDurationRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + int32u duration = 2; + } + + request struct StopActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct PauseActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct PauseActionWithDurationRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + int32u duration = 2; + } + + request struct ResumeActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct EnableActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct EnableActionWithDurationRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + int32u duration = 2; + } + + request struct DisableActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct DisableActionWithDurationRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + int32u duration = 2; + } + + /** This command triggers an action (state change) on the involved endpoints. */ + command InstantAction(InstantActionRequest): DefaultSuccess = 0; + /** This command triggers an action (state change) on the involved endpoints, with a specified time to transition from the current state to the new state. */ + command InstantActionWithTransition(InstantActionWithTransitionRequest): DefaultSuccess = 1; + /** This command triggers the commencement of an action on the involved endpoints. */ + command StartAction(StartActionRequest): DefaultSuccess = 2; + /** This command triggers the commencement of an action (with a duration) on the involved endpoints. */ + command StartActionWithDuration(StartActionWithDurationRequest): DefaultSuccess = 3; + /** This command stops the ongoing action on the involved endpoints. */ + command StopAction(StopActionRequest): DefaultSuccess = 4; + /** This command pauses an ongoing action. */ + command PauseAction(PauseActionRequest): DefaultSuccess = 5; + /** This command pauses an ongoing action with a duration. */ + command PauseActionWithDuration(PauseActionWithDurationRequest): DefaultSuccess = 6; + /** This command resumes a previously paused action. */ + command ResumeAction(ResumeActionRequest): DefaultSuccess = 7; + /** This command enables a certain action or automation. */ + command EnableAction(EnableActionRequest): DefaultSuccess = 8; + /** This command enables a certain action or automation with a duration. */ + command EnableActionWithDuration(EnableActionWithDurationRequest): DefaultSuccess = 9; + /** This command disables a certain action or automation. */ + command DisableAction(DisableActionRequest): DefaultSuccess = 10; + /** This command disables a certain action or automation with a duration. */ + command DisableActionWithDuration(DisableActionWithDurationRequest): DefaultSuccess = 11; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -710,7 +899,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -719,10 +917,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -798,7 +998,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -871,6 +1071,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -878,7 +1079,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -895,7 +1096,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -923,6 +1124,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -935,7 +1138,7 @@ server cluster TimeFormatLocalization = 44 { may have differing preferences for the units in which values are conveyed in communication to a user. As such, Nodes that visually or audibly convey measurable values to the user need a mechanism by which they can be configured to use a user’s preferred unit. */ -server cluster UnitLocalization = 45 { +cluster UnitLocalization = 45 { revision 1; enum TempUnitEnum : enum8 { @@ -948,6 +1151,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } + attribute access(write: manage) optional TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -957,7 +1161,7 @@ server cluster UnitLocalization = 45 { } /** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ -server cluster PowerSource = 47 { +cluster PowerSource = 47 { revision 1; // NOTE: Default/not specifically set enum BatApprovedChemistryEnum : enum16 { @@ -1178,6 +1382,34 @@ server cluster PowerSource = 47 { readonly attribute PowerSourceStatusEnum status = 0; readonly attribute int8u order = 1; readonly attribute char_string<60> description = 2; + readonly attribute optional nullable int32u wiredAssessedInputVoltage = 3; + readonly attribute optional nullable int16u wiredAssessedInputFrequency = 4; + readonly attribute optional WiredCurrentTypeEnum wiredCurrentType = 5; + readonly attribute optional nullable int32u wiredAssessedCurrent = 6; + readonly attribute optional int32u wiredNominalVoltage = 7; + readonly attribute optional int32u wiredMaximumCurrent = 8; + readonly attribute optional boolean wiredPresent = 9; + readonly attribute optional WiredFaultEnum activeWiredFaults[] = 10; + readonly attribute optional nullable int32u batVoltage = 11; + readonly attribute optional nullable int8u batPercentRemaining = 12; + readonly attribute optional nullable int32u batTimeRemaining = 13; + readonly attribute optional BatChargeLevelEnum batChargeLevel = 14; + readonly attribute optional boolean batReplacementNeeded = 15; + readonly attribute optional BatReplaceabilityEnum batReplaceability = 16; + readonly attribute optional boolean batPresent = 17; + readonly attribute optional BatFaultEnum activeBatFaults[] = 18; + readonly attribute optional char_string<60> batReplacementDescription = 19; + readonly attribute optional BatCommonDesignationEnum batCommonDesignation = 20; + readonly attribute optional char_string<20> batANSIDesignation = 21; + readonly attribute optional char_string<20> batIECDesignation = 22; + readonly attribute optional BatApprovedChemistryEnum batApprovedChemistry = 23; + readonly attribute optional int32u batCapacity = 24; + readonly attribute optional int8u batQuantity = 25; + readonly attribute optional BatChargeStateEnum batChargeState = 26; + readonly attribute optional nullable int32u batTimeToFullCharge = 27; + readonly attribute optional boolean batFunctionalWhileCharging = 28; + readonly attribute optional nullable int32u batChargingCurrent = 29; + readonly attribute optional BatChargeFaultEnum activeBatChargeFaults[] = 30; readonly attribute endpoint_no endpointList[] = 31; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1188,7 +1420,7 @@ server cluster PowerSource = 47 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -1227,17 +1459,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -1248,13 +1480,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -1335,12 +1570,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1353,6 +1591,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -1372,48 +1617,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -1448,11 +1704,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -1536,7 +1800,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1555,12 +1824,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -1581,16 +1852,23 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; 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; + + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ + command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ -server cluster ThreadNetworkDiagnostics = 53 { +cluster ThreadNetworkDiagnostics = 53 { revision 1; // NOTE: Default/not specifically set enum ConnectionStatusEnum : enum8 { @@ -1687,6 +1965,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u panId = 3; readonly attribute nullable int64u extendedPanId = 4; readonly attribute nullable octet_string<17> meshLocalPrefix = 5; + readonly attribute optional int64u overrunCount = 6; readonly attribute NeighborTableStruct neighborTable[] = 7; readonly attribute RouteTableStruct routeTable[] = 8; readonly attribute nullable int32u partitionId = 9; @@ -1694,6 +1973,51 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u dataVersion = 11; readonly attribute nullable int16u stableDataVersion = 12; readonly attribute nullable int8u leaderRouterId = 13; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; readonly attribute nullable SecurityPolicy securityPolicy = 59; readonly attribute nullable octet_string<4> channelPage0Mask = 60; readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; @@ -1704,10 +2028,13 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ + command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster WiFiNetworkDiagnostics = 54 { +cluster WiFiNetworkDiagnostics = 54 { revision 1; // NOTE: Default/not specifically set enum AssociationFailureCauseEnum : enum8 { @@ -1764,16 +2091,27 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; + readonly attribute optional nullable int32u beaconLostCount = 5; + readonly attribute optional nullable int32u beaconRxCount = 6; + readonly attribute optional nullable int32u packetMulticastRxCount = 7; + readonly attribute optional nullable int32u packetMulticastTxCount = 8; + readonly attribute optional nullable int32u packetUnicastRxCount = 9; + readonly attribute optional nullable int32u packetUnicastTxCount = 10; + readonly attribute optional nullable int64u currentMaxRate = 11; + readonly attribute optional nullable int64u overrunCount = 12; 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; + + /** Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 */ + command ResetCounts(): DefaultSuccess = 0; } /** The Ethernet Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster EthernetNetworkDiagnostics = 55 { +cluster EthernetNetworkDiagnostics = 55 { revision 1; // NOTE: Default/not specifically set enum PHYRateEnum : enum8 { @@ -1794,15 +2132,15 @@ server cluster EthernetNetworkDiagnostics = 55 { kErrorCounts = 0x2; } - readonly attribute nullable PHYRateEnum PHYRate = 0; - readonly attribute nullable boolean fullDuplex = 1; - readonly attribute int64u packetRxCount = 2; - readonly attribute int64u packetTxCount = 3; - readonly attribute int64u txErrCount = 4; - readonly attribute int64u collisionCount = 5; - readonly attribute int64u overrunCount = 6; - readonly attribute nullable boolean carrierDetect = 7; - readonly attribute int64u timeSinceReset = 8; + readonly attribute optional nullable PHYRateEnum PHYRate = 0; + readonly attribute optional nullable boolean fullDuplex = 1; + readonly attribute optional int64u packetRxCount = 2; + readonly attribute optional int64u packetTxCount = 3; + readonly attribute optional int64u txErrCount = 4; + readonly attribute optional int64u collisionCount = 5; + readonly attribute optional int64u overrunCount = 6; + readonly attribute optional nullable boolean carrierDetect = 7; + readonly attribute optional int64u timeSinceReset = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1810,13 +2148,14 @@ server cluster EthernetNetworkDiagnostics = 55 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the attributes: PacketRxCount, PacketTxCount, TxErrCount, CollisionCount, OverrunCount to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { +cluster Switch = 59 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -1859,6 +2198,7 @@ server cluster Switch = 59 { readonly attribute int8u numberOfPositions = 0; readonly attribute int8u currentPosition = 1; + readonly attribute optional int8u multiPressMax = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1868,7 +2208,7 @@ server cluster Switch = 59 { } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1905,12 +2245,20 @@ server cluster AdministratorCommissioning = 60 { octet_string<32> salt = 4; } + request struct OpenBasicCommissioningWindowRequest { + int16u commissioningTimeout = 0; + } + + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1963,15 +2311,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1985,6 +2347,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1997,38 +2365,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -2083,27 +2439,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -2121,7 +2481,7 @@ server cluster FixedLabel = 64 { } /** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ -server cluster UserLabel = 65 { +cluster UserLabel = 65 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -2139,7 +2499,7 @@ server cluster UserLabel = 65 { } /** This cluster provides an interface to a boolean state called StateValue. */ -server cluster BooleanState = 69 { +cluster BooleanState = 69 { revision 1; info event StateChange = 0 { @@ -2156,7 +2516,7 @@ server cluster BooleanState = 69 { } /** Attributes and commands for selecting a mode from a list of supported options. */ -server cluster ModeSelect = 80 { +cluster ModeSelect = 80 { revision 2; bitmap Feature : bitmap32 { @@ -2178,6 +2538,8 @@ server cluster ModeSelect = 80 { readonly attribute nullable enum16 standardNamespace = 1; readonly attribute ModeOptionStruct supportedModes[] = 2; readonly attribute int8u currentMode = 3; + attribute optional nullable int8u startUpMode = 4; + attribute optional nullable int8u onMode = 5; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2189,11 +2551,12 @@ server cluster ModeSelect = 80 { int8u newMode = 0; } + /** On receipt of this command, if the NewMode field matches the Mode field in an entry of the SupportedModes list, the server SHALL set the CurrentMode attribute to the NewMode value, otherwise, the server SHALL respond with an INVALID_COMMAND status response. */ command ChangeToMode(ChangeToModeRequest): DefaultSuccess = 0; } /** Attributes and commands for configuring the temperature control, and reporting temperature. */ -server cluster TemperatureControl = 86 { +cluster TemperatureControl = 86 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -2202,8 +2565,12 @@ server cluster TemperatureControl = 86 { kTemperatureStep = 0x4; } - readonly attribute int8u selectedTemperatureLevel = 4; - readonly attribute char_string supportedTemperatureLevels[] = 5; + readonly attribute optional temperature temperatureSetpoint = 0; + readonly attribute optional temperature minTemperature = 1; + readonly attribute optional temperature maxTemperature = 2; + readonly attribute optional temperature step = 3; + readonly attribute optional int8u selectedTemperatureLevel = 4; + readonly attribute optional char_string supportedTemperatureLevels[] = 5; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2216,11 +2583,12 @@ server cluster TemperatureControl = 86 { optional int8u targetTemperatureLevel = 1; } + /** Set Temperature */ command SetTemperature(SetTemperatureRequest): DefaultSuccess = 0; } /** An interface to a generic way to secure a door */ -server cluster DoorLock = 257 { +cluster DoorLock = 257 { revision 7; enum AlarmCodeEnum : enum8 { @@ -2603,9 +2971,39 @@ server cluster DoorLock = 257 { readonly attribute nullable DlLockState lockState = 0; readonly attribute DlLockType lockType = 1; readonly attribute boolean actuatorEnabled = 2; + readonly attribute optional nullable DoorStateEnum doorState = 3; + attribute access(write: manage) optional int32u doorOpenEvents = 4; + attribute access(write: manage) optional int32u doorClosedEvents = 5; + attribute access(write: manage) optional int16u openPeriod = 6; + readonly attribute optional int16u numberOfTotalUsersSupported = 17; + readonly attribute optional int16u numberOfPINUsersSupported = 18; + readonly attribute optional int16u numberOfRFIDUsersSupported = 19; + readonly attribute optional int8u numberOfWeekDaySchedulesSupportedPerUser = 20; + readonly attribute optional int8u numberOfYearDaySchedulesSupportedPerUser = 21; + readonly attribute optional int8u numberOfHolidaySchedulesSupported = 22; + readonly attribute optional int8u maxPINCodeLength = 23; + readonly attribute optional int8u minPINCodeLength = 24; + readonly attribute optional int8u maxRFIDCodeLength = 25; + readonly attribute optional int8u minRFIDCodeLength = 26; + readonly attribute optional DlCredentialRuleMask credentialRulesSupport = 27; + readonly attribute optional int8u numberOfCredentialsSupportedPerUser = 28; + attribute access(write: manage) optional char_string<3> language = 33; + attribute access(write: manage) optional int8u LEDSettings = 34; attribute access(write: manage) int32u autoRelockTime = 35; + attribute access(write: manage) optional int8u soundVolume = 36; attribute access(write: manage) OperatingModeEnum operatingMode = 37; readonly attribute DlSupportedOperatingModes supportedOperatingModes = 38; + readonly attribute optional DlDefaultConfigurationRegister defaultConfigurationRegister = 39; + attribute access(write: administer) optional boolean enableLocalProgramming = 40; + attribute access(write: manage) optional boolean enableOneTouchLocking = 41; + attribute access(write: manage) optional boolean enableInsideStatusLED = 42; + attribute access(write: manage) optional boolean enablePrivacyModeButton = 43; + attribute access(write: administer) optional DlLocalProgrammingFeatures localProgrammingFeatures = 44; + attribute access(write: administer) optional int8u wrongCodeEntryLimit = 48; + attribute access(write: administer) optional int8u userCodeTemporaryDisableTime = 49; + attribute access(write: administer) optional boolean sendPINOverTheAir = 50; + attribute access(write: administer) optional boolean requirePINforRemoteOperation = 51; + attribute access(write: administer) optional int16u expiringUserTimeout = 53; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2621,12 +3019,198 @@ server cluster DoorLock = 257 { optional octet_string PINCode = 0; } + request struct UnlockWithTimeoutRequest { + int16u timeout = 0; + optional octet_string PINCode = 1; + } + + request struct SetWeekDayScheduleRequest { + int8u weekDayIndex = 0; + int16u userIndex = 1; + DaysMaskMap daysMask = 2; + int8u startHour = 3; + int8u startMinute = 4; + int8u endHour = 5; + int8u endMinute = 6; + } + + request struct GetWeekDayScheduleRequest { + int8u weekDayIndex = 0; + int16u userIndex = 1; + } + + response struct GetWeekDayScheduleResponse = 12 { + int8u weekDayIndex = 0; + int16u userIndex = 1; + DlStatus status = 2; + optional DaysMaskMap daysMask = 3; + optional int8u startHour = 4; + optional int8u startMinute = 5; + optional int8u endHour = 6; + optional int8u endMinute = 7; + } + + request struct ClearWeekDayScheduleRequest { + int8u weekDayIndex = 0; + int16u userIndex = 1; + } + + request struct SetYearDayScheduleRequest { + int8u yearDayIndex = 0; + int16u userIndex = 1; + epoch_s localStartTime = 2; + epoch_s localEndTime = 3; + } + + request struct GetYearDayScheduleRequest { + int8u yearDayIndex = 0; + int16u userIndex = 1; + } + + response struct GetYearDayScheduleResponse = 15 { + int8u yearDayIndex = 0; + int16u userIndex = 1; + DlStatus status = 2; + optional epoch_s localStartTime = 3; + optional epoch_s localEndTime = 4; + } + + request struct ClearYearDayScheduleRequest { + int8u yearDayIndex = 0; + int16u userIndex = 1; + } + + request struct SetHolidayScheduleRequest { + int8u holidayIndex = 0; + epoch_s localStartTime = 1; + epoch_s localEndTime = 2; + OperatingModeEnum operatingMode = 3; + } + + request struct GetHolidayScheduleRequest { + int8u holidayIndex = 0; + } + + response struct GetHolidayScheduleResponse = 18 { + int8u holidayIndex = 0; + DlStatus status = 1; + optional epoch_s localStartTime = 2; + optional epoch_s localEndTime = 3; + optional OperatingModeEnum operatingMode = 4; + } + + request struct ClearHolidayScheduleRequest { + int8u holidayIndex = 0; + } + + request struct SetUserRequest { + DataOperationTypeEnum operationType = 0; + int16u userIndex = 1; + nullable char_string userName = 2; + nullable int32u userUniqueID = 3; + nullable UserStatusEnum userStatus = 4; + nullable UserTypeEnum userType = 5; + nullable CredentialRuleEnum credentialRule = 6; + } + + request struct GetUserRequest { + int16u userIndex = 0; + } + + response struct GetUserResponse = 28 { + int16u userIndex = 0; + nullable char_string userName = 1; + nullable int32u userUniqueID = 2; + nullable UserStatusEnum userStatus = 3; + nullable UserTypeEnum userType = 4; + nullable CredentialRuleEnum credentialRule = 5; + nullable CredentialStruct credentials[] = 6; + nullable fabric_idx creatorFabricIndex = 7; + nullable fabric_idx lastModifiedFabricIndex = 8; + nullable int16u nextUserIndex = 9; + } + + request struct ClearUserRequest { + int16u userIndex = 0; + } + + request struct SetCredentialRequest { + DataOperationTypeEnum operationType = 0; + CredentialStruct credential = 1; + LONG_OCTET_STRING credentialData = 2; + nullable int16u userIndex = 3; + nullable UserStatusEnum userStatus = 4; + nullable UserTypeEnum userType = 5; + } + + response struct SetCredentialResponse = 35 { + DlStatus status = 0; + nullable int16u userIndex = 1; + nullable int16u nextCredentialIndex = 2; + } + + request struct GetCredentialStatusRequest { + CredentialStruct credential = 0; + } + + response struct GetCredentialStatusResponse = 37 { + boolean credentialExists = 0; + nullable int16u userIndex = 1; + nullable fabric_idx creatorFabricIndex = 2; + nullable fabric_idx lastModifiedFabricIndex = 3; + nullable int16u nextCredentialIndex = 4; + } + + request struct ClearCredentialRequest { + nullable CredentialStruct credential = 0; + } + + request struct UnboltDoorRequest { + optional octet_string PINCode = 0; + } + + /** This command causes the lock device to lock the door. */ timed command LockDoor(LockDoorRequest): DefaultSuccess = 0; + /** This command causes the lock device to unlock the door. */ timed command UnlockDoor(UnlockDoorRequest): DefaultSuccess = 1; + /** This command causes the lock device to unlock the door with a timeout parameter. */ + timed command UnlockWithTimeout(UnlockWithTimeoutRequest): DefaultSuccess = 3; + /** Set a weekly repeating schedule for a specified user. */ + command access(invoke: administer) SetWeekDaySchedule(SetWeekDayScheduleRequest): DefaultSuccess = 11; + /** Retrieve the specific weekly schedule for the specific user. */ + command access(invoke: administer) GetWeekDaySchedule(GetWeekDayScheduleRequest): GetWeekDayScheduleResponse = 12; + /** Clear the specific weekly schedule or all weekly schedules for the specific user. */ + command access(invoke: administer) ClearWeekDaySchedule(ClearWeekDayScheduleRequest): DefaultSuccess = 13; + /** Set a time-specific schedule ID for a specified user. */ + command access(invoke: administer) SetYearDaySchedule(SetYearDayScheduleRequest): DefaultSuccess = 14; + /** Returns the year day schedule data for the specified schedule and user indexes. */ + command access(invoke: administer) GetYearDaySchedule(GetYearDayScheduleRequest): GetYearDayScheduleResponse = 15; + /** Clears the specific year day schedule or all year day schedules for the specific user. */ + command access(invoke: administer) ClearYearDaySchedule(ClearYearDayScheduleRequest): DefaultSuccess = 16; + /** Set the holiday Schedule by specifying local start time and local end time with respect to any Lock Operating Mode. */ + command access(invoke: administer) SetHolidaySchedule(SetHolidayScheduleRequest): DefaultSuccess = 17; + /** Get the holiday schedule for the specified index. */ + command access(invoke: administer) GetHolidaySchedule(GetHolidayScheduleRequest): GetHolidayScheduleResponse = 18; + /** Clears the holiday schedule or all holiday schedules. */ + command access(invoke: administer) ClearHolidaySchedule(ClearHolidayScheduleRequest): DefaultSuccess = 19; + /** Set User into the lock. */ + timed command access(invoke: administer) SetUser(SetUserRequest): DefaultSuccess = 26; + /** Retrieve User. */ + command access(invoke: administer) GetUser(GetUserRequest): GetUserResponse = 27; + /** Clears a User or all Users. */ + timed command access(invoke: administer) ClearUser(ClearUserRequest): DefaultSuccess = 29; + /** Set a credential (e.g. PIN, RFID, Fingerprint, etc.) into the lock for a new user, existing user, or ProgrammingUser. */ + timed command access(invoke: administer) SetCredential(SetCredentialRequest): SetCredentialResponse = 34; + /** Retrieve the status of a particular credential (e.g. PIN, RFID, Fingerprint, etc.) by index. */ + command access(invoke: administer) GetCredentialStatus(GetCredentialStatusRequest): GetCredentialStatusResponse = 36; + /** Clear one, one type, or all credentials except ProgrammingPIN credential. */ + timed command access(invoke: administer) ClearCredential(ClearCredentialRequest): DefaultSuccess = 38; + /** This command causes the lock device to unlock the door without pulling the latch. */ + timed command UnboltDoor(UnboltDoorRequest): DefaultSuccess = 39; } /** Provides an interface for controlling and adjusting automatic window coverings. */ -server cluster WindowCovering = 258 { +cluster WindowCovering = 258 { revision 5; enum EndProductType : enum8 { @@ -2718,10 +3302,27 @@ server cluster WindowCovering = 258 { } readonly attribute Type type = 0; + readonly attribute optional int16u physicalClosedLimitLift = 1; + readonly attribute optional int16u physicalClosedLimitTilt = 2; + readonly attribute optional nullable int16u currentPositionLift = 3; + readonly attribute optional nullable int16u currentPositionTilt = 4; + readonly attribute optional int16u numberOfActuationsLift = 5; + readonly attribute optional int16u numberOfActuationsTilt = 6; readonly attribute ConfigStatus configStatus = 7; + readonly attribute optional nullable percent currentPositionLiftPercentage = 8; + readonly attribute optional nullable percent currentPositionTiltPercentage = 9; readonly attribute OperationalStatus operationalStatus = 10; + readonly attribute optional nullable percent100ths targetPositionLiftPercent100ths = 11; + readonly attribute optional nullable percent100ths targetPositionTiltPercent100ths = 12; readonly attribute EndProductType endProductType = 13; + readonly attribute optional nullable percent100ths currentPositionLiftPercent100ths = 14; + readonly attribute optional nullable percent100ths currentPositionTiltPercent100ths = 15; + readonly attribute optional int16u installedOpenLimitLift = 16; + readonly attribute optional int16u installedClosedLimitLift = 17; + readonly attribute optional int16u installedOpenLimitTilt = 18; + readonly attribute optional int16u installedClosedLimitTilt = 19; attribute access(write: manage) Mode mode = 23; + readonly attribute optional SafetyStatus safetyStatus = 26; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2729,13 +3330,40 @@ server cluster WindowCovering = 258 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + request struct GoToLiftValueRequest { + int16u liftValue = 0; + } + + request struct GoToLiftPercentageRequest { + percent100ths liftPercent100thsValue = 0; + } + + request struct GoToTiltValueRequest { + int16u tiltValue = 0; + } + + request struct GoToTiltPercentageRequest { + percent100ths tiltPercent100thsValue = 0; + } + + /** Moves window covering to InstalledOpenLimitLift and InstalledOpenLimitTilt */ command UpOrOpen(): DefaultSuccess = 0; + /** Moves window covering to InstalledClosedLimitLift and InstalledCloseLimitTilt */ command DownOrClose(): DefaultSuccess = 1; + /** Stop any adjusting of window covering */ command StopMotion(): DefaultSuccess = 2; + /** Go to lift value specified */ + command GoToLiftValue(GoToLiftValueRequest): DefaultSuccess = 4; + /** Go to lift percentage specified */ + command GoToLiftPercentage(GoToLiftPercentageRequest): DefaultSuccess = 5; + /** Go to tilt value specified */ + command GoToTiltValue(GoToTiltValueRequest): DefaultSuccess = 7; + /** Go to tilt percentage specified */ + command GoToTiltPercentage(GoToTiltPercentageRequest): DefaultSuccess = 8; } /** An interface for configuring and controlling pumps. */ -server cluster PumpConfigurationAndControl = 512 { +cluster PumpConfigurationAndControl = 512 { revision 3; enum ControlModeEnum : enum8 { @@ -2830,12 +3458,26 @@ server cluster PumpConfigurationAndControl = 512 { readonly attribute nullable int16s maxPressure = 0; readonly attribute nullable int16u maxSpeed = 1; readonly attribute nullable int16u maxFlow = 2; - readonly attribute nullable int16s minConstPressure = 3; - readonly attribute nullable int16s maxConstPressure = 4; + readonly attribute optional nullable int16s minConstPressure = 3; + readonly attribute optional nullable int16s maxConstPressure = 4; + readonly attribute optional nullable int16s minCompPressure = 5; + readonly attribute optional nullable int16s maxCompPressure = 6; + readonly attribute optional nullable int16u minConstSpeed = 7; + readonly attribute optional nullable int16u maxConstSpeed = 8; + readonly attribute optional nullable int16u minConstFlow = 9; + readonly attribute optional nullable int16u maxConstFlow = 10; + readonly attribute optional nullable int16s minConstTemp = 11; + readonly attribute optional nullable int16s maxConstTemp = 12; + readonly attribute optional PumpStatusBitmap pumpStatus = 16; readonly attribute OperationModeEnum effectiveOperationMode = 17; readonly attribute ControlModeEnum effectiveControlMode = 18; readonly attribute nullable int16s capacity = 19; + readonly attribute optional nullable int16u speed = 20; + attribute access(write: manage) optional nullable int24u lifetimeRunningHours = 21; + readonly attribute optional nullable int24u power = 22; + attribute access(write: manage) optional nullable int32u lifetimeEnergyConsumed = 23; attribute access(write: manage) OperationModeEnum operationMode = 32; + attribute access(write: manage) optional ControlModeEnum controlMode = 33; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2845,7 +3487,7 @@ server cluster PumpConfigurationAndControl = 512 { } /** An interface for configuring and controlling the functionality of a thermostat. */ -server cluster Thermostat = 513 { +cluster Thermostat = 513 { revision 6; enum SetpointAdjustMode : enum8 { @@ -2914,9 +3556,54 @@ server cluster Thermostat = 513 { } readonly attribute nullable int16s localTemperature = 0; - attribute int16s occupiedHeatingSetpoint = 18; + readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute optional bitmap8 occupancy = 2; + readonly attribute optional int16s absMinHeatSetpointLimit = 3; + readonly attribute optional int16s absMaxHeatSetpointLimit = 4; + readonly attribute optional int16s absMinCoolSetpointLimit = 5; + readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional int8u PICoolingDemand = 7; + readonly attribute optional int8u PIHeatingDemand = 8; + attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; + attribute access(write: manage) optional int8s localTemperatureCalibration = 16; + attribute optional int16s occupiedCoolingSetpoint = 17; + attribute optional int16s occupiedHeatingSetpoint = 18; + attribute optional int16s unoccupiedCoolingSetpoint = 19; + attribute optional int16s unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; + attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; + attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; + attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute access(write: manage) optional int8s minSetpointDeadBand = 25; + attribute access(write: manage) optional bitmap8 remoteSensing = 26; attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; attribute access(write: manage) enum8 systemMode = 28; + readonly attribute optional enum8 thermostatRunningMode = 30; + readonly attribute optional enum8 startOfWeek = 32; + readonly attribute optional int8u numberOfWeeklyTransitions = 33; + readonly attribute optional int8u numberOfDailyTransitions = 34; + attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; + attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; + readonly attribute optional bitmap16 thermostatRunningState = 41; + readonly attribute optional enum8 setpointChangeSource = 48; + readonly attribute optional nullable int16s setpointChangeAmount = 49; + readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; + attribute access(write: manage) optional nullable int8u occupiedSetback = 52; + readonly attribute optional nullable int8u occupiedSetbackMin = 53; + readonly attribute optional nullable int8u occupiedSetbackMax = 54; + attribute access(write: manage) optional nullable int8u unoccupiedSetback = 55; + readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; + readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; + attribute access(write: manage) optional int8u emergencyHeatDelta = 58; + attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional int16u ACCapacity = 65; + attribute access(write: manage) optional enum8 ACRefrigerantType = 66; + attribute access(write: manage) optional enum8 ACCompressorType = 67; + attribute access(write: manage) optional bitmap32 ACErrorCode = 68; + attribute access(write: manage) optional enum8 ACLouverPosition = 69; + readonly attribute optional nullable int16s ACCoilTemperature = 70; + attribute access(write: manage) optional enum8 ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2929,11 +3616,37 @@ server cluster Thermostat = 513 { int8s amount = 1; } + response struct GetWeeklyScheduleResponse = 0 { + int8u numberOfTransitionsForSequence = 0; + DayOfWeek dayOfWeekForSequence = 1; + ModeForSequence modeForSequence = 2; + ThermostatScheduleTransition transitions[] = 3; + } + + request struct SetWeeklyScheduleRequest { + int8u numberOfTransitionsForSequence = 0; + DayOfWeek dayOfWeekForSequence = 1; + ModeForSequence modeForSequence = 2; + ThermostatScheduleTransition transitions[] = 3; + } + + request struct GetWeeklyScheduleRequest { + DayOfWeek daysToReturn = 0; + ModeForSequence modeToReturn = 1; + } + + /** Command description for SetpointRaiseLower */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; + /** Command description for SetWeeklySchedule */ + command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; + /** Command description for GetWeeklySchedule */ + command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; + /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ + command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; } /** An interface for controlling a fan in a heating/cooling system. */ -provisional server cluster FanControl = 514 { +provisional cluster FanControl = 514 { revision 4; enum AirflowDirectionEnum : enum8 { @@ -2989,16 +3702,33 @@ provisional server cluster FanControl = 514 { readonly attribute FanModeSequenceEnum fanModeSequence = 1; attribute nullable percent percentSetting = 2; readonly attribute percent percentCurrent = 3; + readonly attribute optional int8u speedMax = 4; + attribute optional nullable int8u speedSetting = 5; + readonly attribute optional int8u speedCurrent = 6; + readonly attribute optional RockBitmap rockSupport = 7; + attribute optional RockBitmap rockSetting = 8; + readonly attribute optional WindBitmap windSupport = 9; + attribute optional WindBitmap windSetting = 10; + attribute optional AirflowDirectionEnum airflowDirection = 11; 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; + + request struct StepRequest { + StepDirectionEnum direction = 0; + optional boolean wrap = 1; + optional boolean lowestOff = 2; + } + + /** The Step command speeds up or slows down the fan, in steps. */ + command Step(StepRequest): DefaultSuccess = 0; } /** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */ -server cluster ThermostatUserInterfaceConfiguration = 516 { +cluster ThermostatUserInterfaceConfiguration = 516 { revision 2; enum KeypadLockoutEnum : enum8 { @@ -3022,6 +3752,7 @@ server cluster ThermostatUserInterfaceConfiguration = 516 { attribute TemperatureDisplayModeEnum temperatureDisplayMode = 0; attribute access(write: manage) KeypadLockoutEnum keypadLockout = 1; + attribute access(write: manage) optional ScheduleProgrammingVisibilityEnum scheduleProgrammingVisibility = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3031,7 +3762,7 @@ server cluster ThermostatUserInterfaceConfiguration = 516 { } /** Attributes and commands for controlling the color properties of a color-capable light. */ -server cluster ColorControl = 768 { +cluster ColorControl = 768 { revision 6; enum ColorLoopAction : enum8 { @@ -3103,21 +3834,255 @@ server cluster ColorControl = 768 { kColorTemperature = 0x10; } + readonly attribute optional int8u currentHue = 0; + readonly attribute optional int8u currentSaturation = 1; + readonly attribute optional int16u remainingTime = 2; + readonly attribute optional int16u currentX = 3; + readonly attribute optional int16u currentY = 4; + readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional char_string<254> compensationText = 6; + readonly attribute optional int16u colorTemperatureMireds = 7; readonly attribute enum8 colorMode = 8; attribute bitmap8 options = 15; readonly attribute nullable int8u numberOfPrimaries = 16; + readonly attribute optional int16u primary1X = 17; + readonly attribute optional int16u primary1Y = 18; + readonly attribute optional nullable int8u primary1Intensity = 19; + readonly attribute optional int16u primary2X = 21; + readonly attribute optional int16u primary2Y = 22; + readonly attribute optional nullable int8u primary2Intensity = 23; + readonly attribute optional int16u primary3X = 25; + readonly attribute optional int16u primary3Y = 26; + readonly attribute optional nullable int8u primary3Intensity = 27; + readonly attribute optional int16u primary4X = 32; + readonly attribute optional int16u primary4Y = 33; + readonly attribute optional nullable int8u primary4Intensity = 34; + readonly attribute optional int16u primary5X = 36; + readonly attribute optional int16u primary5Y = 37; + readonly attribute optional nullable int8u primary5Intensity = 38; + readonly attribute optional int16u primary6X = 40; + readonly attribute optional int16u primary6Y = 41; + readonly attribute optional nullable int8u primary6Intensity = 42; + attribute access(write: manage) optional int16u whitePointX = 48; + attribute access(write: manage) optional int16u whitePointY = 49; + attribute access(write: manage) optional int16u colorPointRX = 50; + attribute access(write: manage) optional int16u colorPointRY = 51; + attribute access(write: manage) optional nullable int8u colorPointRIntensity = 52; + attribute access(write: manage) optional int16u colorPointGX = 54; + attribute access(write: manage) optional int16u colorPointGY = 55; + attribute access(write: manage) optional nullable int8u colorPointGIntensity = 56; + attribute access(write: manage) optional int16u colorPointBX = 58; + attribute access(write: manage) optional int16u colorPointBY = 59; + attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; + readonly attribute optional int16u enhancedCurrentHue = 16384; readonly attribute enum8 enhancedColorMode = 16385; + readonly attribute optional int8u colorLoopActive = 16386; + readonly attribute optional int8u colorLoopDirection = 16387; + readonly attribute optional int16u colorLoopTime = 16388; + readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; + readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; readonly attribute bitmap16 colorCapabilities = 16394; + readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; + readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; + readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; + attribute access(write: manage) optional nullable int16u startUpColorTemperatureMireds = 16400; 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; + + request struct MoveToHueRequest { + int8u hue = 0; + HueDirection direction = 1; + int16u transitionTime = 2; + bitmap8 optionsMask = 3; + bitmap8 optionsOverride = 4; + } + + request struct MoveHueRequest { + HueMoveMode moveMode = 0; + int8u rate = 1; + bitmap8 optionsMask = 2; + bitmap8 optionsOverride = 3; + } + + request struct StepHueRequest { + HueStepMode stepMode = 0; + int8u stepSize = 1; + int8u transitionTime = 2; + bitmap8 optionsMask = 3; + bitmap8 optionsOverride = 4; + } + + request struct MoveToSaturationRequest { + int8u saturation = 0; + int16u transitionTime = 1; + bitmap8 optionsMask = 2; + bitmap8 optionsOverride = 3; + } + + request struct MoveSaturationRequest { + SaturationMoveMode moveMode = 0; + int8u rate = 1; + bitmap8 optionsMask = 2; + bitmap8 optionsOverride = 3; + } + + request struct StepSaturationRequest { + SaturationStepMode stepMode = 0; + int8u stepSize = 1; + int8u transitionTime = 2; + bitmap8 optionsMask = 3; + bitmap8 optionsOverride = 4; + } + + request struct MoveToHueAndSaturationRequest { + int8u hue = 0; + int8u saturation = 1; + int16u transitionTime = 2; + bitmap8 optionsMask = 3; + bitmap8 optionsOverride = 4; + } + + request struct MoveToColorRequest { + int16u colorX = 0; + int16u colorY = 1; + int16u transitionTime = 2; + bitmap8 optionsMask = 3; + bitmap8 optionsOverride = 4; + } + + request struct MoveColorRequest { + int16s rateX = 0; + int16s rateY = 1; + bitmap8 optionsMask = 2; + bitmap8 optionsOverride = 3; + } + + request struct StepColorRequest { + int16s stepX = 0; + int16s stepY = 1; + int16u transitionTime = 2; + bitmap8 optionsMask = 3; + bitmap8 optionsOverride = 4; + } + + request struct MoveToColorTemperatureRequest { + int16u colorTemperatureMireds = 0; + int16u transitionTime = 1; + bitmap8 optionsMask = 2; + bitmap8 optionsOverride = 3; + } + + request struct EnhancedMoveToHueRequest { + int16u enhancedHue = 0; + HueDirection direction = 1; + int16u transitionTime = 2; + bitmap8 optionsMask = 3; + bitmap8 optionsOverride = 4; + } + + request struct EnhancedMoveHueRequest { + HueMoveMode moveMode = 0; + int16u rate = 1; + bitmap8 optionsMask = 2; + bitmap8 optionsOverride = 3; + } + + request struct EnhancedStepHueRequest { + HueStepMode stepMode = 0; + int16u stepSize = 1; + int16u transitionTime = 2; + bitmap8 optionsMask = 3; + bitmap8 optionsOverride = 4; + } + + request struct EnhancedMoveToHueAndSaturationRequest { + int16u enhancedHue = 0; + int8u saturation = 1; + int16u transitionTime = 2; + bitmap8 optionsMask = 3; + bitmap8 optionsOverride = 4; + } + + request struct ColorLoopSetRequest { + ColorLoopUpdateFlags updateFlags = 0; + ColorLoopAction action = 1; + ColorLoopDirection direction = 2; + int16u time = 3; + int16u startHue = 4; + bitmap8 optionsMask = 5; + bitmap8 optionsOverride = 6; + } + + request struct StopMoveStepRequest { + bitmap8 optionsMask = 0; + bitmap8 optionsOverride = 1; + } + + request struct MoveColorTemperatureRequest { + HueMoveMode moveMode = 0; + int16u rate = 1; + int16u colorTemperatureMinimumMireds = 2; + int16u colorTemperatureMaximumMireds = 3; + bitmap8 optionsMask = 4; + bitmap8 optionsOverride = 5; + } + + request struct StepColorTemperatureRequest { + HueStepMode stepMode = 0; + int16u stepSize = 1; + int16u transitionTime = 2; + int16u colorTemperatureMinimumMireds = 3; + int16u colorTemperatureMaximumMireds = 4; + bitmap8 optionsMask = 5; + bitmap8 optionsOverride = 6; + } + + /** Move to specified hue. */ + command MoveToHue(MoveToHueRequest): DefaultSuccess = 0; + /** Move hue up or down at specified rate. */ + command MoveHue(MoveHueRequest): DefaultSuccess = 1; + /** Step hue up or down by specified size at specified rate. */ + command StepHue(StepHueRequest): DefaultSuccess = 2; + /** Move to specified saturation. */ + command MoveToSaturation(MoveToSaturationRequest): DefaultSuccess = 3; + /** Move saturation up or down at specified rate. */ + command MoveSaturation(MoveSaturationRequest): DefaultSuccess = 4; + /** Step saturation up or down by specified size at specified rate. */ + command StepSaturation(StepSaturationRequest): DefaultSuccess = 5; + /** Move to hue and saturation. */ + command MoveToHueAndSaturation(MoveToHueAndSaturationRequest): DefaultSuccess = 6; + /** Move to specified color. */ + command MoveToColor(MoveToColorRequest): DefaultSuccess = 7; + /** Moves the color. */ + command MoveColor(MoveColorRequest): DefaultSuccess = 8; + /** Steps the lighting to a specific color. */ + command StepColor(StepColorRequest): DefaultSuccess = 9; + /** Move to a specific color temperature. */ + command MoveToColorTemperature(MoveToColorTemperatureRequest): DefaultSuccess = 10; + /** Command description for EnhancedMoveToHue */ + command EnhancedMoveToHue(EnhancedMoveToHueRequest): DefaultSuccess = 64; + /** Command description for EnhancedMoveHue */ + command EnhancedMoveHue(EnhancedMoveHueRequest): DefaultSuccess = 65; + /** Command description for EnhancedStepHue */ + command EnhancedStepHue(EnhancedStepHueRequest): DefaultSuccess = 66; + /** Command description for EnhancedMoveToHueAndSaturation */ + command EnhancedMoveToHueAndSaturation(EnhancedMoveToHueAndSaturationRequest): DefaultSuccess = 67; + /** Command description for ColorLoopSet */ + command ColorLoopSet(ColorLoopSetRequest): DefaultSuccess = 68; + /** Command description for StopMoveStep */ + command StopMoveStep(StopMoveStepRequest): DefaultSuccess = 71; + /** Command description for MoveColorTemperature */ + command MoveColorTemperature(MoveColorTemperatureRequest): DefaultSuccess = 75; + /** Command description for StepColorTemperature */ + command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76; } /** Attributes and commands for configuring a lighting ballast. */ -provisional server cluster BallastConfiguration = 769 { +provisional cluster BallastConfiguration = 769 { revision 4; bitmap BallastStatusBitmap : bitmap8 { @@ -3131,9 +4096,18 @@ provisional server cluster BallastConfiguration = 769 { readonly attribute int8u physicalMinLevel = 0; readonly attribute int8u physicalMaxLevel = 1; + readonly attribute optional BallastStatusBitmap ballastStatus = 2; attribute access(write: manage) int8u minLevel = 16; attribute access(write: manage) int8u maxLevel = 17; + attribute access(write: manage) optional nullable int8u intrinsicBallastFactor = 20; + attribute access(write: manage) optional nullable int8u ballastFactorAdjustment = 21; readonly attribute int8u lampQuantity = 32; + attribute access(write: manage) optional char_string<16> lampType = 48; + attribute access(write: manage) optional char_string<16> lampManufacturer = 49; + attribute access(write: manage) optional nullable int24u lampRatedHours = 50; + attribute access(write: manage) optional nullable int24u lampBurnHours = 51; + attribute access(write: manage) optional LampAlarmModeBitmap lampAlarmMode = 52; + attribute access(write: manage) optional nullable int24u lampBurnHoursTripPoint = 53; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3143,7 +4117,7 @@ provisional server cluster BallastConfiguration = 769 { } /** Attributes and commands for configuring the measurement of illuminance, and reporting illuminance measurements. */ -server cluster IlluminanceMeasurement = 1024 { +cluster IlluminanceMeasurement = 1024 { revision 3; enum LightSensorTypeEnum : enum8 { @@ -3154,6 +4128,8 @@ server cluster IlluminanceMeasurement = 1024 { readonly attribute nullable int16u measuredValue = 0; readonly attribute nullable int16u minMeasuredValue = 1; readonly attribute nullable int16u maxMeasuredValue = 2; + readonly attribute optional int16u tolerance = 3; + readonly attribute optional nullable LightSensorTypeEnum lightSensorType = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3163,12 +4139,13 @@ server cluster IlluminanceMeasurement = 1024 { } /** Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. */ -server cluster TemperatureMeasurement = 1026 { +cluster TemperatureMeasurement = 1026 { revision 1; // NOTE: Default/not specifically set readonly attribute nullable temperature measuredValue = 0; readonly attribute nullable temperature minMeasuredValue = 1; readonly attribute nullable temperature maxMeasuredValue = 2; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3178,7 +4155,7 @@ server cluster TemperatureMeasurement = 1026 { } /** Attributes and commands for configuring the measurement of pressure, and reporting pressure measurements. */ -server cluster PressureMeasurement = 1027 { +cluster PressureMeasurement = 1027 { revision 3; bitmap Feature : bitmap32 { @@ -3188,6 +4165,12 @@ server cluster PressureMeasurement = 1027 { readonly attribute nullable int16s measuredValue = 0; readonly attribute nullable int16s minMeasuredValue = 1; readonly attribute nullable int16s maxMeasuredValue = 2; + readonly attribute optional int16u tolerance = 3; + readonly attribute optional nullable int16s scaledValue = 16; + readonly attribute optional nullable int16s minScaledValue = 17; + readonly attribute optional nullable int16s maxScaledValue = 18; + readonly attribute optional int16u scaledTolerance = 19; + readonly attribute optional int8s scale = 20; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3197,12 +4180,13 @@ server cluster PressureMeasurement = 1027 { } /** Attributes and commands for configuring the measurement of flow, and reporting flow measurements. */ -server cluster FlowMeasurement = 1028 { +cluster FlowMeasurement = 1028 { revision 1; // NOTE: Default/not specifically set readonly attribute nullable int16u measuredValue = 0; readonly attribute nullable int16u minMeasuredValue = 1; readonly attribute nullable int16u maxMeasuredValue = 2; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3212,12 +4196,13 @@ server cluster FlowMeasurement = 1028 { } /** Attributes and commands for configuring the measurement of relative humidity, and reporting relative humidity measurements. */ -server cluster RelativeHumidityMeasurement = 1029 { +cluster RelativeHumidityMeasurement = 1029 { revision 3; readonly attribute nullable int16u measuredValue = 0; readonly attribute nullable int16u minMeasuredValue = 1; readonly attribute nullable int16u maxMeasuredValue = 2; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3227,7 +4212,7 @@ server cluster RelativeHumidityMeasurement = 1029 { } /** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ -server cluster OccupancySensing = 1030 { +cluster OccupancySensing = 1030 { revision 3; enum OccupancySensorTypeEnum : enum8 { @@ -3250,6 +4235,15 @@ server cluster OccupancySensing = 1030 { readonly attribute OccupancyBitmap occupancy = 0; readonly attribute OccupancySensorTypeEnum occupancySensorType = 1; readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2; + attribute access(write: manage) optional int16u PIROccupiedToUnoccupiedDelay = 16; + attribute access(write: manage) optional int16u PIRUnoccupiedToOccupiedDelay = 17; + attribute access(write: manage) optional int8u PIRUnoccupiedToOccupiedThreshold = 18; + attribute access(write: manage) optional int16u ultrasonicOccupiedToUnoccupiedDelay = 32; + attribute access(write: manage) optional int16u ultrasonicUnoccupiedToOccupiedDelay = 33; + attribute access(write: manage) optional int8u ultrasonicUnoccupiedToOccupiedThreshold = 34; + attribute access(write: manage) optional int16u physicalContactOccupiedToUnoccupiedDelay = 48; + attribute access(write: manage) optional int16u physicalContactUnoccupiedToOccupiedDelay = 49; + attribute access(write: manage) optional int8u physicalContactUnoccupiedToOccupiedThreshold = 50; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3259,9 +4253,11 @@ server cluster OccupancySensing = 1030 { } /** This cluster provides an interface for managing low power mode on a device that supports the Wake On LAN protocol. */ -server cluster WakeOnLan = 1283 { +cluster WakeOnLan = 1283 { revision 1; // NOTE: Default/not specifically set + readonly attribute optional char_string<12> MACAddress = 0; + readonly attribute optional octet_string<16> linkLocalAddress = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3271,7 +4267,7 @@ server cluster WakeOnLan = 1283 { } /** This cluster provides an interface for controlling the current Channel on a device. */ -server cluster Channel = 1284 { +cluster Channel = 1284 { revision 1; // NOTE: Default/not specifically set enum LineupInfoTypeEnum : enum8 { @@ -3304,6 +4300,9 @@ server cluster Channel = 1284 { LineupInfoTypeEnum lineupInfoType = 3; } + readonly attribute optional ChannelInfoStruct channelList[] = 0; + readonly attribute optional nullable LineupInfoStruct lineup = 1; + readonly attribute optional nullable ChannelInfoStruct currentChannel = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3311,6 +4310,15 @@ server cluster Channel = 1284 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + request struct ChangeChannelRequest { + char_string match = 0; + } + + response struct ChangeChannelResponse = 1 { + StatusEnum status = 0; + optional char_string data = 1; + } + request struct ChangeChannelByNumberRequest { int16u majorNumber = 0; int16u minorNumber = 1; @@ -3320,12 +4328,16 @@ server cluster Channel = 1284 { int16s count = 0; } + /** Change the channel on the media player to the channel case-insensitive exact matching the value passed as an argument. */ + command ChangeChannel(ChangeChannelRequest): ChangeChannelResponse = 0; + /** Change the channel on the media plaeyer to the channel with the given Number in the ChannelList attribute. */ command ChangeChannelByNumber(ChangeChannelByNumberRequest): DefaultSuccess = 2; + /** This command provides channel up and channel down functionality, but allows channel index jumps of size Count. When the value of the increase or decrease is larger than the number of channels remaining in the given direction, then the behavior SHALL be to return to the beginning (or end) of the channel list and continue. For example, if the current channel is at index 0 and count value of -1 is given, then the current channel should change to the last channel. */ command SkipChannel(SkipChannelRequest): DefaultSuccess = 3; } /** This cluster provides an interface for UX navigation within a set of targets on a device or endpoint. */ -server cluster TargetNavigator = 1285 { +cluster TargetNavigator = 1285 { revision 1; // NOTE: Default/not specifically set enum StatusEnum : enum8 { @@ -3340,6 +4352,7 @@ server cluster TargetNavigator = 1285 { } readonly attribute TargetInfoStruct targetList[] = 0; + readonly attribute optional int8u currentTarget = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3357,11 +4370,12 @@ server cluster TargetNavigator = 1285 { optional char_string data = 1; } + /** Upon receipt, this SHALL navigation the UX to the target identified. */ command NavigateTarget(NavigateTargetRequest): NavigateTargetResponse = 0; } /** This cluster provides an interface for controlling Media Playback (PLAY, PAUSE, etc) on a media device such as a TV or Speaker. */ -server cluster MediaPlayback = 1286 { +cluster MediaPlayback = 1286 { revision 1; // NOTE: Default/not specifically set enum PlaybackStateEnum : enum8 { @@ -3391,6 +4405,12 @@ server cluster MediaPlayback = 1286 { } readonly attribute PlaybackStateEnum currentState = 0; + readonly attribute optional nullable epoch_us startTime = 1; + readonly attribute optional nullable int64u duration = 2; + readonly attribute optional nullable PlaybackPositionStruct sampledPosition = 3; + readonly attribute optional single playbackSpeed = 4; + readonly attribute optional nullable int64u seekRangeEnd = 5; + readonly attribute optional nullable int64u seekRangeStart = 6; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3398,18 +4418,49 @@ server cluster MediaPlayback = 1286 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + request struct SkipForwardRequest { + int64u deltaPositionMilliseconds = 0; + } + + request struct SkipBackwardRequest { + int64u deltaPositionMilliseconds = 0; + } + response struct PlaybackResponse = 10 { StatusEnum status = 0; optional char_string data = 1; } + request struct SeekRequest { + int64u position = 0; + } + + /** Upon receipt, this SHALL play media. */ command Play(): PlaybackResponse = 0; + /** Upon receipt, this SHALL pause media. */ command Pause(): PlaybackResponse = 1; + /** Upon receipt, this SHALL stop media. User experience is context-specific. This will often navigate the user back to the location where media was originally launched. */ command Stop(): PlaybackResponse = 2; + /** Upon receipt, this SHALL Start Over with the current media playback item. */ + command StartOver(): PlaybackResponse = 3; + /** Upon receipt, this SHALL cause the handler to be invoked for "Previous". User experience is context-specific. This will often Go back to the previous media playback item. */ + command Previous(): PlaybackResponse = 4; + /** Upon receipt, this SHALL cause the handler to be invoked for "Next". User experience is context-specific. This will often Go forward to the next media playback item. */ + command Next(): PlaybackResponse = 5; + /** Upon receipt, this SHALL Rewind through media. Different Rewind speeds can be used on the TV based upon the number of sequential calls to this function. This is to avoid needing to define every speed now (multiple fast, slow motion, etc). */ + command Rewind(): PlaybackResponse = 6; + /** Upon receipt, this SHALL Advance through media. Different FF speeds can be used on the TV based upon the number of sequential calls to this function. This is to avoid needing to define every speed now (multiple fast, slow motion, etc). */ + command FastForward(): PlaybackResponse = 7; + /** Upon receipt, this SHALL Skip forward in the media by the given number of seconds, using the data as follows: */ + command SkipForward(SkipForwardRequest): PlaybackResponse = 8; + /** Upon receipt, this SHALL Skip backward in the media by the given number of seconds, using the data as follows: */ + command SkipBackward(SkipBackwardRequest): PlaybackResponse = 9; + /** Upon receipt, this SHALL Skip backward in the media by the given number of seconds, using the data as follows: */ + command Seek(SeekRequest): PlaybackResponse = 11; } /** This cluster provides an interface for controlling the Input Selector on a media device such as a TV. */ -server cluster MediaInput = 1287 { +cluster MediaInput = 1287 { revision 1; // NOTE: Default/not specifically set enum InputTypeEnum : enum8 { @@ -3451,13 +4502,23 @@ server cluster MediaInput = 1287 { int8u index = 0; } + request struct RenameInputRequest { + int8u index = 0; + char_string name = 1; + } + + /** Upon receipt, this SHALL change the input on the media device to the input at a specific index in the Input List. */ command SelectInput(SelectInputRequest): DefaultSuccess = 0; + /** Upon receipt, this SHALL display the active status of the input list on screen. */ command ShowInputStatus(): DefaultSuccess = 1; + /** Upon receipt, this SHALL hide the input list from the screen. */ command HideInputStatus(): DefaultSuccess = 2; + /** Upon receipt, this SHALL rename the input at a specific index in the Input List. Updates to the input name SHALL appear in the TV settings menus. */ + command access(invoke: manage) RenameInput(RenameInputRequest): DefaultSuccess = 3; } /** This cluster provides an interface for managing low power mode on a device. */ -server cluster LowPower = 1288 { +cluster LowPower = 1288 { revision 1; // NOTE: Default/not specifically set readonly attribute command_id generatedCommandList[] = 65528; @@ -3467,11 +4528,12 @@ server cluster LowPower = 1288 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** This command shall put the device into low power mode. */ command Sleep(): DefaultSuccess = 0; } /** This cluster provides an interface for controlling a device like a TV using action commands such as UP, DOWN, and SELECT. */ -server cluster KeypadInput = 1289 { +cluster KeypadInput = 1289 { revision 1; // NOTE: Default/not specifically set enum CECKeyCodeEnum : enum8 { @@ -3590,11 +4652,12 @@ server cluster KeypadInput = 1289 { StatusEnum status = 0; } + /** Upon receipt, this SHALL process a keycode as input to the media device. */ command SendKey(SendKeyRequest): SendKeyResponse = 0; } /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ -server cluster ContentLauncher = 1290 { +cluster ContentLauncher = 1290 { revision 1; // NOTE: Default/not specifically set enum MetricTypeEnum : enum8 { @@ -3671,16 +4734,40 @@ server cluster ContentLauncher = 1290 { optional StyleInformationStruct waterMark = 5; } + readonly attribute optional char_string acceptHeader[] = 0; + readonly attribute optional SupportedProtocolsBitmap supportedStreamingProtocols = 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; + + request struct LaunchContentRequest { + ContentSearchStruct search = 0; + boolean autoPlay = 1; + optional char_string data = 2; + } + + request struct LaunchURLRequest { + char_string contentURL = 0; + optional char_string displayString = 1; + optional BrandingInformationStruct brandingInformation = 2; + } + + response struct LauncherResponse = 2 { + StatusEnum status = 0; + optional char_string data = 1; + } + + /** Upon receipt, this SHALL launch the specified content with optional search criteria. */ + command LaunchContent(LaunchContentRequest): LauncherResponse = 0; + /** Upon receipt, this SHALL launch content from the specified URL. */ + command LaunchURL(LaunchURLRequest): LauncherResponse = 1; } /** This cluster provides an interface for controlling the Output on a media device such as a TV. */ -server cluster AudioOutput = 1291 { +cluster AudioOutput = 1291 { revision 1; // NOTE: Default/not specifically set enum OutputTypeEnum : enum8 { @@ -3715,11 +4802,19 @@ server cluster AudioOutput = 1291 { int8u index = 0; } + request struct RenameOutputRequest { + int8u index = 0; + char_string name = 1; + } + + /** Upon receipt, this SHALL change the output on the media device to the output at a specific index in the Output List. */ command SelectOutput(SelectOutputRequest): DefaultSuccess = 0; + /** Upon receipt, this SHALL rename the output at a specific index in the Output List. Updates to the output name SHALL appear in the TV settings menus. */ + command access(invoke: manage) RenameOutput(RenameOutputRequest): DefaultSuccess = 1; } /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ -server cluster ApplicationLauncher = 1292 { +cluster ApplicationLauncher = 1292 { revision 1; // NOTE: Default/not specifically set enum StatusEnum : enum8 { @@ -3742,6 +4837,8 @@ server cluster ApplicationLauncher = 1292 { optional endpoint_no endpoint = 1; } + readonly attribute optional int16u catalogList[] = 0; + readonly attribute optional nullable ApplicationEPStruct currentApp = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3767,13 +4864,16 @@ server cluster ApplicationLauncher = 1292 { optional octet_string data = 1; } + /** Upon receipt, this SHALL launch the specified app with optional data. The TV Device SHALL launch and bring to foreground the identified application in the command if the application is not already launched and in foreground. The TV Device SHALL update state attribute on the Application Basic cluster of the Endpoint corresponding to the launched application. This command returns a Launch Response. */ command LaunchApp(LaunchAppRequest): LauncherResponse = 0; + /** Upon receipt on a Video Player endpoint this SHALL stop the specified application if it is running. */ command StopApp(StopAppRequest): LauncherResponse = 1; + /** Upon receipt on a Video Player endpoint this SHALL hide the specified application if it is running and visible. */ command HideApp(HideAppRequest): LauncherResponse = 2; } /** This cluster provides information about an application running on a TV or media player device which is represented as an endpoint. */ -server cluster ApplicationBasic = 1293 { +cluster ApplicationBasic = 1293 { revision 1; // NOTE: Default/not specifically set enum ApplicationStatusEnum : enum8 { @@ -3788,7 +4888,10 @@ server cluster ApplicationBasic = 1293 { char_string applicationID = 1; } + readonly attribute optional char_string<32> vendorName = 0; + readonly attribute optional vendor_id vendorID = 1; readonly attribute long_char_string<256> applicationName = 2; + readonly attribute optional int16u productID = 3; readonly attribute ApplicationStruct application = 4; readonly attribute ApplicationStatusEnum status = 5; readonly attribute char_string<32> applicationVersion = 6; @@ -3802,7 +4905,7 @@ server cluster ApplicationBasic = 1293 { } /** This cluster provides commands that facilitate user account login on a Content App or a node. For example, a Content App running on a Video Player device, which is represented as an endpoint (see [TV Architecture]), can use this cluster to help make the user account on the Content App match the user account on the Client. */ -server cluster AccountLogin = 1294 { +cluster AccountLogin = 1294 { revision 1; // NOTE: Default/not specifically set readonly attribute command_id generatedCommandList[] = 65528; @@ -3816,22 +4919,25 @@ server cluster AccountLogin = 1294 { char_string<100> tempAccountIdentifier = 0; } + response struct GetSetupPINResponse = 1 { + char_string setupPIN = 0; + } + request struct LoginRequest { char_string<100> tempAccountIdentifier = 0; char_string setupPIN = 1; } - response struct GetSetupPINResponse = 1 { - char_string setupPIN = 0; - } - + /** Upon receipt, the Content App checks if the account associated with the client Temp Account Identifier Rotating ID is the same acount that is active on the given Content App. If the accounts are the same, then the Content App includes the Setup PIN in the GetSetupPIN Response. */ fabric timed command access(invoke: administer) GetSetupPIN(GetSetupPINRequest): GetSetupPINResponse = 0; + /** Upon receipt, the Content App checks if the account associated with the client’s Temp Account Identifier (Rotating ID) has a current active Setup PIN with the given value. If the Setup PIN is valid for the user account associated with the Temp Account Identifier, then the Content App MAY make that user account active. */ fabric timed command access(invoke: administer) Login(LoginRequest): DefaultSuccess = 2; + /** The purpose of this command is to instruct the Content App to clear the current user account. This command SHOULD be used by clients of a Content App to indicate the end of a user session. */ fabric timed command Logout(): DefaultSuccess = 3; } /** The Test Cluster is meant to validate the generated code */ -internal server cluster UnitTesting = 4294048773 { +internal cluster UnitTesting = 4294048773 { revision 1; // NOTE: Default/not specifically set enum SimpleEnum : enum8 { @@ -3997,6 +5103,7 @@ internal server cluster UnitTesting = 4294048773 { timedwrite attribute boolean timedWriteBoolean = 48; attribute boolean generalErrorBoolean = 49; attribute boolean clusterErrorBoolean = 50; + attribute optional boolean unsupported = 255; attribute nullable boolean nullableBoolean = 16384; attribute nullable Bitmap8MaskMap nullableBitmap8 = 16385; attribute nullable Bitmap16MaskMap nullableBitmap16 = 16386; @@ -4030,6 +5137,7 @@ internal server cluster UnitTesting = 4294048773 { attribute nullable int8s nullableRangeRestrictedInt8s = 16423; attribute nullable int16u nullableRangeRestrictedInt16u = 16424; attribute nullable int16s nullableRangeRestrictedInt16s = 16425; + attribute optional int8u writeOnlyInt8u = 16426; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4037,31 +5145,128 @@ internal server cluster UnitTesting = 4294048773 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + response struct TestSpecificResponse = 0 { + int8u returnValue = 0; + } + + response struct TestAddArgumentsResponse = 1 { + int8u returnValue = 0; + } + + response struct TestSimpleArgumentResponse = 2 { + boolean returnValue = 0; + } + + response struct TestStructArrayArgumentResponse = 3 { + NestedStructList arg1[] = 0; + SimpleStruct arg2[] = 1; + SimpleEnum arg3[] = 2; + boolean arg4[] = 3; + SimpleEnum arg5 = 4; + boolean arg6 = 5; + } + request struct TestAddArgumentsRequest { int8u arg1 = 0; int8u arg2 = 1; } + response struct TestListInt8UReverseResponse = 4 { + int8u arg1[] = 0; + } + + request struct TestSimpleArgumentRequestRequest { + boolean arg1 = 0; + } + + response struct TestEnumsResponse = 5 { + vendor_id arg1 = 0; + SimpleEnum arg2 = 1; + } + + request struct TestStructArrayArgumentRequestRequest { + NestedStructList arg1[] = 0; + SimpleStruct arg2[] = 1; + SimpleEnum arg3[] = 2; + boolean arg4[] = 3; + SimpleEnum arg5 = 4; + boolean arg6 = 5; + } + + response struct TestNullableOptionalResponse = 6 { + boolean wasPresent = 0; + optional boolean wasNull = 1; + optional int8u value = 2; + optional nullable int8u originalValue = 3; + } + request struct TestStructArgumentRequestRequest { SimpleStruct arg1 = 0; } + response struct TestComplexNullableOptionalResponse = 7 { + boolean nullableIntWasNull = 0; + optional int16u nullableIntValue = 1; + boolean optionalIntWasPresent = 2; + optional int16u optionalIntValue = 3; + boolean nullableOptionalIntWasPresent = 4; + optional boolean nullableOptionalIntWasNull = 5; + optional int16u nullableOptionalIntValue = 6; + boolean nullableStringWasNull = 7; + optional char_string nullableStringValue = 8; + boolean optionalStringWasPresent = 9; + optional char_string optionalStringValue = 10; + boolean nullableOptionalStringWasPresent = 11; + optional boolean nullableOptionalStringWasNull = 12; + optional char_string nullableOptionalStringValue = 13; + boolean nullableStructWasNull = 14; + optional SimpleStruct nullableStructValue = 15; + boolean optionalStructWasPresent = 16; + optional SimpleStruct optionalStructValue = 17; + boolean nullableOptionalStructWasPresent = 18; + optional boolean nullableOptionalStructWasNull = 19; + optional SimpleStruct nullableOptionalStructValue = 20; + boolean nullableListWasNull = 21; + optional SimpleEnum nullableListValue[] = 22; + boolean optionalListWasPresent = 23; + optional SimpleEnum optionalListValue[] = 24; + boolean nullableOptionalListWasPresent = 25; + optional boolean nullableOptionalListWasNull = 26; + optional SimpleEnum nullableOptionalListValue[] = 27; + } + request struct TestNestedStructArgumentRequestRequest { NestedStruct arg1 = 0; } + response struct BooleanResponse = 8 { + boolean value = 0; + } + request struct TestListStructArgumentRequestRequest { SimpleStruct arg1[] = 0; } + response struct SimpleStructResponse = 9 { + SimpleStruct arg1 = 0; + } + request struct TestListInt8UArgumentRequestRequest { int8u arg1[] = 0; } + response struct TestEmitTestEventResponse = 10 { + int64u value = 0; + } + request struct TestNestedStructListArgumentRequestRequest { NestedStructList arg1 = 0; } + response struct TestEmitTestFabricScopedEventResponse = 11 { + int64u value = 0; + } + request struct TestListNestedStructListArgumentRequestRequest { NestedStructList arg1[] = 0; } @@ -4079,6 +5284,21 @@ internal server cluster UnitTesting = 4294048773 { optional nullable int8u arg1 = 0; } + request struct TestComplexNullableOptionalRequestRequest { + nullable int16u nullableInt = 0; + optional int16u optionalInt = 1; + optional nullable int16u nullableOptionalInt = 2; + nullable char_string nullableString = 3; + optional char_string optionalString = 4; + optional nullable char_string nullableOptionalString = 5; + nullable SimpleStruct nullableStruct = 6; + optional SimpleStruct optionalStruct = 7; + optional nullable SimpleStruct nullableOptionalStruct = 8; + nullable SimpleEnum nullableList[] = 9; + optional SimpleEnum optionalList[] = 10; + optional nullable SimpleEnum nullableOptionalList[] = 11; + } + request struct SimpleStructEchoRequestRequest { SimpleStruct arg1 = 0; } @@ -4097,59 +5317,70 @@ internal server cluster UnitTesting = 4294048773 { int8u arg1 = 0; } - response struct TestSpecificResponse = 0 { - int8u returnValue = 0; - } - - response struct TestAddArgumentsResponse = 1 { - int8u returnValue = 0; - } - - response struct TestListInt8UReverseResponse = 4 { - int8u arg1[] = 0; - } - - response struct TestEnumsResponse = 5 { - vendor_id arg1 = 0; - SimpleEnum arg2 = 1; - } - - response struct TestNullableOptionalResponse = 6 { - boolean wasPresent = 0; - optional boolean wasNull = 1; - optional int8u value = 2; - optional nullable int8u originalValue = 3; - } - - response struct SimpleStructResponse = 9 { - SimpleStruct arg1 = 0; - } - - response struct TestEmitTestEventResponse = 10 { - int64u value = 0; - } - - response struct TestEmitTestFabricScopedEventResponse = 11 { - int64u value = 0; - } - + /** Simple command without any parameters and without a specific response */ command Test(): DefaultSuccess = 0; + /** Simple command without any parameters and without a specific response not handled by the server */ command TestNotHandled(): DefaultSuccess = 1; + /** Simple command without any parameters and with a specific response */ command TestSpecific(): TestSpecificResponse = 2; + /** Simple command that should not be added to the server. */ + command TestUnknownCommand(): DefaultSuccess = 3; + /** Command that takes two arguments and returns their sum. */ command TestAddArguments(TestAddArgumentsRequest): TestAddArgumentsResponse = 4; + /** Command that takes an argument which is bool */ + command TestSimpleArgumentRequest(TestSimpleArgumentRequestRequest): TestSimpleArgumentResponse = 5; + /** Command that takes various arguments that are arrays, including an array of structs which have a list member. */ + command TestStructArrayArgumentRequest(TestStructArrayArgumentRequestRequest): TestStructArrayArgumentResponse = 6; + /** Command that takes an argument which is struct. The response echoes the + 'b' field of the single arg. */ command TestStructArgumentRequest(TestStructArgumentRequestRequest): BooleanResponse = 7; + /** Command that takes an argument which is nested struct. The response + echoes the 'b' field of ar1.c. */ command TestNestedStructArgumentRequest(TestNestedStructArgumentRequestRequest): BooleanResponse = 8; + /** Command that takes an argument which is a list of structs. The response + returns false if there is some struct in the list whose 'b' field is + false, and true otherwise (including if the list is empty). */ command TestListStructArgumentRequest(TestListStructArgumentRequestRequest): BooleanResponse = 9; + /** Command that takes an argument which is a list of INT8U. The response + returns false if the list contains a 0 in it, true otherwise (including + if the list is empty). */ command TestListInt8UArgumentRequest(TestListInt8UArgumentRequestRequest): BooleanResponse = 10; + /** Command that takes an argument which is a Nested Struct List. The + response returns false if there is some struct in arg1 (either directly + in arg1.c or in the arg1.d list) whose 'b' field is false, and true + otherwise. */ command TestNestedStructListArgumentRequest(TestNestedStructListArgumentRequestRequest): BooleanResponse = 11; + /** Command that takes an argument which is a list of Nested Struct List. + The response returns false if there is some struct in arg1 (either + directly in as the 'c' field of an entry 'd' list of an entry) whose 'b' + field is false, and true otherwise (including if the list is empty). */ command TestListNestedStructListArgumentRequest(TestListNestedStructListArgumentRequestRequest): BooleanResponse = 12; + /** Command that takes an argument which is a list of INT8U and expects a + response that reverses the list. */ command TestListInt8UReverseRequest(TestListInt8UReverseRequestRequest): TestListInt8UReverseResponse = 13; + /** Command that sends a vendor id and an enum. The server is expected to + echo them back. */ command TestEnumsRequest(TestEnumsRequestRequest): TestEnumsResponse = 14; + /** Command that takes an argument which is nullable and optional. The + response returns a boolean indicating whether the argument was present, + if that's true a boolean indicating whether the argument was null, and + if that' false the argument it received. */ command TestNullableOptionalRequest(TestNullableOptionalRequestRequest): TestNullableOptionalResponse = 15; + /** Command that takes various arguments which can be nullable and/or optional. The + response returns information about which things were received and what + their state was. */ + command TestComplexNullableOptionalRequest(TestComplexNullableOptionalRequestRequest): TestComplexNullableOptionalResponse = 16; + /** Command that takes an argument which is a struct. The response echoes + the struct back. */ command SimpleStructEchoRequest(SimpleStructEchoRequestRequest): SimpleStructResponse = 17; + /** Command that just responds with a success status if the timed invoke + conditions are met. */ timed command TimedInvokeRequest(): DefaultSuccess = 18; + /** Command that takes an optional argument which is bool. It responds with a success value if the optional is set to any value. */ command TestSimpleOptionalArgumentRequest(TestSimpleOptionalArgumentRequestRequest): DefaultSuccess = 19; + /** Command that takes identical arguments to the fields of the TestEvent and logs the TestEvent to the buffer. Command returns an event ID as the response. */ command TestEmitTestEventRequest(TestEmitTestEventRequestRequest): TestEmitTestEventResponse = 20; + /** Command that takes identical arguments to the fields of the TestFabricScopedEvent and logs the TestFabricScopedEvent to the buffer. Command returns an event ID as the response. */ command TestEmitTestFabricScopedEventRequest(TestEmitTestFabricScopedEventRequestRequest): TestEmitTestFabricScopedEventResponse = 21; } diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index 9d6ed79ffef0b6..b02ba6bc60e556 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -85,6 +87,10 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -92,13 +98,33 @@ server cluster OnOff = 6 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + request struct OffWithEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + enum8 effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControlBitmap onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ -server cluster LevelControl = 8 { +cluster LevelControl = 8 { revision 5; enum MoveModeEnum : enum8 { @@ -123,19 +149,19 @@ server cluster LevelControl = 8 { } readonly attribute nullable int8u currentLevel = 0; - readonly attribute int16u remainingTime = 1; - readonly attribute int8u minLevel = 2; - readonly attribute int8u maxLevel = 3; - readonly attribute int16u currentFrequency = 4; - readonly attribute int16u minFrequency = 5; - readonly attribute int16u maxFrequency = 6; + readonly attribute optional int16u remainingTime = 1; + readonly attribute optional int8u minLevel = 2; + readonly attribute optional int8u maxLevel = 3; + readonly attribute optional int16u currentFrequency = 4; + readonly attribute optional int16u minFrequency = 5; + readonly attribute optional int16u maxFrequency = 6; attribute OptionsBitmap options = 15; - attribute int16u onOffTransitionTime = 16; + attribute optional int16u onOffTransitionTime = 16; attribute nullable int8u onLevel = 17; - attribute nullable int16u onTransitionTime = 18; - attribute nullable int16u offTransitionTime = 19; - attribute nullable int8u defaultMoveRate = 20; - attribute access(write: manage) nullable int8u startUpCurrentLevel = 16384; + attribute optional nullable int16u onTransitionTime = 18; + attribute optional nullable int16u offTransitionTime = 19; + attribute optional nullable int8u defaultMoveRate = 20; + attribute access(write: manage) optional nullable int8u startUpCurrentLevel = 16384; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -197,18 +223,33 @@ server cluster LevelControl = 8 { OptionsBitmap optionsOverride = 1; } + request struct MoveToClosestFrequencyRequest { + int16u frequency = 0; + } + + /** Command description for MoveToLevel */ command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + /** Command description for Move */ command Move(MoveRequest): DefaultSuccess = 1; + /** Command description for Step */ command Step(StepRequest): DefaultSuccess = 2; + /** Command description for Stop */ command Stop(StopRequest): DefaultSuccess = 3; + /** Command description for MoveToLevelWithOnOff */ command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + /** Command description for MoveWithOnOff */ command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + /** Command description for StepWithOnOff */ command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + /** Command description for StopWithOnOff */ command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; + /** Change the currrent frequency to the provided one, or a close + approximation if the exact provided one is not possible. */ + command MoveToClosestFrequency(MoveToClosestFrequencyRequest): DefaultSuccess = 8; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -231,6 +272,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -240,7 +282,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -client cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -264,7 +306,7 @@ client cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -client cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -339,7 +381,7 @@ client cluster AccessControl = 31 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -398,7 +440,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -411,7 +453,7 @@ server cluster AccessControl = 31 { } /** This cluster provides a standardized way for a Node (typically a Bridge, but could be any Node) to expose action information. */ -server cluster Actions = 37 { +cluster Actions = 37 { revision 1; // NOTE: Default/not specifically set enum ActionErrorEnum : enum8 { @@ -488,7 +530,7 @@ server cluster Actions = 37 { readonly attribute ActionStruct actionList[] = 0; readonly attribute EndpointListStruct endpointLists[] = 1; - readonly attribute long_char_string<512> setupURL = 2; + readonly attribute optional long_char_string<512> setupURL = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -501,13 +543,96 @@ server cluster Actions = 37 { optional int32u invokeID = 1; } + request struct InstantActionWithTransitionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + int16u transitionTime = 2; + } + + request struct StartActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct StartActionWithDurationRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + int32u duration = 2; + } + + request struct StopActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct PauseActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct PauseActionWithDurationRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + int32u duration = 2; + } + + request struct ResumeActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct EnableActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct EnableActionWithDurationRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + int32u duration = 2; + } + + request struct DisableActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct DisableActionWithDurationRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + int32u duration = 2; + } + + /** This command triggers an action (state change) on the involved endpoints. */ command InstantAction(InstantActionRequest): DefaultSuccess = 0; + /** This command triggers an action (state change) on the involved endpoints, with a specified time to transition from the current state to the new state. */ + command InstantActionWithTransition(InstantActionWithTransitionRequest): DefaultSuccess = 1; + /** This command triggers the commencement of an action on the involved endpoints. */ + command StartAction(StartActionRequest): DefaultSuccess = 2; + /** This command triggers the commencement of an action (with a duration) on the involved endpoints. */ + command StartActionWithDuration(StartActionWithDurationRequest): DefaultSuccess = 3; + /** This command stops the ongoing action on the involved endpoints. */ + command StopAction(StopActionRequest): DefaultSuccess = 4; + /** This command pauses an ongoing action. */ + command PauseAction(PauseActionRequest): DefaultSuccess = 5; + /** This command pauses an ongoing action with a duration. */ + command PauseActionWithDuration(PauseActionWithDurationRequest): DefaultSuccess = 6; + /** This command resumes a previously paused action. */ + command ResumeAction(ResumeActionRequest): DefaultSuccess = 7; + /** This command enables a certain action or automation. */ + command EnableAction(EnableActionRequest): DefaultSuccess = 8; + /** This command enables a certain action or automation with a duration. */ + command EnableActionWithDuration(EnableActionWithDurationRequest): DefaultSuccess = 9; + /** This command disables a certain action or automation. */ + command DisableAction(DisableActionRequest): DefaultSuccess = 10; + /** This command disables a certain action or automation with a duration. */ + command DisableActionWithDuration(DisableActionWithDurationRequest): DefaultSuccess = 11; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -579,14 +704,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -595,13 +722,15 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Nodes should be expected to be deployed to any and all regions of the world. These global regions may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -618,7 +747,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -646,8 +775,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -660,7 +789,7 @@ server cluster TimeFormatLocalization = 44 { may have differing preferences for the units in which values are conveyed in communication to a user. As such, Nodes that visually or audibly convey measurable values to the user need a mechanism by which they can be configured to use a user’s preferred unit. */ -server cluster UnitLocalization = 45 { +cluster UnitLocalization = 45 { revision 1; enum TempUnitEnum : enum8 { @@ -673,7 +802,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute access(write: manage) TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) optional TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -683,7 +812,7 @@ server cluster UnitLocalization = 45 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -722,17 +851,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -743,13 +872,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -830,12 +962,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -848,6 +983,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -867,48 +1009,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -943,11 +1096,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -1031,12 +1192,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1055,12 +1216,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -1081,20 +1244,23 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; 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; + + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ + command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ -server cluster ThreadNetworkDiagnostics = 53 { +cluster ThreadNetworkDiagnostics = 53 { revision 1; // NOTE: Default/not specifically set enum ConnectionStatusEnum : enum8 { @@ -1191,7 +1357,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u panId = 3; readonly attribute nullable int64u extendedPanId = 4; readonly attribute nullable octet_string<17> meshLocalPrefix = 5; - readonly attribute int64u overrunCount = 6; + readonly attribute optional int64u overrunCount = 6; readonly attribute NeighborTableStruct neighborTable[] = 7; readonly attribute RouteTableStruct routeTable[] = 8; readonly attribute nullable int32u partitionId = 9; @@ -1199,51 +1365,51 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u dataVersion = 11; readonly attribute nullable int16u stableDataVersion = 12; readonly attribute nullable int8u leaderRouterId = 13; - readonly attribute int16u detachedRoleCount = 14; - readonly attribute int16u childRoleCount = 15; - readonly attribute int16u routerRoleCount = 16; - readonly attribute int16u leaderRoleCount = 17; - readonly attribute int16u attachAttemptCount = 18; - readonly attribute int16u partitionIdChangeCount = 19; - readonly attribute int16u betterPartitionAttachAttemptCount = 20; - readonly attribute int16u parentChangeCount = 21; - readonly attribute int32u txTotalCount = 22; - readonly attribute int32u txUnicastCount = 23; - readonly attribute int32u txBroadcastCount = 24; - readonly attribute int32u txAckRequestedCount = 25; - readonly attribute int32u txAckedCount = 26; - readonly attribute int32u txNoAckRequestedCount = 27; - readonly attribute int32u txDataCount = 28; - readonly attribute int32u txDataPollCount = 29; - readonly attribute int32u txBeaconCount = 30; - readonly attribute int32u txBeaconRequestCount = 31; - readonly attribute int32u txOtherCount = 32; - readonly attribute int32u txRetryCount = 33; - readonly attribute int32u txDirectMaxRetryExpiryCount = 34; - readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; - readonly attribute int32u txErrCcaCount = 36; - readonly attribute int32u txErrAbortCount = 37; - readonly attribute int32u txErrBusyChannelCount = 38; - readonly attribute int32u rxTotalCount = 39; - readonly attribute int32u rxUnicastCount = 40; - readonly attribute int32u rxBroadcastCount = 41; - readonly attribute int32u rxDataCount = 42; - readonly attribute int32u rxDataPollCount = 43; - readonly attribute int32u rxBeaconCount = 44; - readonly attribute int32u rxBeaconRequestCount = 45; - readonly attribute int32u rxOtherCount = 46; - readonly attribute int32u rxAddressFilteredCount = 47; - readonly attribute int32u rxDestAddrFilteredCount = 48; - readonly attribute int32u rxDuplicatedCount = 49; - readonly attribute int32u rxErrNoFrameCount = 50; - readonly attribute int32u rxErrUnknownNeighborCount = 51; - readonly attribute int32u rxErrInvalidSrcAddrCount = 52; - readonly attribute int32u rxErrSecCount = 53; - readonly attribute int32u rxErrFcsCount = 54; - readonly attribute int32u rxErrOtherCount = 55; - readonly attribute nullable int64u activeTimestamp = 56; - readonly attribute nullable int64u pendingTimestamp = 57; - readonly attribute nullable int32u delay = 58; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; readonly attribute nullable SecurityPolicy securityPolicy = 59; readonly attribute nullable octet_string<4> channelPage0Mask = 60; readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; @@ -1254,10 +1420,13 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ + command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster WiFiNetworkDiagnostics = 54 { +cluster WiFiNetworkDiagnostics = 54 { revision 1; // NOTE: Default/not specifically set enum AssociationFailureCauseEnum : enum8 { @@ -1314,24 +1483,27 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; - readonly attribute nullable int32u beaconLostCount = 5; - readonly attribute nullable int32u beaconRxCount = 6; - readonly attribute nullable int32u packetMulticastRxCount = 7; - readonly attribute nullable int32u packetMulticastTxCount = 8; - readonly attribute nullable int32u packetUnicastRxCount = 9; - readonly attribute nullable int32u packetUnicastTxCount = 10; - readonly attribute nullable int64u currentMaxRate = 11; - readonly attribute nullable int64u overrunCount = 12; + readonly attribute optional nullable int32u beaconLostCount = 5; + readonly attribute optional nullable int32u beaconRxCount = 6; + readonly attribute optional nullable int32u packetMulticastRxCount = 7; + readonly attribute optional nullable int32u packetMulticastTxCount = 8; + readonly attribute optional nullable int32u packetUnicastRxCount = 9; + readonly attribute optional nullable int32u packetUnicastTxCount = 10; + readonly attribute optional nullable int64u currentMaxRate = 11; + readonly attribute optional nullable int64u overrunCount = 12; 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; + + /** Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 */ + command ResetCounts(): DefaultSuccess = 0; } /** The Ethernet Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster EthernetNetworkDiagnostics = 55 { +cluster EthernetNetworkDiagnostics = 55 { revision 1; // NOTE: Default/not specifically set enum PHYRateEnum : enum8 { @@ -1352,15 +1524,15 @@ server cluster EthernetNetworkDiagnostics = 55 { kErrorCounts = 0x2; } - readonly attribute nullable PHYRateEnum PHYRate = 0; - readonly attribute nullable boolean fullDuplex = 1; - readonly attribute int64u packetRxCount = 2; - readonly attribute int64u packetTxCount = 3; - readonly attribute int64u txErrCount = 4; - readonly attribute int64u collisionCount = 5; - readonly attribute int64u overrunCount = 6; - readonly attribute nullable boolean carrierDetect = 7; - readonly attribute int64u timeSinceReset = 8; + readonly attribute optional nullable PHYRateEnum PHYRate = 0; + readonly attribute optional nullable boolean fullDuplex = 1; + readonly attribute optional int64u packetRxCount = 2; + readonly attribute optional int64u packetTxCount = 3; + readonly attribute optional int64u txErrCount = 4; + readonly attribute optional int64u collisionCount = 5; + readonly attribute optional int64u overrunCount = 6; + readonly attribute optional nullable boolean carrierDetect = 7; + readonly attribute optional int64u timeSinceReset = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1368,13 +1540,14 @@ server cluster EthernetNetworkDiagnostics = 55 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the attributes: PacketRxCount, PacketTxCount, TxErrCount, CollisionCount, OverrunCount to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { +cluster Switch = 59 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -1417,7 +1590,7 @@ server cluster Switch = 59 { readonly attribute int8u numberOfPositions = 0; readonly attribute int8u currentPosition = 1; - readonly attribute int8u multiPressMax = 2; + readonly attribute optional int8u multiPressMax = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1427,7 +1600,7 @@ server cluster Switch = 59 { } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1468,13 +1641,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1527,15 +1703,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1549,6 +1739,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1561,38 +1757,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1647,26 +1831,30 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ -server cluster UserLabel = 65 { +cluster UserLabel = 65 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1684,12 +1872,13 @@ server cluster UserLabel = 65 { } /** Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. */ -server cluster TemperatureMeasurement = 1026 { +cluster TemperatureMeasurement = 1026 { revision 1; // NOTE: Default/not specifically set readonly attribute nullable temperature measuredValue = 0; readonly attribute nullable temperature minMeasuredValue = 1; readonly attribute nullable temperature maxMeasuredValue = 2; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index cc3fe91578cc3c..e653848b1689b3 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -40,11 +40,19 @@ server cluster Identify = 3 { int16u identifyTime = 0; } + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -68,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -150,10 +164,10 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; - readonly attribute boolean globalSceneControl = 16384; - attribute int16u onTime = 16385; - attribute int16u offWaitTime = 16386; - attribute access(write: manage) nullable StartUpOnOffEnum startUpOnOff = 16387; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -161,13 +175,33 @@ server cluster OnOff = 6 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + request struct OffWithEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + enum8 effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControlBitmap onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ -server cluster LevelControl = 8 { +cluster LevelControl = 8 { revision 5; enum MoveModeEnum : enum8 { @@ -192,12 +226,19 @@ server cluster LevelControl = 8 { } readonly attribute nullable int8u currentLevel = 0; - readonly attribute int16u remainingTime = 1; - readonly attribute int8u minLevel = 2; - readonly attribute int8u maxLevel = 3; + readonly attribute optional int16u remainingTime = 1; + readonly attribute optional int8u minLevel = 2; + readonly attribute optional int8u maxLevel = 3; + readonly attribute optional int16u currentFrequency = 4; + readonly attribute optional int16u minFrequency = 5; + readonly attribute optional int16u maxFrequency = 6; attribute OptionsBitmap options = 15; + attribute optional int16u onOffTransitionTime = 16; attribute nullable int8u onLevel = 17; - attribute access(write: manage) nullable int8u startUpCurrentLevel = 16384; + attribute optional nullable int16u onTransitionTime = 18; + attribute optional nullable int16u offTransitionTime = 19; + attribute optional nullable int8u defaultMoveRate = 20; + attribute access(write: manage) optional nullable int8u startUpCurrentLevel = 16384; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -259,18 +300,33 @@ server cluster LevelControl = 8 { OptionsBitmap optionsOverride = 1; } + request struct MoveToClosestFrequencyRequest { + int16u frequency = 0; + } + + /** Command description for MoveToLevel */ command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + /** Command description for Move */ command Move(MoveRequest): DefaultSuccess = 1; + /** Command description for Step */ command Step(StepRequest): DefaultSuccess = 2; + /** Command description for Stop */ command Stop(StopRequest): DefaultSuccess = 3; + /** Command description for MoveToLevelWithOnOff */ command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + /** Command description for MoveWithOnOff */ command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + /** Command description for StepWithOnOff */ command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + /** Command description for StopWithOnOff */ command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; + /** Change the currrent frequency to the provided one, or a close + approximation if the exact provided one is not possible. */ + command MoveToClosestFrequency(MoveToClosestFrequencyRequest): DefaultSuccess = 8; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -293,6 +349,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -302,7 +359,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -client cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -326,7 +383,7 @@ client cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -385,7 +442,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -400,7 +457,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -472,14 +529,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -488,10 +547,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -567,7 +628,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -640,6 +701,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -647,7 +709,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -664,7 +726,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -692,8 +754,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -703,7 +765,7 @@ server cluster TimeFormatLocalization = 44 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -742,17 +804,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -763,13 +825,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -804,11 +869,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -892,12 +965,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -916,12 +989,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -942,10 +1017,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -953,11 +1028,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ -server cluster ThreadNetworkDiagnostics = 53 { +cluster ThreadNetworkDiagnostics = 53 { revision 1; // NOTE: Default/not specifically set enum ConnectionStatusEnum : enum8 { @@ -1054,7 +1130,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u panId = 3; readonly attribute nullable int64u extendedPanId = 4; readonly attribute nullable octet_string<17> meshLocalPrefix = 5; - readonly attribute int64u overrunCount = 6; + readonly attribute optional int64u overrunCount = 6; readonly attribute NeighborTableStruct neighborTable[] = 7; readonly attribute RouteTableStruct routeTable[] = 8; readonly attribute nullable int32u partitionId = 9; @@ -1062,51 +1138,51 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u dataVersion = 11; readonly attribute nullable int16u stableDataVersion = 12; readonly attribute nullable int8u leaderRouterId = 13; - readonly attribute int16u detachedRoleCount = 14; - readonly attribute int16u childRoleCount = 15; - readonly attribute int16u routerRoleCount = 16; - readonly attribute int16u leaderRoleCount = 17; - readonly attribute int16u attachAttemptCount = 18; - readonly attribute int16u partitionIdChangeCount = 19; - readonly attribute int16u betterPartitionAttachAttemptCount = 20; - readonly attribute int16u parentChangeCount = 21; - readonly attribute int32u txTotalCount = 22; - readonly attribute int32u txUnicastCount = 23; - readonly attribute int32u txBroadcastCount = 24; - readonly attribute int32u txAckRequestedCount = 25; - readonly attribute int32u txAckedCount = 26; - readonly attribute int32u txNoAckRequestedCount = 27; - readonly attribute int32u txDataCount = 28; - readonly attribute int32u txDataPollCount = 29; - readonly attribute int32u txBeaconCount = 30; - readonly attribute int32u txBeaconRequestCount = 31; - readonly attribute int32u txOtherCount = 32; - readonly attribute int32u txRetryCount = 33; - readonly attribute int32u txDirectMaxRetryExpiryCount = 34; - readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; - readonly attribute int32u txErrCcaCount = 36; - readonly attribute int32u txErrAbortCount = 37; - readonly attribute int32u txErrBusyChannelCount = 38; - readonly attribute int32u rxTotalCount = 39; - readonly attribute int32u rxUnicastCount = 40; - readonly attribute int32u rxBroadcastCount = 41; - readonly attribute int32u rxDataCount = 42; - readonly attribute int32u rxDataPollCount = 43; - readonly attribute int32u rxBeaconCount = 44; - readonly attribute int32u rxBeaconRequestCount = 45; - readonly attribute int32u rxOtherCount = 46; - readonly attribute int32u rxAddressFilteredCount = 47; - readonly attribute int32u rxDestAddrFilteredCount = 48; - readonly attribute int32u rxDuplicatedCount = 49; - readonly attribute int32u rxErrNoFrameCount = 50; - readonly attribute int32u rxErrUnknownNeighborCount = 51; - readonly attribute int32u rxErrInvalidSrcAddrCount = 52; - readonly attribute int32u rxErrSecCount = 53; - readonly attribute int32u rxErrFcsCount = 54; - readonly attribute int32u rxErrOtherCount = 55; - readonly attribute nullable int64u activeTimestamp = 56; - readonly attribute nullable int64u pendingTimestamp = 57; - readonly attribute nullable int32u delay = 58; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; readonly attribute nullable SecurityPolicy securityPolicy = 59; readonly attribute nullable octet_string<4> channelPage0Mask = 60; readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; @@ -1118,11 +1194,12 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster WiFiNetworkDiagnostics = 54 { +cluster WiFiNetworkDiagnostics = 54 { revision 1; // NOTE: Default/not specifically set enum AssociationFailureCauseEnum : enum8 { @@ -1179,14 +1256,14 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; - readonly attribute nullable int32u beaconLostCount = 5; - readonly attribute nullable int32u beaconRxCount = 6; - readonly attribute nullable int32u packetMulticastRxCount = 7; - readonly attribute nullable int32u packetMulticastTxCount = 8; - readonly attribute nullable int32u packetUnicastRxCount = 9; - readonly attribute nullable int32u packetUnicastTxCount = 10; - readonly attribute nullable int64u currentMaxRate = 11; - readonly attribute nullable int64u overrunCount = 12; + readonly attribute optional nullable int32u beaconLostCount = 5; + readonly attribute optional nullable int32u beaconRxCount = 6; + readonly attribute optional nullable int32u packetMulticastRxCount = 7; + readonly attribute optional nullable int32u packetMulticastTxCount = 8; + readonly attribute optional nullable int32u packetUnicastRxCount = 9; + readonly attribute optional nullable int32u packetUnicastTxCount = 10; + readonly attribute optional nullable int64u currentMaxRate = 11; + readonly attribute optional nullable int64u overrunCount = 12; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1194,11 +1271,12 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 */ command ResetCounts(): DefaultSuccess = 0; } /** The Ethernet Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster EthernetNetworkDiagnostics = 55 { +cluster EthernetNetworkDiagnostics = 55 { revision 1; // NOTE: Default/not specifically set enum PHYRateEnum : enum8 { @@ -1219,15 +1297,15 @@ server cluster EthernetNetworkDiagnostics = 55 { kErrorCounts = 0x2; } - readonly attribute nullable PHYRateEnum PHYRate = 0; - readonly attribute nullable boolean fullDuplex = 1; - readonly attribute int64u packetRxCount = 2; - readonly attribute int64u packetTxCount = 3; - readonly attribute int64u txErrCount = 4; - readonly attribute int64u collisionCount = 5; - readonly attribute int64u overrunCount = 6; - readonly attribute nullable boolean carrierDetect = 7; - readonly attribute int64u timeSinceReset = 8; + readonly attribute optional nullable PHYRateEnum PHYRate = 0; + readonly attribute optional nullable boolean fullDuplex = 1; + readonly attribute optional int64u packetRxCount = 2; + readonly attribute optional int64u packetTxCount = 3; + readonly attribute optional int64u txErrCount = 4; + readonly attribute optional int64u collisionCount = 5; + readonly attribute optional int64u overrunCount = 6; + readonly attribute optional nullable boolean carrierDetect = 7; + readonly attribute optional int64u timeSinceReset = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1235,11 +1313,12 @@ server cluster EthernetNetworkDiagnostics = 55 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the attributes: PacketRxCount, PacketTxCount, TxErrCount, CollisionCount, OverrunCount to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1280,13 +1359,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1339,15 +1421,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1361,6 +1457,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1373,38 +1475,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1459,27 +1549,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1497,7 +1591,7 @@ server cluster FixedLabel = 64 { } /** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ -client cluster OccupancySensing = 1030 { +cluster OccupancySensing = 1030 { revision 3; enum OccupancySensorTypeEnum : enum8 { diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter index 55d65cc9100c0c..ce3065c7631074 100644 --- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -74,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -144,6 +152,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -156,7 +165,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -215,7 +224,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -230,7 +239,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -302,14 +311,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -318,10 +329,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -360,17 +373,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -381,13 +394,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -468,12 +484,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -486,6 +505,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -505,48 +531,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -581,11 +618,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -669,12 +714,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -693,12 +738,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -739,13 +786,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -798,15 +848,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -820,6 +884,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -832,38 +902,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -918,26 +976,30 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** Attributes for reporting air quality classification */ -server cluster AirQuality = 91 { +cluster AirQuality = 91 { revision 1; // NOTE: Default/not specifically set enum AirQualityEnum : enum8 { @@ -967,7 +1029,7 @@ server cluster AirQuality = 91 { } /** Attributes and commands for monitoring HEPA filters in a device */ -server cluster HepaFilterMonitoring = 113 { +cluster HepaFilterMonitoring = 113 { revision 1; // NOTE: Default/not specifically set enum ChangeIndicationEnum : enum8 { @@ -1000,20 +1062,25 @@ server cluster HepaFilterMonitoring = 113 { char_string<20> productIdentifierValue = 1; } - readonly attribute percent condition = 0; - readonly attribute DegradationDirectionEnum degradationDirection = 1; + readonly attribute optional percent condition = 0; + readonly attribute optional DegradationDirectionEnum degradationDirection = 1; readonly attribute ChangeIndicationEnum changeIndication = 2; - readonly attribute boolean inPlaceIndicator = 3; + readonly attribute optional boolean inPlaceIndicator = 3; + attribute optional nullable epoch_s lastChangedTime = 4; + readonly attribute optional ReplacementProductStruct replacementProductList[] = 5; 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; + + /** Reset the condition of the replaceable to the non degraded state */ + command ResetCondition(): DefaultSuccess = 0; } /** Attributes and commands for monitoring activated carbon filters in a device */ -server cluster ActivatedCarbonFilterMonitoring = 114 { +cluster ActivatedCarbonFilterMonitoring = 114 { revision 1; // NOTE: Default/not specifically set enum ChangeIndicationEnum : enum8 { @@ -1046,20 +1113,25 @@ server cluster ActivatedCarbonFilterMonitoring = 114 { char_string<20> productIdentifierValue = 1; } - readonly attribute percent condition = 0; - readonly attribute DegradationDirectionEnum degradationDirection = 1; + readonly attribute optional percent condition = 0; + readonly attribute optional DegradationDirectionEnum degradationDirection = 1; readonly attribute ChangeIndicationEnum changeIndication = 2; - readonly attribute boolean inPlaceIndicator = 3; + readonly attribute optional boolean inPlaceIndicator = 3; + attribute optional nullable epoch_s lastChangedTime = 4; + readonly attribute optional ReplacementProductStruct replacementProductList[] = 5; 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; + + /** Reset the condition of the replaceable to the non degraded state */ + command ResetCondition(): DefaultSuccess = 0; } /** An interface for configuring and controlling the functionality of a thermostat. */ -server cluster Thermostat = 513 { +cluster Thermostat = 513 { revision 6; enum SetpointAdjustMode : enum8 { @@ -1128,11 +1200,54 @@ server cluster Thermostat = 513 { } readonly attribute nullable int16s localTemperature = 0; - attribute int16s occupiedHeatingSetpoint = 18; - attribute access(write: manage) int16s minHeatSetpointLimit = 21; - attribute access(write: manage) int16s maxHeatSetpointLimit = 22; + readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute optional bitmap8 occupancy = 2; + readonly attribute optional int16s absMinHeatSetpointLimit = 3; + readonly attribute optional int16s absMaxHeatSetpointLimit = 4; + readonly attribute optional int16s absMinCoolSetpointLimit = 5; + readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional int8u PICoolingDemand = 7; + readonly attribute optional int8u PIHeatingDemand = 8; + attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; + attribute access(write: manage) optional int8s localTemperatureCalibration = 16; + attribute optional int16s occupiedCoolingSetpoint = 17; + attribute optional int16s occupiedHeatingSetpoint = 18; + attribute optional int16s unoccupiedCoolingSetpoint = 19; + attribute optional int16s unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; + attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; + attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; + attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute access(write: manage) optional int8s minSetpointDeadBand = 25; + attribute access(write: manage) optional bitmap8 remoteSensing = 26; attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; attribute access(write: manage) enum8 systemMode = 28; + readonly attribute optional enum8 thermostatRunningMode = 30; + readonly attribute optional enum8 startOfWeek = 32; + readonly attribute optional int8u numberOfWeeklyTransitions = 33; + readonly attribute optional int8u numberOfDailyTransitions = 34; + attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; + attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; + readonly attribute optional bitmap16 thermostatRunningState = 41; + readonly attribute optional enum8 setpointChangeSource = 48; + readonly attribute optional nullable int16s setpointChangeAmount = 49; + readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; + attribute access(write: manage) optional nullable int8u occupiedSetback = 52; + readonly attribute optional nullable int8u occupiedSetbackMin = 53; + readonly attribute optional nullable int8u occupiedSetbackMax = 54; + attribute access(write: manage) optional nullable int8u unoccupiedSetback = 55; + readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; + readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; + attribute access(write: manage) optional int8u emergencyHeatDelta = 58; + attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional int16u ACCapacity = 65; + attribute access(write: manage) optional enum8 ACRefrigerantType = 66; + attribute access(write: manage) optional enum8 ACCompressorType = 67; + attribute access(write: manage) optional bitmap32 ACErrorCode = 68; + attribute access(write: manage) optional enum8 ACLouverPosition = 69; + readonly attribute optional nullable int16s ACCoilTemperature = 70; + attribute access(write: manage) optional enum8 ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1145,11 +1260,37 @@ server cluster Thermostat = 513 { int8s amount = 1; } + response struct GetWeeklyScheduleResponse = 0 { + int8u numberOfTransitionsForSequence = 0; + DayOfWeek dayOfWeekForSequence = 1; + ModeForSequence modeForSequence = 2; + ThermostatScheduleTransition transitions[] = 3; + } + + request struct SetWeeklyScheduleRequest { + int8u numberOfTransitionsForSequence = 0; + DayOfWeek dayOfWeekForSequence = 1; + ModeForSequence modeForSequence = 2; + ThermostatScheduleTransition transitions[] = 3; + } + + request struct GetWeeklyScheduleRequest { + DayOfWeek daysToReturn = 0; + ModeForSequence modeToReturn = 1; + } + + /** Command description for SetpointRaiseLower */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; + /** Command description for SetWeeklySchedule */ + command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; + /** Command description for GetWeeklySchedule */ + command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; + /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ + command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; } /** An interface for controlling a fan in a heating/cooling system. */ -provisional server cluster FanControl = 514 { +provisional cluster FanControl = 514 { revision 4; enum AirflowDirectionEnum : enum8 { @@ -1205,29 +1346,39 @@ provisional server cluster FanControl = 514 { readonly attribute FanModeSequenceEnum fanModeSequence = 1; attribute nullable percent percentSetting = 2; readonly attribute percent percentCurrent = 3; - readonly attribute int8u speedMax = 4; - attribute nullable int8u speedSetting = 5; - readonly attribute int8u speedCurrent = 6; - readonly attribute RockBitmap rockSupport = 7; - attribute RockBitmap rockSetting = 8; - readonly attribute WindBitmap windSupport = 9; - attribute WindBitmap windSetting = 10; - attribute AirflowDirectionEnum airflowDirection = 11; + readonly attribute optional int8u speedMax = 4; + attribute optional nullable int8u speedSetting = 5; + readonly attribute optional int8u speedCurrent = 6; + readonly attribute optional RockBitmap rockSupport = 7; + attribute optional RockBitmap rockSetting = 8; + readonly attribute optional WindBitmap windSupport = 9; + attribute optional WindBitmap windSetting = 10; + attribute optional AirflowDirectionEnum airflowDirection = 11; 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; + + request struct StepRequest { + StepDirectionEnum direction = 0; + optional boolean wrap = 1; + optional boolean lowestOff = 2; + } + + /** The Step command speeds up or slows down the fan, in steps. */ + command Step(StepRequest): DefaultSuccess = 0; } /** Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. */ -server cluster TemperatureMeasurement = 1026 { +cluster TemperatureMeasurement = 1026 { revision 1; // NOTE: Default/not specifically set readonly attribute nullable temperature measuredValue = 0; readonly attribute nullable temperature minMeasuredValue = 1; readonly attribute nullable temperature maxMeasuredValue = 2; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1237,12 +1388,13 @@ server cluster TemperatureMeasurement = 1026 { } /** Attributes and commands for configuring the measurement of relative humidity, and reporting relative humidity measurements. */ -server cluster RelativeHumidityMeasurement = 1029 { +cluster RelativeHumidityMeasurement = 1029 { revision 3; readonly attribute nullable int16u measuredValue = 0; readonly attribute nullable int16u minMeasuredValue = 1; readonly attribute nullable int16u maxMeasuredValue = 2; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1252,7 +1404,7 @@ server cluster RelativeHumidityMeasurement = 1029 { } /** Attributes for reporting carbon monoxide concentration measurements */ -server cluster CarbonMonoxideConcentrationMeasurement = 1036 { +cluster CarbonMonoxideConcentrationMeasurement = 1036 { revision 3; enum LevelValueEnum : enum8 { @@ -1289,16 +1441,17 @@ server cluster CarbonMonoxideConcentrationMeasurement = 1036 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1308,7 +1461,7 @@ server cluster CarbonMonoxideConcentrationMeasurement = 1036 { } /** Attributes for reporting carbon dioxide concentration measurements */ -server cluster CarbonDioxideConcentrationMeasurement = 1037 { +cluster CarbonDioxideConcentrationMeasurement = 1037 { revision 3; enum LevelValueEnum : enum8 { @@ -1345,16 +1498,17 @@ server cluster CarbonDioxideConcentrationMeasurement = 1037 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1364,7 +1518,7 @@ server cluster CarbonDioxideConcentrationMeasurement = 1037 { } /** Attributes for reporting nitrogen dioxide concentration measurements */ -server cluster NitrogenDioxideConcentrationMeasurement = 1043 { +cluster NitrogenDioxideConcentrationMeasurement = 1043 { revision 3; enum LevelValueEnum : enum8 { @@ -1401,16 +1555,17 @@ server cluster NitrogenDioxideConcentrationMeasurement = 1043 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1420,7 +1575,7 @@ server cluster NitrogenDioxideConcentrationMeasurement = 1043 { } /** Attributes for reporting ozone concentration measurements */ -server cluster OzoneConcentrationMeasurement = 1045 { +cluster OzoneConcentrationMeasurement = 1045 { revision 3; enum LevelValueEnum : enum8 { @@ -1457,16 +1612,17 @@ server cluster OzoneConcentrationMeasurement = 1045 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1476,7 +1632,7 @@ server cluster OzoneConcentrationMeasurement = 1045 { } /** Attributes for reporting PM2.5 concentration measurements */ -server cluster Pm25ConcentrationMeasurement = 1066 { +cluster Pm25ConcentrationMeasurement = 1066 { revision 3; enum LevelValueEnum : enum8 { @@ -1513,16 +1669,17 @@ server cluster Pm25ConcentrationMeasurement = 1066 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1532,7 +1689,7 @@ server cluster Pm25ConcentrationMeasurement = 1066 { } /** Attributes for reporting formaldehyde concentration measurements */ -server cluster FormaldehydeConcentrationMeasurement = 1067 { +cluster FormaldehydeConcentrationMeasurement = 1067 { revision 3; enum LevelValueEnum : enum8 { @@ -1569,16 +1726,17 @@ server cluster FormaldehydeConcentrationMeasurement = 1067 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1588,7 +1746,7 @@ server cluster FormaldehydeConcentrationMeasurement = 1067 { } /** Attributes for reporting PM1 concentration measurements */ -server cluster Pm1ConcentrationMeasurement = 1068 { +cluster Pm1ConcentrationMeasurement = 1068 { revision 3; enum LevelValueEnum : enum8 { @@ -1625,16 +1783,17 @@ server cluster Pm1ConcentrationMeasurement = 1068 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1644,7 +1803,7 @@ server cluster Pm1ConcentrationMeasurement = 1068 { } /** Attributes for reporting PM10 concentration measurements */ -server cluster Pm10ConcentrationMeasurement = 1069 { +cluster Pm10ConcentrationMeasurement = 1069 { revision 3; enum LevelValueEnum : enum8 { @@ -1681,16 +1840,17 @@ server cluster Pm10ConcentrationMeasurement = 1069 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1700,7 +1860,7 @@ server cluster Pm10ConcentrationMeasurement = 1069 { } /** Attributes for reporting total volatile organic compounds concentration measurements */ -server cluster TotalVolatileOrganicCompoundsConcentrationMeasurement = 1070 { +cluster TotalVolatileOrganicCompoundsConcentrationMeasurement = 1070 { revision 3; enum LevelValueEnum : enum8 { @@ -1737,16 +1897,17 @@ server cluster TotalVolatileOrganicCompoundsConcentrationMeasurement = 1070 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1756,7 +1917,7 @@ server cluster TotalVolatileOrganicCompoundsConcentrationMeasurement = 1070 { } /** Attributes for reporting radon concentration measurements */ -server cluster RadonConcentrationMeasurement = 1071 { +cluster RadonConcentrationMeasurement = 1071 { revision 3; enum LevelValueEnum : enum8 { @@ -1793,16 +1954,17 @@ server cluster RadonConcentrationMeasurement = 1071 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter index 71173b45a89cae..d2cdddc159c216 100644 --- a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter +++ b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -40,11 +40,19 @@ server cluster Identify = 3 { int16u identifyTime = 0; } + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -67,6 +75,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -79,7 +88,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -138,7 +147,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -153,7 +162,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -225,14 +234,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -241,10 +252,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -320,7 +333,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -393,6 +406,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -400,7 +414,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -417,7 +431,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -445,8 +459,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -456,7 +470,7 @@ server cluster TimeFormatLocalization = 44 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -495,17 +509,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -516,13 +530,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -603,12 +620,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -621,6 +641,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -640,48 +667,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -716,11 +754,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -804,12 +850,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -828,12 +874,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -854,10 +902,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -865,11 +913,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -910,13 +959,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -969,15 +1021,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -991,6 +1057,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1003,38 +1075,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1089,27 +1149,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1127,7 +1191,7 @@ server cluster FixedLabel = 64 { } /** Attributes for reporting air quality classification */ -server cluster AirQuality = 91 { +cluster AirQuality = 91 { revision 1; // NOTE: Default/not specifically set enum AirQualityEnum : enum8 { @@ -1157,13 +1221,13 @@ server cluster AirQuality = 91 { } /** Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. */ -server cluster TemperatureMeasurement = 1026 { +cluster TemperatureMeasurement = 1026 { revision 1; // NOTE: Default/not specifically set readonly attribute nullable temperature measuredValue = 0; readonly attribute nullable temperature minMeasuredValue = 1; readonly attribute nullable temperature maxMeasuredValue = 2; - readonly attribute int16u tolerance = 3; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1173,13 +1237,13 @@ server cluster TemperatureMeasurement = 1026 { } /** Attributes and commands for configuring the measurement of relative humidity, and reporting relative humidity measurements. */ -server cluster RelativeHumidityMeasurement = 1029 { +cluster RelativeHumidityMeasurement = 1029 { revision 3; readonly attribute nullable int16u measuredValue = 0; readonly attribute nullable int16u minMeasuredValue = 1; readonly attribute nullable int16u maxMeasuredValue = 2; - readonly attribute int16u tolerance = 3; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1189,7 +1253,7 @@ server cluster RelativeHumidityMeasurement = 1029 { } /** Attributes for reporting carbon monoxide concentration measurements */ -server cluster CarbonMonoxideConcentrationMeasurement = 1036 { +cluster CarbonMonoxideConcentrationMeasurement = 1036 { revision 3; enum LevelValueEnum : enum8 { @@ -1226,17 +1290,17 @@ server cluster CarbonMonoxideConcentrationMeasurement = 1036 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute single uncertainty = 7; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1246,7 +1310,7 @@ server cluster CarbonMonoxideConcentrationMeasurement = 1036 { } /** Attributes for reporting carbon dioxide concentration measurements */ -server cluster CarbonDioxideConcentrationMeasurement = 1037 { +cluster CarbonDioxideConcentrationMeasurement = 1037 { revision 3; enum LevelValueEnum : enum8 { @@ -1283,17 +1347,17 @@ server cluster CarbonDioxideConcentrationMeasurement = 1037 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute single uncertainty = 7; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1303,7 +1367,7 @@ server cluster CarbonDioxideConcentrationMeasurement = 1037 { } /** Attributes for reporting nitrogen dioxide concentration measurements */ -server cluster NitrogenDioxideConcentrationMeasurement = 1043 { +cluster NitrogenDioxideConcentrationMeasurement = 1043 { revision 3; enum LevelValueEnum : enum8 { @@ -1340,17 +1404,17 @@ server cluster NitrogenDioxideConcentrationMeasurement = 1043 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute single uncertainty = 7; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1360,7 +1424,7 @@ server cluster NitrogenDioxideConcentrationMeasurement = 1043 { } /** Attributes for reporting ozone concentration measurements */ -server cluster OzoneConcentrationMeasurement = 1045 { +cluster OzoneConcentrationMeasurement = 1045 { revision 3; enum LevelValueEnum : enum8 { @@ -1397,17 +1461,17 @@ server cluster OzoneConcentrationMeasurement = 1045 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute single uncertainty = 7; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1417,7 +1481,7 @@ server cluster OzoneConcentrationMeasurement = 1045 { } /** Attributes for reporting PM2.5 concentration measurements */ -server cluster Pm25ConcentrationMeasurement = 1066 { +cluster Pm25ConcentrationMeasurement = 1066 { revision 3; enum LevelValueEnum : enum8 { @@ -1454,17 +1518,17 @@ server cluster Pm25ConcentrationMeasurement = 1066 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute single uncertainty = 7; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1474,7 +1538,7 @@ server cluster Pm25ConcentrationMeasurement = 1066 { } /** Attributes for reporting formaldehyde concentration measurements */ -server cluster FormaldehydeConcentrationMeasurement = 1067 { +cluster FormaldehydeConcentrationMeasurement = 1067 { revision 3; enum LevelValueEnum : enum8 { @@ -1511,17 +1575,17 @@ server cluster FormaldehydeConcentrationMeasurement = 1067 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute single uncertainty = 7; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1531,7 +1595,7 @@ server cluster FormaldehydeConcentrationMeasurement = 1067 { } /** Attributes for reporting PM1 concentration measurements */ -server cluster Pm1ConcentrationMeasurement = 1068 { +cluster Pm1ConcentrationMeasurement = 1068 { revision 3; enum LevelValueEnum : enum8 { @@ -1568,17 +1632,17 @@ server cluster Pm1ConcentrationMeasurement = 1068 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute single uncertainty = 7; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1588,7 +1652,7 @@ server cluster Pm1ConcentrationMeasurement = 1068 { } /** Attributes for reporting PM10 concentration measurements */ -server cluster Pm10ConcentrationMeasurement = 1069 { +cluster Pm10ConcentrationMeasurement = 1069 { revision 3; enum LevelValueEnum : enum8 { @@ -1625,17 +1689,17 @@ server cluster Pm10ConcentrationMeasurement = 1069 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute single uncertainty = 7; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1645,7 +1709,7 @@ server cluster Pm10ConcentrationMeasurement = 1069 { } /** Attributes for reporting total volatile organic compounds concentration measurements */ -server cluster TotalVolatileOrganicCompoundsConcentrationMeasurement = 1070 { +cluster TotalVolatileOrganicCompoundsConcentrationMeasurement = 1070 { revision 3; enum LevelValueEnum : enum8 { @@ -1682,17 +1746,17 @@ server cluster TotalVolatileOrganicCompoundsConcentrationMeasurement = 1070 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute single uncertainty = 7; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1702,7 +1766,7 @@ server cluster TotalVolatileOrganicCompoundsConcentrationMeasurement = 1070 { } /** Attributes for reporting radon concentration measurements */ -server cluster RadonConcentrationMeasurement = 1071 { +cluster RadonConcentrationMeasurement = 1071 { revision 3; enum LevelValueEnum : enum8 { @@ -1739,17 +1803,17 @@ server cluster RadonConcentrationMeasurement = 1071 { kAverageMeasurement = 0x20; } - readonly attribute nullable single measuredValue = 0; - readonly attribute nullable single minMeasuredValue = 1; - readonly attribute nullable single maxMeasuredValue = 2; - readonly attribute nullable single peakMeasuredValue = 3; - readonly attribute elapsed_s peakMeasuredValueWindow = 4; - readonly attribute nullable single averageMeasuredValue = 5; - readonly attribute elapsed_s averageMeasuredValueWindow = 6; - readonly attribute single uncertainty = 7; - readonly attribute MeasurementUnitEnum measurementUnit = 8; - readonly attribute MeasurementMediumEnum measurementMedium = 9; - readonly attribute LevelValueEnum levelValue = 10; + readonly attribute optional nullable single measuredValue = 0; + readonly attribute optional nullable single minMeasuredValue = 1; + readonly attribute optional nullable single maxMeasuredValue = 2; + readonly attribute optional nullable single peakMeasuredValue = 3; + readonly attribute optional elapsed_s peakMeasuredValueWindow = 4; + readonly attribute optional nullable single averageMeasuredValue = 5; + readonly attribute optional elapsed_s averageMeasuredValueWindow = 6; + readonly attribute optional single uncertainty = 7; + readonly attribute optional MeasurementUnitEnum measurementUnit = 8; + readonly attribute optional MeasurementMediumEnum measurementMedium = 9; + readonly attribute optional LevelValueEnum levelValue = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter index 9d9f290ca8346c..a4d8a54503eb72 100644 --- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -37,6 +37,10 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -44,13 +48,33 @@ server cluster OnOff = 6 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + request struct OffWithEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + enum8 effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControlBitmap onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -73,6 +97,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -85,7 +110,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -144,7 +169,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -159,7 +184,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -231,14 +256,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -247,10 +274,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -326,7 +355,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -399,6 +428,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -406,7 +436,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -423,7 +453,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -451,8 +481,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -462,7 +492,7 @@ server cluster TimeFormatLocalization = 44 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -501,17 +531,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -522,13 +552,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -609,12 +642,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -627,6 +663,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -646,48 +689,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -722,11 +776,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -810,12 +872,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -834,12 +896,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -860,10 +924,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -871,11 +935,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -916,13 +981,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -975,15 +1043,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -997,6 +1079,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1009,38 +1097,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1095,27 +1171,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1133,9 +1213,11 @@ server cluster FixedLabel = 64 { } /** This cluster provides an interface for managing low power mode on a device that supports the Wake On LAN protocol. */ -server cluster WakeOnLan = 1283 { +cluster WakeOnLan = 1283 { revision 1; // NOTE: Default/not specifically set + readonly attribute optional char_string<12> MACAddress = 0; + readonly attribute optional octet_string<16> linkLocalAddress = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1145,7 +1227,7 @@ server cluster WakeOnLan = 1283 { } /** This cluster provides an interface for controlling the current Channel on a device. */ -server cluster Channel = 1284 { +cluster Channel = 1284 { revision 1; // NOTE: Default/not specifically set enum LineupInfoTypeEnum : enum8 { @@ -1178,9 +1260,9 @@ server cluster Channel = 1284 { LineupInfoTypeEnum lineupInfoType = 3; } - readonly attribute ChannelInfoStruct channelList[] = 0; - readonly attribute nullable LineupInfoStruct lineup = 1; - readonly attribute nullable ChannelInfoStruct currentChannel = 2; + readonly attribute optional ChannelInfoStruct channelList[] = 0; + readonly attribute optional nullable LineupInfoStruct lineup = 1; + readonly attribute optional nullable ChannelInfoStruct currentChannel = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1192,6 +1274,11 @@ server cluster Channel = 1284 { char_string match = 0; } + response struct ChangeChannelResponse = 1 { + StatusEnum status = 0; + optional char_string data = 1; + } + request struct ChangeChannelByNumberRequest { int16u majorNumber = 0; int16u minorNumber = 1; @@ -1201,18 +1288,16 @@ server cluster Channel = 1284 { int16s count = 0; } - response struct ChangeChannelResponse = 1 { - StatusEnum status = 0; - optional char_string data = 1; - } - + /** Change the channel on the media player to the channel case-insensitive exact matching the value passed as an argument. */ command ChangeChannel(ChangeChannelRequest): ChangeChannelResponse = 0; + /** Change the channel on the media plaeyer to the channel with the given Number in the ChannelList attribute. */ command ChangeChannelByNumber(ChangeChannelByNumberRequest): DefaultSuccess = 2; + /** This command provides channel up and channel down functionality, but allows channel index jumps of size Count. When the value of the increase or decrease is larger than the number of channels remaining in the given direction, then the behavior SHALL be to return to the beginning (or end) of the channel list and continue. For example, if the current channel is at index 0 and count value of -1 is given, then the current channel should change to the last channel. */ command SkipChannel(SkipChannelRequest): DefaultSuccess = 3; } /** This cluster provides an interface for UX navigation within a set of targets on a device or endpoint. */ -server cluster TargetNavigator = 1285 { +cluster TargetNavigator = 1285 { revision 1; // NOTE: Default/not specifically set enum StatusEnum : enum8 { @@ -1227,6 +1312,7 @@ server cluster TargetNavigator = 1285 { } readonly attribute TargetInfoStruct targetList[] = 0; + readonly attribute optional int8u currentTarget = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1244,11 +1330,12 @@ server cluster TargetNavigator = 1285 { optional char_string data = 1; } + /** Upon receipt, this SHALL navigation the UX to the target identified. */ command NavigateTarget(NavigateTargetRequest): NavigateTargetResponse = 0; } /** This cluster provides an interface for controlling Media Playback (PLAY, PAUSE, etc) on a media device such as a TV or Speaker. */ -server cluster MediaPlayback = 1286 { +cluster MediaPlayback = 1286 { revision 1; // NOTE: Default/not specifically set enum PlaybackStateEnum : enum8 { @@ -1278,6 +1365,12 @@ server cluster MediaPlayback = 1286 { } readonly attribute PlaybackStateEnum currentState = 0; + readonly attribute optional nullable epoch_us startTime = 1; + readonly attribute optional nullable int64u duration = 2; + readonly attribute optional nullable PlaybackPositionStruct sampledPosition = 3; + readonly attribute optional single playbackSpeed = 4; + readonly attribute optional nullable int64u seekRangeEnd = 5; + readonly attribute optional nullable int64u seekRangeStart = 6; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1285,18 +1378,49 @@ server cluster MediaPlayback = 1286 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + request struct SkipForwardRequest { + int64u deltaPositionMilliseconds = 0; + } + + request struct SkipBackwardRequest { + int64u deltaPositionMilliseconds = 0; + } + response struct PlaybackResponse = 10 { StatusEnum status = 0; optional char_string data = 1; } + request struct SeekRequest { + int64u position = 0; + } + + /** Upon receipt, this SHALL play media. */ command Play(): PlaybackResponse = 0; + /** Upon receipt, this SHALL pause media. */ command Pause(): PlaybackResponse = 1; + /** Upon receipt, this SHALL stop media. User experience is context-specific. This will often navigate the user back to the location where media was originally launched. */ command Stop(): PlaybackResponse = 2; + /** Upon receipt, this SHALL Start Over with the current media playback item. */ + command StartOver(): PlaybackResponse = 3; + /** Upon receipt, this SHALL cause the handler to be invoked for "Previous". User experience is context-specific. This will often Go back to the previous media playback item. */ + command Previous(): PlaybackResponse = 4; + /** Upon receipt, this SHALL cause the handler to be invoked for "Next". User experience is context-specific. This will often Go forward to the next media playback item. */ + command Next(): PlaybackResponse = 5; + /** Upon receipt, this SHALL Rewind through media. Different Rewind speeds can be used on the TV based upon the number of sequential calls to this function. This is to avoid needing to define every speed now (multiple fast, slow motion, etc). */ + command Rewind(): PlaybackResponse = 6; + /** Upon receipt, this SHALL Advance through media. Different FF speeds can be used on the TV based upon the number of sequential calls to this function. This is to avoid needing to define every speed now (multiple fast, slow motion, etc). */ + command FastForward(): PlaybackResponse = 7; + /** Upon receipt, this SHALL Skip forward in the media by the given number of seconds, using the data as follows: */ + command SkipForward(SkipForwardRequest): PlaybackResponse = 8; + /** Upon receipt, this SHALL Skip backward in the media by the given number of seconds, using the data as follows: */ + command SkipBackward(SkipBackwardRequest): PlaybackResponse = 9; + /** Upon receipt, this SHALL Skip backward in the media by the given number of seconds, using the data as follows: */ + command Seek(SeekRequest): PlaybackResponse = 11; } /** This cluster provides an interface for controlling the Input Selector on a media device such as a TV. */ -server cluster MediaInput = 1287 { +cluster MediaInput = 1287 { revision 1; // NOTE: Default/not specifically set enum InputTypeEnum : enum8 { @@ -1338,13 +1462,23 @@ server cluster MediaInput = 1287 { int8u index = 0; } + request struct RenameInputRequest { + int8u index = 0; + char_string name = 1; + } + + /** Upon receipt, this SHALL change the input on the media device to the input at a specific index in the Input List. */ command SelectInput(SelectInputRequest): DefaultSuccess = 0; + /** Upon receipt, this SHALL display the active status of the input list on screen. */ command ShowInputStatus(): DefaultSuccess = 1; + /** Upon receipt, this SHALL hide the input list from the screen. */ command HideInputStatus(): DefaultSuccess = 2; + /** Upon receipt, this SHALL rename the input at a specific index in the Input List. Updates to the input name SHALL appear in the TV settings menus. */ + command access(invoke: manage) RenameInput(RenameInputRequest): DefaultSuccess = 3; } /** This cluster provides an interface for managing low power mode on a device. */ -server cluster LowPower = 1288 { +cluster LowPower = 1288 { revision 1; // NOTE: Default/not specifically set readonly attribute command_id generatedCommandList[] = 65528; @@ -1354,11 +1488,12 @@ server cluster LowPower = 1288 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** This command shall put the device into low power mode. */ command Sleep(): DefaultSuccess = 0; } /** This cluster provides an interface for controlling a device like a TV using action commands such as UP, DOWN, and SELECT. */ -server cluster KeypadInput = 1289 { +cluster KeypadInput = 1289 { revision 1; // NOTE: Default/not specifically set enum CECKeyCodeEnum : enum8 { @@ -1477,11 +1612,12 @@ server cluster KeypadInput = 1289 { StatusEnum status = 0; } + /** Upon receipt, this SHALL process a keycode as input to the media device. */ command SendKey(SendKeyRequest): SendKeyResponse = 0; } /** This cluster provides an interface for controlling the Output on a media device such as a TV. */ -server cluster AudioOutput = 1291 { +cluster AudioOutput = 1291 { revision 1; // NOTE: Default/not specifically set enum OutputTypeEnum : enum8 { @@ -1516,7 +1652,15 @@ server cluster AudioOutput = 1291 { int8u index = 0; } + request struct RenameOutputRequest { + int8u index = 0; + char_string name = 1; + } + + /** Upon receipt, this SHALL change the output on the media device to the output at a specific index in the Output List. */ command SelectOutput(SelectOutputRequest): DefaultSuccess = 0; + /** Upon receipt, this SHALL rename the output at a specific index in the Output List. Updates to the output name SHALL appear in the TV settings menus. */ + command access(invoke: manage) RenameOutput(RenameOutputRequest): DefaultSuccess = 1; } endpoint 0 { diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter index f1b1a1ffd9266b..03efd931e3b1e9 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -74,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -156,10 +164,10 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; - readonly attribute boolean globalSceneControl = 16384; - attribute int16u onTime = 16385; - attribute int16u offWaitTime = 16386; - attribute access(write: manage) nullable StartUpOnOffEnum startUpOnOff = 16387; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -178,16 +186,22 @@ server cluster OnOff = 6 { int16u offWaitTime = 2; } + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ -server cluster LevelControl = 8 { +cluster LevelControl = 8 { revision 5; enum MoveModeEnum : enum8 { @@ -212,10 +226,19 @@ server cluster LevelControl = 8 { } readonly attribute nullable int8u currentLevel = 0; - readonly attribute int16u remainingTime = 1; + readonly attribute optional int16u remainingTime = 1; + readonly attribute optional int8u minLevel = 2; + readonly attribute optional int8u maxLevel = 3; + readonly attribute optional int16u currentFrequency = 4; + readonly attribute optional int16u minFrequency = 5; + readonly attribute optional int16u maxFrequency = 6; attribute OptionsBitmap options = 15; + attribute optional int16u onOffTransitionTime = 16; attribute nullable int8u onLevel = 17; - attribute access(write: manage) nullable int8u startUpCurrentLevel = 16384; + attribute optional nullable int16u onTransitionTime = 18; + attribute optional nullable int16u offTransitionTime = 19; + attribute optional nullable int8u defaultMoveRate = 20; + attribute access(write: manage) optional nullable int8u startUpCurrentLevel = 16384; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -277,18 +300,33 @@ server cluster LevelControl = 8 { OptionsBitmap optionsOverride = 1; } + request struct MoveToClosestFrequencyRequest { + int16u frequency = 0; + } + + /** Command description for MoveToLevel */ command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + /** Command description for Move */ command Move(MoveRequest): DefaultSuccess = 1; + /** Command description for Step */ command Step(StepRequest): DefaultSuccess = 2; + /** Command description for Stop */ command Stop(StopRequest): DefaultSuccess = 3; + /** Command description for MoveToLevelWithOnOff */ command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + /** Command description for MoveWithOnOff */ command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + /** Command description for StepWithOnOff */ command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + /** Command description for StopWithOnOff */ command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; + /** Change the currrent frequency to the provided one, or a close + approximation if the exact provided one is not possible. */ + command MoveToClosestFrequency(MoveToClosestFrequencyRequest): DefaultSuccess = 8; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -311,6 +349,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -323,7 +362,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -382,7 +421,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -397,7 +436,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -469,14 +508,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -485,10 +526,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -564,7 +607,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -637,11 +680,12 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -680,17 +724,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -701,13 +745,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -788,12 +835,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -806,6 +856,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -825,48 +882,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -901,11 +969,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -989,12 +1065,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1013,12 +1089,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -1039,10 +1117,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1050,11 +1128,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1095,13 +1174,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1154,15 +1236,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1176,6 +1272,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1188,38 +1290,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1274,26 +1364,30 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** Attributes and commands for controlling the color properties of a color-capable light. */ -server cluster ColorControl = 768 { +cluster ColorControl = 768 { revision 6; enum ColorLoopAction : enum8 { @@ -1365,36 +1459,58 @@ server cluster ColorControl = 768 { kColorTemperature = 0x10; } - readonly attribute int16u remainingTime = 2; - readonly attribute int16u colorTemperatureMireds = 7; + readonly attribute optional int8u currentHue = 0; + readonly attribute optional int8u currentSaturation = 1; + readonly attribute optional int16u remainingTime = 2; + readonly attribute optional int16u currentX = 3; + readonly attribute optional int16u currentY = 4; + readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional char_string<254> compensationText = 6; + readonly attribute optional int16u colorTemperatureMireds = 7; readonly attribute enum8 colorMode = 8; attribute bitmap8 options = 15; readonly attribute nullable int8u numberOfPrimaries = 16; - readonly attribute int16u primary1X = 17; - readonly attribute int16u primary1Y = 18; - readonly attribute nullable int8u primary1Intensity = 19; - readonly attribute int16u primary2X = 21; - readonly attribute int16u primary2Y = 22; - readonly attribute nullable int8u primary2Intensity = 23; - readonly attribute int16u primary3X = 25; - readonly attribute int16u primary3Y = 26; - readonly attribute nullable int8u primary3Intensity = 27; - readonly attribute int16u primary4X = 32; - readonly attribute int16u primary4Y = 33; - readonly attribute nullable int8u primary4Intensity = 34; - readonly attribute int16u primary5X = 36; - readonly attribute int16u primary5Y = 37; - readonly attribute nullable int8u primary5Intensity = 38; - readonly attribute int16u primary6X = 40; - readonly attribute int16u primary6Y = 41; - readonly attribute nullable int8u primary6Intensity = 42; - readonly attribute int16u enhancedCurrentHue = 16384; + readonly attribute optional int16u primary1X = 17; + readonly attribute optional int16u primary1Y = 18; + readonly attribute optional nullable int8u primary1Intensity = 19; + readonly attribute optional int16u primary2X = 21; + readonly attribute optional int16u primary2Y = 22; + readonly attribute optional nullable int8u primary2Intensity = 23; + readonly attribute optional int16u primary3X = 25; + readonly attribute optional int16u primary3Y = 26; + readonly attribute optional nullable int8u primary3Intensity = 27; + readonly attribute optional int16u primary4X = 32; + readonly attribute optional int16u primary4Y = 33; + readonly attribute optional nullable int8u primary4Intensity = 34; + readonly attribute optional int16u primary5X = 36; + readonly attribute optional int16u primary5Y = 37; + readonly attribute optional nullable int8u primary5Intensity = 38; + readonly attribute optional int16u primary6X = 40; + readonly attribute optional int16u primary6Y = 41; + readonly attribute optional nullable int8u primary6Intensity = 42; + attribute access(write: manage) optional int16u whitePointX = 48; + attribute access(write: manage) optional int16u whitePointY = 49; + attribute access(write: manage) optional int16u colorPointRX = 50; + attribute access(write: manage) optional int16u colorPointRY = 51; + attribute access(write: manage) optional nullable int8u colorPointRIntensity = 52; + attribute access(write: manage) optional int16u colorPointGX = 54; + attribute access(write: manage) optional int16u colorPointGY = 55; + attribute access(write: manage) optional nullable int8u colorPointGIntensity = 56; + attribute access(write: manage) optional int16u colorPointBX = 58; + attribute access(write: manage) optional int16u colorPointBY = 59; + attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; + readonly attribute optional int16u enhancedCurrentHue = 16384; readonly attribute enum8 enhancedColorMode = 16385; + readonly attribute optional int8u colorLoopActive = 16386; + readonly attribute optional int8u colorLoopDirection = 16387; + readonly attribute optional int16u colorLoopTime = 16388; + readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; + readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; readonly attribute bitmap16 colorCapabilities = 16394; - readonly attribute int16u colorTempPhysicalMinMireds = 16395; - readonly attribute int16u colorTempPhysicalMaxMireds = 16396; - readonly attribute int16u coupleColorTempToLevelMinMireds = 16397; - attribute access(write: manage) nullable int16u startUpColorTemperatureMireds = 16400; + readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; + readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; + readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; + attribute access(write: manage) optional nullable int16u startUpColorTemperatureMireds = 16400; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1550,24 +1666,43 @@ server cluster ColorControl = 768 { bitmap8 optionsOverride = 6; } + /** Move to specified hue. */ command MoveToHue(MoveToHueRequest): DefaultSuccess = 0; + /** Move hue up or down at specified rate. */ command MoveHue(MoveHueRequest): DefaultSuccess = 1; + /** Step hue up or down by specified size at specified rate. */ command StepHue(StepHueRequest): DefaultSuccess = 2; + /** Move to specified saturation. */ command MoveToSaturation(MoveToSaturationRequest): DefaultSuccess = 3; + /** Move saturation up or down at specified rate. */ command MoveSaturation(MoveSaturationRequest): DefaultSuccess = 4; + /** Step saturation up or down by specified size at specified rate. */ command StepSaturation(StepSaturationRequest): DefaultSuccess = 5; + /** Move to hue and saturation. */ command MoveToHueAndSaturation(MoveToHueAndSaturationRequest): DefaultSuccess = 6; + /** Move to specified color. */ command MoveToColor(MoveToColorRequest): DefaultSuccess = 7; + /** Moves the color. */ command MoveColor(MoveColorRequest): DefaultSuccess = 8; + /** Steps the lighting to a specific color. */ command StepColor(StepColorRequest): DefaultSuccess = 9; + /** Move to a specific color temperature. */ command MoveToColorTemperature(MoveToColorTemperatureRequest): DefaultSuccess = 10; + /** Command description for EnhancedMoveToHue */ command EnhancedMoveToHue(EnhancedMoveToHueRequest): DefaultSuccess = 64; + /** Command description for EnhancedMoveHue */ command EnhancedMoveHue(EnhancedMoveHueRequest): DefaultSuccess = 65; + /** Command description for EnhancedStepHue */ command EnhancedStepHue(EnhancedStepHueRequest): DefaultSuccess = 66; + /** Command description for EnhancedMoveToHueAndSaturation */ command EnhancedMoveToHueAndSaturation(EnhancedMoveToHueAndSaturationRequest): DefaultSuccess = 67; + /** Command description for ColorLoopSet */ command ColorLoopSet(ColorLoopSetRequest): DefaultSuccess = 68; + /** Command description for StopMoveStep */ command StopMoveStep(StopMoveStepRequest): DefaultSuccess = 71; + /** Command description for MoveColorTemperature */ command MoveColorTemperature(MoveColorTemperatureRequest): DefaultSuccess = 75; + /** Command description for StepColorTemperature */ command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76; } diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index d5d9264c3939bf..fef9187b21a9d6 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -40,11 +40,19 @@ server cluster Identify = 3 { int16u identifyTime = 0; } + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -68,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -138,6 +152,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -147,7 +162,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -client cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -171,7 +186,7 @@ client cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -230,7 +245,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -245,7 +260,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -317,14 +332,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -333,10 +350,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -412,7 +431,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -485,6 +504,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -492,7 +512,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -509,7 +529,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -537,8 +557,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -548,7 +568,7 @@ server cluster TimeFormatLocalization = 44 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -587,17 +607,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -608,13 +628,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -695,12 +718,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -713,6 +739,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -732,48 +765,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -808,11 +852,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -896,12 +948,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -920,12 +972,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -946,10 +1000,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -957,11 +1011,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1002,13 +1057,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1061,15 +1119,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1083,6 +1155,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1095,38 +1173,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1181,27 +1247,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1219,7 +1289,7 @@ server cluster FixedLabel = 64 { } /** This cluster provides an interface to a boolean state called StateValue. */ -server cluster BooleanState = 69 { +cluster BooleanState = 69 { revision 1; info event StateChange = 0 { diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index ef43de5f8a3f87..283a0a236d7eb4 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -40,11 +40,19 @@ server cluster Identify = 3 { int16u identifyTime = 0; } + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -68,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -150,10 +164,10 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; - readonly attribute boolean globalSceneControl = 16384; - attribute int16u onTime = 16385; - attribute int16u offWaitTime = 16386; - attribute access(write: manage) nullable StartUpOnOffEnum startUpOnOff = 16387; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -161,13 +175,33 @@ server cluster OnOff = 6 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + request struct OffWithEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + enum8 effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControlBitmap onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ -server cluster LevelControl = 8 { +cluster LevelControl = 8 { revision 5; enum MoveModeEnum : enum8 { @@ -192,12 +226,19 @@ server cluster LevelControl = 8 { } readonly attribute nullable int8u currentLevel = 0; - readonly attribute int16u remainingTime = 1; - readonly attribute int8u minLevel = 2; - readonly attribute int8u maxLevel = 3; + readonly attribute optional int16u remainingTime = 1; + readonly attribute optional int8u minLevel = 2; + readonly attribute optional int8u maxLevel = 3; + readonly attribute optional int16u currentFrequency = 4; + readonly attribute optional int16u minFrequency = 5; + readonly attribute optional int16u maxFrequency = 6; attribute OptionsBitmap options = 15; + attribute optional int16u onOffTransitionTime = 16; attribute nullable int8u onLevel = 17; - attribute access(write: manage) nullable int8u startUpCurrentLevel = 16384; + attribute optional nullable int16u onTransitionTime = 18; + attribute optional nullable int16u offTransitionTime = 19; + attribute optional nullable int8u defaultMoveRate = 20; + attribute access(write: manage) optional nullable int8u startUpCurrentLevel = 16384; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -259,18 +300,33 @@ server cluster LevelControl = 8 { OptionsBitmap optionsOverride = 1; } + request struct MoveToClosestFrequencyRequest { + int16u frequency = 0; + } + + /** Command description for MoveToLevel */ command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + /** Command description for Move */ command Move(MoveRequest): DefaultSuccess = 1; + /** Command description for Step */ command Step(StepRequest): DefaultSuccess = 2; + /** Command description for Stop */ command Stop(StopRequest): DefaultSuccess = 3; + /** Command description for MoveToLevelWithOnOff */ command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + /** Command description for MoveWithOnOff */ command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + /** Command description for StepWithOnOff */ command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + /** Command description for StopWithOnOff */ command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; + /** Change the currrent frequency to the provided one, or a close + approximation if the exact provided one is not possible. */ + command MoveToClosestFrequency(MoveToClosestFrequencyRequest): DefaultSuccess = 8; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -293,6 +349,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -302,7 +359,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -client cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -326,7 +383,7 @@ client cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -385,7 +442,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -400,7 +457,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -472,14 +529,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -488,10 +547,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -567,7 +628,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -640,6 +701,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -647,7 +709,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -664,7 +726,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -692,8 +754,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -703,7 +765,7 @@ server cluster TimeFormatLocalization = 44 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -742,17 +804,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -763,13 +825,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -850,12 +915,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -868,6 +936,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -887,48 +962,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -963,11 +1049,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -1051,12 +1145,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1075,12 +1169,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -1101,10 +1197,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1112,11 +1208,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1157,13 +1254,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1216,15 +1316,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1238,6 +1352,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1250,38 +1370,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1336,27 +1444,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1374,7 +1486,7 @@ server cluster FixedLabel = 64 { } /** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ -client cluster OccupancySensing = 1030 { +cluster OccupancySensing = 1030 { revision 3; enum OccupancySensorTypeEnum : enum8 { diff --git a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter index 14ba05083d114d..80a118a7fdb7df 100644 --- a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter +++ b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -73,6 +75,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -85,7 +88,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -144,7 +147,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -159,7 +162,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -231,15 +234,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute boolean reachable = 17; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -248,13 +252,15 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Nodes should be expected to be deployed to any and all regions of the world. These global regions may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -271,7 +277,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -299,6 +305,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -311,7 +319,7 @@ server cluster TimeFormatLocalization = 44 { may have differing preferences for the units in which values are conveyed in communication to a user. As such, Nodes that visually or audibly convey measurable values to the user need a mechanism by which they can be configured to use a user’s preferred unit. */ -server cluster UnitLocalization = 45 { +cluster UnitLocalization = 45 { revision 1; enum TempUnitEnum : enum8 { @@ -324,7 +332,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute access(write: manage) TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) optional TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -334,7 +342,7 @@ server cluster UnitLocalization = 45 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -373,17 +381,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -394,13 +402,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -481,12 +492,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -499,6 +513,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -518,48 +539,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -643,12 +675,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -667,12 +699,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster WiFiNetworkDiagnostics = 54 { +cluster WiFiNetworkDiagnostics = 54 { revision 1; // NOTE: Default/not specifically set enum AssociationFailureCauseEnum : enum8 { @@ -729,14 +763,14 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; - readonly attribute nullable int32u beaconLostCount = 5; - readonly attribute nullable int32u beaconRxCount = 6; - readonly attribute nullable int32u packetMulticastRxCount = 7; - readonly attribute nullable int32u packetMulticastTxCount = 8; - readonly attribute nullable int32u packetUnicastRxCount = 9; - readonly attribute nullable int32u packetUnicastTxCount = 10; - readonly attribute nullable int64u currentMaxRate = 11; - readonly attribute nullable int64u overrunCount = 12; + readonly attribute optional nullable int32u beaconLostCount = 5; + readonly attribute optional nullable int32u beaconRxCount = 6; + readonly attribute optional nullable int32u packetMulticastRxCount = 7; + readonly attribute optional nullable int32u packetMulticastTxCount = 8; + readonly attribute optional nullable int32u packetUnicastRxCount = 9; + readonly attribute optional nullable int32u packetUnicastTxCount = 10; + readonly attribute optional nullable int64u currentMaxRate = 11; + readonly attribute optional nullable int64u overrunCount = 12; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -744,11 +778,12 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 */ command ResetCounts(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -789,13 +824,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -848,15 +886,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -870,6 +922,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -882,38 +940,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -968,26 +1014,30 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** This cluster supports remotely monitoring and, where supported, changing the operational state of any device where a state machine is a part of the operation. */ -server cluster OperationalState = 96 { +cluster OperationalState = 96 { revision 1; // NOTE: Default/not specifically set enum ErrorStateEnum : enum8 { @@ -1027,7 +1077,7 @@ server cluster OperationalState = 96 { readonly attribute nullable char_string phaseList[] = 0; readonly attribute nullable int8u currentPhase = 1; - readonly attribute nullable elapsed_s countdownTime = 2; + readonly attribute optional nullable elapsed_s countdownTime = 2; readonly attribute OperationalStateStruct operationalStateList[] = 3; readonly attribute OperationalStateEnum operationalState = 4; readonly attribute ErrorStateStruct operationalError = 5; @@ -1042,9 +1092,13 @@ server cluster OperationalState = 96 { ErrorStateStruct commandResponseState = 0; } + /** Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. */ command Pause(): OperationalCommandResponse = 0; + /** Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. */ command Stop(): OperationalCommandResponse = 1; + /** Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it can be started. */ command Start(): OperationalCommandResponse = 2; + /** Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). */ command Resume(): OperationalCommandResponse = 3; } diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index 8920a94371f28b..7509cad970a8da 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -40,11 +40,19 @@ server cluster Identify = 3 { int16u identifyTime = 0; } + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -68,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -138,6 +152,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -147,7 +162,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -client cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -171,7 +186,7 @@ client cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -230,7 +245,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -245,7 +260,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -317,14 +332,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -333,10 +350,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -412,7 +431,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -485,6 +504,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -492,7 +512,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -509,7 +529,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -537,8 +557,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -548,7 +568,7 @@ server cluster TimeFormatLocalization = 44 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -587,17 +607,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -608,13 +628,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -695,12 +718,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -713,6 +739,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -732,48 +765,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -808,11 +852,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -896,12 +948,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -920,12 +972,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -946,10 +1000,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -957,11 +1011,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1002,13 +1057,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1061,15 +1119,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1083,6 +1155,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1095,38 +1173,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1181,27 +1247,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1219,7 +1289,7 @@ server cluster FixedLabel = 64 { } /** An interface to a generic way to secure a door */ -server cluster DoorLock = 257 { +cluster DoorLock = 257 { revision 7; enum AlarmCodeEnum : enum8 { @@ -1602,18 +1672,39 @@ server cluster DoorLock = 257 { readonly attribute nullable DlLockState lockState = 0; readonly attribute DlLockType lockType = 1; readonly attribute boolean actuatorEnabled = 2; - readonly attribute int16u numberOfTotalUsersSupported = 17; - readonly attribute int16u numberOfPINUsersSupported = 18; - readonly attribute int8u maxPINCodeLength = 23; - readonly attribute int8u minPINCodeLength = 24; - readonly attribute int8u numberOfCredentialsSupportedPerUser = 28; + readonly attribute optional nullable DoorStateEnum doorState = 3; + attribute access(write: manage) optional int32u doorOpenEvents = 4; + attribute access(write: manage) optional int32u doorClosedEvents = 5; + attribute access(write: manage) optional int16u openPeriod = 6; + readonly attribute optional int16u numberOfTotalUsersSupported = 17; + readonly attribute optional int16u numberOfPINUsersSupported = 18; + readonly attribute optional int16u numberOfRFIDUsersSupported = 19; + readonly attribute optional int8u numberOfWeekDaySchedulesSupportedPerUser = 20; + readonly attribute optional int8u numberOfYearDaySchedulesSupportedPerUser = 21; + readonly attribute optional int8u numberOfHolidaySchedulesSupported = 22; + readonly attribute optional int8u maxPINCodeLength = 23; + readonly attribute optional int8u minPINCodeLength = 24; + readonly attribute optional int8u maxRFIDCodeLength = 25; + readonly attribute optional int8u minRFIDCodeLength = 26; + readonly attribute optional DlCredentialRuleMask credentialRulesSupport = 27; + readonly attribute optional int8u numberOfCredentialsSupportedPerUser = 28; + attribute access(write: manage) optional char_string<3> language = 33; + attribute access(write: manage) optional int8u LEDSettings = 34; attribute access(write: manage) int32u autoRelockTime = 35; + attribute access(write: manage) optional int8u soundVolume = 36; attribute access(write: manage) OperatingModeEnum operatingMode = 37; readonly attribute DlSupportedOperatingModes supportedOperatingModes = 38; - attribute access(write: administer) int8u wrongCodeEntryLimit = 48; - attribute access(write: administer) int8u userCodeTemporaryDisableTime = 49; - attribute access(write: administer) boolean sendPINOverTheAir = 50; - attribute access(write: administer) boolean requirePINforRemoteOperation = 51; + readonly attribute optional DlDefaultConfigurationRegister defaultConfigurationRegister = 39; + attribute access(write: administer) optional boolean enableLocalProgramming = 40; + attribute access(write: manage) optional boolean enableOneTouchLocking = 41; + attribute access(write: manage) optional boolean enableInsideStatusLED = 42; + attribute access(write: manage) optional boolean enablePrivacyModeButton = 43; + attribute access(write: administer) optional DlLocalProgrammingFeatures localProgrammingFeatures = 44; + attribute access(write: administer) optional int8u wrongCodeEntryLimit = 48; + attribute access(write: administer) optional int8u userCodeTemporaryDisableTime = 49; + attribute access(write: administer) optional boolean sendPINOverTheAir = 50; + attribute access(write: administer) optional boolean requirePINforRemoteOperation = 51; + attribute access(write: administer) optional int16u expiringUserTimeout = 53; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1634,39 +1725,97 @@ server cluster DoorLock = 257 { optional octet_string PINCode = 1; } - request struct SetUserRequest { - DataOperationTypeEnum operationType = 0; + request struct SetWeekDayScheduleRequest { + int8u weekDayIndex = 0; int16u userIndex = 1; - nullable char_string userName = 2; - nullable int32u userUniqueID = 3; - nullable UserStatusEnum userStatus = 4; - nullable UserTypeEnum userType = 5; - nullable CredentialRuleEnum credentialRule = 6; + DaysMaskMap daysMask = 2; + int8u startHour = 3; + int8u startMinute = 4; + int8u endHour = 5; + int8u endMinute = 6; } - request struct GetUserRequest { - int16u userIndex = 0; + request struct GetWeekDayScheduleRequest { + int8u weekDayIndex = 0; + int16u userIndex = 1; } - request struct ClearUserRequest { - int16u userIndex = 0; + response struct GetWeekDayScheduleResponse = 12 { + int8u weekDayIndex = 0; + int16u userIndex = 1; + DlStatus status = 2; + optional DaysMaskMap daysMask = 3; + optional int8u startHour = 4; + optional int8u startMinute = 5; + optional int8u endHour = 6; + optional int8u endMinute = 7; } - request struct SetCredentialRequest { + request struct ClearWeekDayScheduleRequest { + int8u weekDayIndex = 0; + int16u userIndex = 1; + } + + request struct SetYearDayScheduleRequest { + int8u yearDayIndex = 0; + int16u userIndex = 1; + epoch_s localStartTime = 2; + epoch_s localEndTime = 3; + } + + request struct GetYearDayScheduleRequest { + int8u yearDayIndex = 0; + int16u userIndex = 1; + } + + response struct GetYearDayScheduleResponse = 15 { + int8u yearDayIndex = 0; + int16u userIndex = 1; + DlStatus status = 2; + optional epoch_s localStartTime = 3; + optional epoch_s localEndTime = 4; + } + + request struct ClearYearDayScheduleRequest { + int8u yearDayIndex = 0; + int16u userIndex = 1; + } + + request struct SetHolidayScheduleRequest { + int8u holidayIndex = 0; + epoch_s localStartTime = 1; + epoch_s localEndTime = 2; + OperatingModeEnum operatingMode = 3; + } + + request struct GetHolidayScheduleRequest { + int8u holidayIndex = 0; + } + + response struct GetHolidayScheduleResponse = 18 { + int8u holidayIndex = 0; + DlStatus status = 1; + optional epoch_s localStartTime = 2; + optional epoch_s localEndTime = 3; + optional OperatingModeEnum operatingMode = 4; + } + + request struct ClearHolidayScheduleRequest { + int8u holidayIndex = 0; + } + + request struct SetUserRequest { DataOperationTypeEnum operationType = 0; - CredentialStruct credential = 1; - LONG_OCTET_STRING credentialData = 2; - nullable int16u userIndex = 3; + int16u userIndex = 1; + nullable char_string userName = 2; + nullable int32u userUniqueID = 3; nullable UserStatusEnum userStatus = 4; nullable UserTypeEnum userType = 5; + nullable CredentialRuleEnum credentialRule = 6; } - request struct GetCredentialStatusRequest { - CredentialStruct credential = 0; - } - - request struct ClearCredentialRequest { - nullable CredentialStruct credential = 0; + request struct GetUserRequest { + int16u userIndex = 0; } response struct GetUserResponse = 28 { @@ -1682,12 +1831,29 @@ server cluster DoorLock = 257 { nullable int16u nextUserIndex = 9; } + request struct ClearUserRequest { + int16u userIndex = 0; + } + + request struct SetCredentialRequest { + DataOperationTypeEnum operationType = 0; + CredentialStruct credential = 1; + LONG_OCTET_STRING credentialData = 2; + nullable int16u userIndex = 3; + nullable UserStatusEnum userStatus = 4; + nullable UserTypeEnum userType = 5; + } + response struct SetCredentialResponse = 35 { DlStatus status = 0; nullable int16u userIndex = 1; nullable int16u nextCredentialIndex = 2; } + request struct GetCredentialStatusRequest { + CredentialStruct credential = 0; + } + response struct GetCredentialStatusResponse = 37 { boolean credentialExists = 0; nullable int16u userIndex = 1; @@ -1696,15 +1862,52 @@ server cluster DoorLock = 257 { nullable int16u nextCredentialIndex = 4; } + request struct ClearCredentialRequest { + nullable CredentialStruct credential = 0; + } + + request struct UnboltDoorRequest { + optional octet_string PINCode = 0; + } + + /** This command causes the lock device to lock the door. */ timed command LockDoor(LockDoorRequest): DefaultSuccess = 0; + /** This command causes the lock device to unlock the door. */ timed command UnlockDoor(UnlockDoorRequest): DefaultSuccess = 1; + /** This command causes the lock device to unlock the door with a timeout parameter. */ timed command UnlockWithTimeout(UnlockWithTimeoutRequest): DefaultSuccess = 3; + /** Set a weekly repeating schedule for a specified user. */ + command access(invoke: administer) SetWeekDaySchedule(SetWeekDayScheduleRequest): DefaultSuccess = 11; + /** Retrieve the specific weekly schedule for the specific user. */ + command access(invoke: administer) GetWeekDaySchedule(GetWeekDayScheduleRequest): GetWeekDayScheduleResponse = 12; + /** Clear the specific weekly schedule or all weekly schedules for the specific user. */ + command access(invoke: administer) ClearWeekDaySchedule(ClearWeekDayScheduleRequest): DefaultSuccess = 13; + /** Set a time-specific schedule ID for a specified user. */ + command access(invoke: administer) SetYearDaySchedule(SetYearDayScheduleRequest): DefaultSuccess = 14; + /** Returns the year day schedule data for the specified schedule and user indexes. */ + command access(invoke: administer) GetYearDaySchedule(GetYearDayScheduleRequest): GetYearDayScheduleResponse = 15; + /** Clears the specific year day schedule or all year day schedules for the specific user. */ + command access(invoke: administer) ClearYearDaySchedule(ClearYearDayScheduleRequest): DefaultSuccess = 16; + /** Set the holiday Schedule by specifying local start time and local end time with respect to any Lock Operating Mode. */ + command access(invoke: administer) SetHolidaySchedule(SetHolidayScheduleRequest): DefaultSuccess = 17; + /** Get the holiday schedule for the specified index. */ + command access(invoke: administer) GetHolidaySchedule(GetHolidayScheduleRequest): GetHolidayScheduleResponse = 18; + /** Clears the holiday schedule or all holiday schedules. */ + command access(invoke: administer) ClearHolidaySchedule(ClearHolidayScheduleRequest): DefaultSuccess = 19; + /** Set User into the lock. */ timed command access(invoke: administer) SetUser(SetUserRequest): DefaultSuccess = 26; + /** Retrieve User. */ command access(invoke: administer) GetUser(GetUserRequest): GetUserResponse = 27; + /** Clears a User or all Users. */ timed command access(invoke: administer) ClearUser(ClearUserRequest): DefaultSuccess = 29; + /** Set a credential (e.g. PIN, RFID, Fingerprint, etc.) into the lock for a new user, existing user, or ProgrammingUser. */ timed command access(invoke: administer) SetCredential(SetCredentialRequest): SetCredentialResponse = 34; + /** Retrieve the status of a particular credential (e.g. PIN, RFID, Fingerprint, etc.) by index. */ command access(invoke: administer) GetCredentialStatus(GetCredentialStatusRequest): GetCredentialStatusResponse = 36; + /** Clear one, one type, or all credentials except ProgrammingPIN credential. */ timed command access(invoke: administer) ClearCredential(ClearCredentialRequest): DefaultSuccess = 38; + /** This command causes the lock device to unlock the door without pulling the latch. */ + timed command UnboltDoor(UnboltDoorRequest): DefaultSuccess = 39; } endpoint 0 { diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index a1d647da6fafb2..83ffd87792f0b5 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -40,11 +40,19 @@ server cluster Identify = 3 { int16u identifyTime = 0; } + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -68,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -150,10 +164,10 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; - readonly attribute boolean globalSceneControl = 16384; - attribute int16u onTime = 16385; - attribute int16u offWaitTime = 16386; - attribute access(write: manage) nullable StartUpOnOffEnum startUpOnOff = 16387; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -161,13 +175,33 @@ server cluster OnOff = 6 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + request struct OffWithEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + enum8 effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControlBitmap onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ -server cluster LevelControl = 8 { +cluster LevelControl = 8 { revision 5; enum MoveModeEnum : enum8 { @@ -192,12 +226,19 @@ server cluster LevelControl = 8 { } readonly attribute nullable int8u currentLevel = 0; - readonly attribute int16u remainingTime = 1; - readonly attribute int8u minLevel = 2; - readonly attribute int8u maxLevel = 3; + readonly attribute optional int16u remainingTime = 1; + readonly attribute optional int8u minLevel = 2; + readonly attribute optional int8u maxLevel = 3; + readonly attribute optional int16u currentFrequency = 4; + readonly attribute optional int16u minFrequency = 5; + readonly attribute optional int16u maxFrequency = 6; attribute OptionsBitmap options = 15; + attribute optional int16u onOffTransitionTime = 16; attribute nullable int8u onLevel = 17; - attribute access(write: manage) nullable int8u startUpCurrentLevel = 16384; + attribute optional nullable int16u onTransitionTime = 18; + attribute optional nullable int16u offTransitionTime = 19; + attribute optional nullable int8u defaultMoveRate = 20; + attribute access(write: manage) optional nullable int8u startUpCurrentLevel = 16384; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -259,18 +300,33 @@ server cluster LevelControl = 8 { OptionsBitmap optionsOverride = 1; } + request struct MoveToClosestFrequencyRequest { + int16u frequency = 0; + } + + /** Command description for MoveToLevel */ command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + /** Command description for Move */ command Move(MoveRequest): DefaultSuccess = 1; + /** Command description for Step */ command Step(StepRequest): DefaultSuccess = 2; + /** Command description for Stop */ command Stop(StopRequest): DefaultSuccess = 3; + /** Command description for MoveToLevelWithOnOff */ command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + /** Command description for MoveWithOnOff */ command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + /** Command description for StepWithOnOff */ command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + /** Command description for StopWithOnOff */ command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; + /** Change the currrent frequency to the provided one, or a close + approximation if the exact provided one is not possible. */ + command MoveToClosestFrequency(MoveToClosestFrequencyRequest): DefaultSuccess = 8; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -293,6 +349,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -302,7 +359,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -client cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -326,7 +383,7 @@ client cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -385,7 +442,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -400,7 +457,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -472,14 +529,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -488,10 +547,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -567,7 +628,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -640,6 +701,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -647,7 +709,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -664,7 +726,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -692,8 +754,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -703,7 +765,7 @@ server cluster TimeFormatLocalization = 44 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -742,17 +804,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -763,13 +825,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -850,12 +915,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -868,6 +936,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -887,48 +962,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -963,11 +1049,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -1051,12 +1145,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1075,12 +1169,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -1101,10 +1197,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1112,11 +1208,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1157,13 +1254,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1216,15 +1316,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1238,6 +1352,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1250,38 +1370,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1336,27 +1444,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1374,7 +1486,7 @@ server cluster FixedLabel = 64 { } /** Attributes and commands for controlling the color properties of a color-capable light. */ -server cluster ColorControl = 768 { +cluster ColorControl = 768 { revision 6; enum ColorLoopAction : enum8 { @@ -1446,27 +1558,58 @@ server cluster ColorControl = 768 { kColorTemperature = 0x10; } - readonly attribute int8u currentHue = 0; - readonly attribute int8u currentSaturation = 1; - readonly attribute int16u remainingTime = 2; - readonly attribute int16u currentX = 3; - readonly attribute int16u currentY = 4; - readonly attribute int16u colorTemperatureMireds = 7; + readonly attribute optional int8u currentHue = 0; + readonly attribute optional int8u currentSaturation = 1; + readonly attribute optional int16u remainingTime = 2; + readonly attribute optional int16u currentX = 3; + readonly attribute optional int16u currentY = 4; + readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional char_string<254> compensationText = 6; + readonly attribute optional int16u colorTemperatureMireds = 7; readonly attribute enum8 colorMode = 8; attribute bitmap8 options = 15; readonly attribute nullable int8u numberOfPrimaries = 16; - readonly attribute int16u enhancedCurrentHue = 16384; + readonly attribute optional int16u primary1X = 17; + readonly attribute optional int16u primary1Y = 18; + readonly attribute optional nullable int8u primary1Intensity = 19; + readonly attribute optional int16u primary2X = 21; + readonly attribute optional int16u primary2Y = 22; + readonly attribute optional nullable int8u primary2Intensity = 23; + readonly attribute optional int16u primary3X = 25; + readonly attribute optional int16u primary3Y = 26; + readonly attribute optional nullable int8u primary3Intensity = 27; + readonly attribute optional int16u primary4X = 32; + readonly attribute optional int16u primary4Y = 33; + readonly attribute optional nullable int8u primary4Intensity = 34; + readonly attribute optional int16u primary5X = 36; + readonly attribute optional int16u primary5Y = 37; + readonly attribute optional nullable int8u primary5Intensity = 38; + readonly attribute optional int16u primary6X = 40; + readonly attribute optional int16u primary6Y = 41; + readonly attribute optional nullable int8u primary6Intensity = 42; + attribute access(write: manage) optional int16u whitePointX = 48; + attribute access(write: manage) optional int16u whitePointY = 49; + attribute access(write: manage) optional int16u colorPointRX = 50; + attribute access(write: manage) optional int16u colorPointRY = 51; + attribute access(write: manage) optional nullable int8u colorPointRIntensity = 52; + attribute access(write: manage) optional int16u colorPointGX = 54; + attribute access(write: manage) optional int16u colorPointGY = 55; + attribute access(write: manage) optional nullable int8u colorPointGIntensity = 56; + attribute access(write: manage) optional int16u colorPointBX = 58; + attribute access(write: manage) optional int16u colorPointBY = 59; + attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; + readonly attribute optional int16u enhancedCurrentHue = 16384; readonly attribute enum8 enhancedColorMode = 16385; - readonly attribute int8u colorLoopActive = 16386; - readonly attribute int8u colorLoopDirection = 16387; - readonly attribute int16u colorLoopTime = 16388; - readonly attribute int16u colorLoopStartEnhancedHue = 16389; - readonly attribute int16u colorLoopStoredEnhancedHue = 16390; + readonly attribute optional int8u colorLoopActive = 16386; + readonly attribute optional int8u colorLoopDirection = 16387; + readonly attribute optional int16u colorLoopTime = 16388; + readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; + readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; readonly attribute bitmap16 colorCapabilities = 16394; - readonly attribute int16u colorTempPhysicalMinMireds = 16395; - readonly attribute int16u colorTempPhysicalMaxMireds = 16396; - readonly attribute int16u coupleColorTempToLevelMinMireds = 16397; - attribute access(write: manage) nullable int16u startUpColorTemperatureMireds = 16400; + readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; + readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; + readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; + attribute access(write: manage) optional nullable int16u startUpColorTemperatureMireds = 16400; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1622,24 +1765,43 @@ server cluster ColorControl = 768 { bitmap8 optionsOverride = 6; } + /** Move to specified hue. */ command MoveToHue(MoveToHueRequest): DefaultSuccess = 0; + /** Move hue up or down at specified rate. */ command MoveHue(MoveHueRequest): DefaultSuccess = 1; + /** Step hue up or down by specified size at specified rate. */ command StepHue(StepHueRequest): DefaultSuccess = 2; + /** Move to specified saturation. */ command MoveToSaturation(MoveToSaturationRequest): DefaultSuccess = 3; + /** Move saturation up or down at specified rate. */ command MoveSaturation(MoveSaturationRequest): DefaultSuccess = 4; + /** Step saturation up or down by specified size at specified rate. */ command StepSaturation(StepSaturationRequest): DefaultSuccess = 5; + /** Move to hue and saturation. */ command MoveToHueAndSaturation(MoveToHueAndSaturationRequest): DefaultSuccess = 6; + /** Move to specified color. */ command MoveToColor(MoveToColorRequest): DefaultSuccess = 7; + /** Moves the color. */ command MoveColor(MoveColorRequest): DefaultSuccess = 8; + /** Steps the lighting to a specific color. */ command StepColor(StepColorRequest): DefaultSuccess = 9; + /** Move to a specific color temperature. */ command MoveToColorTemperature(MoveToColorTemperatureRequest): DefaultSuccess = 10; + /** Command description for EnhancedMoveToHue */ command EnhancedMoveToHue(EnhancedMoveToHueRequest): DefaultSuccess = 64; + /** Command description for EnhancedMoveHue */ command EnhancedMoveHue(EnhancedMoveHueRequest): DefaultSuccess = 65; + /** Command description for EnhancedStepHue */ command EnhancedStepHue(EnhancedStepHueRequest): DefaultSuccess = 66; + /** Command description for EnhancedMoveToHueAndSaturation */ command EnhancedMoveToHueAndSaturation(EnhancedMoveToHueAndSaturationRequest): DefaultSuccess = 67; + /** Command description for ColorLoopSet */ command ColorLoopSet(ColorLoopSetRequest): DefaultSuccess = 68; + /** Command description for StopMoveStep */ command StopMoveStep(StopMoveStepRequest): DefaultSuccess = 71; + /** Command description for MoveColorTemperature */ command MoveColorTemperature(MoveColorTemperatureRequest): DefaultSuccess = 75; + /** Command description for StepColorTemperature */ command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76; } diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter index c29e963c4fc5c3..797beb4cd54ab9 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -74,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -144,6 +152,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -156,7 +165,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -215,7 +224,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -230,7 +239,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -302,14 +311,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -318,10 +329,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -397,7 +410,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -470,6 +483,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -477,7 +491,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -494,7 +508,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -522,8 +536,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -533,7 +547,7 @@ server cluster TimeFormatLocalization = 44 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -572,17 +586,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -593,13 +607,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -680,12 +697,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -698,6 +718,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -717,48 +744,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -793,11 +831,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -881,12 +927,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -905,12 +951,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -931,10 +979,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -942,11 +990,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -987,13 +1036,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1046,15 +1098,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1068,6 +1134,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1080,38 +1152,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1166,27 +1226,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1204,7 +1268,7 @@ server cluster FixedLabel = 64 { } /** An interface for controlling a fan in a heating/cooling system. */ -provisional server cluster FanControl = 514 { +provisional cluster FanControl = 514 { revision 4; enum AirflowDirectionEnum : enum8 { @@ -1260,19 +1324,29 @@ provisional server cluster FanControl = 514 { readonly attribute FanModeSequenceEnum fanModeSequence = 1; attribute nullable percent percentSetting = 2; readonly attribute percent percentCurrent = 3; - readonly attribute int8u speedMax = 4; - attribute nullable int8u speedSetting = 5; - readonly attribute int8u speedCurrent = 6; - readonly attribute RockBitmap rockSupport = 7; - attribute RockBitmap rockSetting = 8; - readonly attribute WindBitmap windSupport = 9; - attribute WindBitmap windSetting = 10; + readonly attribute optional int8u speedMax = 4; + attribute optional nullable int8u speedSetting = 5; + readonly attribute optional int8u speedCurrent = 6; + readonly attribute optional RockBitmap rockSupport = 7; + attribute optional RockBitmap rockSetting = 8; + readonly attribute optional WindBitmap windSupport = 9; + attribute optional WindBitmap windSetting = 10; + attribute optional AirflowDirectionEnum airflowDirection = 11; 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; + + request struct StepRequest { + StepDirectionEnum direction = 0; + optional boolean wrap = 1; + optional boolean lowestOff = 2; + } + + /** The Step command speeds up or slows down the fan, in steps. */ + command Step(StepRequest): DefaultSuccess = 0; } endpoint 0 { diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index 35533ef666300a..46c512f43947cc 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -40,11 +40,19 @@ server cluster Identify = 3 { int16u identifyTime = 0; } + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -client cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -121,7 +129,7 @@ client cluster Groups = 4 { } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -144,6 +152,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -153,7 +162,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -client cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -177,7 +186,7 @@ client cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -236,7 +245,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -251,7 +260,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -323,14 +332,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -339,10 +350,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -418,7 +431,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -491,6 +504,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -498,7 +512,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -515,7 +529,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -543,8 +557,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -554,7 +568,7 @@ server cluster TimeFormatLocalization = 44 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -593,17 +607,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -614,13 +628,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -701,12 +718,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -719,6 +739,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -738,48 +765,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -814,11 +852,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -902,12 +948,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -926,12 +972,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -952,10 +1000,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -963,11 +1011,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1008,13 +1057,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1067,15 +1119,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1089,6 +1155,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1101,38 +1173,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1187,27 +1247,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1225,13 +1289,13 @@ server cluster FixedLabel = 64 { } /** Attributes and commands for configuring the measurement of flow, and reporting flow measurements. */ -server cluster FlowMeasurement = 1028 { +cluster FlowMeasurement = 1028 { revision 1; // NOTE: Default/not specifically set readonly attribute nullable int16u measuredValue = 0; readonly attribute nullable int16u minMeasuredValue = 1; readonly attribute nullable int16u maxMeasuredValue = 2; - readonly attribute int16u tolerance = 3; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter index 9a191147a58beb..52dc3c1af9436c 100644 --- a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter +++ b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -73,6 +75,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -85,7 +88,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -144,7 +147,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -159,7 +162,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -231,14 +234,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -247,10 +252,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -289,17 +296,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -310,13 +317,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -397,12 +407,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -415,6 +428,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -434,48 +454,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -510,11 +541,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -598,12 +637,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -622,14 +661,16 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { +cluster Switch = 59 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -672,6 +713,7 @@ server cluster Switch = 59 { readonly attribute int8u numberOfPositions = 0; readonly attribute int8u currentPosition = 1; + readonly attribute optional int8u multiPressMax = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -681,7 +723,7 @@ server cluster Switch = 59 { } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -722,13 +764,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -781,15 +826,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -803,6 +862,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -815,38 +880,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -901,21 +954,25 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index 9187a209f8d703..7517795e2f4762 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -40,11 +40,19 @@ server cluster Identify = 3 { int16u identifyTime = 0; } + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -68,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -150,6 +164,10 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -157,13 +175,33 @@ server cluster OnOff = 6 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + request struct OffWithEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + enum8 effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControlBitmap onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ -server cluster LevelControl = 8 { +cluster LevelControl = 8 { revision 5; enum MoveModeEnum : enum8 { @@ -188,10 +226,19 @@ server cluster LevelControl = 8 { } readonly attribute nullable int8u currentLevel = 0; - readonly attribute int8u minLevel = 2; - readonly attribute int8u maxLevel = 3; + readonly attribute optional int16u remainingTime = 1; + readonly attribute optional int8u minLevel = 2; + readonly attribute optional int8u maxLevel = 3; + readonly attribute optional int16u currentFrequency = 4; + readonly attribute optional int16u minFrequency = 5; + readonly attribute optional int16u maxFrequency = 6; attribute OptionsBitmap options = 15; + attribute optional int16u onOffTransitionTime = 16; attribute nullable int8u onLevel = 17; + attribute optional nullable int16u onTransitionTime = 18; + attribute optional nullable int16u offTransitionTime = 19; + attribute optional nullable int8u defaultMoveRate = 20; + attribute access(write: manage) optional nullable int8u startUpCurrentLevel = 16384; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -253,18 +300,33 @@ server cluster LevelControl = 8 { OptionsBitmap optionsOverride = 1; } + request struct MoveToClosestFrequencyRequest { + int16u frequency = 0; + } + + /** Command description for MoveToLevel */ command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + /** Command description for Move */ command Move(MoveRequest): DefaultSuccess = 1; + /** Command description for Step */ command Step(StepRequest): DefaultSuccess = 2; + /** Command description for Stop */ command Stop(StopRequest): DefaultSuccess = 3; + /** Command description for MoveToLevelWithOnOff */ command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + /** Command description for MoveWithOnOff */ command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + /** Command description for StepWithOnOff */ command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + /** Command description for StopWithOnOff */ command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; + /** Change the currrent frequency to the provided one, or a close + approximation if the exact provided one is not possible. */ + command MoveToClosestFrequency(MoveToClosestFrequencyRequest): DefaultSuccess = 8; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -287,6 +349,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -296,7 +359,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -client cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -320,7 +383,7 @@ client cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -379,7 +442,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -394,7 +457,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -466,14 +529,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -482,10 +547,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -561,7 +628,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -634,6 +701,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -641,7 +709,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -658,7 +726,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -686,8 +754,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -697,7 +765,7 @@ server cluster TimeFormatLocalization = 44 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -736,17 +804,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -757,13 +825,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -844,12 +915,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -862,6 +936,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -881,48 +962,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -957,11 +1049,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -1045,12 +1145,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1069,12 +1169,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -1095,10 +1197,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1106,11 +1208,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1151,13 +1254,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1210,15 +1316,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1232,6 +1352,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1244,38 +1370,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1330,27 +1444,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1368,7 +1486,7 @@ server cluster FixedLabel = 64 { } /** An interface for configuring and controlling the functionality of a thermostat. */ -client cluster Thermostat = 513 { +cluster Thermostat = 513 { revision 6; enum SetpointAdjustMode : enum8 { @@ -1527,7 +1645,7 @@ client cluster Thermostat = 513 { } /** An interface for controlling a fan in a heating/cooling system. */ -provisional server cluster FanControl = 514 { +provisional cluster FanControl = 514 { revision 4; enum AirflowDirectionEnum : enum8 { @@ -1583,15 +1701,29 @@ provisional server cluster FanControl = 514 { readonly attribute FanModeSequenceEnum fanModeSequence = 1; attribute nullable percent percentSetting = 2; readonly attribute percent percentCurrent = 3; - readonly attribute int8u speedMax = 4; - attribute nullable int8u speedSetting = 5; - readonly attribute int8u speedCurrent = 6; + readonly attribute optional int8u speedMax = 4; + attribute optional nullable int8u speedSetting = 5; + readonly attribute optional int8u speedCurrent = 6; + readonly attribute optional RockBitmap rockSupport = 7; + attribute optional RockBitmap rockSetting = 8; + readonly attribute optional WindBitmap windSupport = 9; + attribute optional WindBitmap windSetting = 10; + attribute optional AirflowDirectionEnum airflowDirection = 11; 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; + + request struct StepRequest { + StepDirectionEnum direction = 0; + optional boolean wrap = 1; + optional boolean lowestOff = 2; + } + + /** The Step command speeds up or slows down the fan, in steps. */ + command Step(StepRequest): DefaultSuccess = 0; } endpoint 0 { diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index 2f15c1a9bec55a..1d0fcead12104b 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -40,11 +40,19 @@ server cluster Identify = 3 { int16u identifyTime = 0; } + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -client cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -121,7 +129,7 @@ client cluster Groups = 4 { } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -144,6 +152,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -153,7 +162,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -client cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -177,7 +186,7 @@ client cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -236,7 +245,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -251,7 +260,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -323,14 +332,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -339,10 +350,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -418,7 +431,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -491,6 +504,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -498,7 +512,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -515,7 +529,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -543,8 +557,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -554,7 +568,7 @@ server cluster TimeFormatLocalization = 44 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -593,17 +607,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -614,13 +628,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -701,12 +718,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -719,6 +739,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -738,48 +765,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -814,11 +852,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -902,12 +948,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -926,12 +972,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -952,10 +1000,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -963,11 +1011,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1008,13 +1057,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1067,15 +1119,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1089,6 +1155,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1101,38 +1173,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1187,27 +1247,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1225,13 +1289,13 @@ server cluster FixedLabel = 64 { } /** Attributes and commands for configuring the measurement of relative humidity, and reporting relative humidity measurements. */ -server cluster RelativeHumidityMeasurement = 1029 { +cluster RelativeHumidityMeasurement = 1029 { revision 3; readonly attribute nullable int16u measuredValue = 0; readonly attribute nullable int16u minMeasuredValue = 1; readonly attribute nullable int16u maxMeasuredValue = 2; - readonly attribute int16u tolerance = 3; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter index 687ad1becde51d..0457bf0d8ba7fc 100644 --- a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter +++ b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -73,6 +75,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -85,7 +88,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -144,7 +147,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -159,7 +162,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -231,15 +234,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute boolean reachable = 17; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -248,13 +252,15 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Nodes should be expected to be deployed to any and all regions of the world. These global regions may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -271,7 +277,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -299,6 +305,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -311,7 +319,7 @@ server cluster TimeFormatLocalization = 44 { may have differing preferences for the units in which values are conveyed in communication to a user. As such, Nodes that visually or audibly convey measurable values to the user need a mechanism by which they can be configured to use a user’s preferred unit. */ -server cluster UnitLocalization = 45 { +cluster UnitLocalization = 45 { revision 1; enum TempUnitEnum : enum8 { @@ -324,7 +332,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute access(write: manage) TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) optional TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -334,7 +342,7 @@ server cluster UnitLocalization = 45 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -373,17 +381,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -394,13 +402,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -481,12 +492,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -499,6 +513,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -518,48 +539,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -643,12 +675,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -667,12 +699,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster WiFiNetworkDiagnostics = 54 { +cluster WiFiNetworkDiagnostics = 54 { revision 1; // NOTE: Default/not specifically set enum AssociationFailureCauseEnum : enum8 { @@ -729,14 +763,14 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; - readonly attribute nullable int32u beaconLostCount = 5; - readonly attribute nullable int32u beaconRxCount = 6; - readonly attribute nullable int32u packetMulticastRxCount = 7; - readonly attribute nullable int32u packetMulticastTxCount = 8; - readonly attribute nullable int32u packetUnicastRxCount = 9; - readonly attribute nullable int32u packetUnicastTxCount = 10; - readonly attribute nullable int64u currentMaxRate = 11; - readonly attribute nullable int64u overrunCount = 12; + readonly attribute optional nullable int32u beaconLostCount = 5; + readonly attribute optional nullable int32u beaconRxCount = 6; + readonly attribute optional nullable int32u packetMulticastRxCount = 7; + readonly attribute optional nullable int32u packetMulticastTxCount = 8; + readonly attribute optional nullable int32u packetUnicastRxCount = 9; + readonly attribute optional nullable int32u packetUnicastTxCount = 10; + readonly attribute optional nullable int64u currentMaxRate = 11; + readonly attribute optional nullable int64u overrunCount = 12; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -744,11 +778,12 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 */ command ResetCounts(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -789,13 +824,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -848,15 +886,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -870,6 +922,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -882,38 +940,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -968,26 +1014,30 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** This cluster supports remotely monitoring and, where supported, changing the operational state of any device where a state machine is a part of the operation. */ -server cluster OperationalState = 96 { +cluster OperationalState = 96 { revision 1; // NOTE: Default/not specifically set enum ErrorStateEnum : enum8 { @@ -1027,6 +1077,7 @@ server cluster OperationalState = 96 { readonly attribute nullable char_string phaseList[] = 0; readonly attribute nullable int8u currentPhase = 1; + readonly attribute optional nullable elapsed_s countdownTime = 2; readonly attribute OperationalStateStruct operationalStateList[] = 3; readonly attribute OperationalStateEnum operationalState = 4; readonly attribute ErrorStateStruct operationalError = 5; @@ -1041,9 +1092,14 @@ server cluster OperationalState = 96 { ErrorStateStruct commandResponseState = 0; } + /** Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. */ command Pause(): OperationalCommandResponse = 0; + /** Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. */ command Stop(): OperationalCommandResponse = 1; + /** Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it can be started. */ command Start(): OperationalCommandResponse = 2; + /** Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). */ + command Resume(): OperationalCommandResponse = 3; } endpoint 0 { diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index 2d66aead52b704..fc0609ef1469b1 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -40,11 +40,19 @@ server cluster Identify = 3 { int16u identifyTime = 0; } + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -client cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -121,7 +129,7 @@ client cluster Groups = 4 { } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -144,6 +152,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -153,7 +162,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -client cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -177,7 +186,7 @@ client cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -236,7 +245,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -251,7 +260,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -323,14 +332,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -339,10 +350,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -418,7 +431,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -491,6 +504,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -498,7 +512,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -515,7 +529,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -543,8 +557,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -554,7 +568,7 @@ server cluster TimeFormatLocalization = 44 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -593,17 +607,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -614,13 +628,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -701,12 +718,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -719,6 +739,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -738,48 +765,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -814,11 +852,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -902,12 +948,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -926,12 +972,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -952,10 +1000,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -963,11 +1011,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1008,13 +1057,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1067,15 +1119,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1089,6 +1155,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1101,38 +1173,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1187,27 +1247,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1225,7 +1289,7 @@ server cluster FixedLabel = 64 { } /** Attributes and commands for configuring the measurement of illuminance, and reporting illuminance measurements. */ -server cluster IlluminanceMeasurement = 1024 { +cluster IlluminanceMeasurement = 1024 { revision 3; enum LightSensorTypeEnum : enum8 { @@ -1236,7 +1300,8 @@ server cluster IlluminanceMeasurement = 1024 { readonly attribute nullable int16u measuredValue = 0; readonly attribute nullable int16u minMeasuredValue = 1; readonly attribute nullable int16u maxMeasuredValue = 2; - readonly attribute nullable LightSensorTypeEnum lightSensorType = 4; + readonly attribute optional int16u tolerance = 3; + readonly attribute optional nullable LightSensorTypeEnum lightSensorType = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index 7d09f158e883e6..75b1df739861ad 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -40,11 +40,19 @@ server cluster Identify = 3 { int16u identifyTime = 0; } + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -client cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -121,7 +129,7 @@ client cluster Groups = 4 { } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -144,6 +152,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -153,7 +162,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -client cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -177,7 +186,7 @@ client cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -236,7 +245,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -251,7 +260,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -323,14 +332,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -339,10 +350,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -418,7 +431,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -491,6 +504,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -498,7 +512,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -515,7 +529,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -543,8 +557,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -554,7 +568,7 @@ server cluster TimeFormatLocalization = 44 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -593,17 +607,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -614,13 +628,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -701,12 +718,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -719,6 +739,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -738,48 +765,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -814,11 +852,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -902,12 +948,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -926,12 +972,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -952,10 +1000,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -963,11 +1011,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1008,13 +1057,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1067,15 +1119,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1089,6 +1155,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1101,38 +1173,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1187,27 +1247,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1225,7 +1289,7 @@ server cluster FixedLabel = 64 { } /** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ -server cluster OccupancySensing = 1030 { +cluster OccupancySensing = 1030 { revision 3; enum OccupancySensorTypeEnum : enum8 { @@ -1248,6 +1312,15 @@ server cluster OccupancySensing = 1030 { readonly attribute OccupancyBitmap occupancy = 0; readonly attribute OccupancySensorTypeEnum occupancySensorType = 1; readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2; + attribute access(write: manage) optional int16u PIROccupiedToUnoccupiedDelay = 16; + attribute access(write: manage) optional int16u PIRUnoccupiedToOccupiedDelay = 17; + attribute access(write: manage) optional int8u PIRUnoccupiedToOccupiedThreshold = 18; + attribute access(write: manage) optional int16u ultrasonicOccupiedToUnoccupiedDelay = 32; + attribute access(write: manage) optional int16u ultrasonicUnoccupiedToOccupiedDelay = 33; + attribute access(write: manage) optional int8u ultrasonicUnoccupiedToOccupiedThreshold = 34; + attribute access(write: manage) optional int16u physicalContactOccupiedToUnoccupiedDelay = 48; + attribute access(write: manage) optional int16u physicalContactUnoccupiedToOccupiedDelay = 49; + attribute access(write: manage) optional int8u physicalContactUnoccupiedToOccupiedThreshold = 50; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index 3bec6b2cb078d1..c4e896bb232762 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -40,11 +40,19 @@ server cluster Identify = 3 { int16u identifyTime = 0; } + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -68,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -150,10 +164,10 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; - readonly attribute boolean globalSceneControl = 16384; - attribute int16u onTime = 16385; - attribute int16u offWaitTime = 16386; - attribute access(write: manage) nullable StartUpOnOffEnum startUpOnOff = 16387; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -161,13 +175,33 @@ server cluster OnOff = 6 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + request struct OffWithEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + enum8 effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControlBitmap onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ -server cluster LevelControl = 8 { +cluster LevelControl = 8 { revision 5; enum MoveModeEnum : enum8 { @@ -192,12 +226,19 @@ server cluster LevelControl = 8 { } readonly attribute nullable int8u currentLevel = 0; - readonly attribute int16u remainingTime = 1; - readonly attribute int8u minLevel = 2; - readonly attribute int8u maxLevel = 3; + readonly attribute optional int16u remainingTime = 1; + readonly attribute optional int8u minLevel = 2; + readonly attribute optional int8u maxLevel = 3; + readonly attribute optional int16u currentFrequency = 4; + readonly attribute optional int16u minFrequency = 5; + readonly attribute optional int16u maxFrequency = 6; attribute OptionsBitmap options = 15; + attribute optional int16u onOffTransitionTime = 16; attribute nullable int8u onLevel = 17; - attribute access(write: manage) nullable int8u startUpCurrentLevel = 16384; + attribute optional nullable int16u onTransitionTime = 18; + attribute optional nullable int16u offTransitionTime = 19; + attribute optional nullable int8u defaultMoveRate = 20; + attribute access(write: manage) optional nullable int8u startUpCurrentLevel = 16384; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -259,18 +300,33 @@ server cluster LevelControl = 8 { OptionsBitmap optionsOverride = 1; } + request struct MoveToClosestFrequencyRequest { + int16u frequency = 0; + } + + /** Command description for MoveToLevel */ command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + /** Command description for Move */ command Move(MoveRequest): DefaultSuccess = 1; + /** Command description for Step */ command Step(StepRequest): DefaultSuccess = 2; + /** Command description for Stop */ command Stop(StopRequest): DefaultSuccess = 3; + /** Command description for MoveToLevelWithOnOff */ command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + /** Command description for MoveWithOnOff */ command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + /** Command description for StepWithOnOff */ command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + /** Command description for StopWithOnOff */ command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; + /** Change the currrent frequency to the provided one, or a close + approximation if the exact provided one is not possible. */ + command MoveToClosestFrequency(MoveToClosestFrequencyRequest): DefaultSuccess = 8; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -293,6 +349,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -302,7 +359,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -client cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -326,7 +383,7 @@ client cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -385,7 +442,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -400,7 +457,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -472,14 +529,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -488,10 +547,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -567,7 +628,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -640,6 +701,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -647,7 +709,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -664,7 +726,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -692,8 +754,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -703,7 +765,7 @@ server cluster TimeFormatLocalization = 44 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -742,17 +804,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -763,13 +825,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -850,12 +915,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -868,6 +936,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -887,48 +962,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -963,11 +1049,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -1051,12 +1145,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1075,12 +1169,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -1101,10 +1197,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1112,11 +1208,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1157,13 +1254,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1216,15 +1316,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1238,6 +1352,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1250,38 +1370,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1336,27 +1444,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { diff --git a/examples/chef/devices/rootnode_onofflight_samplemei.matter b/examples/chef/devices/rootnode_onofflight_samplemei.matter index 219192be944c27..dae295bb41b743 100644 --- a/examples/chef/devices/rootnode_onofflight_samplemei.matter +++ b/examples/chef/devices/rootnode_onofflight_samplemei.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -40,11 +40,19 @@ server cluster Identify = 3 { int16u identifyTime = 0; } + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -68,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -150,10 +164,10 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; - readonly attribute boolean globalSceneControl = 16384; - attribute int16u onTime = 16385; - attribute int16u offWaitTime = 16386; - attribute access(write: manage) nullable StartUpOnOffEnum startUpOnOff = 16387; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -161,13 +175,33 @@ server cluster OnOff = 6 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + request struct OffWithEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + enum8 effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControlBitmap onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ -server cluster LevelControl = 8 { +cluster LevelControl = 8 { revision 5; enum MoveModeEnum : enum8 { @@ -192,12 +226,19 @@ server cluster LevelControl = 8 { } readonly attribute nullable int8u currentLevel = 0; - readonly attribute int16u remainingTime = 1; - readonly attribute int8u minLevel = 2; - readonly attribute int8u maxLevel = 3; + readonly attribute optional int16u remainingTime = 1; + readonly attribute optional int8u minLevel = 2; + readonly attribute optional int8u maxLevel = 3; + readonly attribute optional int16u currentFrequency = 4; + readonly attribute optional int16u minFrequency = 5; + readonly attribute optional int16u maxFrequency = 6; attribute OptionsBitmap options = 15; + attribute optional int16u onOffTransitionTime = 16; attribute nullable int8u onLevel = 17; - attribute access(write: manage) nullable int8u startUpCurrentLevel = 16384; + attribute optional nullable int16u onTransitionTime = 18; + attribute optional nullable int16u offTransitionTime = 19; + attribute optional nullable int8u defaultMoveRate = 20; + attribute access(write: manage) optional nullable int8u startUpCurrentLevel = 16384; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -259,18 +300,33 @@ server cluster LevelControl = 8 { OptionsBitmap optionsOverride = 1; } + request struct MoveToClosestFrequencyRequest { + int16u frequency = 0; + } + + /** Command description for MoveToLevel */ command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + /** Command description for Move */ command Move(MoveRequest): DefaultSuccess = 1; + /** Command description for Step */ command Step(StepRequest): DefaultSuccess = 2; + /** Command description for Stop */ command Stop(StopRequest): DefaultSuccess = 3; + /** Command description for MoveToLevelWithOnOff */ command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + /** Command description for MoveWithOnOff */ command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + /** Command description for StepWithOnOff */ command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + /** Command description for StopWithOnOff */ command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; + /** Change the currrent frequency to the provided one, or a close + approximation if the exact provided one is not possible. */ + command MoveToClosestFrequency(MoveToClosestFrequencyRequest): DefaultSuccess = 8; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -293,6 +349,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -302,7 +359,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -client cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -326,7 +383,7 @@ client cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -385,7 +442,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -400,7 +457,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -472,14 +529,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -488,10 +547,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -567,7 +628,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -640,6 +701,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -647,7 +709,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -664,7 +726,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -692,8 +754,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -703,7 +765,7 @@ server cluster TimeFormatLocalization = 44 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -742,17 +804,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -763,13 +825,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -850,12 +915,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -868,6 +936,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -887,48 +962,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -963,11 +1049,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -1051,12 +1145,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1075,12 +1169,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -1101,10 +1197,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1112,11 +1208,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1157,13 +1254,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1216,15 +1316,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1238,6 +1352,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1250,38 +1370,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1336,27 +1444,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1374,7 +1486,7 @@ server cluster FixedLabel = 64 { } /** The Sample MEI cluster showcases a cluster manufacturer extensions */ -server cluster SampleMei = 4294048800 { +cluster SampleMei = 4294048800 { revision 1; // NOTE: Default/not specifically set attribute boolean flipFlop = 0; @@ -1385,16 +1497,18 @@ server cluster SampleMei = 4294048800 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + response struct AddArgumentsResponse = 1 { + int8u returnValue = 0; + } + request struct AddArgumentsRequest { int8u arg1 = 0; int8u arg2 = 1; } - response struct AddArgumentsResponse = 1 { - int8u returnValue = 0; - } - + /** Simple command without any parameters and without a response. */ command Ping(): DefaultSuccess = 0; + /** Command that takes two uint8 arguments and returns their sum. */ command AddArguments(AddArgumentsRequest): AddArgumentsResponse = 2; } diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index 620a1a421215d0..bf47c1b75f3b87 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -40,11 +40,19 @@ server cluster Identify = 3 { int16u identifyTime = 0; } + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -68,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -client cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -187,7 +201,7 @@ client cluster OnOff = 6 { } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -222,6 +236,10 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -229,13 +247,33 @@ server cluster OnOff = 6 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + request struct OffWithEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + enum8 effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControlBitmap onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -258,6 +296,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -267,7 +306,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -client cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -291,7 +330,7 @@ client cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -350,7 +389,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -365,7 +404,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -437,14 +476,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -453,10 +494,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -532,7 +575,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -605,6 +648,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -612,7 +656,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -629,7 +673,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -657,8 +701,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -668,7 +712,7 @@ server cluster TimeFormatLocalization = 44 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -707,17 +751,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -728,13 +772,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -815,12 +862,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -833,6 +883,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -852,48 +909,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -928,11 +996,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -1016,12 +1092,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1040,12 +1116,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -1066,10 +1144,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1077,11 +1155,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1122,13 +1201,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1181,15 +1263,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1203,6 +1299,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1215,38 +1317,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1301,27 +1391,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index 7b8c7d2048be2f..e30800cb21e0a7 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -40,11 +40,19 @@ server cluster Identify = 3 { int16u identifyTime = 0; } + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -68,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -150,10 +164,10 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; - readonly attribute boolean globalSceneControl = 16384; - attribute int16u onTime = 16385; - attribute int16u offWaitTime = 16386; - attribute access(write: manage) nullable StartUpOnOffEnum startUpOnOff = 16387; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -161,13 +175,33 @@ server cluster OnOff = 6 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + request struct OffWithEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + enum8 effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControlBitmap onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -190,6 +224,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -199,7 +234,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -client cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -223,7 +258,7 @@ client cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -282,7 +317,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -297,7 +332,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -369,14 +404,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -385,10 +422,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -464,7 +503,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -537,6 +576,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -544,7 +584,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -561,7 +601,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -589,8 +629,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -600,7 +640,7 @@ server cluster TimeFormatLocalization = 44 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -639,17 +679,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -660,13 +700,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -747,12 +790,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -765,6 +811,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -784,48 +837,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -860,11 +924,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -948,12 +1020,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -972,12 +1044,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -998,10 +1072,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1009,11 +1083,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1054,13 +1129,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1113,15 +1191,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1135,6 +1227,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1147,38 +1245,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1233,27 +1319,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index ad10b0d7c5aa98..94f94b10f083b7 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -40,11 +40,19 @@ server cluster Identify = 3 { int16u identifyTime = 0; } + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -client cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -121,7 +129,7 @@ client cluster Groups = 4 { } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -144,6 +152,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -153,7 +162,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -client cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -177,7 +186,7 @@ client cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -236,7 +245,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -251,7 +260,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -323,14 +332,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -339,10 +350,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -418,7 +431,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -491,6 +504,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -498,7 +512,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -515,7 +529,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -543,8 +557,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -554,7 +568,7 @@ server cluster TimeFormatLocalization = 44 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -593,17 +607,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -614,13 +628,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -701,12 +718,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -719,6 +739,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -738,48 +765,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -814,11 +852,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -902,12 +948,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -926,12 +972,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -952,10 +1000,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -963,11 +1011,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1008,13 +1057,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1067,15 +1119,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1089,6 +1155,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1101,38 +1173,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1187,27 +1247,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1225,7 +1289,7 @@ server cluster FixedLabel = 64 { } /** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ -server cluster UserLabel = 65 { +cluster UserLabel = 65 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1243,7 +1307,7 @@ server cluster UserLabel = 65 { } /** Attributes and commands for configuring the measurement of pressure, and reporting pressure measurements. */ -server cluster PressureMeasurement = 1027 { +cluster PressureMeasurement = 1027 { revision 3; bitmap Feature : bitmap32 { @@ -1253,6 +1317,12 @@ server cluster PressureMeasurement = 1027 { readonly attribute nullable int16s measuredValue = 0; readonly attribute nullable int16s minMeasuredValue = 1; readonly attribute nullable int16s maxMeasuredValue = 2; + readonly attribute optional int16u tolerance = 3; + readonly attribute optional nullable int16s scaledValue = 16; + readonly attribute optional nullable int16s minScaledValue = 17; + readonly attribute optional nullable int16s maxScaledValue = 18; + readonly attribute optional int16u scaledTolerance = 19; + readonly attribute optional int8s scale = 20; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_pump_5f904818cc.matter b/examples/chef/devices/rootnode_pump_5f904818cc.matter index 341c49272dce06..0972e7fcb7f8a5 100644 --- a/examples/chef/devices/rootnode_pump_5f904818cc.matter +++ b/examples/chef/devices/rootnode_pump_5f904818cc.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -84,7 +86,11 @@ server cluster OnOff = 6 { kAcceptOnlyWhenOn = 0x1; } - readonly nosubscribe attribute boolean onOff = 0; + readonly attribute boolean onOff = 0; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -92,13 +98,33 @@ server cluster OnOff = 6 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + request struct OffWithEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + enum8 effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControlBitmap onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -121,6 +147,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -133,7 +160,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -192,7 +219,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -207,7 +234,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -279,7 +306,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -288,13 +324,15 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Nodes should be expected to be deployed to any and all regions of the world. These global regions may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -311,7 +349,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -339,6 +377,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -351,7 +391,7 @@ server cluster TimeFormatLocalization = 44 { may have differing preferences for the units in which values are conveyed in communication to a user. As such, Nodes that visually or audibly convey measurable values to the user need a mechanism by which they can be configured to use a user’s preferred unit. */ -server cluster UnitLocalization = 45 { +cluster UnitLocalization = 45 { revision 1; enum TempUnitEnum : enum8 { @@ -364,6 +404,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } + attribute access(write: manage) optional TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -373,7 +414,7 @@ server cluster UnitLocalization = 45 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -412,17 +453,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -433,13 +474,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -520,12 +564,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -538,6 +585,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -557,48 +611,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -682,7 +747,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -701,12 +771,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -747,13 +819,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -806,15 +881,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -828,6 +917,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -840,38 +935,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -926,26 +1009,30 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** An interface for configuring and controlling pumps. */ -server cluster PumpConfigurationAndControl = 512 { +cluster PumpConfigurationAndControl = 512 { revision 3; enum ControlModeEnum : enum8 { @@ -1040,15 +1127,26 @@ server cluster PumpConfigurationAndControl = 512 { readonly attribute nullable int16s maxPressure = 0; readonly attribute nullable int16u maxSpeed = 1; readonly attribute nullable int16u maxFlow = 2; - readonly attribute nullable int16s minConstTemp = 11; - readonly attribute nullable int16s maxConstTemp = 12; - readonly attribute PumpStatusBitmap pumpStatus = 16; + readonly attribute optional nullable int16s minConstPressure = 3; + readonly attribute optional nullable int16s maxConstPressure = 4; + readonly attribute optional nullable int16s minCompPressure = 5; + readonly attribute optional nullable int16s maxCompPressure = 6; + readonly attribute optional nullable int16u minConstSpeed = 7; + readonly attribute optional nullable int16u maxConstSpeed = 8; + readonly attribute optional nullable int16u minConstFlow = 9; + readonly attribute optional nullable int16u maxConstFlow = 10; + readonly attribute optional nullable int16s minConstTemp = 11; + readonly attribute optional nullable int16s maxConstTemp = 12; + readonly attribute optional PumpStatusBitmap pumpStatus = 16; readonly attribute OperationModeEnum effectiveOperationMode = 17; readonly attribute ControlModeEnum effectiveControlMode = 18; - readonly nosubscribe attribute nullable int16s capacity = 19; - readonly attribute nullable int16u speed = 20; + readonly attribute nullable int16s capacity = 19; + readonly attribute optional nullable int16u speed = 20; + attribute access(write: manage) optional nullable int24u lifetimeRunningHours = 21; + readonly attribute optional nullable int24u power = 22; + attribute access(write: manage) optional nullable int32u lifetimeEnergyConsumed = 23; attribute access(write: manage) OperationModeEnum operationMode = 32; - attribute access(write: manage) ControlModeEnum controlMode = 33; + attribute access(write: manage) optional ControlModeEnum controlMode = 33; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1058,12 +1156,13 @@ server cluster PumpConfigurationAndControl = 512 { } /** Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. */ -server cluster TemperatureMeasurement = 1026 { +cluster TemperatureMeasurement = 1026 { revision 1; // NOTE: Default/not specifically set readonly attribute nullable temperature measuredValue = 0; readonly attribute nullable temperature minMeasuredValue = 1; readonly attribute nullable temperature maxMeasuredValue = 2; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1073,7 +1172,7 @@ server cluster TemperatureMeasurement = 1026 { } /** Attributes and commands for configuring the measurement of pressure, and reporting pressure measurements. */ -server cluster PressureMeasurement = 1027 { +cluster PressureMeasurement = 1027 { revision 3; bitmap Feature : bitmap32 { @@ -1083,6 +1182,12 @@ server cluster PressureMeasurement = 1027 { readonly attribute nullable int16s measuredValue = 0; readonly attribute nullable int16s minMeasuredValue = 1; readonly attribute nullable int16s maxMeasuredValue = 2; + readonly attribute optional int16u tolerance = 3; + readonly attribute optional nullable int16s scaledValue = 16; + readonly attribute optional nullable int16s minScaledValue = 17; + readonly attribute optional nullable int16s maxScaledValue = 18; + readonly attribute optional int16u scaledTolerance = 19; + readonly attribute optional int8s scale = 20; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1092,12 +1197,13 @@ server cluster PressureMeasurement = 1027 { } /** Attributes and commands for configuring the measurement of flow, and reporting flow measurements. */ -server cluster FlowMeasurement = 1028 { +cluster FlowMeasurement = 1028 { revision 1; // NOTE: Default/not specifically set readonly attribute nullable int16u measuredValue = 0; readonly attribute nullable int16u minMeasuredValue = 1; readonly attribute nullable int16u maxMeasuredValue = 2; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_pump_a811bb33a0.matter b/examples/chef/devices/rootnode_pump_a811bb33a0.matter index a33a8283f77648..aa8d883bc39509 100644 --- a/examples/chef/devices/rootnode_pump_a811bb33a0.matter +++ b/examples/chef/devices/rootnode_pump_a811bb33a0.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -84,7 +86,11 @@ server cluster OnOff = 6 { kAcceptOnlyWhenOn = 0x1; } - readonly nosubscribe attribute boolean onOff = 0; + readonly attribute boolean onOff = 0; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -92,13 +98,33 @@ server cluster OnOff = 6 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + request struct OffWithEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + enum8 effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControlBitmap onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -121,6 +147,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -133,7 +160,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -192,7 +219,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -207,7 +234,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -279,7 +306,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -288,13 +324,15 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Nodes should be expected to be deployed to any and all regions of the world. These global regions may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -311,7 +349,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -339,6 +377,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -351,7 +391,7 @@ server cluster TimeFormatLocalization = 44 { may have differing preferences for the units in which values are conveyed in communication to a user. As such, Nodes that visually or audibly convey measurable values to the user need a mechanism by which they can be configured to use a user’s preferred unit. */ -server cluster UnitLocalization = 45 { +cluster UnitLocalization = 45 { revision 1; enum TempUnitEnum : enum8 { @@ -364,6 +404,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } + attribute access(write: manage) optional TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -373,7 +414,7 @@ server cluster UnitLocalization = 45 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -412,17 +453,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -433,13 +474,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -520,12 +564,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -538,6 +585,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -557,48 +611,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -682,7 +747,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -701,12 +771,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -747,13 +819,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -806,15 +881,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -828,6 +917,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -840,38 +935,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -926,26 +1009,30 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** An interface for configuring and controlling pumps. */ -server cluster PumpConfigurationAndControl = 512 { +cluster PumpConfigurationAndControl = 512 { revision 3; enum ControlModeEnum : enum8 { @@ -1040,10 +1127,26 @@ server cluster PumpConfigurationAndControl = 512 { readonly attribute nullable int16s maxPressure = 0; readonly attribute nullable int16u maxSpeed = 1; readonly attribute nullable int16u maxFlow = 2; + readonly attribute optional nullable int16s minConstPressure = 3; + readonly attribute optional nullable int16s maxConstPressure = 4; + readonly attribute optional nullable int16s minCompPressure = 5; + readonly attribute optional nullable int16s maxCompPressure = 6; + readonly attribute optional nullable int16u minConstSpeed = 7; + readonly attribute optional nullable int16u maxConstSpeed = 8; + readonly attribute optional nullable int16u minConstFlow = 9; + readonly attribute optional nullable int16u maxConstFlow = 10; + readonly attribute optional nullable int16s minConstTemp = 11; + readonly attribute optional nullable int16s maxConstTemp = 12; + readonly attribute optional PumpStatusBitmap pumpStatus = 16; readonly attribute OperationModeEnum effectiveOperationMode = 17; readonly attribute ControlModeEnum effectiveControlMode = 18; - readonly nosubscribe attribute nullable int16s capacity = 19; + readonly attribute nullable int16s capacity = 19; + readonly attribute optional nullable int16u speed = 20; + attribute access(write: manage) optional nullable int24u lifetimeRunningHours = 21; + readonly attribute optional nullable int24u power = 22; + attribute access(write: manage) optional nullable int32u lifetimeEnergyConsumed = 23; attribute access(write: manage) OperationModeEnum operationMode = 32; + attribute access(write: manage) optional ControlModeEnum controlMode = 33; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter index 527d50ed0cbb37..951c41b42cef58 100644 --- a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter +++ b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -73,6 +75,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -85,7 +88,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -144,7 +147,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -159,7 +162,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -231,15 +234,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute boolean reachable = 17; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -248,13 +252,15 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Nodes should be expected to be deployed to any and all regions of the world. These global regions may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -271,7 +277,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -299,6 +305,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -311,7 +319,7 @@ server cluster TimeFormatLocalization = 44 { may have differing preferences for the units in which values are conveyed in communication to a user. As such, Nodes that visually or audibly convey measurable values to the user need a mechanism by which they can be configured to use a user’s preferred unit. */ -server cluster UnitLocalization = 45 { +cluster UnitLocalization = 45 { revision 1; enum TempUnitEnum : enum8 { @@ -324,7 +332,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute access(write: manage) TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) optional TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -334,7 +342,7 @@ server cluster UnitLocalization = 45 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -373,17 +381,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -394,13 +402,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -481,12 +492,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -499,6 +513,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -518,48 +539,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -643,12 +675,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -667,12 +699,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster WiFiNetworkDiagnostics = 54 { +cluster WiFiNetworkDiagnostics = 54 { revision 1; // NOTE: Default/not specifically set enum AssociationFailureCauseEnum : enum8 { @@ -729,14 +763,14 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; - readonly attribute nullable int32u beaconLostCount = 5; - readonly attribute nullable int32u beaconRxCount = 6; - readonly attribute nullable int32u packetMulticastRxCount = 7; - readonly attribute nullable int32u packetMulticastTxCount = 8; - readonly attribute nullable int32u packetUnicastRxCount = 9; - readonly attribute nullable int32u packetUnicastTxCount = 10; - readonly attribute nullable int64u currentMaxRate = 11; - readonly attribute nullable int64u overrunCount = 12; + readonly attribute optional nullable int32u beaconLostCount = 5; + readonly attribute optional nullable int32u beaconRxCount = 6; + readonly attribute optional nullable int32u packetMulticastRxCount = 7; + readonly attribute optional nullable int32u packetMulticastTxCount = 8; + readonly attribute optional nullable int32u packetUnicastRxCount = 9; + readonly attribute optional nullable int32u packetUnicastTxCount = 10; + readonly attribute optional nullable int64u currentMaxRate = 11; + readonly attribute optional nullable int64u overrunCount = 12; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -744,11 +778,12 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 */ command ResetCounts(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -789,13 +824,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -848,15 +886,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -870,6 +922,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -882,38 +940,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -968,26 +1014,30 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** Attributes and commands for configuring the temperature control, and reporting temperature. */ -server cluster TemperatureControl = 86 { +cluster TemperatureControl = 86 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -996,8 +1046,12 @@ server cluster TemperatureControl = 86 { kTemperatureStep = 0x4; } - readonly attribute int8u selectedTemperatureLevel = 4; - readonly attribute char_string supportedTemperatureLevels[] = 5; + readonly attribute optional temperature temperatureSetpoint = 0; + readonly attribute optional temperature minTemperature = 1; + readonly attribute optional temperature maxTemperature = 2; + readonly attribute optional temperature step = 3; + readonly attribute optional int8u selectedTemperatureLevel = 4; + readonly attribute optional char_string supportedTemperatureLevels[] = 5; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1010,6 +1064,7 @@ server cluster TemperatureControl = 86 { optional int8u targetTemperatureLevel = 1; } + /** Set Temperature */ command SetTemperature(SetTemperatureRequest): DefaultSuccess = 0; } diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter index f9c8622f2f4656..50fdc7577d85f0 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -74,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -144,6 +152,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -156,7 +165,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -215,7 +224,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -230,7 +239,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -302,14 +311,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -318,10 +329,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -360,17 +373,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -381,13 +394,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -468,12 +484,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -486,6 +505,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -505,48 +531,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -581,11 +618,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -669,12 +714,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -693,12 +738,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -739,13 +786,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -798,15 +848,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -820,6 +884,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -832,38 +902,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -918,26 +976,30 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** Attributes and commands for selecting a mode from a list of supported options. */ -server cluster RvcRunMode = 84 { +cluster RvcRunMode = 84 { revision 2; enum ModeTag : enum16 { @@ -973,7 +1035,7 @@ server cluster RvcRunMode = 84 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; - attribute nullable int8u onMode = 3; + attribute optional nullable int8u onMode = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -990,11 +1052,13 @@ server cluster RvcRunMode = 84 { optional char_string statusText = 1; } + /** This command is used to change device modes. + On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; } /** Attributes and commands for selecting a mode from a list of supported options. */ -server cluster RvcCleanMode = 85 { +cluster RvcCleanMode = 85 { revision 2; enum ModeTag : enum16 { @@ -1024,7 +1088,7 @@ server cluster RvcCleanMode = 85 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; - attribute nullable int8u onMode = 3; + attribute optional nullable int8u onMode = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1041,11 +1105,13 @@ server cluster RvcCleanMode = 85 { optional char_string statusText = 1; } + /** This command is used to change device modes. + On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; } /** This cluster supports remotely monitoring and, where supported, changing the operational state of a Robotic Vacuum. */ -server cluster RvcOperationalState = 97 { +cluster RvcOperationalState = 97 { revision 1; // NOTE: Default/not specifically set enum ErrorStateEnum : enum8 { @@ -1088,7 +1154,7 @@ server cluster RvcOperationalState = 97 { readonly attribute nullable char_string phaseList[] = 0; readonly attribute nullable int8u currentPhase = 1; - readonly attribute nullable elapsed_s countdownTime = 2; + readonly attribute optional nullable elapsed_s countdownTime = 2; readonly attribute OperationalStateStruct operationalStateList[] = 3; readonly attribute enum8 operationalState = 4; readonly attribute ErrorStateStruct operationalError = 5; @@ -1103,7 +1169,13 @@ server cluster RvcOperationalState = 97 { ErrorStateStruct commandResponseState = 0; } + /** Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. */ command Pause(): OperationalCommandResponse = 0; + /** Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. */ + command Stop(): OperationalCommandResponse = 1; + /** Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it can be started. */ + command Start(): OperationalCommandResponse = 2; + /** Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). */ command Resume(): OperationalCommandResponse = 3; } diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter index fd516663144de9..bd9587ba6242cd 100644 --- a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -74,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -155,7 +163,11 @@ server cluster OnOff = 6 { kAcceptOnlyWhenOn = 0x1; } - readonly nosubscribe attribute boolean onOff = 0; + readonly attribute boolean onOff = 0; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -163,13 +175,33 @@ server cluster OnOff = 6 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + request struct OffWithEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + enum8 effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControlBitmap onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -192,6 +224,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -204,7 +237,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -263,7 +296,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -278,7 +311,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -350,14 +383,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -366,10 +401,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -408,17 +445,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -429,13 +466,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -516,12 +556,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -534,6 +577,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -553,48 +603,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -629,11 +690,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -717,12 +786,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -741,12 +810,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -787,13 +858,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -846,15 +920,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -868,6 +956,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -880,38 +974,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -966,26 +1048,30 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** An interface for configuring and controlling the functionality of a thermostat. */ -server cluster Thermostat = 513 { +cluster Thermostat = 513 { revision 6; enum SetpointAdjustMode : enum8 { @@ -1054,13 +1140,54 @@ server cluster Thermostat = 513 { } readonly attribute nullable int16s localTemperature = 0; - readonly attribute int16s absMinCoolSetpointLimit = 5; - readonly attribute int16s absMaxCoolSetpointLimit = 6; - attribute int16s occupiedCoolingSetpoint = 17; - attribute access(write: manage) int16s minCoolSetpointLimit = 23; - attribute access(write: manage) int16s maxCoolSetpointLimit = 24; + readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute optional bitmap8 occupancy = 2; + readonly attribute optional int16s absMinHeatSetpointLimit = 3; + readonly attribute optional int16s absMaxHeatSetpointLimit = 4; + readonly attribute optional int16s absMinCoolSetpointLimit = 5; + readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional int8u PICoolingDemand = 7; + readonly attribute optional int8u PIHeatingDemand = 8; + attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; + attribute access(write: manage) optional int8s localTemperatureCalibration = 16; + attribute optional int16s occupiedCoolingSetpoint = 17; + attribute optional int16s occupiedHeatingSetpoint = 18; + attribute optional int16s unoccupiedCoolingSetpoint = 19; + attribute optional int16s unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; + attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; + attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; + attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute access(write: manage) optional int8s minSetpointDeadBand = 25; + attribute access(write: manage) optional bitmap8 remoteSensing = 26; attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; attribute access(write: manage) enum8 systemMode = 28; + readonly attribute optional enum8 thermostatRunningMode = 30; + readonly attribute optional enum8 startOfWeek = 32; + readonly attribute optional int8u numberOfWeeklyTransitions = 33; + readonly attribute optional int8u numberOfDailyTransitions = 34; + attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; + attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; + readonly attribute optional bitmap16 thermostatRunningState = 41; + readonly attribute optional enum8 setpointChangeSource = 48; + readonly attribute optional nullable int16s setpointChangeAmount = 49; + readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; + attribute access(write: manage) optional nullable int8u occupiedSetback = 52; + readonly attribute optional nullable int8u occupiedSetbackMin = 53; + readonly attribute optional nullable int8u occupiedSetbackMax = 54; + attribute access(write: manage) optional nullable int8u unoccupiedSetback = 55; + readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; + readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; + attribute access(write: manage) optional int8u emergencyHeatDelta = 58; + attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional int16u ACCapacity = 65; + attribute access(write: manage) optional enum8 ACRefrigerantType = 66; + attribute access(write: manage) optional enum8 ACCompressorType = 67; + attribute access(write: manage) optional bitmap32 ACErrorCode = 68; + attribute access(write: manage) optional enum8 ACLouverPosition = 69; + readonly attribute optional nullable int16s ACCoilTemperature = 70; + attribute access(write: manage) optional enum8 ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1073,11 +1200,37 @@ server cluster Thermostat = 513 { int8s amount = 1; } + response struct GetWeeklyScheduleResponse = 0 { + int8u numberOfTransitionsForSequence = 0; + DayOfWeek dayOfWeekForSequence = 1; + ModeForSequence modeForSequence = 2; + ThermostatScheduleTransition transitions[] = 3; + } + + request struct SetWeeklyScheduleRequest { + int8u numberOfTransitionsForSequence = 0; + DayOfWeek dayOfWeekForSequence = 1; + ModeForSequence modeForSequence = 2; + ThermostatScheduleTransition transitions[] = 3; + } + + request struct GetWeeklyScheduleRequest { + DayOfWeek daysToReturn = 0; + ModeForSequence modeToReturn = 1; + } + + /** Command description for SetpointRaiseLower */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; + /** Command description for SetWeeklySchedule */ + command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; + /** Command description for GetWeeklySchedule */ + command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; + /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ + command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; } /** An interface for controlling a fan in a heating/cooling system. */ -provisional server cluster FanControl = 514 { +provisional cluster FanControl = 514 { revision 4; enum AirflowDirectionEnum : enum8 { @@ -1133,16 +1286,33 @@ provisional server cluster FanControl = 514 { readonly attribute FanModeSequenceEnum fanModeSequence = 1; attribute nullable percent percentSetting = 2; readonly attribute percent percentCurrent = 3; + readonly attribute optional int8u speedMax = 4; + attribute optional nullable int8u speedSetting = 5; + readonly attribute optional int8u speedCurrent = 6; + readonly attribute optional RockBitmap rockSupport = 7; + attribute optional RockBitmap rockSetting = 8; + readonly attribute optional WindBitmap windSupport = 9; + attribute optional WindBitmap windSetting = 10; + attribute optional AirflowDirectionEnum airflowDirection = 11; 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; + + request struct StepRequest { + StepDirectionEnum direction = 0; + optional boolean wrap = 1; + optional boolean lowestOff = 2; + } + + /** The Step command speeds up or slows down the fan, in steps. */ + command Step(StepRequest): DefaultSuccess = 0; } /** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */ -server cluster ThermostatUserInterfaceConfiguration = 516 { +cluster ThermostatUserInterfaceConfiguration = 516 { revision 2; enum KeypadLockoutEnum : enum8 { @@ -1166,6 +1336,7 @@ server cluster ThermostatUserInterfaceConfiguration = 516 { attribute TemperatureDisplayModeEnum temperatureDisplayMode = 0; attribute access(write: manage) KeypadLockoutEnum keypadLockout = 1; + attribute access(write: manage) optional ScheduleProgrammingVisibilityEnum scheduleProgrammingVisibility = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter index f35fe5c9784979..02e2c2b9d3b8e9 100644 --- a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter +++ b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -74,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -144,6 +152,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -156,7 +165,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -215,7 +224,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -230,7 +239,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -302,14 +311,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -318,10 +329,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ -server cluster PowerSource = 47 { +cluster PowerSource = 47 { revision 1; // NOTE: Default/not specifically set enum BatApprovedChemistryEnum : enum16 { @@ -542,9 +555,34 @@ server cluster PowerSource = 47 { readonly attribute PowerSourceStatusEnum status = 0; readonly attribute int8u order = 1; readonly attribute char_string<60> description = 2; - readonly attribute BatChargeLevelEnum batChargeLevel = 14; - readonly attribute boolean batReplacementNeeded = 15; - readonly attribute BatReplaceabilityEnum batReplaceability = 16; + readonly attribute optional nullable int32u wiredAssessedInputVoltage = 3; + readonly attribute optional nullable int16u wiredAssessedInputFrequency = 4; + readonly attribute optional WiredCurrentTypeEnum wiredCurrentType = 5; + readonly attribute optional nullable int32u wiredAssessedCurrent = 6; + readonly attribute optional int32u wiredNominalVoltage = 7; + readonly attribute optional int32u wiredMaximumCurrent = 8; + readonly attribute optional boolean wiredPresent = 9; + readonly attribute optional WiredFaultEnum activeWiredFaults[] = 10; + readonly attribute optional nullable int32u batVoltage = 11; + readonly attribute optional nullable int8u batPercentRemaining = 12; + readonly attribute optional nullable int32u batTimeRemaining = 13; + readonly attribute optional BatChargeLevelEnum batChargeLevel = 14; + readonly attribute optional boolean batReplacementNeeded = 15; + readonly attribute optional BatReplaceabilityEnum batReplaceability = 16; + readonly attribute optional boolean batPresent = 17; + readonly attribute optional BatFaultEnum activeBatFaults[] = 18; + readonly attribute optional char_string<60> batReplacementDescription = 19; + readonly attribute optional BatCommonDesignationEnum batCommonDesignation = 20; + readonly attribute optional char_string<20> batANSIDesignation = 21; + readonly attribute optional char_string<20> batIECDesignation = 22; + readonly attribute optional BatApprovedChemistryEnum batApprovedChemistry = 23; + readonly attribute optional int32u batCapacity = 24; + readonly attribute optional int8u batQuantity = 25; + readonly attribute optional BatChargeStateEnum batChargeState = 26; + readonly attribute optional nullable int32u batTimeToFullCharge = 27; + readonly attribute optional boolean batFunctionalWhileCharging = 28; + readonly attribute optional nullable int32u batChargingCurrent = 29; + readonly attribute optional BatChargeFaultEnum activeBatChargeFaults[] = 30; readonly attribute endpoint_no endpointList[] = 31; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -555,7 +593,7 @@ server cluster PowerSource = 47 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -594,17 +632,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -615,13 +653,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -702,12 +743,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -720,6 +764,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -739,48 +790,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -815,11 +877,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -903,12 +973,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -927,12 +997,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -973,13 +1045,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1032,15 +1107,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1054,6 +1143,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1066,38 +1161,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1152,26 +1235,30 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** This cluster provides an interface for observing and managing the state of smoke and CO alarms. */ -server cluster SmokeCoAlarm = 92 { +cluster SmokeCoAlarm = 92 { revision 1; enum AlarmStateEnum : enum8 { @@ -1259,18 +1346,18 @@ server cluster SmokeCoAlarm = 92 { } readonly attribute ExpressedStateEnum expressedState = 0; - readonly attribute AlarmStateEnum smokeState = 1; - readonly attribute AlarmStateEnum COState = 2; + readonly attribute optional AlarmStateEnum smokeState = 1; + readonly attribute optional AlarmStateEnum COState = 2; readonly attribute AlarmStateEnum batteryAlert = 3; - readonly attribute MuteStateEnum deviceMuted = 4; + readonly attribute optional MuteStateEnum deviceMuted = 4; readonly attribute boolean testInProgress = 5; readonly attribute boolean hardwareFaultAlert = 6; readonly attribute EndOfServiceEnum endOfServiceAlert = 7; - readonly attribute AlarmStateEnum interconnectSmokeAlarm = 8; - readonly attribute AlarmStateEnum interconnectCOAlarm = 9; - readonly attribute ContaminationStateEnum contaminationState = 10; - attribute access(write: manage) SensitivityEnum smokeSensitivityLevel = 11; - readonly attribute epoch_s expiryDate = 12; + readonly attribute optional AlarmStateEnum interconnectSmokeAlarm = 8; + readonly attribute optional AlarmStateEnum interconnectCOAlarm = 9; + readonly attribute optional ContaminationStateEnum contaminationState = 10; + attribute access(write: manage) optional SensitivityEnum smokeSensitivityLevel = 11; + readonly attribute optional epoch_s expiryDate = 12; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1278,6 +1365,7 @@ server cluster SmokeCoAlarm = 92 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** This command SHALL initiate a device self-test. */ command SelfTestRequest(): DefaultSuccess = 0; } diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index 601fa08658bb54..700004cd8458cc 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -40,11 +40,19 @@ server cluster Identify = 3 { int16u identifyTime = 0; } + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -79,6 +87,10 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -86,13 +98,33 @@ server cluster OnOff = 6 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + request struct OffWithEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + enum8 effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControlBitmap onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ -server cluster LevelControl = 8 { +cluster LevelControl = 8 { revision 5; enum MoveModeEnum : enum8 { @@ -117,10 +149,19 @@ server cluster LevelControl = 8 { } readonly attribute nullable int8u currentLevel = 0; - readonly attribute int8u minLevel = 2; - readonly attribute int8u maxLevel = 3; + readonly attribute optional int16u remainingTime = 1; + readonly attribute optional int8u minLevel = 2; + readonly attribute optional int8u maxLevel = 3; + readonly attribute optional int16u currentFrequency = 4; + readonly attribute optional int16u minFrequency = 5; + readonly attribute optional int16u maxFrequency = 6; attribute OptionsBitmap options = 15; + attribute optional int16u onOffTransitionTime = 16; attribute nullable int8u onLevel = 17; + attribute optional nullable int16u onTransitionTime = 18; + attribute optional nullable int16u offTransitionTime = 19; + attribute optional nullable int8u defaultMoveRate = 20; + attribute access(write: manage) optional nullable int8u startUpCurrentLevel = 16384; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -182,18 +223,33 @@ server cluster LevelControl = 8 { OptionsBitmap optionsOverride = 1; } + request struct MoveToClosestFrequencyRequest { + int16u frequency = 0; + } + + /** Command description for MoveToLevel */ command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + /** Command description for Move */ command Move(MoveRequest): DefaultSuccess = 1; + /** Command description for Step */ command Step(StepRequest): DefaultSuccess = 2; + /** Command description for Stop */ command Stop(StopRequest): DefaultSuccess = 3; + /** Command description for MoveToLevelWithOnOff */ command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + /** Command description for MoveWithOnOff */ command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + /** Command description for StepWithOnOff */ command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + /** Command description for StopWithOnOff */ command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; + /** Change the currrent frequency to the provided one, or a close + approximation if the exact provided one is not possible. */ + command MoveToClosestFrequency(MoveToClosestFrequencyRequest): DefaultSuccess = 8; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -216,6 +272,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -225,7 +282,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -client cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -249,7 +306,7 @@ client cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -308,7 +365,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -323,7 +380,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -395,14 +452,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -411,10 +470,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -490,7 +551,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -563,6 +624,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -570,7 +632,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -587,7 +649,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -615,8 +677,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -626,7 +688,7 @@ server cluster TimeFormatLocalization = 44 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -665,17 +727,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -686,13 +748,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -773,12 +838,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -791,6 +859,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -810,48 +885,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -886,11 +972,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -974,12 +1068,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -998,12 +1092,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -1024,10 +1120,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1035,11 +1131,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1080,13 +1177,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1139,15 +1239,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1161,6 +1275,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1173,38 +1293,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1259,27 +1367,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index c23770638fa3ec..ed5e756b6b05e8 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -40,11 +40,19 @@ server cluster Identify = 3 { int16u identifyTime = 0; } + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -client cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -121,7 +129,7 @@ client cluster Groups = 4 { } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -144,6 +152,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -153,7 +162,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -client cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -177,7 +186,7 @@ client cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -236,7 +245,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -251,7 +260,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -323,14 +332,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -339,10 +350,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -418,7 +431,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -491,6 +504,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -498,7 +512,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -515,7 +529,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -543,8 +557,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -554,7 +568,7 @@ server cluster TimeFormatLocalization = 44 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -593,17 +607,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -614,13 +628,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -701,12 +718,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -719,6 +739,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -738,48 +765,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -814,11 +852,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -902,12 +948,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -926,12 +972,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -952,10 +1000,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -963,11 +1011,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1008,13 +1057,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1067,15 +1119,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1089,6 +1155,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1101,38 +1173,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1187,27 +1247,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1225,12 +1289,13 @@ server cluster FixedLabel = 64 { } /** Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. */ -server cluster TemperatureMeasurement = 1026 { +cluster TemperatureMeasurement = 1026 { revision 1; // NOTE: Default/not specifically set readonly attribute nullable temperature measuredValue = 0; readonly attribute nullable temperature minMeasuredValue = 1; readonly attribute nullable temperature maxMeasuredValue = 2; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index 7357b6b73b7f34..5843d93ecaa74a 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -40,11 +40,19 @@ server cluster Identify = 3 { int16u identifyTime = 0; } + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -68,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -138,6 +152,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -147,7 +162,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -client cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -171,7 +186,7 @@ client cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -230,7 +245,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -245,7 +260,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -317,14 +332,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -333,10 +350,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -412,7 +431,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -485,6 +504,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -492,7 +512,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -509,7 +529,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -537,8 +557,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -548,7 +568,7 @@ server cluster TimeFormatLocalization = 44 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -587,17 +607,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -608,13 +628,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -695,12 +718,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -713,6 +739,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -732,48 +765,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -808,11 +852,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -896,12 +948,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -920,12 +972,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -946,10 +1000,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -957,11 +1011,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1002,13 +1057,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1061,15 +1119,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1083,6 +1155,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1095,38 +1173,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1181,27 +1247,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1219,7 +1289,7 @@ server cluster FixedLabel = 64 { } /** An interface for configuring and controlling the functionality of a thermostat. */ -server cluster Thermostat = 513 { +cluster Thermostat = 513 { revision 6; enum SetpointAdjustMode : enum8 { @@ -1288,32 +1358,54 @@ server cluster Thermostat = 513 { } readonly attribute nullable int16s localTemperature = 0; - readonly attribute nullable int16s outdoorTemperature = 1; - readonly attribute bitmap8 occupancy = 2; - readonly attribute int16s absMinHeatSetpointLimit = 3; - readonly attribute int16s absMaxHeatSetpointLimit = 4; - readonly attribute int16s absMinCoolSetpointLimit = 5; - readonly attribute int16s absMaxCoolSetpointLimit = 6; - readonly attribute int8u PICoolingDemand = 7; - readonly attribute int8u PIHeatingDemand = 8; - attribute access(write: manage) bitmap8 HVACSystemTypeConfiguration = 9; - attribute access(write: manage) int8s localTemperatureCalibration = 16; - attribute int16s occupiedCoolingSetpoint = 17; - attribute int16s occupiedHeatingSetpoint = 18; - attribute int16s unoccupiedCoolingSetpoint = 19; - attribute int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) int16s minHeatSetpointLimit = 21; - attribute access(write: manage) int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) int16s minCoolSetpointLimit = 23; - attribute access(write: manage) int16s maxCoolSetpointLimit = 24; - attribute access(write: manage) int8s minSetpointDeadBand = 25; - attribute access(write: manage) bitmap8 remoteSensing = 26; + readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute optional bitmap8 occupancy = 2; + readonly attribute optional int16s absMinHeatSetpointLimit = 3; + readonly attribute optional int16s absMaxHeatSetpointLimit = 4; + readonly attribute optional int16s absMinCoolSetpointLimit = 5; + readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional int8u PICoolingDemand = 7; + readonly attribute optional int8u PIHeatingDemand = 8; + attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; + attribute access(write: manage) optional int8s localTemperatureCalibration = 16; + attribute optional int16s occupiedCoolingSetpoint = 17; + attribute optional int16s occupiedHeatingSetpoint = 18; + attribute optional int16s unoccupiedCoolingSetpoint = 19; + attribute optional int16s unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; + attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; + attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; + attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute access(write: manage) optional int8s minSetpointDeadBand = 25; + attribute access(write: manage) optional bitmap8 remoteSensing = 26; attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; attribute access(write: manage) enum8 systemMode = 28; - readonly attribute enum8 thermostatRunningMode = 30; - readonly attribute enum8 startOfWeek = 32; - readonly attribute int8u numberOfWeeklyTransitions = 33; - readonly attribute int8u numberOfDailyTransitions = 34; + readonly attribute optional enum8 thermostatRunningMode = 30; + readonly attribute optional enum8 startOfWeek = 32; + readonly attribute optional int8u numberOfWeeklyTransitions = 33; + readonly attribute optional int8u numberOfDailyTransitions = 34; + attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; + attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; + readonly attribute optional bitmap16 thermostatRunningState = 41; + readonly attribute optional enum8 setpointChangeSource = 48; + readonly attribute optional nullable int16s setpointChangeAmount = 49; + readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; + attribute access(write: manage) optional nullable int8u occupiedSetback = 52; + readonly attribute optional nullable int8u occupiedSetbackMin = 53; + readonly attribute optional nullable int8u occupiedSetbackMax = 54; + attribute access(write: manage) optional nullable int8u unoccupiedSetback = 55; + readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; + readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; + attribute access(write: manage) optional int8u emergencyHeatDelta = 58; + attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional int16u ACCapacity = 65; + attribute access(write: manage) optional enum8 ACRefrigerantType = 66; + attribute access(write: manage) optional enum8 ACCompressorType = 67; + attribute access(write: manage) optional bitmap32 ACErrorCode = 68; + attribute access(write: manage) optional enum8 ACLouverPosition = 69; + readonly attribute optional nullable int16s ACCoilTemperature = 70; + attribute access(write: manage) optional enum8 ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1326,11 +1418,37 @@ server cluster Thermostat = 513 { int8s amount = 1; } + response struct GetWeeklyScheduleResponse = 0 { + int8u numberOfTransitionsForSequence = 0; + DayOfWeek dayOfWeekForSequence = 1; + ModeForSequence modeForSequence = 2; + ThermostatScheduleTransition transitions[] = 3; + } + + request struct SetWeeklyScheduleRequest { + int8u numberOfTransitionsForSequence = 0; + DayOfWeek dayOfWeekForSequence = 1; + ModeForSequence modeForSequence = 2; + ThermostatScheduleTransition transitions[] = 3; + } + + request struct GetWeeklyScheduleRequest { + DayOfWeek daysToReturn = 0; + ModeForSequence modeToReturn = 1; + } + + /** Command description for SetpointRaiseLower */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; + /** Command description for SetWeeklySchedule */ + command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; + /** Command description for GetWeeklySchedule */ + command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; + /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ + command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; } /** An interface for controlling a fan in a heating/cooling system. */ -provisional client cluster FanControl = 514 { +provisional cluster FanControl = 514 { revision 4; enum AirflowDirectionEnum : enum8 { @@ -1412,7 +1530,7 @@ provisional client cluster FanControl = 514 { } /** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */ -server cluster ThermostatUserInterfaceConfiguration = 516 { +cluster ThermostatUserInterfaceConfiguration = 516 { revision 2; enum KeypadLockoutEnum : enum8 { @@ -1436,6 +1554,7 @@ server cluster ThermostatUserInterfaceConfiguration = 516 { attribute TemperatureDisplayModeEnum temperatureDisplayMode = 0; attribute access(write: manage) KeypadLockoutEnum keypadLockout = 1; + attribute access(write: manage) optional ScheduleProgrammingVisibilityEnum scheduleProgrammingVisibility = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1445,7 +1564,7 @@ server cluster ThermostatUserInterfaceConfiguration = 516 { } /** Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. */ -client cluster TemperatureMeasurement = 1026 { +cluster TemperatureMeasurement = 1026 { revision 1; // NOTE: Default/not specifically set readonly attribute nullable temperature measuredValue = 0; @@ -1461,7 +1580,7 @@ client cluster TemperatureMeasurement = 1026 { } /** Attributes and commands for configuring the measurement of relative humidity, and reporting relative humidity measurements. */ -client cluster RelativeHumidityMeasurement = 1029 { +cluster RelativeHumidityMeasurement = 1029 { revision 3; readonly attribute nullable int16u measuredValue = 0; @@ -1477,7 +1596,7 @@ client cluster RelativeHumidityMeasurement = 1029 { } /** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ -client cluster OccupancySensing = 1030 { +cluster OccupancySensing = 1030 { revision 3; enum OccupancySensorTypeEnum : enum8 { diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index db3d5a58090813..7074292cc75deb 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -40,11 +40,19 @@ server cluster Identify = 3 { int16u identifyTime = 0; } + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -68,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -138,6 +152,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -147,7 +162,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -client cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -171,7 +186,7 @@ client cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -230,7 +245,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -245,7 +260,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -317,14 +332,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -333,10 +350,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -412,7 +431,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -485,6 +504,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -492,7 +512,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -509,7 +529,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -537,8 +557,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -548,7 +568,7 @@ server cluster TimeFormatLocalization = 44 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -587,17 +607,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -608,13 +628,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -695,12 +718,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -713,6 +739,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -732,48 +765,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -808,11 +852,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -896,12 +948,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -920,12 +972,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -946,10 +1000,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -957,11 +1011,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1002,13 +1057,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1061,15 +1119,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1083,6 +1155,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1095,38 +1173,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1181,27 +1247,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1219,7 +1289,7 @@ server cluster FixedLabel = 64 { } /** Provides an interface for controlling and adjusting automatic window coverings. */ -server cluster WindowCovering = 258 { +cluster WindowCovering = 258 { revision 5; enum EndProductType : enum8 { @@ -1311,27 +1381,27 @@ server cluster WindowCovering = 258 { } readonly attribute Type type = 0; - readonly attribute int16u physicalClosedLimitLift = 1; - readonly attribute int16u physicalClosedLimitTilt = 2; - readonly attribute nullable int16u currentPositionLift = 3; - readonly attribute nullable int16u currentPositionTilt = 4; - readonly attribute int16u numberOfActuationsLift = 5; - readonly attribute int16u numberOfActuationsTilt = 6; + readonly attribute optional int16u physicalClosedLimitLift = 1; + readonly attribute optional int16u physicalClosedLimitTilt = 2; + readonly attribute optional nullable int16u currentPositionLift = 3; + readonly attribute optional nullable int16u currentPositionTilt = 4; + readonly attribute optional int16u numberOfActuationsLift = 5; + readonly attribute optional int16u numberOfActuationsTilt = 6; readonly attribute ConfigStatus configStatus = 7; - readonly attribute nullable percent currentPositionLiftPercentage = 8; - readonly attribute nullable percent currentPositionTiltPercentage = 9; + readonly attribute optional nullable percent currentPositionLiftPercentage = 8; + readonly attribute optional nullable percent currentPositionTiltPercentage = 9; readonly attribute OperationalStatus operationalStatus = 10; - readonly attribute nullable percent100ths targetPositionLiftPercent100ths = 11; - readonly attribute nullable percent100ths targetPositionTiltPercent100ths = 12; + readonly attribute optional nullable percent100ths targetPositionLiftPercent100ths = 11; + readonly attribute optional nullable percent100ths targetPositionTiltPercent100ths = 12; readonly attribute EndProductType endProductType = 13; - readonly attribute nullable percent100ths currentPositionLiftPercent100ths = 14; - readonly attribute nullable percent100ths currentPositionTiltPercent100ths = 15; - readonly attribute int16u installedOpenLimitLift = 16; - readonly attribute int16u installedClosedLimitLift = 17; - readonly attribute int16u installedOpenLimitTilt = 18; - readonly attribute int16u installedClosedLimitTilt = 19; + readonly attribute optional nullable percent100ths currentPositionLiftPercent100ths = 14; + readonly attribute optional nullable percent100ths currentPositionTiltPercent100ths = 15; + readonly attribute optional int16u installedOpenLimitLift = 16; + readonly attribute optional int16u installedClosedLimitLift = 17; + readonly attribute optional int16u installedOpenLimitTilt = 18; + readonly attribute optional int16u installedClosedLimitTilt = 19; attribute access(write: manage) Mode mode = 23; - readonly attribute SafetyStatus safetyStatus = 26; + readonly attribute optional SafetyStatus safetyStatus = 26; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1355,12 +1425,19 @@ server cluster WindowCovering = 258 { percent100ths tiltPercent100thsValue = 0; } + /** Moves window covering to InstalledOpenLimitLift and InstalledOpenLimitTilt */ command UpOrOpen(): DefaultSuccess = 0; + /** Moves window covering to InstalledClosedLimitLift and InstalledCloseLimitTilt */ command DownOrClose(): DefaultSuccess = 1; + /** Stop any adjusting of window covering */ command StopMotion(): DefaultSuccess = 2; + /** Go to lift value specified */ command GoToLiftValue(GoToLiftValueRequest): DefaultSuccess = 4; + /** Go to lift percentage specified */ command GoToLiftPercentage(GoToLiftPercentageRequest): DefaultSuccess = 5; + /** Go to tilt value specified */ command GoToTiltValue(GoToTiltValueRequest): DefaultSuccess = 7; + /** Go to tilt percentage specified */ command GoToTiltPercentage(GoToTiltPercentageRequest): DefaultSuccess = 8; } diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter index 112ba2a89ddfd1..834efe7ec8a781 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -74,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -144,6 +152,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -156,7 +165,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -215,7 +224,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -230,7 +239,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -302,14 +311,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -318,10 +329,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -397,7 +410,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -470,6 +483,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -477,7 +491,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -494,7 +508,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -522,8 +536,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -533,7 +547,7 @@ server cluster TimeFormatLocalization = 44 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -572,17 +586,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -593,13 +607,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -680,12 +697,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -698,6 +718,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -717,48 +744,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -793,11 +831,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -881,12 +927,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -905,12 +951,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -931,10 +979,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -942,11 +990,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ -server cluster ThreadNetworkDiagnostics = 53 { +cluster ThreadNetworkDiagnostics = 53 { revision 1; // NOTE: Default/not specifically set enum ConnectionStatusEnum : enum8 { @@ -1043,7 +1092,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u panId = 3; readonly attribute nullable int64u extendedPanId = 4; readonly attribute nullable octet_string<17> meshLocalPrefix = 5; - readonly attribute int64u overrunCount = 6; + readonly attribute optional int64u overrunCount = 6; readonly attribute NeighborTableStruct neighborTable[] = 7; readonly attribute RouteTableStruct routeTable[] = 8; readonly attribute nullable int32u partitionId = 9; @@ -1051,51 +1100,51 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u dataVersion = 11; readonly attribute nullable int16u stableDataVersion = 12; readonly attribute nullable int8u leaderRouterId = 13; - readonly attribute int16u detachedRoleCount = 14; - readonly attribute int16u childRoleCount = 15; - readonly attribute int16u routerRoleCount = 16; - readonly attribute int16u leaderRoleCount = 17; - readonly attribute int16u attachAttemptCount = 18; - readonly attribute int16u partitionIdChangeCount = 19; - readonly attribute int16u betterPartitionAttachAttemptCount = 20; - readonly attribute int16u parentChangeCount = 21; - readonly attribute int32u txTotalCount = 22; - readonly attribute int32u txUnicastCount = 23; - readonly attribute int32u txBroadcastCount = 24; - readonly attribute int32u txAckRequestedCount = 25; - readonly attribute int32u txAckedCount = 26; - readonly attribute int32u txNoAckRequestedCount = 27; - readonly attribute int32u txDataCount = 28; - readonly attribute int32u txDataPollCount = 29; - readonly attribute int32u txBeaconCount = 30; - readonly attribute int32u txBeaconRequestCount = 31; - readonly attribute int32u txOtherCount = 32; - readonly attribute int32u txRetryCount = 33; - readonly attribute int32u txDirectMaxRetryExpiryCount = 34; - readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; - readonly attribute int32u txErrCcaCount = 36; - readonly attribute int32u txErrAbortCount = 37; - readonly attribute int32u txErrBusyChannelCount = 38; - readonly attribute int32u rxTotalCount = 39; - readonly attribute int32u rxUnicastCount = 40; - readonly attribute int32u rxBroadcastCount = 41; - readonly attribute int32u rxDataCount = 42; - readonly attribute int32u rxDataPollCount = 43; - readonly attribute int32u rxBeaconCount = 44; - readonly attribute int32u rxBeaconRequestCount = 45; - readonly attribute int32u rxOtherCount = 46; - readonly attribute int32u rxAddressFilteredCount = 47; - readonly attribute int32u rxDestAddrFilteredCount = 48; - readonly attribute int32u rxDuplicatedCount = 49; - readonly attribute int32u rxErrNoFrameCount = 50; - readonly attribute int32u rxErrUnknownNeighborCount = 51; - readonly attribute int32u rxErrInvalidSrcAddrCount = 52; - readonly attribute int32u rxErrSecCount = 53; - readonly attribute int32u rxErrFcsCount = 54; - readonly attribute int32u rxErrOtherCount = 55; - readonly attribute nullable int64u activeTimestamp = 56; - readonly attribute nullable int64u pendingTimestamp = 57; - readonly attribute nullable int32u delay = 58; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; readonly attribute nullable SecurityPolicy securityPolicy = 59; readonly attribute nullable octet_string<4> channelPage0Mask = 60; readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; @@ -1107,11 +1156,12 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster WiFiNetworkDiagnostics = 54 { +cluster WiFiNetworkDiagnostics = 54 { revision 1; // NOTE: Default/not specifically set enum AssociationFailureCauseEnum : enum8 { @@ -1168,14 +1218,14 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; - readonly attribute nullable int32u beaconLostCount = 5; - readonly attribute nullable int32u beaconRxCount = 6; - readonly attribute nullable int32u packetMulticastRxCount = 7; - readonly attribute nullable int32u packetMulticastTxCount = 8; - readonly attribute nullable int32u packetUnicastRxCount = 9; - readonly attribute nullable int32u packetUnicastTxCount = 10; - readonly attribute nullable int64u currentMaxRate = 11; - readonly attribute nullable int64u overrunCount = 12; + readonly attribute optional nullable int32u beaconLostCount = 5; + readonly attribute optional nullable int32u beaconRxCount = 6; + readonly attribute optional nullable int32u packetMulticastRxCount = 7; + readonly attribute optional nullable int32u packetMulticastTxCount = 8; + readonly attribute optional nullable int32u packetUnicastRxCount = 9; + readonly attribute optional nullable int32u packetUnicastTxCount = 10; + readonly attribute optional nullable int64u currentMaxRate = 11; + readonly attribute optional nullable int64u overrunCount = 12; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1183,11 +1233,12 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 */ command ResetCounts(): DefaultSuccess = 0; } /** The Ethernet Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster EthernetNetworkDiagnostics = 55 { +cluster EthernetNetworkDiagnostics = 55 { revision 1; // NOTE: Default/not specifically set enum PHYRateEnum : enum8 { @@ -1208,15 +1259,15 @@ server cluster EthernetNetworkDiagnostics = 55 { kErrorCounts = 0x2; } - readonly attribute nullable PHYRateEnum PHYRate = 0; - readonly attribute nullable boolean fullDuplex = 1; - readonly attribute int64u packetRxCount = 2; - readonly attribute int64u packetTxCount = 3; - readonly attribute int64u txErrCount = 4; - readonly attribute int64u collisionCount = 5; - readonly attribute int64u overrunCount = 6; - readonly attribute nullable boolean carrierDetect = 7; - readonly attribute int64u timeSinceReset = 8; + readonly attribute optional nullable PHYRateEnum PHYRate = 0; + readonly attribute optional nullable boolean fullDuplex = 1; + readonly attribute optional int64u packetRxCount = 2; + readonly attribute optional int64u packetTxCount = 3; + readonly attribute optional int64u txErrCount = 4; + readonly attribute optional int64u collisionCount = 5; + readonly attribute optional int64u overrunCount = 6; + readonly attribute optional nullable boolean carrierDetect = 7; + readonly attribute optional int64u timeSinceReset = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1224,11 +1275,12 @@ server cluster EthernetNetworkDiagnostics = 55 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the attributes: PacketRxCount, PacketTxCount, TxErrCount, CollisionCount, OverrunCount to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1269,13 +1321,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1328,15 +1383,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1350,6 +1419,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1362,38 +1437,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1448,27 +1511,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1486,7 +1553,7 @@ server cluster FixedLabel = 64 { } /** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ -server cluster UserLabel = 65 { +cluster UserLabel = 65 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1504,7 +1571,7 @@ server cluster UserLabel = 65 { } /** This cluster provides an interface to a boolean state called StateValue. */ -server cluster BooleanState = 69 { +cluster BooleanState = 69 { revision 1; info event StateChange = 0 { @@ -1521,7 +1588,7 @@ server cluster BooleanState = 69 { } /** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ -server cluster OccupancySensing = 1030 { +cluster OccupancySensing = 1030 { revision 3; enum OccupancySensorTypeEnum : enum8 { @@ -1544,6 +1611,15 @@ server cluster OccupancySensing = 1030 { readonly attribute OccupancyBitmap occupancy = 0; readonly attribute OccupancySensorTypeEnum occupancySensorType = 1; readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2; + attribute access(write: manage) optional int16u PIROccupiedToUnoccupiedDelay = 16; + attribute access(write: manage) optional int16u PIRUnoccupiedToOccupiedDelay = 17; + attribute access(write: manage) optional int8u PIRUnoccupiedToOccupiedThreshold = 18; + attribute access(write: manage) optional int16u ultrasonicOccupiedToUnoccupiedDelay = 32; + attribute access(write: manage) optional int16u ultrasonicUnoccupiedToOccupiedDelay = 33; + attribute access(write: manage) optional int8u ultrasonicUnoccupiedToOccupiedThreshold = 34; + attribute access(write: manage) optional int16u physicalContactOccupiedToUnoccupiedDelay = 48; + attribute access(write: manage) optional int16u physicalContactUnoccupiedToOccupiedDelay = 49; + attribute access(write: manage) optional int8u physicalContactUnoccupiedToOccupiedThreshold = 50; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter index 4cc0f304729eb9..d7bbc626813f98 100644 --- a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter +++ b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -74,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -144,6 +152,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -153,7 +162,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -server cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -177,7 +186,7 @@ server cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -236,7 +245,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -251,7 +260,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -323,15 +332,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute boolean reachable = 17; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -340,13 +350,15 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Nodes should be expected to be deployed to any and all regions of the world. These global regions may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -363,7 +375,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -391,6 +403,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -403,7 +417,7 @@ server cluster TimeFormatLocalization = 44 { may have differing preferences for the units in which values are conveyed in communication to a user. As such, Nodes that visually or audibly convey measurable values to the user need a mechanism by which they can be configured to use a user’s preferred unit. */ -server cluster UnitLocalization = 45 { +cluster UnitLocalization = 45 { revision 1; enum TempUnitEnum : enum8 { @@ -416,7 +430,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute access(write: manage) TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) optional TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -426,7 +440,7 @@ server cluster UnitLocalization = 45 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -465,17 +479,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -486,13 +500,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -573,12 +590,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -591,6 +611,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -610,48 +637,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -735,12 +773,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -759,12 +797,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster WiFiNetworkDiagnostics = 54 { +cluster WiFiNetworkDiagnostics = 54 { revision 1; // NOTE: Default/not specifically set enum AssociationFailureCauseEnum : enum8 { @@ -821,14 +861,14 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; - readonly attribute nullable int32u beaconLostCount = 5; - readonly attribute nullable int32u beaconRxCount = 6; - readonly attribute nullable int32u packetMulticastRxCount = 7; - readonly attribute nullable int32u packetMulticastTxCount = 8; - readonly attribute nullable int32u packetUnicastRxCount = 9; - readonly attribute nullable int32u packetUnicastTxCount = 10; - readonly attribute nullable int64u currentMaxRate = 11; - readonly attribute nullable int64u overrunCount = 12; + readonly attribute optional nullable int32u beaconLostCount = 5; + readonly attribute optional nullable int32u beaconRxCount = 6; + readonly attribute optional nullable int32u packetMulticastRxCount = 7; + readonly attribute optional nullable int32u packetMulticastTxCount = 8; + readonly attribute optional nullable int32u packetUnicastRxCount = 9; + readonly attribute optional nullable int32u packetUnicastTxCount = 10; + readonly attribute optional nullable int64u currentMaxRate = 11; + readonly attribute optional nullable int64u overrunCount = 12; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -836,11 +876,12 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 */ command ResetCounts(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -877,12 +918,20 @@ server cluster AdministratorCommissioning = 60 { octet_string<32> salt = 4; } + request struct OpenBasicCommissioningWindowRequest { + int16u commissioningTimeout = 0; + } + + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -935,15 +984,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -957,6 +1020,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -969,38 +1038,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1055,26 +1112,30 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** This cluster supports remotely monitoring and, where supported, changing the operational state of any device where a state machine is a part of the operation. */ -server cluster OperationalState = 96 { +cluster OperationalState = 96 { revision 1; // NOTE: Default/not specifically set enum ErrorStateEnum : enum8 { @@ -1114,7 +1175,7 @@ server cluster OperationalState = 96 { readonly attribute nullable char_string phaseList[] = 0; readonly attribute nullable int8u currentPhase = 1; - readonly attribute nullable elapsed_s countdownTime = 2; + readonly attribute optional nullable elapsed_s countdownTime = 2; readonly attribute OperationalStateStruct operationalStateList[] = 3; readonly attribute OperationalStateEnum operationalState = 4; readonly attribute ErrorStateStruct operationalError = 5; @@ -1129,9 +1190,13 @@ server cluster OperationalState = 96 { ErrorStateStruct commandResponseState = 0; } + /** Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. */ command Pause(): OperationalCommandResponse = 0; + /** Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. */ command Stop(): OperationalCommandResponse = 1; + /** Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it can be started. */ command Start(): OperationalCommandResponse = 2; + /** Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). */ command Resume(): OperationalCommandResponse = 3; } diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index 95f33981f5df7f..e620c4167046ac 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -client cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -52,7 +52,7 @@ client cluster Identify = 3 { } /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -95,12 +95,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -124,54 +126,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** Attributes and commands for scene configuration and manipulation. */ -provisional client cluster Scenes = 5 { +provisional cluster Scenes = 5 { revision 5; bitmap CopyModeBitmap : bitmap8 { @@ -364,7 +372,7 @@ provisional client cluster Scenes = 5 { } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -client cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -436,7 +444,7 @@ client cluster OnOff = 6 { } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -459,6 +467,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -468,7 +477,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -server cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -492,7 +501,7 @@ server cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -551,7 +560,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -566,7 +575,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -638,14 +647,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -654,10 +665,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -733,7 +746,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -806,6 +819,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -813,7 +827,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -830,7 +844,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -858,8 +872,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -869,7 +883,7 @@ server cluster TimeFormatLocalization = 44 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -908,17 +922,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -929,13 +943,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -1016,12 +1033,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1034,6 +1054,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -1053,48 +1080,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -1129,11 +1167,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -1217,12 +1263,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1241,12 +1287,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -1267,10 +1315,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1278,11 +1326,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ -server cluster ThreadNetworkDiagnostics = 53 { +cluster ThreadNetworkDiagnostics = 53 { revision 1; // NOTE: Default/not specifically set enum ConnectionStatusEnum : enum8 { @@ -1379,7 +1428,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u panId = 3; readonly attribute nullable int64u extendedPanId = 4; readonly attribute nullable octet_string<17> meshLocalPrefix = 5; - readonly attribute int64u overrunCount = 6; + readonly attribute optional int64u overrunCount = 6; readonly attribute NeighborTableStruct neighborTable[] = 7; readonly attribute RouteTableStruct routeTable[] = 8; readonly attribute nullable int32u partitionId = 9; @@ -1387,51 +1436,51 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u dataVersion = 11; readonly attribute nullable int16u stableDataVersion = 12; readonly attribute nullable int8u leaderRouterId = 13; - readonly attribute int16u detachedRoleCount = 14; - readonly attribute int16u childRoleCount = 15; - readonly attribute int16u routerRoleCount = 16; - readonly attribute int16u leaderRoleCount = 17; - readonly attribute int16u attachAttemptCount = 18; - readonly attribute int16u partitionIdChangeCount = 19; - readonly attribute int16u betterPartitionAttachAttemptCount = 20; - readonly attribute int16u parentChangeCount = 21; - readonly attribute int32u txTotalCount = 22; - readonly attribute int32u txUnicastCount = 23; - readonly attribute int32u txBroadcastCount = 24; - readonly attribute int32u txAckRequestedCount = 25; - readonly attribute int32u txAckedCount = 26; - readonly attribute int32u txNoAckRequestedCount = 27; - readonly attribute int32u txDataCount = 28; - readonly attribute int32u txDataPollCount = 29; - readonly attribute int32u txBeaconCount = 30; - readonly attribute int32u txBeaconRequestCount = 31; - readonly attribute int32u txOtherCount = 32; - readonly attribute int32u txRetryCount = 33; - readonly attribute int32u txDirectMaxRetryExpiryCount = 34; - readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; - readonly attribute int32u txErrCcaCount = 36; - readonly attribute int32u txErrAbortCount = 37; - readonly attribute int32u txErrBusyChannelCount = 38; - readonly attribute int32u rxTotalCount = 39; - readonly attribute int32u rxUnicastCount = 40; - readonly attribute int32u rxBroadcastCount = 41; - readonly attribute int32u rxDataCount = 42; - readonly attribute int32u rxDataPollCount = 43; - readonly attribute int32u rxBeaconCount = 44; - readonly attribute int32u rxBeaconRequestCount = 45; - readonly attribute int32u rxOtherCount = 46; - readonly attribute int32u rxAddressFilteredCount = 47; - readonly attribute int32u rxDestAddrFilteredCount = 48; - readonly attribute int32u rxDuplicatedCount = 49; - readonly attribute int32u rxErrNoFrameCount = 50; - readonly attribute int32u rxErrUnknownNeighborCount = 51; - readonly attribute int32u rxErrInvalidSrcAddrCount = 52; - readonly attribute int32u rxErrSecCount = 53; - readonly attribute int32u rxErrFcsCount = 54; - readonly attribute int32u rxErrOtherCount = 55; - readonly attribute nullable int64u activeTimestamp = 56; - readonly attribute nullable int64u pendingTimestamp = 57; - readonly attribute nullable int32u delay = 58; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; readonly attribute nullable SecurityPolicy securityPolicy = 59; readonly attribute nullable octet_string<4> channelPage0Mask = 60; readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; @@ -1443,11 +1492,12 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster WiFiNetworkDiagnostics = 54 { +cluster WiFiNetworkDiagnostics = 54 { revision 1; // NOTE: Default/not specifically set enum AssociationFailureCauseEnum : enum8 { @@ -1504,14 +1554,14 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; - readonly attribute nullable int32u beaconLostCount = 5; - readonly attribute nullable int32u beaconRxCount = 6; - readonly attribute nullable int32u packetMulticastRxCount = 7; - readonly attribute nullable int32u packetMulticastTxCount = 8; - readonly attribute nullable int32u packetUnicastRxCount = 9; - readonly attribute nullable int32u packetUnicastTxCount = 10; - readonly attribute nullable int64u currentMaxRate = 11; - readonly attribute nullable int64u overrunCount = 12; + readonly attribute optional nullable int32u beaconLostCount = 5; + readonly attribute optional nullable int32u beaconRxCount = 6; + readonly attribute optional nullable int32u packetMulticastRxCount = 7; + readonly attribute optional nullable int32u packetMulticastTxCount = 8; + readonly attribute optional nullable int32u packetUnicastRxCount = 9; + readonly attribute optional nullable int32u packetUnicastTxCount = 10; + readonly attribute optional nullable int64u currentMaxRate = 11; + readonly attribute optional nullable int64u overrunCount = 12; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1519,11 +1569,12 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 */ command ResetCounts(): DefaultSuccess = 0; } /** The Ethernet Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster EthernetNetworkDiagnostics = 55 { +cluster EthernetNetworkDiagnostics = 55 { revision 1; // NOTE: Default/not specifically set enum PHYRateEnum : enum8 { @@ -1544,15 +1595,15 @@ server cluster EthernetNetworkDiagnostics = 55 { kErrorCounts = 0x2; } - readonly attribute nullable PHYRateEnum PHYRate = 0; - readonly attribute nullable boolean fullDuplex = 1; - readonly attribute int64u packetRxCount = 2; - readonly attribute int64u packetTxCount = 3; - readonly attribute int64u txErrCount = 4; - readonly attribute int64u collisionCount = 5; - readonly attribute int64u overrunCount = 6; - readonly attribute nullable boolean carrierDetect = 7; - readonly attribute int64u timeSinceReset = 8; + readonly attribute optional nullable PHYRateEnum PHYRate = 0; + readonly attribute optional nullable boolean fullDuplex = 1; + readonly attribute optional int64u packetRxCount = 2; + readonly attribute optional int64u packetTxCount = 3; + readonly attribute optional int64u txErrCount = 4; + readonly attribute optional int64u collisionCount = 5; + readonly attribute optional int64u overrunCount = 6; + readonly attribute optional nullable boolean carrierDetect = 7; + readonly attribute optional int64u timeSinceReset = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1560,11 +1611,12 @@ server cluster EthernetNetworkDiagnostics = 55 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the attributes: PacketRxCount, PacketTxCount, TxErrCount, CollisionCount, OverrunCount to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** Accurate time is required for a number of reasons, including scheduling, display and validating security materials. */ -server cluster TimeSynchronization = 56 { +cluster TimeSynchronization = 56 { revision 2; enum GranularityEnum : enum8 { @@ -1655,16 +1707,17 @@ server cluster TimeSynchronization = 56 { readonly attribute nullable epoch_us UTCTime = 0; readonly attribute GranularityEnum granularity = 1; - readonly attribute TimeSourceEnum timeSource = 2; - readonly attribute nullable TrustedTimeSourceStruct trustedTimeSource = 3; - readonly attribute nullable char_string<128> defaultNTP = 4; - readonly attribute TimeZoneStruct timeZone[] = 5; - readonly attribute DSTOffsetStruct DSTOffset[] = 6; - readonly attribute nullable epoch_us localTime = 7; - readonly attribute TimeZoneDatabaseEnum timeZoneDatabase = 8; - readonly attribute int8u timeZoneListMaxSize = 10; - readonly attribute int8u DSTOffsetListMaxSize = 11; - readonly attribute boolean supportsDNSResolve = 12; + readonly attribute optional TimeSourceEnum timeSource = 2; + readonly attribute optional nullable TrustedTimeSourceStruct trustedTimeSource = 3; + readonly attribute optional nullable char_string<128> defaultNTP = 4; + readonly attribute optional TimeZoneStruct timeZone[] = 5; + readonly attribute optional DSTOffsetStruct DSTOffset[] = 6; + readonly attribute optional nullable epoch_us localTime = 7; + readonly attribute optional TimeZoneDatabaseEnum timeZoneDatabase = 8; + readonly attribute optional boolean NTPServerAvailable = 9; + readonly attribute optional int8u timeZoneListMaxSize = 10; + readonly attribute optional int8u DSTOffsetListMaxSize = 11; + readonly attribute optional boolean supportsDNSResolve = 12; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1686,6 +1739,10 @@ server cluster TimeSynchronization = 56 { TimeZoneStruct timeZone[] = 0; } + response struct SetTimeZoneResponse = 3 { + boolean DSTOffsetRequired = 0; + } + request struct SetDSTOffsetRequest { DSTOffsetStruct DSTOffset[] = 0; } @@ -1694,21 +1751,22 @@ server cluster TimeSynchronization = 56 { nullable char_string<128> defaultNTP = 0; } - response struct SetTimeZoneResponse = 3 { - boolean DSTOffsetRequired = 0; - } - + /** This command MAY be issued by Administrator to set the time. */ command access(invoke: administer) SetUTCTime(SetUTCTimeRequest): DefaultSuccess = 0; + /** This command SHALL set TrustedTimeSource. */ fabric command access(invoke: administer) SetTrustedTimeSource(SetTrustedTimeSourceRequest): DefaultSuccess = 1; + /** This command SHALL set TimeZone. */ command access(invoke: manage) SetTimeZone(SetTimeZoneRequest): SetTimeZoneResponse = 2; + /** This command SHALL set DSTOffset. */ command access(invoke: manage) SetDSTOffset(SetDSTOffsetRequest): DefaultSuccess = 4; + /** This command is used to set DefaultNTP. */ command access(invoke: administer) SetDefaultNTP(SetDefaultNTPRequest): DefaultSuccess = 5; } /** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { +cluster Switch = 59 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -1751,6 +1809,7 @@ server cluster Switch = 59 { readonly attribute int8u numberOfPositions = 0; readonly attribute int8u currentPosition = 1; + readonly attribute optional int8u multiPressMax = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1760,7 +1819,7 @@ server cluster Switch = 59 { } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1801,13 +1860,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1860,15 +1922,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1882,6 +1958,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1894,38 +1976,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1980,27 +2050,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -2018,7 +2092,7 @@ server cluster FixedLabel = 64 { } /** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ -server cluster UserLabel = 65 { +cluster UserLabel = 65 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -2036,7 +2110,7 @@ server cluster UserLabel = 65 { } /** Allows servers to ensure that listed clients are notified when a server is available for communication. */ -server cluster IcdManagement = 70 { +cluster IcdManagement = 70 { revision 2; bitmap Feature : bitmap32 { @@ -2074,16 +2148,48 @@ server cluster IcdManagement = 70 { readonly attribute int32u idleModeDuration = 0; readonly attribute int32u activeModeDuration = 1; readonly attribute int16u activeModeThreshold = 2; + readonly attribute access(read: administer) optional MonitoringRegistrationStruct registeredClients[] = 3; + readonly attribute access(read: administer) optional int32u ICDCounter = 4; + readonly attribute optional int16u clientsSupportedPerFabric = 5; + readonly attribute optional UserActiveModeTriggerBitmap userActiveModeTriggerHint = 6; + readonly attribute optional char_string<128> userActiveModeTriggerInstruction = 7; 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; + + request struct RegisterClientRequest { + node_id checkInNodeID = 0; + int64u monitoredSubject = 1; + octet_string<16> key = 2; + optional octet_string<16> verificationKey = 3; + } + + response struct RegisterClientResponse = 1 { + int32u ICDCounter = 0; + } + + request struct UnregisterClientRequest { + node_id checkInNodeID = 0; + optional octet_string<16> verificationKey = 1; + } + + response struct StayActiveResponse = 4 { + int32u promisedActiveDuration = 0; + } + + /** Register a client to the end device */ + fabric command access(invoke: manage) RegisterClient(RegisterClientRequest): RegisterClientResponse = 0; + /** Unregister a client from an end device */ + fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2; + /** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */ + command access(invoke: manage) StayActiveRequest(): StayActiveResponse = 3; } /** Attributes and commands for controlling the color properties of a color-capable light. */ -client cluster ColorControl = 768 { +cluster ColorControl = 768 { revision 6; enum ColorLoopAction : enum8 { diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter index e240264c075ff1..dacc334477e386 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -74,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -156,10 +164,10 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; - readonly attribute boolean globalSceneControl = 16384; - attribute int16u onTime = 16385; - attribute int16u offWaitTime = 16386; - attribute access(write: manage) nullable StartUpOnOffEnum startUpOnOff = 16387; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -178,16 +186,22 @@ server cluster OnOff = 6 { int16u offWaitTime = 2; } + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ -server cluster LevelControl = 8 { +cluster LevelControl = 8 { revision 5; enum MoveModeEnum : enum8 { @@ -212,19 +226,19 @@ server cluster LevelControl = 8 { } readonly attribute nullable int8u currentLevel = 0; - readonly attribute int16u remainingTime = 1; - readonly attribute int8u minLevel = 2; - readonly attribute int8u maxLevel = 3; - readonly attribute int16u currentFrequency = 4; - readonly attribute int16u minFrequency = 5; - readonly attribute int16u maxFrequency = 6; + readonly attribute optional int16u remainingTime = 1; + readonly attribute optional int8u minLevel = 2; + readonly attribute optional int8u maxLevel = 3; + readonly attribute optional int16u currentFrequency = 4; + readonly attribute optional int16u minFrequency = 5; + readonly attribute optional int16u maxFrequency = 6; attribute OptionsBitmap options = 15; - attribute int16u onOffTransitionTime = 16; + attribute optional int16u onOffTransitionTime = 16; attribute nullable int8u onLevel = 17; - attribute nullable int16u onTransitionTime = 18; - attribute nullable int16u offTransitionTime = 19; - attribute nullable int8u defaultMoveRate = 20; - attribute access(write: manage) nullable int8u startUpCurrentLevel = 16384; + attribute optional nullable int16u onTransitionTime = 18; + attribute optional nullable int16u offTransitionTime = 19; + attribute optional nullable int8u defaultMoveRate = 20; + attribute access(write: manage) optional nullable int8u startUpCurrentLevel = 16384; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -286,18 +300,33 @@ server cluster LevelControl = 8 { OptionsBitmap optionsOverride = 1; } + request struct MoveToClosestFrequencyRequest { + int16u frequency = 0; + } + + /** Command description for MoveToLevel */ command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + /** Command description for Move */ command Move(MoveRequest): DefaultSuccess = 1; + /** Command description for Step */ command Step(StepRequest): DefaultSuccess = 2; + /** Command description for Stop */ command Stop(StopRequest): DefaultSuccess = 3; + /** Command description for MoveToLevelWithOnOff */ command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + /** Command description for MoveWithOnOff */ command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + /** Command description for StepWithOnOff */ command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + /** Command description for StopWithOnOff */ command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; + /** Change the currrent frequency to the provided one, or a close + approximation if the exact provided one is not possible. */ + command MoveToClosestFrequency(MoveToClosestFrequencyRequest): DefaultSuccess = 8; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -320,6 +349,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -332,7 +362,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -391,7 +421,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -406,7 +436,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -478,14 +508,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -494,10 +526,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -573,7 +607,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -646,6 +680,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -653,7 +688,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -670,7 +705,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -698,8 +733,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -709,7 +744,7 @@ server cluster TimeFormatLocalization = 44 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -748,17 +783,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -769,13 +804,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -856,12 +894,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -874,6 +915,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -893,48 +941,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -969,11 +1028,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -1057,12 +1124,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1081,12 +1148,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -1107,9 +1176,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1117,11 +1187,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** The Ethernet Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster EthernetNetworkDiagnostics = 55 { +cluster EthernetNetworkDiagnostics = 55 { revision 1; // NOTE: Default/not specifically set enum PHYRateEnum : enum8 { @@ -1142,15 +1213,15 @@ server cluster EthernetNetworkDiagnostics = 55 { kErrorCounts = 0x2; } - readonly attribute nullable PHYRateEnum PHYRate = 0; - readonly attribute nullable boolean fullDuplex = 1; - readonly attribute int64u packetRxCount = 2; - readonly attribute int64u packetTxCount = 3; - readonly attribute int64u txErrCount = 4; - readonly attribute int64u collisionCount = 5; - readonly attribute int64u overrunCount = 6; - readonly attribute nullable boolean carrierDetect = 7; - readonly attribute int64u timeSinceReset = 8; + readonly attribute optional nullable PHYRateEnum PHYRate = 0; + readonly attribute optional nullable boolean fullDuplex = 1; + readonly attribute optional int64u packetRxCount = 2; + readonly attribute optional int64u packetTxCount = 3; + readonly attribute optional int64u txErrCount = 4; + readonly attribute optional int64u collisionCount = 5; + readonly attribute optional int64u overrunCount = 6; + readonly attribute optional nullable boolean carrierDetect = 7; + readonly attribute optional int64u timeSinceReset = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1158,11 +1229,12 @@ server cluster EthernetNetworkDiagnostics = 55 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the attributes: PacketRxCount, PacketTxCount, TxErrCount, CollisionCount, OverrunCount to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1203,13 +1275,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1262,15 +1337,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1284,6 +1373,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1296,38 +1391,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1382,27 +1465,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1420,7 +1507,7 @@ server cluster FixedLabel = 64 { } /** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ -server cluster UserLabel = 65 { +cluster UserLabel = 65 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1438,7 +1525,7 @@ server cluster UserLabel = 65 { } /** Attributes and commands for controlling the color properties of a color-capable light. */ -server cluster ColorControl = 768 { +cluster ColorControl = 768 { revision 6; enum ColorLoopAction : enum8 { @@ -1510,45 +1597,58 @@ server cluster ColorControl = 768 { kColorTemperature = 0x10; } - readonly attribute int8u currentHue = 0; - readonly attribute int8u currentSaturation = 1; - readonly attribute int16u remainingTime = 2; - readonly attribute int16u currentX = 3; - readonly attribute int16u currentY = 4; - readonly attribute int16u colorTemperatureMireds = 7; + readonly attribute optional int8u currentHue = 0; + readonly attribute optional int8u currentSaturation = 1; + readonly attribute optional int16u remainingTime = 2; + readonly attribute optional int16u currentX = 3; + readonly attribute optional int16u currentY = 4; + readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional char_string<254> compensationText = 6; + readonly attribute optional int16u colorTemperatureMireds = 7; readonly attribute enum8 colorMode = 8; attribute bitmap8 options = 15; readonly attribute nullable int8u numberOfPrimaries = 16; - readonly attribute int16u primary1X = 17; - readonly attribute int16u primary1Y = 18; - readonly attribute nullable int8u primary1Intensity = 19; - readonly attribute int16u primary2X = 21; - readonly attribute int16u primary2Y = 22; - readonly attribute nullable int8u primary2Intensity = 23; - readonly attribute int16u primary3X = 25; - readonly attribute int16u primary3Y = 26; - readonly attribute nullable int8u primary3Intensity = 27; - readonly attribute int16u primary4X = 32; - readonly attribute int16u primary4Y = 33; - readonly attribute nullable int8u primary4Intensity = 34; - readonly attribute int16u primary5X = 36; - readonly attribute int16u primary5Y = 37; - readonly attribute nullable int8u primary5Intensity = 38; - readonly attribute int16u primary6X = 40; - readonly attribute int16u primary6Y = 41; - readonly attribute nullable int8u primary6Intensity = 42; - readonly attribute int16u enhancedCurrentHue = 16384; + readonly attribute optional int16u primary1X = 17; + readonly attribute optional int16u primary1Y = 18; + readonly attribute optional nullable int8u primary1Intensity = 19; + readonly attribute optional int16u primary2X = 21; + readonly attribute optional int16u primary2Y = 22; + readonly attribute optional nullable int8u primary2Intensity = 23; + readonly attribute optional int16u primary3X = 25; + readonly attribute optional int16u primary3Y = 26; + readonly attribute optional nullable int8u primary3Intensity = 27; + readonly attribute optional int16u primary4X = 32; + readonly attribute optional int16u primary4Y = 33; + readonly attribute optional nullable int8u primary4Intensity = 34; + readonly attribute optional int16u primary5X = 36; + readonly attribute optional int16u primary5Y = 37; + readonly attribute optional nullable int8u primary5Intensity = 38; + readonly attribute optional int16u primary6X = 40; + readonly attribute optional int16u primary6Y = 41; + readonly attribute optional nullable int8u primary6Intensity = 42; + attribute access(write: manage) optional int16u whitePointX = 48; + attribute access(write: manage) optional int16u whitePointY = 49; + attribute access(write: manage) optional int16u colorPointRX = 50; + attribute access(write: manage) optional int16u colorPointRY = 51; + attribute access(write: manage) optional nullable int8u colorPointRIntensity = 52; + attribute access(write: manage) optional int16u colorPointGX = 54; + attribute access(write: manage) optional int16u colorPointGY = 55; + attribute access(write: manage) optional nullable int8u colorPointGIntensity = 56; + attribute access(write: manage) optional int16u colorPointBX = 58; + attribute access(write: manage) optional int16u colorPointBY = 59; + attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; + readonly attribute optional int16u enhancedCurrentHue = 16384; readonly attribute enum8 enhancedColorMode = 16385; - readonly attribute int8u colorLoopActive = 16386; - readonly attribute int8u colorLoopDirection = 16387; - readonly attribute int16u colorLoopTime = 16388; - readonly attribute int16u colorLoopStartEnhancedHue = 16389; - readonly attribute int16u colorLoopStoredEnhancedHue = 16390; + readonly attribute optional int8u colorLoopActive = 16386; + readonly attribute optional int8u colorLoopDirection = 16387; + readonly attribute optional int16u colorLoopTime = 16388; + readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; + readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; readonly attribute bitmap16 colorCapabilities = 16394; - readonly attribute int16u colorTempPhysicalMinMireds = 16395; - readonly attribute int16u colorTempPhysicalMaxMireds = 16396; - readonly attribute int16u coupleColorTempToLevelMinMireds = 16397; - attribute access(write: manage) nullable int16u startUpColorTemperatureMireds = 16400; + readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; + readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; + readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; + attribute access(write: manage) optional nullable int16u startUpColorTemperatureMireds = 16400; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1704,24 +1804,43 @@ server cluster ColorControl = 768 { bitmap8 optionsOverride = 6; } + /** Move to specified hue. */ command MoveToHue(MoveToHueRequest): DefaultSuccess = 0; + /** Move hue up or down at specified rate. */ command MoveHue(MoveHueRequest): DefaultSuccess = 1; + /** Step hue up or down by specified size at specified rate. */ command StepHue(StepHueRequest): DefaultSuccess = 2; + /** Move to specified saturation. */ command MoveToSaturation(MoveToSaturationRequest): DefaultSuccess = 3; + /** Move saturation up or down at specified rate. */ command MoveSaturation(MoveSaturationRequest): DefaultSuccess = 4; + /** Step saturation up or down by specified size at specified rate. */ command StepSaturation(StepSaturationRequest): DefaultSuccess = 5; + /** Move to hue and saturation. */ command MoveToHueAndSaturation(MoveToHueAndSaturationRequest): DefaultSuccess = 6; + /** Move to specified color. */ command MoveToColor(MoveToColorRequest): DefaultSuccess = 7; + /** Moves the color. */ command MoveColor(MoveColorRequest): DefaultSuccess = 8; + /** Steps the lighting to a specific color. */ command StepColor(StepColorRequest): DefaultSuccess = 9; + /** Move to a specific color temperature. */ command MoveToColorTemperature(MoveToColorTemperatureRequest): DefaultSuccess = 10; + /** Command description for EnhancedMoveToHue */ command EnhancedMoveToHue(EnhancedMoveToHueRequest): DefaultSuccess = 64; + /** Command description for EnhancedMoveHue */ command EnhancedMoveHue(EnhancedMoveHueRequest): DefaultSuccess = 65; + /** Command description for EnhancedStepHue */ command EnhancedStepHue(EnhancedStepHueRequest): DefaultSuccess = 66; + /** Command description for EnhancedMoveToHueAndSaturation */ command EnhancedMoveToHueAndSaturation(EnhancedMoveToHueAndSaturationRequest): DefaultSuccess = 67; + /** Command description for ColorLoopSet */ command ColorLoopSet(ColorLoopSetRequest): DefaultSuccess = 68; + /** Command description for StopMoveStep */ command StopMoveStep(StopMoveStepRequest): DefaultSuccess = 71; + /** Command description for MoveColorTemperature */ command MoveColorTemperature(MoveColorTemperatureRequest): DefaultSuccess = 75; + /** Command description for StepColorTemperature */ command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76; } diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter index 6c9dd9e766b5f2..615b7f857fa390 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -74,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -156,10 +164,10 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; - readonly attribute boolean globalSceneControl = 16384; - attribute int16u onTime = 16385; - attribute int16u offWaitTime = 16386; - attribute access(write: manage) nullable StartUpOnOffEnum startUpOnOff = 16387; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -178,16 +186,22 @@ server cluster OnOff = 6 { int16u offWaitTime = 2; } + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ -server cluster LevelControl = 8 { +cluster LevelControl = 8 { revision 5; enum MoveModeEnum : enum8 { @@ -212,19 +226,19 @@ server cluster LevelControl = 8 { } readonly attribute nullable int8u currentLevel = 0; - readonly attribute int16u remainingTime = 1; - readonly attribute int8u minLevel = 2; - readonly attribute int8u maxLevel = 3; - readonly attribute int16u currentFrequency = 4; - readonly attribute int16u minFrequency = 5; - readonly attribute int16u maxFrequency = 6; + readonly attribute optional int16u remainingTime = 1; + readonly attribute optional int8u minLevel = 2; + readonly attribute optional int8u maxLevel = 3; + readonly attribute optional int16u currentFrequency = 4; + readonly attribute optional int16u minFrequency = 5; + readonly attribute optional int16u maxFrequency = 6; attribute OptionsBitmap options = 15; - attribute int16u onOffTransitionTime = 16; + attribute optional int16u onOffTransitionTime = 16; attribute nullable int8u onLevel = 17; - attribute nullable int16u onTransitionTime = 18; - attribute nullable int16u offTransitionTime = 19; - attribute nullable int8u defaultMoveRate = 20; - attribute access(write: manage) nullable int8u startUpCurrentLevel = 16384; + attribute optional nullable int16u onTransitionTime = 18; + attribute optional nullable int16u offTransitionTime = 19; + attribute optional nullable int8u defaultMoveRate = 20; + attribute access(write: manage) optional nullable int8u startUpCurrentLevel = 16384; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -286,18 +300,33 @@ server cluster LevelControl = 8 { OptionsBitmap optionsOverride = 1; } + request struct MoveToClosestFrequencyRequest { + int16u frequency = 0; + } + + /** Command description for MoveToLevel */ command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + /** Command description for Move */ command Move(MoveRequest): DefaultSuccess = 1; + /** Command description for Step */ command Step(StepRequest): DefaultSuccess = 2; + /** Command description for Stop */ command Stop(StopRequest): DefaultSuccess = 3; + /** Command description for MoveToLevelWithOnOff */ command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + /** Command description for MoveWithOnOff */ command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + /** Command description for StepWithOnOff */ command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + /** Command description for StopWithOnOff */ command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; + /** Change the currrent frequency to the provided one, or a close + approximation if the exact provided one is not possible. */ + command MoveToClosestFrequency(MoveToClosestFrequencyRequest): DefaultSuccess = 8; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -320,6 +349,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -332,7 +362,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -391,7 +421,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -406,7 +436,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -478,14 +508,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -494,10 +526,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -573,7 +607,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -646,6 +680,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -653,7 +688,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -670,7 +705,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -698,8 +733,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -709,7 +744,7 @@ server cluster TimeFormatLocalization = 44 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -748,17 +783,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -769,13 +804,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -856,12 +894,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -874,6 +915,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -893,48 +941,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -969,11 +1028,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -1057,12 +1124,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1081,12 +1148,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -1107,10 +1176,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1118,11 +1187,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ -server cluster ThreadNetworkDiagnostics = 53 { +cluster ThreadNetworkDiagnostics = 53 { revision 1; // NOTE: Default/not specifically set enum ConnectionStatusEnum : enum8 { @@ -1219,7 +1289,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u panId = 3; readonly attribute nullable int64u extendedPanId = 4; readonly attribute nullable octet_string<17> meshLocalPrefix = 5; - readonly attribute int64u overrunCount = 6; + readonly attribute optional int64u overrunCount = 6; readonly attribute NeighborTableStruct neighborTable[] = 7; readonly attribute RouteTableStruct routeTable[] = 8; readonly attribute nullable int32u partitionId = 9; @@ -1227,51 +1297,51 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u dataVersion = 11; readonly attribute nullable int16u stableDataVersion = 12; readonly attribute nullable int8u leaderRouterId = 13; - readonly attribute int16u detachedRoleCount = 14; - readonly attribute int16u childRoleCount = 15; - readonly attribute int16u routerRoleCount = 16; - readonly attribute int16u leaderRoleCount = 17; - readonly attribute int16u attachAttemptCount = 18; - readonly attribute int16u partitionIdChangeCount = 19; - readonly attribute int16u betterPartitionAttachAttemptCount = 20; - readonly attribute int16u parentChangeCount = 21; - readonly attribute int32u txTotalCount = 22; - readonly attribute int32u txUnicastCount = 23; - readonly attribute int32u txBroadcastCount = 24; - readonly attribute int32u txAckRequestedCount = 25; - readonly attribute int32u txAckedCount = 26; - readonly attribute int32u txNoAckRequestedCount = 27; - readonly attribute int32u txDataCount = 28; - readonly attribute int32u txDataPollCount = 29; - readonly attribute int32u txBeaconCount = 30; - readonly attribute int32u txBeaconRequestCount = 31; - readonly attribute int32u txOtherCount = 32; - readonly attribute int32u txRetryCount = 33; - readonly attribute int32u txDirectMaxRetryExpiryCount = 34; - readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; - readonly attribute int32u txErrCcaCount = 36; - readonly attribute int32u txErrAbortCount = 37; - readonly attribute int32u txErrBusyChannelCount = 38; - readonly attribute int32u rxTotalCount = 39; - readonly attribute int32u rxUnicastCount = 40; - readonly attribute int32u rxBroadcastCount = 41; - readonly attribute int32u rxDataCount = 42; - readonly attribute int32u rxDataPollCount = 43; - readonly attribute int32u rxBeaconCount = 44; - readonly attribute int32u rxBeaconRequestCount = 45; - readonly attribute int32u rxOtherCount = 46; - readonly attribute int32u rxAddressFilteredCount = 47; - readonly attribute int32u rxDestAddrFilteredCount = 48; - readonly attribute int32u rxDuplicatedCount = 49; - readonly attribute int32u rxErrNoFrameCount = 50; - readonly attribute int32u rxErrUnknownNeighborCount = 51; - readonly attribute int32u rxErrInvalidSrcAddrCount = 52; - readonly attribute int32u rxErrSecCount = 53; - readonly attribute int32u rxErrFcsCount = 54; - readonly attribute int32u rxErrOtherCount = 55; - readonly attribute nullable int64u activeTimestamp = 56; - readonly attribute nullable int64u pendingTimestamp = 57; - readonly attribute nullable int32u delay = 58; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; readonly attribute nullable SecurityPolicy securityPolicy = 59; readonly attribute nullable octet_string<4> channelPage0Mask = 60; readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; @@ -1282,10 +1352,13 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ + command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1326,13 +1399,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1385,15 +1461,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1407,6 +1497,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1419,38 +1515,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1505,27 +1589,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1543,7 +1631,7 @@ server cluster FixedLabel = 64 { } /** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ -server cluster UserLabel = 65 { +cluster UserLabel = 65 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1561,7 +1649,7 @@ server cluster UserLabel = 65 { } /** Attributes and commands for controlling the color properties of a color-capable light. */ -server cluster ColorControl = 768 { +cluster ColorControl = 768 { revision 6; enum ColorLoopAction : enum8 { @@ -1633,45 +1721,58 @@ server cluster ColorControl = 768 { kColorTemperature = 0x10; } - readonly attribute int8u currentHue = 0; - readonly attribute int8u currentSaturation = 1; - readonly attribute int16u remainingTime = 2; - readonly attribute int16u currentX = 3; - readonly attribute int16u currentY = 4; - readonly attribute int16u colorTemperatureMireds = 7; + readonly attribute optional int8u currentHue = 0; + readonly attribute optional int8u currentSaturation = 1; + readonly attribute optional int16u remainingTime = 2; + readonly attribute optional int16u currentX = 3; + readonly attribute optional int16u currentY = 4; + readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional char_string<254> compensationText = 6; + readonly attribute optional int16u colorTemperatureMireds = 7; readonly attribute enum8 colorMode = 8; attribute bitmap8 options = 15; readonly attribute nullable int8u numberOfPrimaries = 16; - readonly attribute int16u primary1X = 17; - readonly attribute int16u primary1Y = 18; - readonly attribute nullable int8u primary1Intensity = 19; - readonly attribute int16u primary2X = 21; - readonly attribute int16u primary2Y = 22; - readonly attribute nullable int8u primary2Intensity = 23; - readonly attribute int16u primary3X = 25; - readonly attribute int16u primary3Y = 26; - readonly attribute nullable int8u primary3Intensity = 27; - readonly attribute int16u primary4X = 32; - readonly attribute int16u primary4Y = 33; - readonly attribute nullable int8u primary4Intensity = 34; - readonly attribute int16u primary5X = 36; - readonly attribute int16u primary5Y = 37; - readonly attribute nullable int8u primary5Intensity = 38; - readonly attribute int16u primary6X = 40; - readonly attribute int16u primary6Y = 41; - readonly attribute nullable int8u primary6Intensity = 42; - readonly attribute int16u enhancedCurrentHue = 16384; + readonly attribute optional int16u primary1X = 17; + readonly attribute optional int16u primary1Y = 18; + readonly attribute optional nullable int8u primary1Intensity = 19; + readonly attribute optional int16u primary2X = 21; + readonly attribute optional int16u primary2Y = 22; + readonly attribute optional nullable int8u primary2Intensity = 23; + readonly attribute optional int16u primary3X = 25; + readonly attribute optional int16u primary3Y = 26; + readonly attribute optional nullable int8u primary3Intensity = 27; + readonly attribute optional int16u primary4X = 32; + readonly attribute optional int16u primary4Y = 33; + readonly attribute optional nullable int8u primary4Intensity = 34; + readonly attribute optional int16u primary5X = 36; + readonly attribute optional int16u primary5Y = 37; + readonly attribute optional nullable int8u primary5Intensity = 38; + readonly attribute optional int16u primary6X = 40; + readonly attribute optional int16u primary6Y = 41; + readonly attribute optional nullable int8u primary6Intensity = 42; + attribute access(write: manage) optional int16u whitePointX = 48; + attribute access(write: manage) optional int16u whitePointY = 49; + attribute access(write: manage) optional int16u colorPointRX = 50; + attribute access(write: manage) optional int16u colorPointRY = 51; + attribute access(write: manage) optional nullable int8u colorPointRIntensity = 52; + attribute access(write: manage) optional int16u colorPointGX = 54; + attribute access(write: manage) optional int16u colorPointGY = 55; + attribute access(write: manage) optional nullable int8u colorPointGIntensity = 56; + attribute access(write: manage) optional int16u colorPointBX = 58; + attribute access(write: manage) optional int16u colorPointBY = 59; + attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; + readonly attribute optional int16u enhancedCurrentHue = 16384; readonly attribute enum8 enhancedColorMode = 16385; - readonly attribute int8u colorLoopActive = 16386; - readonly attribute int8u colorLoopDirection = 16387; - readonly attribute int16u colorLoopTime = 16388; - readonly attribute int16u colorLoopStartEnhancedHue = 16389; - readonly attribute int16u colorLoopStoredEnhancedHue = 16390; + readonly attribute optional int8u colorLoopActive = 16386; + readonly attribute optional int8u colorLoopDirection = 16387; + readonly attribute optional int16u colorLoopTime = 16388; + readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; + readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; readonly attribute bitmap16 colorCapabilities = 16394; - readonly attribute int16u colorTempPhysicalMinMireds = 16395; - readonly attribute int16u colorTempPhysicalMaxMireds = 16396; - readonly attribute int16u coupleColorTempToLevelMinMireds = 16397; - attribute access(write: manage) nullable int16u startUpColorTemperatureMireds = 16400; + readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; + readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; + readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; + attribute access(write: manage) optional nullable int16u startUpColorTemperatureMireds = 16400; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1827,24 +1928,43 @@ server cluster ColorControl = 768 { bitmap8 optionsOverride = 6; } + /** Move to specified hue. */ command MoveToHue(MoveToHueRequest): DefaultSuccess = 0; + /** Move hue up or down at specified rate. */ command MoveHue(MoveHueRequest): DefaultSuccess = 1; + /** Step hue up or down by specified size at specified rate. */ command StepHue(StepHueRequest): DefaultSuccess = 2; + /** Move to specified saturation. */ command MoveToSaturation(MoveToSaturationRequest): DefaultSuccess = 3; + /** Move saturation up or down at specified rate. */ command MoveSaturation(MoveSaturationRequest): DefaultSuccess = 4; + /** Step saturation up or down by specified size at specified rate. */ command StepSaturation(StepSaturationRequest): DefaultSuccess = 5; + /** Move to hue and saturation. */ command MoveToHueAndSaturation(MoveToHueAndSaturationRequest): DefaultSuccess = 6; + /** Move to specified color. */ command MoveToColor(MoveToColorRequest): DefaultSuccess = 7; + /** Moves the color. */ command MoveColor(MoveColorRequest): DefaultSuccess = 8; + /** Steps the lighting to a specific color. */ command StepColor(StepColorRequest): DefaultSuccess = 9; + /** Move to a specific color temperature. */ command MoveToColorTemperature(MoveToColorTemperatureRequest): DefaultSuccess = 10; + /** Command description for EnhancedMoveToHue */ command EnhancedMoveToHue(EnhancedMoveToHueRequest): DefaultSuccess = 64; + /** Command description for EnhancedMoveHue */ command EnhancedMoveHue(EnhancedMoveHueRequest): DefaultSuccess = 65; + /** Command description for EnhancedStepHue */ command EnhancedStepHue(EnhancedStepHueRequest): DefaultSuccess = 66; + /** Command description for EnhancedMoveToHueAndSaturation */ command EnhancedMoveToHueAndSaturation(EnhancedMoveToHueAndSaturationRequest): DefaultSuccess = 67; + /** Command description for ColorLoopSet */ command ColorLoopSet(ColorLoopSetRequest): DefaultSuccess = 68; + /** Command description for StopMoveStep */ command StopMoveStep(StopMoveStepRequest): DefaultSuccess = 71; + /** Command description for MoveColorTemperature */ command MoveColorTemperature(MoveColorTemperatureRequest): DefaultSuccess = 75; + /** Command description for StepColorTemperature */ command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76; } diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter index 40e2a56a180b31..a4c13b17b4b040 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -74,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -156,10 +164,10 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; - readonly attribute boolean globalSceneControl = 16384; - attribute int16u onTime = 16385; - attribute int16u offWaitTime = 16386; - attribute access(write: manage) nullable StartUpOnOffEnum startUpOnOff = 16387; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -178,16 +186,22 @@ server cluster OnOff = 6 { int16u offWaitTime = 2; } + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ -server cluster LevelControl = 8 { +cluster LevelControl = 8 { revision 5; enum MoveModeEnum : enum8 { @@ -212,19 +226,19 @@ server cluster LevelControl = 8 { } readonly attribute nullable int8u currentLevel = 0; - readonly attribute int16u remainingTime = 1; - readonly attribute int8u minLevel = 2; - readonly attribute int8u maxLevel = 3; - readonly attribute int16u currentFrequency = 4; - readonly attribute int16u minFrequency = 5; - readonly attribute int16u maxFrequency = 6; + readonly attribute optional int16u remainingTime = 1; + readonly attribute optional int8u minLevel = 2; + readonly attribute optional int8u maxLevel = 3; + readonly attribute optional int16u currentFrequency = 4; + readonly attribute optional int16u minFrequency = 5; + readonly attribute optional int16u maxFrequency = 6; attribute OptionsBitmap options = 15; - attribute int16u onOffTransitionTime = 16; + attribute optional int16u onOffTransitionTime = 16; attribute nullable int8u onLevel = 17; - attribute nullable int16u onTransitionTime = 18; - attribute nullable int16u offTransitionTime = 19; - attribute nullable int8u defaultMoveRate = 20; - attribute access(write: manage) nullable int8u startUpCurrentLevel = 16384; + attribute optional nullable int16u onTransitionTime = 18; + attribute optional nullable int16u offTransitionTime = 19; + attribute optional nullable int8u defaultMoveRate = 20; + attribute access(write: manage) optional nullable int8u startUpCurrentLevel = 16384; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -286,18 +300,33 @@ server cluster LevelControl = 8 { OptionsBitmap optionsOverride = 1; } + request struct MoveToClosestFrequencyRequest { + int16u frequency = 0; + } + + /** Command description for MoveToLevel */ command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + /** Command description for Move */ command Move(MoveRequest): DefaultSuccess = 1; + /** Command description for Step */ command Step(StepRequest): DefaultSuccess = 2; + /** Command description for Stop */ command Stop(StopRequest): DefaultSuccess = 3; + /** Command description for MoveToLevelWithOnOff */ command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + /** Command description for MoveWithOnOff */ command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + /** Command description for StepWithOnOff */ command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + /** Command description for StopWithOnOff */ command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; + /** Change the currrent frequency to the provided one, or a close + approximation if the exact provided one is not possible. */ + command MoveToClosestFrequency(MoveToClosestFrequencyRequest): DefaultSuccess = 8; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -320,6 +349,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -332,7 +362,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -391,7 +421,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -406,7 +436,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -478,14 +508,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -494,10 +526,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -573,7 +607,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -646,6 +680,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -653,7 +688,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -670,7 +705,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -698,8 +733,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -709,7 +744,7 @@ server cluster TimeFormatLocalization = 44 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -748,17 +783,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -769,13 +804,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -856,12 +894,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -874,6 +915,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -893,48 +941,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -969,11 +1028,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -1057,12 +1124,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1081,12 +1148,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -1107,9 +1176,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1117,11 +1187,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster WiFiNetworkDiagnostics = 54 { +cluster WiFiNetworkDiagnostics = 54 { revision 1; // NOTE: Default/not specifically set enum AssociationFailureCauseEnum : enum8 { @@ -1178,24 +1249,27 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; - readonly attribute nullable int32u beaconLostCount = 5; - readonly attribute nullable int32u beaconRxCount = 6; - readonly attribute nullable int32u packetMulticastRxCount = 7; - readonly attribute nullable int32u packetMulticastTxCount = 8; - readonly attribute nullable int32u packetUnicastRxCount = 9; - readonly attribute nullable int32u packetUnicastTxCount = 10; - readonly attribute nullable int64u currentMaxRate = 11; - readonly attribute nullable int64u overrunCount = 12; + readonly attribute optional nullable int32u beaconLostCount = 5; + readonly attribute optional nullable int32u beaconRxCount = 6; + readonly attribute optional nullable int32u packetMulticastRxCount = 7; + readonly attribute optional nullable int32u packetMulticastTxCount = 8; + readonly attribute optional nullable int32u packetUnicastRxCount = 9; + readonly attribute optional nullable int32u packetUnicastTxCount = 10; + readonly attribute optional nullable int64u currentMaxRate = 11; + readonly attribute optional nullable int64u overrunCount = 12; 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; + + /** Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 */ + command ResetCounts(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1236,13 +1310,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1295,15 +1372,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1317,6 +1408,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1329,38 +1426,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1415,27 +1500,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1453,7 +1542,7 @@ server cluster FixedLabel = 64 { } /** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ -server cluster UserLabel = 65 { +cluster UserLabel = 65 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1471,7 +1560,7 @@ server cluster UserLabel = 65 { } /** Attributes and commands for controlling the color properties of a color-capable light. */ -server cluster ColorControl = 768 { +cluster ColorControl = 768 { revision 6; enum ColorLoopAction : enum8 { @@ -1543,45 +1632,58 @@ server cluster ColorControl = 768 { kColorTemperature = 0x10; } - readonly attribute int8u currentHue = 0; - readonly attribute int8u currentSaturation = 1; - readonly attribute int16u remainingTime = 2; - readonly attribute int16u currentX = 3; - readonly attribute int16u currentY = 4; - readonly attribute int16u colorTemperatureMireds = 7; + readonly attribute optional int8u currentHue = 0; + readonly attribute optional int8u currentSaturation = 1; + readonly attribute optional int16u remainingTime = 2; + readonly attribute optional int16u currentX = 3; + readonly attribute optional int16u currentY = 4; + readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional char_string<254> compensationText = 6; + readonly attribute optional int16u colorTemperatureMireds = 7; readonly attribute enum8 colorMode = 8; attribute bitmap8 options = 15; readonly attribute nullable int8u numberOfPrimaries = 16; - readonly attribute int16u primary1X = 17; - readonly attribute int16u primary1Y = 18; - readonly attribute nullable int8u primary1Intensity = 19; - readonly attribute int16u primary2X = 21; - readonly attribute int16u primary2Y = 22; - readonly attribute nullable int8u primary2Intensity = 23; - readonly attribute int16u primary3X = 25; - readonly attribute int16u primary3Y = 26; - readonly attribute nullable int8u primary3Intensity = 27; - readonly attribute int16u primary4X = 32; - readonly attribute int16u primary4Y = 33; - readonly attribute nullable int8u primary4Intensity = 34; - readonly attribute int16u primary5X = 36; - readonly attribute int16u primary5Y = 37; - readonly attribute nullable int8u primary5Intensity = 38; - readonly attribute int16u primary6X = 40; - readonly attribute int16u primary6Y = 41; - readonly attribute nullable int8u primary6Intensity = 42; - readonly attribute int16u enhancedCurrentHue = 16384; + readonly attribute optional int16u primary1X = 17; + readonly attribute optional int16u primary1Y = 18; + readonly attribute optional nullable int8u primary1Intensity = 19; + readonly attribute optional int16u primary2X = 21; + readonly attribute optional int16u primary2Y = 22; + readonly attribute optional nullable int8u primary2Intensity = 23; + readonly attribute optional int16u primary3X = 25; + readonly attribute optional int16u primary3Y = 26; + readonly attribute optional nullable int8u primary3Intensity = 27; + readonly attribute optional int16u primary4X = 32; + readonly attribute optional int16u primary4Y = 33; + readonly attribute optional nullable int8u primary4Intensity = 34; + readonly attribute optional int16u primary5X = 36; + readonly attribute optional int16u primary5Y = 37; + readonly attribute optional nullable int8u primary5Intensity = 38; + readonly attribute optional int16u primary6X = 40; + readonly attribute optional int16u primary6Y = 41; + readonly attribute optional nullable int8u primary6Intensity = 42; + attribute access(write: manage) optional int16u whitePointX = 48; + attribute access(write: manage) optional int16u whitePointY = 49; + attribute access(write: manage) optional int16u colorPointRX = 50; + attribute access(write: manage) optional int16u colorPointRY = 51; + attribute access(write: manage) optional nullable int8u colorPointRIntensity = 52; + attribute access(write: manage) optional int16u colorPointGX = 54; + attribute access(write: manage) optional int16u colorPointGY = 55; + attribute access(write: manage) optional nullable int8u colorPointGIntensity = 56; + attribute access(write: manage) optional int16u colorPointBX = 58; + attribute access(write: manage) optional int16u colorPointBY = 59; + attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; + readonly attribute optional int16u enhancedCurrentHue = 16384; readonly attribute enum8 enhancedColorMode = 16385; - readonly attribute int8u colorLoopActive = 16386; - readonly attribute int8u colorLoopDirection = 16387; - readonly attribute int16u colorLoopTime = 16388; - readonly attribute int16u colorLoopStartEnhancedHue = 16389; - readonly attribute int16u colorLoopStoredEnhancedHue = 16390; + readonly attribute optional int8u colorLoopActive = 16386; + readonly attribute optional int8u colorLoopDirection = 16387; + readonly attribute optional int16u colorLoopTime = 16388; + readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; + readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; readonly attribute bitmap16 colorCapabilities = 16394; - readonly attribute int16u colorTempPhysicalMinMireds = 16395; - readonly attribute int16u colorTempPhysicalMaxMireds = 16396; - readonly attribute int16u coupleColorTempToLevelMinMireds = 16397; - attribute access(write: manage) nullable int16u startUpColorTemperatureMireds = 16400; + readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; + readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; + readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; + attribute access(write: manage) optional nullable int16u startUpColorTemperatureMireds = 16400; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1737,24 +1839,43 @@ server cluster ColorControl = 768 { bitmap8 optionsOverride = 6; } + /** Move to specified hue. */ command MoveToHue(MoveToHueRequest): DefaultSuccess = 0; + /** Move hue up or down at specified rate. */ command MoveHue(MoveHueRequest): DefaultSuccess = 1; + /** Step hue up or down by specified size at specified rate. */ command StepHue(StepHueRequest): DefaultSuccess = 2; + /** Move to specified saturation. */ command MoveToSaturation(MoveToSaturationRequest): DefaultSuccess = 3; + /** Move saturation up or down at specified rate. */ command MoveSaturation(MoveSaturationRequest): DefaultSuccess = 4; + /** Step saturation up or down by specified size at specified rate. */ command StepSaturation(StepSaturationRequest): DefaultSuccess = 5; + /** Move to hue and saturation. */ command MoveToHueAndSaturation(MoveToHueAndSaturationRequest): DefaultSuccess = 6; + /** Move to specified color. */ command MoveToColor(MoveToColorRequest): DefaultSuccess = 7; + /** Moves the color. */ command MoveColor(MoveColorRequest): DefaultSuccess = 8; + /** Steps the lighting to a specific color. */ command StepColor(StepColorRequest): DefaultSuccess = 9; + /** Move to a specific color temperature. */ command MoveToColorTemperature(MoveToColorTemperatureRequest): DefaultSuccess = 10; + /** Command description for EnhancedMoveToHue */ command EnhancedMoveToHue(EnhancedMoveToHueRequest): DefaultSuccess = 64; + /** Command description for EnhancedMoveHue */ command EnhancedMoveHue(EnhancedMoveHueRequest): DefaultSuccess = 65; + /** Command description for EnhancedStepHue */ command EnhancedStepHue(EnhancedStepHueRequest): DefaultSuccess = 66; + /** Command description for EnhancedMoveToHueAndSaturation */ command EnhancedMoveToHueAndSaturation(EnhancedMoveToHueAndSaturationRequest): DefaultSuccess = 67; + /** Command description for ColorLoopSet */ command ColorLoopSet(ColorLoopSetRequest): DefaultSuccess = 68; + /** Command description for StopMoveStep */ command StopMoveStep(StopMoveStepRequest): DefaultSuccess = 71; + /** Command description for MoveColorTemperature */ command MoveColorTemperature(MoveColorTemperatureRequest): DefaultSuccess = 75; + /** Command description for StepColorTemperature */ command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76; } diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 064abbb3432c75..68ae1ef872e3df 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -74,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** Attributes and commands for scene configuration and manipulation. */ -provisional server cluster Scenes = 5 { +provisional cluster Scenes = 5 { revision 5; bitmap CopyModeBitmap : bitmap8 { @@ -158,8 +166,12 @@ provisional server cluster Scenes = 5 { fabric_idx fabricIndex = 254; } + readonly attribute optional int8u sceneCount = 0; + readonly attribute optional int8u currentScene = 1; + readonly attribute optional group_id currentGroup = 2; + readonly attribute optional boolean sceneValid = 3; readonly attribute NameSupportBitmap nameSupport = 4; - readonly attribute nullable node_id lastConfiguredBy = 5; + readonly attribute optional nullable node_id lastConfiguredBy = 5; readonly attribute int16u sceneTableSize = 6; readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; readonly attribute command_id generatedCommandList[] = 65528; @@ -177,25 +189,57 @@ provisional server cluster Scenes = 5 { ExtensionFieldSet extensionFieldSets[] = 4; } + response struct AddSceneResponse = 0 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + request struct ViewSceneRequest { group_id groupID = 0; int8u sceneID = 1; } + response struct ViewSceneResponse = 1 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + request struct RemoveSceneRequest { group_id groupID = 0; int8u sceneID = 1; } + response struct RemoveSceneResponse = 2 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + request struct RemoveAllScenesRequest { group_id groupID = 0; } + response struct RemoveAllScenesResponse = 3 { + status status = 0; + group_id groupID = 1; + } + request struct StoreSceneRequest { group_id groupID = 0; int8u sceneID = 1; } + response struct StoreSceneResponse = 4 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + request struct RecallSceneRequest { group_id groupID = 0; int8u sceneID = 1; @@ -206,6 +250,13 @@ provisional server cluster Scenes = 5 { group_id groupID = 0; } + response struct GetSceneMembershipResponse = 6 { + status status = 0; + nullable int8u capacity = 1; + group_id groupID = 2; + optional int8u sceneList[] = 3; + } + request struct EnhancedAddSceneRequest { group_id groupID = 0; int8u sceneID = 1; @@ -214,26 +265,18 @@ provisional server cluster Scenes = 5 { ExtensionFieldSet extensionFieldSets[] = 4; } - request struct EnhancedViewSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - request struct CopySceneRequest { - CopyModeBitmap mode = 0; - group_id groupIdentifierFrom = 1; - int8u sceneIdentifierFrom = 2; - group_id groupIdentifierTo = 3; - int8u sceneIdentifierTo = 4; - } - - response struct AddSceneResponse = 0 { + response struct EnhancedAddSceneResponse = 64 { status status = 0; group_id groupID = 1; int8u sceneID = 2; } - response struct ViewSceneResponse = 1 { + request struct EnhancedViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct EnhancedViewSceneResponse = 65 { status status = 0; group_id groupID = 1; int8u sceneID = 2; @@ -242,44 +285,44 @@ provisional server cluster Scenes = 5 { optional ExtensionFieldSet extensionFieldSets[] = 5; } - response struct RemoveSceneResponse = 2 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - response struct RemoveAllScenesResponse = 3 { - status status = 0; - group_id groupID = 1; - } - - response struct StoreSceneResponse = 4 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; + request struct CopySceneRequest { + CopyModeBitmap mode = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + group_id groupIdentifierTo = 3; + int8u sceneIdentifierTo = 4; } - response struct GetSceneMembershipResponse = 6 { + response struct CopySceneResponse = 66 { status status = 0; - nullable int8u capacity = 1; - group_id groupID = 2; - optional int8u sceneList[] = 3; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; } + /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; + /** Retrieves the requested scene entry from its Scene table. */ fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; + /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; + /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; + /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -314,10 +357,10 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; - readonly attribute boolean globalSceneControl = 16384; - attribute int16u onTime = 16385; - attribute int16u offWaitTime = 16386; - attribute access(write: manage) nullable StartUpOnOffEnum startUpOnOff = 16387; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -336,16 +379,22 @@ server cluster OnOff = 6 { int16u offWaitTime = 2; } + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ -server cluster LevelControl = 8 { +cluster LevelControl = 8 { revision 5; enum MoveModeEnum : enum8 { @@ -370,19 +419,19 @@ server cluster LevelControl = 8 { } readonly attribute nullable int8u currentLevel = 0; - readonly attribute int16u remainingTime = 1; - readonly attribute int8u minLevel = 2; - readonly attribute int8u maxLevel = 3; - readonly attribute int16u currentFrequency = 4; - readonly attribute int16u minFrequency = 5; - readonly attribute int16u maxFrequency = 6; + readonly attribute optional int16u remainingTime = 1; + readonly attribute optional int8u minLevel = 2; + readonly attribute optional int8u maxLevel = 3; + readonly attribute optional int16u currentFrequency = 4; + readonly attribute optional int16u minFrequency = 5; + readonly attribute optional int16u maxFrequency = 6; attribute OptionsBitmap options = 15; - attribute int16u onOffTransitionTime = 16; + attribute optional int16u onOffTransitionTime = 16; attribute nullable int8u onLevel = 17; - attribute nullable int16u onTransitionTime = 18; - attribute nullable int16u offTransitionTime = 19; - attribute nullable int8u defaultMoveRate = 20; - attribute access(write: manage) nullable int8u startUpCurrentLevel = 16384; + attribute optional nullable int16u onTransitionTime = 18; + attribute optional nullable int16u offTransitionTime = 19; + attribute optional nullable int8u defaultMoveRate = 20; + attribute access(write: manage) optional nullable int8u startUpCurrentLevel = 16384; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -444,18 +493,33 @@ server cluster LevelControl = 8 { OptionsBitmap optionsOverride = 1; } + request struct MoveToClosestFrequencyRequest { + int16u frequency = 0; + } + + /** Command description for MoveToLevel */ command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + /** Command description for Move */ command Move(MoveRequest): DefaultSuccess = 1; + /** Command description for Step */ command Step(StepRequest): DefaultSuccess = 2; + /** Command description for Stop */ command Stop(StopRequest): DefaultSuccess = 3; + /** Command description for MoveToLevelWithOnOff */ command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + /** Command description for MoveWithOnOff */ command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + /** Command description for StepWithOnOff */ command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + /** Command description for StopWithOnOff */ command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; + /** Change the currrent frequency to the provided one, or a close + approximation if the exact provided one is not possible. */ + command MoveToClosestFrequency(MoveToClosestFrequencyRequest): DefaultSuccess = 8; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -478,6 +542,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -490,7 +555,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -549,7 +614,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -564,7 +629,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -636,14 +701,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -652,10 +719,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -731,7 +800,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -804,6 +873,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -811,7 +881,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -828,7 +898,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -856,8 +926,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -867,7 +937,7 @@ server cluster TimeFormatLocalization = 44 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -906,17 +976,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -927,13 +997,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -1014,12 +1087,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1032,6 +1108,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -1051,48 +1134,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -1127,11 +1221,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -1215,12 +1317,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1239,12 +1341,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -1265,10 +1369,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1276,11 +1380,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ -server cluster ThreadNetworkDiagnostics = 53 { +cluster ThreadNetworkDiagnostics = 53 { revision 1; // NOTE: Default/not specifically set enum ConnectionStatusEnum : enum8 { @@ -1377,7 +1482,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u panId = 3; readonly attribute nullable int64u extendedPanId = 4; readonly attribute nullable octet_string<17> meshLocalPrefix = 5; - readonly attribute int64u overrunCount = 6; + readonly attribute optional int64u overrunCount = 6; readonly attribute NeighborTableStruct neighborTable[] = 7; readonly attribute RouteTableStruct routeTable[] = 8; readonly attribute nullable int32u partitionId = 9; @@ -1385,51 +1490,51 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u dataVersion = 11; readonly attribute nullable int16u stableDataVersion = 12; readonly attribute nullable int8u leaderRouterId = 13; - readonly attribute int16u detachedRoleCount = 14; - readonly attribute int16u childRoleCount = 15; - readonly attribute int16u routerRoleCount = 16; - readonly attribute int16u leaderRoleCount = 17; - readonly attribute int16u attachAttemptCount = 18; - readonly attribute int16u partitionIdChangeCount = 19; - readonly attribute int16u betterPartitionAttachAttemptCount = 20; - readonly attribute int16u parentChangeCount = 21; - readonly attribute int32u txTotalCount = 22; - readonly attribute int32u txUnicastCount = 23; - readonly attribute int32u txBroadcastCount = 24; - readonly attribute int32u txAckRequestedCount = 25; - readonly attribute int32u txAckedCount = 26; - readonly attribute int32u txNoAckRequestedCount = 27; - readonly attribute int32u txDataCount = 28; - readonly attribute int32u txDataPollCount = 29; - readonly attribute int32u txBeaconCount = 30; - readonly attribute int32u txBeaconRequestCount = 31; - readonly attribute int32u txOtherCount = 32; - readonly attribute int32u txRetryCount = 33; - readonly attribute int32u txDirectMaxRetryExpiryCount = 34; - readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; - readonly attribute int32u txErrCcaCount = 36; - readonly attribute int32u txErrAbortCount = 37; - readonly attribute int32u txErrBusyChannelCount = 38; - readonly attribute int32u rxTotalCount = 39; - readonly attribute int32u rxUnicastCount = 40; - readonly attribute int32u rxBroadcastCount = 41; - readonly attribute int32u rxDataCount = 42; - readonly attribute int32u rxDataPollCount = 43; - readonly attribute int32u rxBeaconCount = 44; - readonly attribute int32u rxBeaconRequestCount = 45; - readonly attribute int32u rxOtherCount = 46; - readonly attribute int32u rxAddressFilteredCount = 47; - readonly attribute int32u rxDestAddrFilteredCount = 48; - readonly attribute int32u rxDuplicatedCount = 49; - readonly attribute int32u rxErrNoFrameCount = 50; - readonly attribute int32u rxErrUnknownNeighborCount = 51; - readonly attribute int32u rxErrInvalidSrcAddrCount = 52; - readonly attribute int32u rxErrSecCount = 53; - readonly attribute int32u rxErrFcsCount = 54; - readonly attribute int32u rxErrOtherCount = 55; - readonly attribute nullable int64u activeTimestamp = 56; - readonly attribute nullable int64u pendingTimestamp = 57; - readonly attribute nullable int32u delay = 58; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; readonly attribute nullable SecurityPolicy securityPolicy = 59; readonly attribute nullable octet_string<4> channelPage0Mask = 60; readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; @@ -1441,11 +1546,12 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster WiFiNetworkDiagnostics = 54 { +cluster WiFiNetworkDiagnostics = 54 { revision 1; // NOTE: Default/not specifically set enum AssociationFailureCauseEnum : enum8 { @@ -1502,14 +1608,14 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; - readonly attribute nullable int32u beaconLostCount = 5; - readonly attribute nullable int32u beaconRxCount = 6; - readonly attribute nullable int32u packetMulticastRxCount = 7; - readonly attribute nullable int32u packetMulticastTxCount = 8; - readonly attribute nullable int32u packetUnicastRxCount = 9; - readonly attribute nullable int32u packetUnicastTxCount = 10; - readonly attribute nullable int64u currentMaxRate = 11; - readonly attribute nullable int64u overrunCount = 12; + readonly attribute optional nullable int32u beaconLostCount = 5; + readonly attribute optional nullable int32u beaconRxCount = 6; + readonly attribute optional nullable int32u packetMulticastRxCount = 7; + readonly attribute optional nullable int32u packetMulticastTxCount = 8; + readonly attribute optional nullable int32u packetUnicastRxCount = 9; + readonly attribute optional nullable int32u packetUnicastTxCount = 10; + readonly attribute optional nullable int64u currentMaxRate = 11; + readonly attribute optional nullable int64u overrunCount = 12; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1517,11 +1623,12 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 */ command ResetCounts(): DefaultSuccess = 0; } /** The Ethernet Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster EthernetNetworkDiagnostics = 55 { +cluster EthernetNetworkDiagnostics = 55 { revision 1; // NOTE: Default/not specifically set enum PHYRateEnum : enum8 { @@ -1542,15 +1649,15 @@ server cluster EthernetNetworkDiagnostics = 55 { kErrorCounts = 0x2; } - readonly attribute nullable PHYRateEnum PHYRate = 0; - readonly attribute nullable boolean fullDuplex = 1; - readonly attribute int64u packetRxCount = 2; - readonly attribute int64u packetTxCount = 3; - readonly attribute int64u txErrCount = 4; - readonly attribute int64u collisionCount = 5; - readonly attribute int64u overrunCount = 6; - readonly attribute nullable boolean carrierDetect = 7; - readonly attribute int64u timeSinceReset = 8; + readonly attribute optional nullable PHYRateEnum PHYRate = 0; + readonly attribute optional nullable boolean fullDuplex = 1; + readonly attribute optional int64u packetRxCount = 2; + readonly attribute optional int64u packetTxCount = 3; + readonly attribute optional int64u txErrCount = 4; + readonly attribute optional int64u collisionCount = 5; + readonly attribute optional int64u overrunCount = 6; + readonly attribute optional nullable boolean carrierDetect = 7; + readonly attribute optional int64u timeSinceReset = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1558,13 +1665,14 @@ server cluster EthernetNetworkDiagnostics = 55 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the attributes: PacketRxCount, PacketTxCount, TxErrCount, CollisionCount, OverrunCount to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { +cluster Switch = 59 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -1607,6 +1715,7 @@ server cluster Switch = 59 { readonly attribute int8u numberOfPositions = 0; readonly attribute int8u currentPosition = 1; + readonly attribute optional int8u multiPressMax = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1616,7 +1725,7 @@ server cluster Switch = 59 { } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1657,13 +1766,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1716,15 +1828,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1738,6 +1864,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1750,38 +1882,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1836,27 +1956,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1874,7 +1998,7 @@ server cluster FixedLabel = 64 { } /** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ -server cluster UserLabel = 65 { +cluster UserLabel = 65 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1892,7 +2016,7 @@ server cluster UserLabel = 65 { } /** Attributes and commands for controlling the color properties of a color-capable light. */ -server cluster ColorControl = 768 { +cluster ColorControl = 768 { revision 6; enum ColorLoopAction : enum8 { @@ -1964,27 +2088,58 @@ server cluster ColorControl = 768 { kColorTemperature = 0x10; } - readonly attribute int8u currentHue = 0; - readonly attribute int8u currentSaturation = 1; - readonly attribute int16u remainingTime = 2; - readonly attribute int16u currentX = 3; - readonly attribute int16u currentY = 4; - readonly attribute int16u colorTemperatureMireds = 7; + readonly attribute optional int8u currentHue = 0; + readonly attribute optional int8u currentSaturation = 1; + readonly attribute optional int16u remainingTime = 2; + readonly attribute optional int16u currentX = 3; + readonly attribute optional int16u currentY = 4; + readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional char_string<254> compensationText = 6; + readonly attribute optional int16u colorTemperatureMireds = 7; readonly attribute enum8 colorMode = 8; attribute bitmap8 options = 15; readonly attribute nullable int8u numberOfPrimaries = 16; - readonly attribute int16u enhancedCurrentHue = 16384; + readonly attribute optional int16u primary1X = 17; + readonly attribute optional int16u primary1Y = 18; + readonly attribute optional nullable int8u primary1Intensity = 19; + readonly attribute optional int16u primary2X = 21; + readonly attribute optional int16u primary2Y = 22; + readonly attribute optional nullable int8u primary2Intensity = 23; + readonly attribute optional int16u primary3X = 25; + readonly attribute optional int16u primary3Y = 26; + readonly attribute optional nullable int8u primary3Intensity = 27; + readonly attribute optional int16u primary4X = 32; + readonly attribute optional int16u primary4Y = 33; + readonly attribute optional nullable int8u primary4Intensity = 34; + readonly attribute optional int16u primary5X = 36; + readonly attribute optional int16u primary5Y = 37; + readonly attribute optional nullable int8u primary5Intensity = 38; + readonly attribute optional int16u primary6X = 40; + readonly attribute optional int16u primary6Y = 41; + readonly attribute optional nullable int8u primary6Intensity = 42; + attribute access(write: manage) optional int16u whitePointX = 48; + attribute access(write: manage) optional int16u whitePointY = 49; + attribute access(write: manage) optional int16u colorPointRX = 50; + attribute access(write: manage) optional int16u colorPointRY = 51; + attribute access(write: manage) optional nullable int8u colorPointRIntensity = 52; + attribute access(write: manage) optional int16u colorPointGX = 54; + attribute access(write: manage) optional int16u colorPointGY = 55; + attribute access(write: manage) optional nullable int8u colorPointGIntensity = 56; + attribute access(write: manage) optional int16u colorPointBX = 58; + attribute access(write: manage) optional int16u colorPointBY = 59; + attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; + readonly attribute optional int16u enhancedCurrentHue = 16384; readonly attribute enum8 enhancedColorMode = 16385; - readonly attribute int8u colorLoopActive = 16386; - readonly attribute int8u colorLoopDirection = 16387; - readonly attribute int16u colorLoopTime = 16388; - readonly attribute int16u colorLoopStartEnhancedHue = 16389; - readonly attribute int16u colorLoopStoredEnhancedHue = 16390; + readonly attribute optional int8u colorLoopActive = 16386; + readonly attribute optional int8u colorLoopDirection = 16387; + readonly attribute optional int16u colorLoopTime = 16388; + readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; + readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; readonly attribute bitmap16 colorCapabilities = 16394; - readonly attribute int16u colorTempPhysicalMinMireds = 16395; - readonly attribute int16u colorTempPhysicalMaxMireds = 16396; - readonly attribute int16u coupleColorTempToLevelMinMireds = 16397; - attribute access(write: manage) nullable int16u startUpColorTemperatureMireds = 16400; + readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; + readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; + readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; + attribute access(write: manage) optional nullable int16u startUpColorTemperatureMireds = 16400; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2140,29 +2295,48 @@ server cluster ColorControl = 768 { bitmap8 optionsOverride = 6; } + /** Move to specified hue. */ command MoveToHue(MoveToHueRequest): DefaultSuccess = 0; + /** Move hue up or down at specified rate. */ command MoveHue(MoveHueRequest): DefaultSuccess = 1; + /** Step hue up or down by specified size at specified rate. */ command StepHue(StepHueRequest): DefaultSuccess = 2; + /** Move to specified saturation. */ command MoveToSaturation(MoveToSaturationRequest): DefaultSuccess = 3; + /** Move saturation up or down at specified rate. */ command MoveSaturation(MoveSaturationRequest): DefaultSuccess = 4; + /** Step saturation up or down by specified size at specified rate. */ command StepSaturation(StepSaturationRequest): DefaultSuccess = 5; + /** Move to hue and saturation. */ command MoveToHueAndSaturation(MoveToHueAndSaturationRequest): DefaultSuccess = 6; + /** Move to specified color. */ command MoveToColor(MoveToColorRequest): DefaultSuccess = 7; + /** Moves the color. */ command MoveColor(MoveColorRequest): DefaultSuccess = 8; + /** Steps the lighting to a specific color. */ command StepColor(StepColorRequest): DefaultSuccess = 9; + /** Move to a specific color temperature. */ command MoveToColorTemperature(MoveToColorTemperatureRequest): DefaultSuccess = 10; + /** Command description for EnhancedMoveToHue */ command EnhancedMoveToHue(EnhancedMoveToHueRequest): DefaultSuccess = 64; + /** Command description for EnhancedMoveHue */ command EnhancedMoveHue(EnhancedMoveHueRequest): DefaultSuccess = 65; + /** Command description for EnhancedStepHue */ command EnhancedStepHue(EnhancedStepHueRequest): DefaultSuccess = 66; + /** Command description for EnhancedMoveToHueAndSaturation */ command EnhancedMoveToHueAndSaturation(EnhancedMoveToHueAndSaturationRequest): DefaultSuccess = 67; + /** Command description for ColorLoopSet */ command ColorLoopSet(ColorLoopSetRequest): DefaultSuccess = 68; + /** Command description for StopMoveStep */ command StopMoveStep(StopMoveStepRequest): DefaultSuccess = 71; + /** Command description for MoveColorTemperature */ command MoveColorTemperature(MoveColorTemperatureRequest): DefaultSuccess = 75; + /** Command description for StepColorTemperature */ command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76; } /** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ -server cluster OccupancySensing = 1030 { +cluster OccupancySensing = 1030 { revision 3; enum OccupancySensorTypeEnum : enum8 { @@ -2185,6 +2359,15 @@ server cluster OccupancySensing = 1030 { readonly attribute OccupancyBitmap occupancy = 0; readonly attribute OccupancySensorTypeEnum occupancySensorType = 1; readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2; + attribute access(write: manage) optional int16u PIROccupiedToUnoccupiedDelay = 16; + attribute access(write: manage) optional int16u PIRUnoccupiedToOccupiedDelay = 17; + attribute access(write: manage) optional int8u PIRUnoccupiedToOccupiedThreshold = 18; + attribute access(write: manage) optional int16u ultrasonicOccupiedToUnoccupiedDelay = 32; + attribute access(write: manage) optional int16u ultrasonicUnoccupiedToOccupiedDelay = 33; + attribute access(write: manage) optional int8u ultrasonicUnoccupiedToOccupiedThreshold = 34; + attribute access(write: manage) optional int16u physicalContactOccupiedToUnoccupiedDelay = 48; + attribute access(write: manage) optional int16u physicalContactUnoccupiedToOccupiedDelay = 49; + attribute access(write: manage) optional int8u physicalContactUnoccupiedToOccupiedThreshold = 50; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.matter b/examples/lighting-app/nxp/zap/lighting-on-off.matter index 783bcd56a54587..de7d31131c589c 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.matter +++ b/examples/lighting-app/nxp/zap/lighting-on-off.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -74,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -156,10 +164,10 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; - readonly attribute boolean globalSceneControl = 16384; - attribute int16u onTime = 16385; - attribute int16u offWaitTime = 16386; - attribute access(write: manage) nullable StartUpOnOffEnum startUpOnOff = 16387; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -178,16 +186,22 @@ server cluster OnOff = 6 { int16u offWaitTime = 2; } + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ -server cluster LevelControl = 8 { +cluster LevelControl = 8 { revision 5; enum MoveModeEnum : enum8 { @@ -212,12 +226,19 @@ server cluster LevelControl = 8 { } readonly attribute nullable int8u currentLevel = 0; - readonly attribute int16u remainingTime = 1; - readonly attribute int8u minLevel = 2; - readonly attribute int8u maxLevel = 3; + readonly attribute optional int16u remainingTime = 1; + readonly attribute optional int8u minLevel = 2; + readonly attribute optional int8u maxLevel = 3; + readonly attribute optional int16u currentFrequency = 4; + readonly attribute optional int16u minFrequency = 5; + readonly attribute optional int16u maxFrequency = 6; attribute OptionsBitmap options = 15; + attribute optional int16u onOffTransitionTime = 16; attribute nullable int8u onLevel = 17; - attribute access(write: manage) nullable int8u startUpCurrentLevel = 16384; + attribute optional nullable int16u onTransitionTime = 18; + attribute optional nullable int16u offTransitionTime = 19; + attribute optional nullable int8u defaultMoveRate = 20; + attribute access(write: manage) optional nullable int8u startUpCurrentLevel = 16384; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -279,18 +300,33 @@ server cluster LevelControl = 8 { OptionsBitmap optionsOverride = 1; } + request struct MoveToClosestFrequencyRequest { + int16u frequency = 0; + } + + /** Command description for MoveToLevel */ command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + /** Command description for Move */ command Move(MoveRequest): DefaultSuccess = 1; + /** Command description for Step */ command Step(StepRequest): DefaultSuccess = 2; + /** Command description for Stop */ command Stop(StopRequest): DefaultSuccess = 3; + /** Command description for MoveToLevelWithOnOff */ command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + /** Command description for MoveWithOnOff */ command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + /** Command description for StepWithOnOff */ command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + /** Command description for StopWithOnOff */ command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; + /** Change the currrent frequency to the provided one, or a close + approximation if the exact provided one is not possible. */ + command MoveToClosestFrequency(MoveToClosestFrequencyRequest): DefaultSuccess = 8; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -313,6 +349,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -325,7 +362,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -384,6 +421,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -398,7 +436,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -470,7 +508,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -479,10 +526,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -558,7 +607,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -631,11 +680,12 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -674,17 +724,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -695,13 +745,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -782,12 +835,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -800,6 +856,22 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + request struct AddOrUpdateWiFiNetworkRequest { + octet_string<32> ssid = 0; + octet_string<64> credentials = 1; + optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; + } + request struct AddOrUpdateThreadNetworkRequest { octet_string<254> operationalDataset = 0; optional int64u breadcrumb = 1; @@ -810,47 +882,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -934,7 +1018,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -953,12 +1042,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -979,10 +1070,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -990,11 +1081,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ -server cluster ThreadNetworkDiagnostics = 53 { +cluster ThreadNetworkDiagnostics = 53 { revision 1; // NOTE: Default/not specifically set enum ConnectionStatusEnum : enum8 { @@ -1091,7 +1183,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u panId = 3; readonly attribute nullable int64u extendedPanId = 4; readonly attribute nullable octet_string<17> meshLocalPrefix = 5; - readonly attribute int64u overrunCount = 6; + readonly attribute optional int64u overrunCount = 6; readonly attribute NeighborTableStruct neighborTable[] = 7; readonly attribute RouteTableStruct routeTable[] = 8; readonly attribute nullable int32u partitionId = 9; @@ -1099,48 +1191,51 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u dataVersion = 11; readonly attribute nullable int16u stableDataVersion = 12; readonly attribute nullable int8u leaderRouterId = 13; - readonly attribute int16u detachedRoleCount = 14; - readonly attribute int16u childRoleCount = 15; - readonly attribute int16u routerRoleCount = 16; - readonly attribute int16u leaderRoleCount = 17; - readonly attribute int16u attachAttemptCount = 18; - readonly attribute int16u partitionIdChangeCount = 19; - readonly attribute int16u betterPartitionAttachAttemptCount = 20; - readonly attribute int16u parentChangeCount = 21; - readonly attribute int32u txTotalCount = 22; - readonly attribute int32u txUnicastCount = 23; - readonly attribute int32u txBroadcastCount = 24; - readonly attribute int32u txAckRequestedCount = 25; - readonly attribute int32u txAckedCount = 26; - readonly attribute int32u txNoAckRequestedCount = 27; - readonly attribute int32u txDataCount = 28; - readonly attribute int32u txDataPollCount = 29; - readonly attribute int32u txBeaconCount = 30; - readonly attribute int32u txBeaconRequestCount = 31; - readonly attribute int32u txOtherCount = 32; - readonly attribute int32u txRetryCount = 33; - readonly attribute int32u txDirectMaxRetryExpiryCount = 34; - readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; - readonly attribute int32u txErrCcaCount = 36; - readonly attribute int32u txErrAbortCount = 37; - readonly attribute int32u txErrBusyChannelCount = 38; - readonly attribute int32u rxTotalCount = 39; - readonly attribute int32u rxUnicastCount = 40; - readonly attribute int32u rxBroadcastCount = 41; - readonly attribute int32u rxDataCount = 42; - readonly attribute int32u rxDataPollCount = 43; - readonly attribute int32u rxBeaconCount = 44; - readonly attribute int32u rxBeaconRequestCount = 45; - readonly attribute int32u rxOtherCount = 46; - readonly attribute int32u rxAddressFilteredCount = 47; - readonly attribute int32u rxDestAddrFilteredCount = 48; - readonly attribute int32u rxDuplicatedCount = 49; - readonly attribute int32u rxErrNoFrameCount = 50; - readonly attribute int32u rxErrUnknownNeighborCount = 51; - readonly attribute int32u rxErrInvalidSrcAddrCount = 52; - readonly attribute int32u rxErrSecCount = 53; - readonly attribute int32u rxErrFcsCount = 54; - readonly attribute int32u rxErrOtherCount = 55; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; readonly attribute nullable SecurityPolicy securityPolicy = 59; readonly attribute nullable octet_string<4> channelPage0Mask = 60; readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; @@ -1152,11 +1247,12 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1193,12 +1289,20 @@ server cluster AdministratorCommissioning = 60 { octet_string<32> salt = 4; } + request struct OpenBasicCommissioningWindowRequest { + int16u commissioningTimeout = 0; + } + + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1251,15 +1355,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1273,6 +1391,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1285,38 +1409,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1371,21 +1483,25 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } diff --git a/examples/lighting-app/qpg/zap/light.matter b/examples/lighting-app/qpg/zap/light.matter index 9ad302c97de85b..d2b1ce998f00af 100644 --- a/examples/lighting-app/qpg/zap/light.matter +++ b/examples/lighting-app/qpg/zap/light.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -74,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -156,10 +164,10 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; - readonly attribute boolean globalSceneControl = 16384; - attribute int16u onTime = 16385; - attribute int16u offWaitTime = 16386; - attribute access(write: manage) nullable StartUpOnOffEnum startUpOnOff = 16387; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -178,16 +186,22 @@ server cluster OnOff = 6 { int16u offWaitTime = 2; } + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ -server cluster LevelControl = 8 { +cluster LevelControl = 8 { revision 5; enum MoveModeEnum : enum8 { @@ -212,12 +226,19 @@ server cluster LevelControl = 8 { } readonly attribute nullable int8u currentLevel = 0; - readonly attribute int16u remainingTime = 1; - readonly attribute int8u minLevel = 2; - readonly attribute int8u maxLevel = 3; + readonly attribute optional int16u remainingTime = 1; + readonly attribute optional int8u minLevel = 2; + readonly attribute optional int8u maxLevel = 3; + readonly attribute optional int16u currentFrequency = 4; + readonly attribute optional int16u minFrequency = 5; + readonly attribute optional int16u maxFrequency = 6; attribute OptionsBitmap options = 15; + attribute optional int16u onOffTransitionTime = 16; attribute nullable int8u onLevel = 17; - attribute access(write: manage) nullable int8u startUpCurrentLevel = 16384; + attribute optional nullable int16u onTransitionTime = 18; + attribute optional nullable int16u offTransitionTime = 19; + attribute optional nullable int8u defaultMoveRate = 20; + attribute access(write: manage) optional nullable int8u startUpCurrentLevel = 16384; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -279,18 +300,33 @@ server cluster LevelControl = 8 { OptionsBitmap optionsOverride = 1; } + request struct MoveToClosestFrequencyRequest { + int16u frequency = 0; + } + + /** Command description for MoveToLevel */ command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + /** Command description for Move */ command Move(MoveRequest): DefaultSuccess = 1; + /** Command description for Step */ command Step(StepRequest): DefaultSuccess = 2; + /** Command description for Stop */ command Stop(StopRequest): DefaultSuccess = 3; + /** Command description for MoveToLevelWithOnOff */ command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + /** Command description for MoveWithOnOff */ command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + /** Command description for StepWithOnOff */ command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + /** Command description for StopWithOnOff */ command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; + /** Change the currrent frequency to the provided one, or a close + approximation if the exact provided one is not possible. */ + command MoveToClosestFrequency(MoveToClosestFrequencyRequest): DefaultSuccess = 8; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -313,6 +349,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -325,7 +362,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -384,7 +421,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -399,7 +436,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -471,14 +508,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -487,10 +526,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -566,7 +607,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -639,11 +680,12 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -682,17 +724,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -703,13 +745,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -790,12 +835,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -808,6 +856,22 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + request struct AddOrUpdateWiFiNetworkRequest { + octet_string<32> ssid = 0; + octet_string<64> credentials = 1; + optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; + } + request struct AddOrUpdateThreadNetworkRequest { octet_string<254> operationalDataset = 0; optional int64u breadcrumb = 1; @@ -818,47 +882,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -900,11 +976,12 @@ server cluster DiagnosticLogs = 50 { optional systime_us timeSinceBoot = 3; } + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -988,11 +1065,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1011,12 +1089,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -1037,10 +1117,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1048,11 +1128,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ -server cluster ThreadNetworkDiagnostics = 53 { +cluster ThreadNetworkDiagnostics = 53 { revision 1; // NOTE: Default/not specifically set enum ConnectionStatusEnum : enum8 { @@ -1149,7 +1230,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u panId = 3; readonly attribute nullable int64u extendedPanId = 4; readonly attribute nullable octet_string<17> meshLocalPrefix = 5; - readonly attribute int64u overrunCount = 6; + readonly attribute optional int64u overrunCount = 6; readonly attribute NeighborTableStruct neighborTable[] = 7; readonly attribute RouteTableStruct routeTable[] = 8; readonly attribute nullable int32u partitionId = 9; @@ -1157,48 +1238,51 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u dataVersion = 11; readonly attribute nullable int16u stableDataVersion = 12; readonly attribute nullable int8u leaderRouterId = 13; - readonly attribute int16u detachedRoleCount = 14; - readonly attribute int16u childRoleCount = 15; - readonly attribute int16u routerRoleCount = 16; - readonly attribute int16u leaderRoleCount = 17; - readonly attribute int16u attachAttemptCount = 18; - readonly attribute int16u partitionIdChangeCount = 19; - readonly attribute int16u betterPartitionAttachAttemptCount = 20; - readonly attribute int16u parentChangeCount = 21; - readonly attribute int32u txTotalCount = 22; - readonly attribute int32u txUnicastCount = 23; - readonly attribute int32u txBroadcastCount = 24; - readonly attribute int32u txAckRequestedCount = 25; - readonly attribute int32u txAckedCount = 26; - readonly attribute int32u txNoAckRequestedCount = 27; - readonly attribute int32u txDataCount = 28; - readonly attribute int32u txDataPollCount = 29; - readonly attribute int32u txBeaconCount = 30; - readonly attribute int32u txBeaconRequestCount = 31; - readonly attribute int32u txOtherCount = 32; - readonly attribute int32u txRetryCount = 33; - readonly attribute int32u txDirectMaxRetryExpiryCount = 34; - readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; - readonly attribute int32u txErrCcaCount = 36; - readonly attribute int32u txErrAbortCount = 37; - readonly attribute int32u txErrBusyChannelCount = 38; - readonly attribute int32u rxTotalCount = 39; - readonly attribute int32u rxUnicastCount = 40; - readonly attribute int32u rxBroadcastCount = 41; - readonly attribute int32u rxDataCount = 42; - readonly attribute int32u rxDataPollCount = 43; - readonly attribute int32u rxBeaconCount = 44; - readonly attribute int32u rxBeaconRequestCount = 45; - readonly attribute int32u rxOtherCount = 46; - readonly attribute int32u rxAddressFilteredCount = 47; - readonly attribute int32u rxDestAddrFilteredCount = 48; - readonly attribute int32u rxDuplicatedCount = 49; - readonly attribute int32u rxErrNoFrameCount = 50; - readonly attribute int32u rxErrUnknownNeighborCount = 51; - readonly attribute int32u rxErrInvalidSrcAddrCount = 52; - readonly attribute int32u rxErrSecCount = 53; - readonly attribute int32u rxErrFcsCount = 54; - readonly attribute int32u rxErrOtherCount = 55; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; readonly attribute nullable SecurityPolicy securityPolicy = 59; readonly attribute nullable octet_string<4> channelPage0Mask = 60; readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; @@ -1210,11 +1294,12 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1255,13 +1340,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1314,15 +1402,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1336,6 +1438,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1348,38 +1456,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1434,27 +1530,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1472,7 +1572,7 @@ server cluster FixedLabel = 64 { } /** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ -server cluster UserLabel = 65 { +cluster UserLabel = 65 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1490,7 +1590,7 @@ server cluster UserLabel = 65 { } /** Attributes and commands for controlling the color properties of a color-capable light. */ -server cluster ColorControl = 768 { +cluster ColorControl = 768 { revision 6; enum ColorLoopAction : enum8 { @@ -1562,45 +1662,58 @@ server cluster ColorControl = 768 { kColorTemperature = 0x10; } - readonly attribute int8u currentHue = 0; - readonly attribute int8u currentSaturation = 1; - readonly attribute int16u remainingTime = 2; - readonly attribute int16u currentX = 3; - readonly attribute int16u currentY = 4; - readonly attribute int16u colorTemperatureMireds = 7; + readonly attribute optional int8u currentHue = 0; + readonly attribute optional int8u currentSaturation = 1; + readonly attribute optional int16u remainingTime = 2; + readonly attribute optional int16u currentX = 3; + readonly attribute optional int16u currentY = 4; + readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional char_string<254> compensationText = 6; + readonly attribute optional int16u colorTemperatureMireds = 7; readonly attribute enum8 colorMode = 8; attribute bitmap8 options = 15; readonly attribute nullable int8u numberOfPrimaries = 16; - readonly attribute int16u primary1X = 17; - readonly attribute int16u primary1Y = 18; - readonly attribute nullable int8u primary1Intensity = 19; - readonly attribute int16u primary2X = 21; - readonly attribute int16u primary2Y = 22; - readonly attribute nullable int8u primary2Intensity = 23; - readonly attribute int16u primary3X = 25; - readonly attribute int16u primary3Y = 26; - readonly attribute nullable int8u primary3Intensity = 27; - readonly attribute int16u primary4X = 32; - readonly attribute int16u primary4Y = 33; - readonly attribute nullable int8u primary4Intensity = 34; - readonly attribute int16u primary5X = 36; - readonly attribute int16u primary5Y = 37; - readonly attribute nullable int8u primary5Intensity = 38; - readonly attribute int16u primary6X = 40; - readonly attribute int16u primary6Y = 41; - readonly attribute nullable int8u primary6Intensity = 42; - readonly attribute int16u enhancedCurrentHue = 16384; + readonly attribute optional int16u primary1X = 17; + readonly attribute optional int16u primary1Y = 18; + readonly attribute optional nullable int8u primary1Intensity = 19; + readonly attribute optional int16u primary2X = 21; + readonly attribute optional int16u primary2Y = 22; + readonly attribute optional nullable int8u primary2Intensity = 23; + readonly attribute optional int16u primary3X = 25; + readonly attribute optional int16u primary3Y = 26; + readonly attribute optional nullable int8u primary3Intensity = 27; + readonly attribute optional int16u primary4X = 32; + readonly attribute optional int16u primary4Y = 33; + readonly attribute optional nullable int8u primary4Intensity = 34; + readonly attribute optional int16u primary5X = 36; + readonly attribute optional int16u primary5Y = 37; + readonly attribute optional nullable int8u primary5Intensity = 38; + readonly attribute optional int16u primary6X = 40; + readonly attribute optional int16u primary6Y = 41; + readonly attribute optional nullable int8u primary6Intensity = 42; + attribute access(write: manage) optional int16u whitePointX = 48; + attribute access(write: manage) optional int16u whitePointY = 49; + attribute access(write: manage) optional int16u colorPointRX = 50; + attribute access(write: manage) optional int16u colorPointRY = 51; + attribute access(write: manage) optional nullable int8u colorPointRIntensity = 52; + attribute access(write: manage) optional int16u colorPointGX = 54; + attribute access(write: manage) optional int16u colorPointGY = 55; + attribute access(write: manage) optional nullable int8u colorPointGIntensity = 56; + attribute access(write: manage) optional int16u colorPointBX = 58; + attribute access(write: manage) optional int16u colorPointBY = 59; + attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; + readonly attribute optional int16u enhancedCurrentHue = 16384; readonly attribute enum8 enhancedColorMode = 16385; - readonly attribute int8u colorLoopActive = 16386; - readonly attribute int8u colorLoopDirection = 16387; - readonly attribute int16u colorLoopTime = 16388; - readonly attribute int16u colorLoopStartEnhancedHue = 16389; - readonly attribute int16u colorLoopStoredEnhancedHue = 16390; + readonly attribute optional int8u colorLoopActive = 16386; + readonly attribute optional int8u colorLoopDirection = 16387; + readonly attribute optional int16u colorLoopTime = 16388; + readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; + readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; readonly attribute bitmap16 colorCapabilities = 16394; - readonly attribute int16u colorTempPhysicalMinMireds = 16395; - readonly attribute int16u colorTempPhysicalMaxMireds = 16396; - readonly attribute int16u coupleColorTempToLevelMinMireds = 16397; - attribute access(write: manage) nullable int16u startUpColorTemperatureMireds = 16400; + readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; + readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; + readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; + attribute access(write: manage) optional nullable int16u startUpColorTemperatureMireds = 16400; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1756,24 +1869,43 @@ server cluster ColorControl = 768 { bitmap8 optionsOverride = 6; } + /** Move to specified hue. */ command MoveToHue(MoveToHueRequest): DefaultSuccess = 0; + /** Move hue up or down at specified rate. */ command MoveHue(MoveHueRequest): DefaultSuccess = 1; + /** Step hue up or down by specified size at specified rate. */ command StepHue(StepHueRequest): DefaultSuccess = 2; + /** Move to specified saturation. */ command MoveToSaturation(MoveToSaturationRequest): DefaultSuccess = 3; + /** Move saturation up or down at specified rate. */ command MoveSaturation(MoveSaturationRequest): DefaultSuccess = 4; + /** Step saturation up or down by specified size at specified rate. */ command StepSaturation(StepSaturationRequest): DefaultSuccess = 5; + /** Move to hue and saturation. */ command MoveToHueAndSaturation(MoveToHueAndSaturationRequest): DefaultSuccess = 6; + /** Move to specified color. */ command MoveToColor(MoveToColorRequest): DefaultSuccess = 7; + /** Moves the color. */ command MoveColor(MoveColorRequest): DefaultSuccess = 8; + /** Steps the lighting to a specific color. */ command StepColor(StepColorRequest): DefaultSuccess = 9; + /** Move to a specific color temperature. */ command MoveToColorTemperature(MoveToColorTemperatureRequest): DefaultSuccess = 10; + /** Command description for EnhancedMoveToHue */ command EnhancedMoveToHue(EnhancedMoveToHueRequest): DefaultSuccess = 64; + /** Command description for EnhancedMoveHue */ command EnhancedMoveHue(EnhancedMoveHueRequest): DefaultSuccess = 65; + /** Command description for EnhancedStepHue */ command EnhancedStepHue(EnhancedStepHueRequest): DefaultSuccess = 66; + /** Command description for EnhancedMoveToHueAndSaturation */ command EnhancedMoveToHueAndSaturation(EnhancedMoveToHueAndSaturationRequest): DefaultSuccess = 67; + /** Command description for ColorLoopSet */ command ColorLoopSet(ColorLoopSetRequest): DefaultSuccess = 68; + /** Command description for StopMoveStep */ command StopMoveStep(StopMoveStepRequest): DefaultSuccess = 71; + /** Command description for MoveColorTemperature */ command MoveColorTemperature(MoveColorTemperatureRequest): DefaultSuccess = 75; + /** Command description for StepColorTemperature */ command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76; } diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter index 622268ba3b8d4a..a3d41f21a869bc 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -74,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** Attributes and commands for scene configuration and manipulation. */ -provisional server cluster Scenes = 5 { +provisional cluster Scenes = 5 { revision 5; bitmap CopyModeBitmap : bitmap8 { @@ -158,8 +166,12 @@ provisional server cluster Scenes = 5 { fabric_idx fabricIndex = 254; } + readonly attribute optional int8u sceneCount = 0; + readonly attribute optional int8u currentScene = 1; + readonly attribute optional group_id currentGroup = 2; + readonly attribute optional boolean sceneValid = 3; readonly attribute NameSupportBitmap nameSupport = 4; - readonly attribute nullable node_id lastConfiguredBy = 5; + readonly attribute optional nullable node_id lastConfiguredBy = 5; readonly attribute int16u sceneTableSize = 6; readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; readonly attribute command_id generatedCommandList[] = 65528; @@ -177,62 +189,17 @@ provisional server cluster Scenes = 5 { ExtensionFieldSet extensionFieldSets[] = 4; } - request struct ViewSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - request struct RemoveSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - request struct RemoveAllScenesRequest { - group_id groupID = 0; - } - - request struct StoreSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - request struct RecallSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - optional nullable int16u transitionTime = 2; - } - - request struct GetSceneMembershipRequest { - group_id groupID = 0; - } - - request struct EnhancedAddSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - int16u transitionTime = 2; - char_string sceneName = 3; - ExtensionFieldSet extensionFieldSets[] = 4; - } - - request struct EnhancedViewSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - request struct CopySceneRequest { - CopyModeBitmap mode = 0; - group_id groupIdentifierFrom = 1; - int8u sceneIdentifierFrom = 2; - group_id groupIdentifierTo = 3; - int8u sceneIdentifierTo = 4; - } - response struct AddSceneResponse = 0 { status status = 0; group_id groupID = 1; int8u sceneID = 2; } + request struct ViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + response struct ViewSceneResponse = 1 { status status = 0; group_id groupID = 1; @@ -242,23 +209,47 @@ provisional server cluster Scenes = 5 { optional ExtensionFieldSet extensionFieldSets[] = 5; } + request struct RemoveSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + response struct RemoveSceneResponse = 2 { status status = 0; group_id groupID = 1; int8u sceneID = 2; } + request struct RemoveAllScenesRequest { + group_id groupID = 0; + } + response struct RemoveAllScenesResponse = 3 { status status = 0; group_id groupID = 1; } + request struct StoreSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + response struct StoreSceneResponse = 4 { status status = 0; group_id groupID = 1; int8u sceneID = 2; } + request struct RecallSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + optional nullable int16u transitionTime = 2; + } + + request struct GetSceneMembershipRequest { + group_id groupID = 0; + } + response struct GetSceneMembershipResponse = 6 { status status = 0; nullable int8u capacity = 1; @@ -266,12 +257,25 @@ provisional server cluster Scenes = 5 { optional int8u sceneList[] = 3; } + request struct EnhancedAddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int16u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; + } + response struct EnhancedAddSceneResponse = 64 { status status = 0; group_id groupID = 1; int8u sceneID = 2; } + request struct EnhancedViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + response struct EnhancedViewSceneResponse = 65 { status status = 0; group_id groupID = 1; @@ -281,26 +285,44 @@ provisional server cluster Scenes = 5 { optional ExtensionFieldSet extensionFieldSets[] = 5; } + request struct CopySceneRequest { + CopyModeBitmap mode = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + group_id groupIdentifierTo = 3; + int8u sceneIdentifierTo = 4; + } + response struct CopySceneResponse = 66 { status status = 0; group_id groupIdentifierFrom = 1; int8u sceneIdentifierFrom = 2; } + /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; + /** Retrieves the requested scene entry from its Scene table. */ fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; + /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; + /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; + /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -335,10 +357,10 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; - readonly attribute boolean globalSceneControl = 16384; - attribute int16u onTime = 16385; - attribute int16u offWaitTime = 16386; - attribute access(write: manage) nullable StartUpOnOffEnum startUpOnOff = 16387; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -357,16 +379,22 @@ server cluster OnOff = 6 { int16u offWaitTime = 2; } + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ -server cluster LevelControl = 8 { +cluster LevelControl = 8 { revision 5; enum MoveModeEnum : enum8 { @@ -391,19 +419,19 @@ server cluster LevelControl = 8 { } readonly attribute nullable int8u currentLevel = 0; - readonly attribute int16u remainingTime = 1; - readonly attribute int8u minLevel = 2; - readonly attribute int8u maxLevel = 3; - readonly attribute int16u currentFrequency = 4; - readonly attribute int16u minFrequency = 5; - readonly attribute int16u maxFrequency = 6; + readonly attribute optional int16u remainingTime = 1; + readonly attribute optional int8u minLevel = 2; + readonly attribute optional int8u maxLevel = 3; + readonly attribute optional int16u currentFrequency = 4; + readonly attribute optional int16u minFrequency = 5; + readonly attribute optional int16u maxFrequency = 6; attribute OptionsBitmap options = 15; - attribute int16u onOffTransitionTime = 16; + attribute optional int16u onOffTransitionTime = 16; attribute nullable int8u onLevel = 17; - attribute nullable int16u onTransitionTime = 18; - attribute nullable int16u offTransitionTime = 19; - attribute nullable int8u defaultMoveRate = 20; - attribute access(write: manage) nullable int8u startUpCurrentLevel = 16384; + attribute optional nullable int16u onTransitionTime = 18; + attribute optional nullable int16u offTransitionTime = 19; + attribute optional nullable int8u defaultMoveRate = 20; + attribute access(write: manage) optional nullable int8u startUpCurrentLevel = 16384; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -465,18 +493,33 @@ server cluster LevelControl = 8 { OptionsBitmap optionsOverride = 1; } + request struct MoveToClosestFrequencyRequest { + int16u frequency = 0; + } + + /** Command description for MoveToLevel */ command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + /** Command description for Move */ command Move(MoveRequest): DefaultSuccess = 1; + /** Command description for Step */ command Step(StepRequest): DefaultSuccess = 2; + /** Command description for Stop */ command Stop(StopRequest): DefaultSuccess = 3; + /** Command description for MoveToLevelWithOnOff */ command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + /** Command description for MoveWithOnOff */ command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + /** Command description for StepWithOnOff */ command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + /** Command description for StopWithOnOff */ command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; + /** Change the currrent frequency to the provided one, or a close + approximation if the exact provided one is not possible. */ + command MoveToClosestFrequency(MoveToClosestFrequencyRequest): DefaultSuccess = 8; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -499,6 +542,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -511,7 +555,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -570,7 +614,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -585,7 +629,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -657,14 +701,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -673,10 +719,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -752,7 +800,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -825,6 +873,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -832,7 +881,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -849,7 +898,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -877,8 +926,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -888,7 +937,7 @@ server cluster TimeFormatLocalization = 44 { } /** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ -server cluster PowerSource = 47 { +cluster PowerSource = 47 { revision 1; // NOTE: Default/not specifically set enum BatApprovedChemistryEnum : enum16 { @@ -1109,13 +1158,34 @@ server cluster PowerSource = 47 { readonly attribute PowerSourceStatusEnum status = 0; readonly attribute int8u order = 1; readonly attribute char_string<60> description = 2; - readonly attribute nullable int32u wiredAssessedInputVoltage = 3; - readonly attribute nullable int16u wiredAssessedInputFrequency = 4; - readonly attribute WiredCurrentTypeEnum wiredCurrentType = 5; - readonly attribute nullable int32u wiredAssessedCurrent = 6; - readonly attribute int32u wiredNominalVoltage = 7; - readonly attribute int32u wiredMaximumCurrent = 8; - readonly attribute boolean wiredPresent = 9; + readonly attribute optional nullable int32u wiredAssessedInputVoltage = 3; + readonly attribute optional nullable int16u wiredAssessedInputFrequency = 4; + readonly attribute optional WiredCurrentTypeEnum wiredCurrentType = 5; + readonly attribute optional nullable int32u wiredAssessedCurrent = 6; + readonly attribute optional int32u wiredNominalVoltage = 7; + readonly attribute optional int32u wiredMaximumCurrent = 8; + readonly attribute optional boolean wiredPresent = 9; + readonly attribute optional WiredFaultEnum activeWiredFaults[] = 10; + readonly attribute optional nullable int32u batVoltage = 11; + readonly attribute optional nullable int8u batPercentRemaining = 12; + readonly attribute optional nullable int32u batTimeRemaining = 13; + readonly attribute optional BatChargeLevelEnum batChargeLevel = 14; + readonly attribute optional boolean batReplacementNeeded = 15; + readonly attribute optional BatReplaceabilityEnum batReplaceability = 16; + readonly attribute optional boolean batPresent = 17; + readonly attribute optional BatFaultEnum activeBatFaults[] = 18; + readonly attribute optional char_string<60> batReplacementDescription = 19; + readonly attribute optional BatCommonDesignationEnum batCommonDesignation = 20; + readonly attribute optional char_string<20> batANSIDesignation = 21; + readonly attribute optional char_string<20> batIECDesignation = 22; + readonly attribute optional BatApprovedChemistryEnum batApprovedChemistry = 23; + readonly attribute optional int32u batCapacity = 24; + readonly attribute optional int8u batQuantity = 25; + readonly attribute optional BatChargeStateEnum batChargeState = 26; + readonly attribute optional nullable int32u batTimeToFullCharge = 27; + readonly attribute optional boolean batFunctionalWhileCharging = 28; + readonly attribute optional nullable int32u batChargingCurrent = 29; + readonly attribute optional BatChargeFaultEnum activeBatChargeFaults[] = 30; readonly attribute endpoint_no endpointList[] = 31; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1126,7 +1196,7 @@ server cluster PowerSource = 47 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -1165,17 +1235,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -1186,13 +1256,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -1273,14 +1346,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; - readonly attribute ThreadCapabilitiesBitmap supportedThreadFeatures = 9; - readonly attribute int16u threadVersion = 10; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1293,6 +1367,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -1312,48 +1393,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -1388,11 +1480,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -1476,12 +1576,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1500,12 +1600,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -1526,10 +1628,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1537,11 +1639,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ -server cluster ThreadNetworkDiagnostics = 53 { +cluster ThreadNetworkDiagnostics = 53 { revision 1; // NOTE: Default/not specifically set enum ConnectionStatusEnum : enum8 { @@ -1638,7 +1741,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u panId = 3; readonly attribute nullable int64u extendedPanId = 4; readonly attribute nullable octet_string<17> meshLocalPrefix = 5; - readonly attribute int64u overrunCount = 6; + readonly attribute optional int64u overrunCount = 6; readonly attribute NeighborTableStruct neighborTable[] = 7; readonly attribute RouteTableStruct routeTable[] = 8; readonly attribute nullable int32u partitionId = 9; @@ -1646,51 +1749,51 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u dataVersion = 11; readonly attribute nullable int16u stableDataVersion = 12; readonly attribute nullable int8u leaderRouterId = 13; - readonly attribute int16u detachedRoleCount = 14; - readonly attribute int16u childRoleCount = 15; - readonly attribute int16u routerRoleCount = 16; - readonly attribute int16u leaderRoleCount = 17; - readonly attribute int16u attachAttemptCount = 18; - readonly attribute int16u partitionIdChangeCount = 19; - readonly attribute int16u betterPartitionAttachAttemptCount = 20; - readonly attribute int16u parentChangeCount = 21; - readonly attribute int32u txTotalCount = 22; - readonly attribute int32u txUnicastCount = 23; - readonly attribute int32u txBroadcastCount = 24; - readonly attribute int32u txAckRequestedCount = 25; - readonly attribute int32u txAckedCount = 26; - readonly attribute int32u txNoAckRequestedCount = 27; - readonly attribute int32u txDataCount = 28; - readonly attribute int32u txDataPollCount = 29; - readonly attribute int32u txBeaconCount = 30; - readonly attribute int32u txBeaconRequestCount = 31; - readonly attribute int32u txOtherCount = 32; - readonly attribute int32u txRetryCount = 33; - readonly attribute int32u txDirectMaxRetryExpiryCount = 34; - readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; - readonly attribute int32u txErrCcaCount = 36; - readonly attribute int32u txErrAbortCount = 37; - readonly attribute int32u txErrBusyChannelCount = 38; - readonly attribute int32u rxTotalCount = 39; - readonly attribute int32u rxUnicastCount = 40; - readonly attribute int32u rxBroadcastCount = 41; - readonly attribute int32u rxDataCount = 42; - readonly attribute int32u rxDataPollCount = 43; - readonly attribute int32u rxBeaconCount = 44; - readonly attribute int32u rxBeaconRequestCount = 45; - readonly attribute int32u rxOtherCount = 46; - readonly attribute int32u rxAddressFilteredCount = 47; - readonly attribute int32u rxDestAddrFilteredCount = 48; - readonly attribute int32u rxDuplicatedCount = 49; - readonly attribute int32u rxErrNoFrameCount = 50; - readonly attribute int32u rxErrUnknownNeighborCount = 51; - readonly attribute int32u rxErrInvalidSrcAddrCount = 52; - readonly attribute int32u rxErrSecCount = 53; - readonly attribute int32u rxErrFcsCount = 54; - readonly attribute int32u rxErrOtherCount = 55; - readonly attribute nullable int64u activeTimestamp = 56; - readonly attribute nullable int64u pendingTimestamp = 57; - readonly attribute nullable int32u delay = 58; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; readonly attribute nullable SecurityPolicy securityPolicy = 59; readonly attribute nullable octet_string<4> channelPage0Mask = 60; readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; @@ -1702,11 +1805,12 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1747,13 +1851,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1806,15 +1913,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1828,6 +1949,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1840,38 +1967,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1926,27 +2041,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1964,7 +2083,7 @@ server cluster FixedLabel = 64 { } /** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ -server cluster UserLabel = 65 { +cluster UserLabel = 65 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1982,7 +2101,7 @@ server cluster UserLabel = 65 { } /** Attributes and commands for controlling the color properties of a color-capable light. */ -server cluster ColorControl = 768 { +cluster ColorControl = 768 { revision 6; enum ColorLoopAction : enum8 { @@ -2054,27 +2173,58 @@ server cluster ColorControl = 768 { kColorTemperature = 0x10; } - readonly attribute int8u currentHue = 0; - readonly attribute int8u currentSaturation = 1; - readonly attribute int16u remainingTime = 2; - readonly attribute int16u currentX = 3; - readonly attribute int16u currentY = 4; - readonly attribute int16u colorTemperatureMireds = 7; + readonly attribute optional int8u currentHue = 0; + readonly attribute optional int8u currentSaturation = 1; + readonly attribute optional int16u remainingTime = 2; + readonly attribute optional int16u currentX = 3; + readonly attribute optional int16u currentY = 4; + readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional char_string<254> compensationText = 6; + readonly attribute optional int16u colorTemperatureMireds = 7; readonly attribute enum8 colorMode = 8; attribute bitmap8 options = 15; readonly attribute nullable int8u numberOfPrimaries = 16; - readonly attribute int16u enhancedCurrentHue = 16384; + readonly attribute optional int16u primary1X = 17; + readonly attribute optional int16u primary1Y = 18; + readonly attribute optional nullable int8u primary1Intensity = 19; + readonly attribute optional int16u primary2X = 21; + readonly attribute optional int16u primary2Y = 22; + readonly attribute optional nullable int8u primary2Intensity = 23; + readonly attribute optional int16u primary3X = 25; + readonly attribute optional int16u primary3Y = 26; + readonly attribute optional nullable int8u primary3Intensity = 27; + readonly attribute optional int16u primary4X = 32; + readonly attribute optional int16u primary4Y = 33; + readonly attribute optional nullable int8u primary4Intensity = 34; + readonly attribute optional int16u primary5X = 36; + readonly attribute optional int16u primary5Y = 37; + readonly attribute optional nullable int8u primary5Intensity = 38; + readonly attribute optional int16u primary6X = 40; + readonly attribute optional int16u primary6Y = 41; + readonly attribute optional nullable int8u primary6Intensity = 42; + attribute access(write: manage) optional int16u whitePointX = 48; + attribute access(write: manage) optional int16u whitePointY = 49; + attribute access(write: manage) optional int16u colorPointRX = 50; + attribute access(write: manage) optional int16u colorPointRY = 51; + attribute access(write: manage) optional nullable int8u colorPointRIntensity = 52; + attribute access(write: manage) optional int16u colorPointGX = 54; + attribute access(write: manage) optional int16u colorPointGY = 55; + attribute access(write: manage) optional nullable int8u colorPointGIntensity = 56; + attribute access(write: manage) optional int16u colorPointBX = 58; + attribute access(write: manage) optional int16u colorPointBY = 59; + attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; + readonly attribute optional int16u enhancedCurrentHue = 16384; readonly attribute enum8 enhancedColorMode = 16385; - readonly attribute int8u colorLoopActive = 16386; - readonly attribute int8u colorLoopDirection = 16387; - readonly attribute int16u colorLoopTime = 16388; - readonly attribute int16u colorLoopStartEnhancedHue = 16389; - readonly attribute int16u colorLoopStoredEnhancedHue = 16390; + readonly attribute optional int8u colorLoopActive = 16386; + readonly attribute optional int8u colorLoopDirection = 16387; + readonly attribute optional int16u colorLoopTime = 16388; + readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; + readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; readonly attribute bitmap16 colorCapabilities = 16394; - readonly attribute int16u colorTempPhysicalMinMireds = 16395; - readonly attribute int16u colorTempPhysicalMaxMireds = 16396; - readonly attribute int16u coupleColorTempToLevelMinMireds = 16397; - attribute access(write: manage) nullable int16u startUpColorTemperatureMireds = 16400; + readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; + readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; + readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; + attribute access(write: manage) optional nullable int16u startUpColorTemperatureMireds = 16400; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2230,24 +2380,43 @@ server cluster ColorControl = 768 { bitmap8 optionsOverride = 6; } + /** Move to specified hue. */ command MoveToHue(MoveToHueRequest): DefaultSuccess = 0; + /** Move hue up or down at specified rate. */ command MoveHue(MoveHueRequest): DefaultSuccess = 1; + /** Step hue up or down by specified size at specified rate. */ command StepHue(StepHueRequest): DefaultSuccess = 2; + /** Move to specified saturation. */ command MoveToSaturation(MoveToSaturationRequest): DefaultSuccess = 3; + /** Move saturation up or down at specified rate. */ command MoveSaturation(MoveSaturationRequest): DefaultSuccess = 4; + /** Step saturation up or down by specified size at specified rate. */ command StepSaturation(StepSaturationRequest): DefaultSuccess = 5; + /** Move to hue and saturation. */ command MoveToHueAndSaturation(MoveToHueAndSaturationRequest): DefaultSuccess = 6; + /** Move to specified color. */ command MoveToColor(MoveToColorRequest): DefaultSuccess = 7; + /** Moves the color. */ command MoveColor(MoveColorRequest): DefaultSuccess = 8; + /** Steps the lighting to a specific color. */ command StepColor(StepColorRequest): DefaultSuccess = 9; + /** Move to a specific color temperature. */ command MoveToColorTemperature(MoveToColorTemperatureRequest): DefaultSuccess = 10; + /** Command description for EnhancedMoveToHue */ command EnhancedMoveToHue(EnhancedMoveToHueRequest): DefaultSuccess = 64; + /** Command description for EnhancedMoveHue */ command EnhancedMoveHue(EnhancedMoveHueRequest): DefaultSuccess = 65; + /** Command description for EnhancedStepHue */ command EnhancedStepHue(EnhancedStepHueRequest): DefaultSuccess = 66; + /** Command description for EnhancedMoveToHueAndSaturation */ command EnhancedMoveToHueAndSaturation(EnhancedMoveToHueAndSaturationRequest): DefaultSuccess = 67; + /** Command description for ColorLoopSet */ command ColorLoopSet(ColorLoopSetRequest): DefaultSuccess = 68; + /** Command description for StopMoveStep */ command StopMoveStep(StopMoveStepRequest): DefaultSuccess = 71; + /** Command description for MoveColorTemperature */ command MoveColorTemperature(MoveColorTemperatureRequest): DefaultSuccess = 75; + /** Command description for StepColorTemperature */ command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76; } diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter index 3ab26ccd8033dd..b120ea8c139bcb 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -74,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** Attributes and commands for scene configuration and manipulation. */ -provisional server cluster Scenes = 5 { +provisional cluster Scenes = 5 { revision 5; bitmap CopyModeBitmap : bitmap8 { @@ -158,8 +166,12 @@ provisional server cluster Scenes = 5 { fabric_idx fabricIndex = 254; } + readonly attribute optional int8u sceneCount = 0; + readonly attribute optional int8u currentScene = 1; + readonly attribute optional group_id currentGroup = 2; + readonly attribute optional boolean sceneValid = 3; readonly attribute NameSupportBitmap nameSupport = 4; - readonly attribute nullable node_id lastConfiguredBy = 5; + readonly attribute optional nullable node_id lastConfiguredBy = 5; readonly attribute int16u sceneTableSize = 6; readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; readonly attribute command_id generatedCommandList[] = 65528; @@ -177,25 +189,57 @@ provisional server cluster Scenes = 5 { ExtensionFieldSet extensionFieldSets[] = 4; } + response struct AddSceneResponse = 0 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + request struct ViewSceneRequest { group_id groupID = 0; int8u sceneID = 1; } + response struct ViewSceneResponse = 1 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + request struct RemoveSceneRequest { group_id groupID = 0; int8u sceneID = 1; } + response struct RemoveSceneResponse = 2 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + request struct RemoveAllScenesRequest { group_id groupID = 0; } + response struct RemoveAllScenesResponse = 3 { + status status = 0; + group_id groupID = 1; + } + request struct StoreSceneRequest { group_id groupID = 0; int8u sceneID = 1; } + response struct StoreSceneResponse = 4 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + request struct RecallSceneRequest { group_id groupID = 0; int8u sceneID = 1; @@ -206,6 +250,13 @@ provisional server cluster Scenes = 5 { group_id groupID = 0; } + response struct GetSceneMembershipResponse = 6 { + status status = 0; + nullable int8u capacity = 1; + group_id groupID = 2; + optional int8u sceneList[] = 3; + } + request struct EnhancedAddSceneRequest { group_id groupID = 0; int8u sceneID = 1; @@ -214,26 +265,18 @@ provisional server cluster Scenes = 5 { ExtensionFieldSet extensionFieldSets[] = 4; } - request struct EnhancedViewSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - request struct CopySceneRequest { - CopyModeBitmap mode = 0; - group_id groupIdentifierFrom = 1; - int8u sceneIdentifierFrom = 2; - group_id groupIdentifierTo = 3; - int8u sceneIdentifierTo = 4; - } - - response struct AddSceneResponse = 0 { + response struct EnhancedAddSceneResponse = 64 { status status = 0; group_id groupID = 1; int8u sceneID = 2; } - response struct ViewSceneResponse = 1 { + request struct EnhancedViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct EnhancedViewSceneResponse = 65 { status status = 0; group_id groupID = 1; int8u sceneID = 2; @@ -242,44 +285,44 @@ provisional server cluster Scenes = 5 { optional ExtensionFieldSet extensionFieldSets[] = 5; } - response struct RemoveSceneResponse = 2 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - response struct RemoveAllScenesResponse = 3 { - status status = 0; - group_id groupID = 1; - } - - response struct StoreSceneResponse = 4 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; + request struct CopySceneRequest { + CopyModeBitmap mode = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + group_id groupIdentifierTo = 3; + int8u sceneIdentifierTo = 4; } - response struct GetSceneMembershipResponse = 6 { + response struct CopySceneResponse = 66 { status status = 0; - nullable int8u capacity = 1; - group_id groupID = 2; - optional int8u sceneList[] = 3; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; } + /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; + /** Retrieves the requested scene entry from its Scene table. */ fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; + /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; + /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; + /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -314,10 +357,10 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; - readonly attribute boolean globalSceneControl = 16384; - attribute int16u onTime = 16385; - attribute int16u offWaitTime = 16386; - attribute access(write: manage) nullable StartUpOnOffEnum startUpOnOff = 16387; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -336,16 +379,22 @@ server cluster OnOff = 6 { int16u offWaitTime = 2; } + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ -server cluster LevelControl = 8 { +cluster LevelControl = 8 { revision 5; enum MoveModeEnum : enum8 { @@ -370,19 +419,19 @@ server cluster LevelControl = 8 { } readonly attribute nullable int8u currentLevel = 0; - readonly attribute int16u remainingTime = 1; - readonly attribute int8u minLevel = 2; - readonly attribute int8u maxLevel = 3; - readonly attribute int16u currentFrequency = 4; - readonly attribute int16u minFrequency = 5; - readonly attribute int16u maxFrequency = 6; + readonly attribute optional int16u remainingTime = 1; + readonly attribute optional int8u minLevel = 2; + readonly attribute optional int8u maxLevel = 3; + readonly attribute optional int16u currentFrequency = 4; + readonly attribute optional int16u minFrequency = 5; + readonly attribute optional int16u maxFrequency = 6; attribute OptionsBitmap options = 15; - attribute int16u onOffTransitionTime = 16; + attribute optional int16u onOffTransitionTime = 16; attribute nullable int8u onLevel = 17; - attribute nullable int16u onTransitionTime = 18; - attribute nullable int16u offTransitionTime = 19; - attribute nullable int8u defaultMoveRate = 20; - attribute access(write: manage) nullable int8u startUpCurrentLevel = 16384; + attribute optional nullable int16u onTransitionTime = 18; + attribute optional nullable int16u offTransitionTime = 19; + attribute optional nullable int8u defaultMoveRate = 20; + attribute access(write: manage) optional nullable int8u startUpCurrentLevel = 16384; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -444,18 +493,33 @@ server cluster LevelControl = 8 { OptionsBitmap optionsOverride = 1; } + request struct MoveToClosestFrequencyRequest { + int16u frequency = 0; + } + + /** Command description for MoveToLevel */ command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + /** Command description for Move */ command Move(MoveRequest): DefaultSuccess = 1; + /** Command description for Step */ command Step(StepRequest): DefaultSuccess = 2; + /** Command description for Stop */ command Stop(StopRequest): DefaultSuccess = 3; + /** Command description for MoveToLevelWithOnOff */ command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + /** Command description for MoveWithOnOff */ command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + /** Command description for StepWithOnOff */ command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + /** Command description for StopWithOnOff */ command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; + /** Change the currrent frequency to the provided one, or a close + approximation if the exact provided one is not possible. */ + command MoveToClosestFrequency(MoveToClosestFrequencyRequest): DefaultSuccess = 8; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -478,6 +542,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -490,7 +555,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -549,7 +614,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -564,7 +629,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -636,14 +701,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -652,10 +719,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -731,7 +800,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -804,6 +873,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -811,7 +881,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -828,7 +898,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -856,8 +926,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -867,7 +937,7 @@ server cluster TimeFormatLocalization = 44 { } /** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ -server cluster PowerSource = 47 { +cluster PowerSource = 47 { revision 1; // NOTE: Default/not specifically set enum BatApprovedChemistryEnum : enum16 { @@ -1088,13 +1158,34 @@ server cluster PowerSource = 47 { readonly attribute PowerSourceStatusEnum status = 0; readonly attribute int8u order = 1; readonly attribute char_string<60> description = 2; - readonly attribute nullable int32u wiredAssessedInputVoltage = 3; - readonly attribute nullable int16u wiredAssessedInputFrequency = 4; - readonly attribute WiredCurrentTypeEnum wiredCurrentType = 5; - readonly attribute nullable int32u wiredAssessedCurrent = 6; - readonly attribute int32u wiredNominalVoltage = 7; - readonly attribute int32u wiredMaximumCurrent = 8; - readonly attribute boolean wiredPresent = 9; + readonly attribute optional nullable int32u wiredAssessedInputVoltage = 3; + readonly attribute optional nullable int16u wiredAssessedInputFrequency = 4; + readonly attribute optional WiredCurrentTypeEnum wiredCurrentType = 5; + readonly attribute optional nullable int32u wiredAssessedCurrent = 6; + readonly attribute optional int32u wiredNominalVoltage = 7; + readonly attribute optional int32u wiredMaximumCurrent = 8; + readonly attribute optional boolean wiredPresent = 9; + readonly attribute optional WiredFaultEnum activeWiredFaults[] = 10; + readonly attribute optional nullable int32u batVoltage = 11; + readonly attribute optional nullable int8u batPercentRemaining = 12; + readonly attribute optional nullable int32u batTimeRemaining = 13; + readonly attribute optional BatChargeLevelEnum batChargeLevel = 14; + readonly attribute optional boolean batReplacementNeeded = 15; + readonly attribute optional BatReplaceabilityEnum batReplaceability = 16; + readonly attribute optional boolean batPresent = 17; + readonly attribute optional BatFaultEnum activeBatFaults[] = 18; + readonly attribute optional char_string<60> batReplacementDescription = 19; + readonly attribute optional BatCommonDesignationEnum batCommonDesignation = 20; + readonly attribute optional char_string<20> batANSIDesignation = 21; + readonly attribute optional char_string<20> batIECDesignation = 22; + readonly attribute optional BatApprovedChemistryEnum batApprovedChemistry = 23; + readonly attribute optional int32u batCapacity = 24; + readonly attribute optional int8u batQuantity = 25; + readonly attribute optional BatChargeStateEnum batChargeState = 26; + readonly attribute optional nullable int32u batTimeToFullCharge = 27; + readonly attribute optional boolean batFunctionalWhileCharging = 28; + readonly attribute optional nullable int32u batChargingCurrent = 29; + readonly attribute optional BatChargeFaultEnum activeBatChargeFaults[] = 30; readonly attribute endpoint_no endpointList[] = 31; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1105,7 +1196,7 @@ server cluster PowerSource = 47 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -1144,17 +1235,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -1165,13 +1256,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -1252,12 +1346,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1270,6 +1367,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -1289,48 +1393,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -1365,11 +1480,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -1453,12 +1576,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1477,12 +1600,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -1503,10 +1628,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1514,11 +1639,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster WiFiNetworkDiagnostics = 54 { +cluster WiFiNetworkDiagnostics = 54 { revision 1; // NOTE: Default/not specifically set enum AssociationFailureCauseEnum : enum8 { @@ -1575,14 +1701,14 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; - readonly attribute nullable int32u beaconLostCount = 5; - readonly attribute nullable int32u beaconRxCount = 6; - readonly attribute nullable int32u packetMulticastRxCount = 7; - readonly attribute nullable int32u packetMulticastTxCount = 8; - readonly attribute nullable int32u packetUnicastRxCount = 9; - readonly attribute nullable int32u packetUnicastTxCount = 10; - readonly attribute nullable int64u currentMaxRate = 11; - readonly attribute nullable int64u overrunCount = 12; + readonly attribute optional nullable int32u beaconLostCount = 5; + readonly attribute optional nullable int32u beaconRxCount = 6; + readonly attribute optional nullable int32u packetMulticastRxCount = 7; + readonly attribute optional nullable int32u packetMulticastTxCount = 8; + readonly attribute optional nullable int32u packetUnicastRxCount = 9; + readonly attribute optional nullable int32u packetUnicastTxCount = 10; + readonly attribute optional nullable int64u currentMaxRate = 11; + readonly attribute optional nullable int64u overrunCount = 12; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1590,11 +1716,12 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 */ command ResetCounts(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1635,13 +1762,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1694,15 +1824,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1716,6 +1860,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1728,38 +1878,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1814,27 +1952,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1852,7 +1994,7 @@ server cluster FixedLabel = 64 { } /** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ -server cluster UserLabel = 65 { +cluster UserLabel = 65 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1870,7 +2012,7 @@ server cluster UserLabel = 65 { } /** Attributes and commands for controlling the color properties of a color-capable light. */ -server cluster ColorControl = 768 { +cluster ColorControl = 768 { revision 6; enum ColorLoopAction : enum8 { @@ -1942,27 +2084,58 @@ server cluster ColorControl = 768 { kColorTemperature = 0x10; } - readonly attribute int8u currentHue = 0; - readonly attribute int8u currentSaturation = 1; - readonly attribute int16u remainingTime = 2; - readonly attribute int16u currentX = 3; - readonly attribute int16u currentY = 4; - readonly attribute int16u colorTemperatureMireds = 7; + readonly attribute optional int8u currentHue = 0; + readonly attribute optional int8u currentSaturation = 1; + readonly attribute optional int16u remainingTime = 2; + readonly attribute optional int16u currentX = 3; + readonly attribute optional int16u currentY = 4; + readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional char_string<254> compensationText = 6; + readonly attribute optional int16u colorTemperatureMireds = 7; readonly attribute enum8 colorMode = 8; attribute bitmap8 options = 15; readonly attribute nullable int8u numberOfPrimaries = 16; - readonly attribute int16u enhancedCurrentHue = 16384; + readonly attribute optional int16u primary1X = 17; + readonly attribute optional int16u primary1Y = 18; + readonly attribute optional nullable int8u primary1Intensity = 19; + readonly attribute optional int16u primary2X = 21; + readonly attribute optional int16u primary2Y = 22; + readonly attribute optional nullable int8u primary2Intensity = 23; + readonly attribute optional int16u primary3X = 25; + readonly attribute optional int16u primary3Y = 26; + readonly attribute optional nullable int8u primary3Intensity = 27; + readonly attribute optional int16u primary4X = 32; + readonly attribute optional int16u primary4Y = 33; + readonly attribute optional nullable int8u primary4Intensity = 34; + readonly attribute optional int16u primary5X = 36; + readonly attribute optional int16u primary5Y = 37; + readonly attribute optional nullable int8u primary5Intensity = 38; + readonly attribute optional int16u primary6X = 40; + readonly attribute optional int16u primary6Y = 41; + readonly attribute optional nullable int8u primary6Intensity = 42; + attribute access(write: manage) optional int16u whitePointX = 48; + attribute access(write: manage) optional int16u whitePointY = 49; + attribute access(write: manage) optional int16u colorPointRX = 50; + attribute access(write: manage) optional int16u colorPointRY = 51; + attribute access(write: manage) optional nullable int8u colorPointRIntensity = 52; + attribute access(write: manage) optional int16u colorPointGX = 54; + attribute access(write: manage) optional int16u colorPointGY = 55; + attribute access(write: manage) optional nullable int8u colorPointGIntensity = 56; + attribute access(write: manage) optional int16u colorPointBX = 58; + attribute access(write: manage) optional int16u colorPointBY = 59; + attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; + readonly attribute optional int16u enhancedCurrentHue = 16384; readonly attribute enum8 enhancedColorMode = 16385; - readonly attribute int8u colorLoopActive = 16386; - readonly attribute int8u colorLoopDirection = 16387; - readonly attribute int16u colorLoopTime = 16388; - readonly attribute int16u colorLoopStartEnhancedHue = 16389; - readonly attribute int16u colorLoopStoredEnhancedHue = 16390; + readonly attribute optional int8u colorLoopActive = 16386; + readonly attribute optional int8u colorLoopDirection = 16387; + readonly attribute optional int16u colorLoopTime = 16388; + readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; + readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; readonly attribute bitmap16 colorCapabilities = 16394; - readonly attribute int16u colorTempPhysicalMinMireds = 16395; - readonly attribute int16u colorTempPhysicalMaxMireds = 16396; - readonly attribute int16u coupleColorTempToLevelMinMireds = 16397; - attribute access(write: manage) nullable int16u startUpColorTemperatureMireds = 16400; + readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; + readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; + readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; + attribute access(write: manage) optional nullable int16u startUpColorTemperatureMireds = 16400; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2118,24 +2291,43 @@ server cluster ColorControl = 768 { bitmap8 optionsOverride = 6; } + /** Move to specified hue. */ command MoveToHue(MoveToHueRequest): DefaultSuccess = 0; + /** Move hue up or down at specified rate. */ command MoveHue(MoveHueRequest): DefaultSuccess = 1; + /** Step hue up or down by specified size at specified rate. */ command StepHue(StepHueRequest): DefaultSuccess = 2; + /** Move to specified saturation. */ command MoveToSaturation(MoveToSaturationRequest): DefaultSuccess = 3; + /** Move saturation up or down at specified rate. */ command MoveSaturation(MoveSaturationRequest): DefaultSuccess = 4; + /** Step saturation up or down by specified size at specified rate. */ command StepSaturation(StepSaturationRequest): DefaultSuccess = 5; + /** Move to hue and saturation. */ command MoveToHueAndSaturation(MoveToHueAndSaturationRequest): DefaultSuccess = 6; + /** Move to specified color. */ command MoveToColor(MoveToColorRequest): DefaultSuccess = 7; + /** Moves the color. */ command MoveColor(MoveColorRequest): DefaultSuccess = 8; + /** Steps the lighting to a specific color. */ command StepColor(StepColorRequest): DefaultSuccess = 9; + /** Move to a specific color temperature. */ command MoveToColorTemperature(MoveToColorTemperatureRequest): DefaultSuccess = 10; + /** Command description for EnhancedMoveToHue */ command EnhancedMoveToHue(EnhancedMoveToHueRequest): DefaultSuccess = 64; + /** Command description for EnhancedMoveHue */ command EnhancedMoveHue(EnhancedMoveHueRequest): DefaultSuccess = 65; + /** Command description for EnhancedStepHue */ command EnhancedStepHue(EnhancedStepHueRequest): DefaultSuccess = 66; + /** Command description for EnhancedMoveToHueAndSaturation */ command EnhancedMoveToHueAndSaturation(EnhancedMoveToHueAndSaturationRequest): DefaultSuccess = 67; + /** Command description for ColorLoopSet */ command ColorLoopSet(ColorLoopSetRequest): DefaultSuccess = 68; + /** Command description for StopMoveStep */ command StopMoveStep(StopMoveStepRequest): DefaultSuccess = 71; + /** Command description for MoveColorTemperature */ command MoveColorTemperature(MoveColorTemperatureRequest): DefaultSuccess = 75; + /** Command description for StepColorTemperature */ command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76; } diff --git a/examples/lit-icd-app/linux/args.gni b/examples/lit-icd-app/linux/args.gni index 50691e9c530522..5630bb4e1ccb25 100644 --- a/examples/lit-icd-app/linux/args.gni +++ b/examples/lit-icd-app/linux/args.gni @@ -22,7 +22,8 @@ chip_system_project_config_include = "" chip_project_config_include_dirs = [ "${chip_root}/examples/lit-icd-app/linux/include" ] -chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ] +chip_project_config_include_dirs += + [ "${chip_root}/examples/lit-icd-app/linux/config/" ] matter_enable_tracing_support = true # ICD configurations diff --git a/examples/lit-icd-app/linux/config/CHIPProjectConfig.h b/examples/lit-icd-app/linux/config/CHIPProjectConfig.h new file mode 100644 index 00000000000000..fd663ffcbc893d --- /dev/null +++ b/examples/lit-icd-app/linux/config/CHIPProjectConfig.h @@ -0,0 +1,91 @@ +/* + * + * Copyright (c) 2020-2022 Project CHIP Authors + * Copyright (c) 2016-2017 Nest Labs, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * CHIP project configuration for standalone builds on Linux and OS X. + * + */ +#ifndef CHIPPROJECTCONFIG_H +#define CHIPPROJECTCONFIG_H + +// TODO Cleanup this file, as most of it is irrelevant +// Issue #30616 + +#define CHIP_CONFIG_EVENT_LOGGING_NUM_EXTERNAL_CALLBACKS 2 + +// Uncomment this for a large Tunnel MTU. +// #define CHIP_CONFIG_TUNNEL_INTERFACE_MTU (9000) + +// Enable support functions for parsing command-line arguments +#define CHIP_CONFIG_ENABLE_ARG_PARSER 1 + +// Enable use of test setup parameters for testing purposes only. +// +// WARNING: This option makes it possible to circumvent basic chip security functionality. +// Because of this it SHOULD NEVER BE ENABLED IN PRODUCTION BUILDS. +// +#ifndef CHIP_DEVICE_CONFIG_ENABLE_TEST_SETUP_PARAMS +#define CHIP_DEVICE_CONFIG_ENABLE_TEST_SETUP_PARAMS 1 +#endif + +// Enable reading DRBG seed data from /dev/(u)random. +// This is needed for test applications and the CHIP device manager to function +// properly when CHIP_CONFIG_RNG_IMPLEMENTATION_CHIPDRBG is enabled. +#define CHIP_CONFIG_DEV_RANDOM_DRBG_SEED 1 + +// For convenience, Chip Security Test Mode can be enabled and the +// requirement for authentication in various protocols can be disabled. +// +// WARNING: These options make it possible to circumvent basic Chip security functionality, +// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. +// +// To build with this flag, pass 'treat_warnings_as_errors=false' to gn/ninja. +// +#define CHIP_CONFIG_SECURITY_TEST_MODE 0 + +#define CHIP_CONFIG_ENABLE_UPDATE 1 + +#define CHIP_SYSTEM_CONFIG_PACKETBUFFER_POOL_SIZE 0 + +#define CHIP_CONFIG_DATA_MANAGEMENT_CLIENT_EXPERIMENTAL 1 + +#ifndef CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT +#define CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT 4 +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION 1 +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING "1.0" +#endif + +// +// Default of 8 ECs is not sufficient for some of the unit tests +// that try to validate multiple simultaneous interactions. +// In tests like TestReadHandler_MultipleSubscriptions, we are trying to issue as many read / subscription requests as possible in +// parallel. Since the default config says we support 16 fabrics, and we will have 4 read handlers for each fabric (3 subscriptions +// + 1 reserved for read) that is read transactions in parallel. Since the report handlers are allocated on the heap, we will issue +// 65 requests (the TestReadHandler_MultipleSubscriptions will issue CHIP_IM_MAX_NUM_READ_HANDLER + 1 subscriptions to verify heap +// allocation logic) in total and that is 130 ECs. Round this up to 150 ECs +// +#define CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS 150 + +#endif /* CHIPPROJECTCONFIG_H */ diff --git a/examples/lit-icd-app/linux/config/SystemProjectConfig.h b/examples/lit-icd-app/linux/config/SystemProjectConfig.h new file mode 100644 index 00000000000000..0d5a7586da0975 --- /dev/null +++ b/examples/lit-icd-app/linux/config/SystemProjectConfig.h @@ -0,0 +1,35 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2018 Nest Labs, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * chip::System project configuration for standalone builds on Linux and OS X. + * + */ +#ifndef SYSTEMPROJECTCONFIG_H +#define SYSTEMPROJECTCONFIG_H + +// TODO Cleanup this file, as most of it is irrelevant +// Issue #30616 + +#if CHIP_SYSTEM_CONFIG_USE_SOCKETS +// Uncomment this for larger buffers (e.g. to support a bigger CHIP_CONFIG_TUNNEL_INTERFACE_MTU). +// #define CHIP_SYSTEM_CONFIG_PACKETBUFFER_CAPACITY_MAX 9050 +#endif + +#endif /* SYSTEMPROJECTCONFIG_H */ diff --git a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter index 851919351de21f..8498133d2850d4 100644 --- a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter +++ b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -40,11 +40,19 @@ server cluster Identify = 3 { int16u identifyTime = 0; } + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -67,6 +75,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -79,7 +88,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -138,7 +147,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -153,7 +162,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -225,7 +234,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -234,10 +252,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -313,7 +333,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -386,6 +406,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -393,7 +414,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing preferences for the units in which values are conveyed in communication to a user. As such, Nodes that visually or audibly convey measurable values to the user need a mechanism by which they can be configured to use a user’s preferred unit. */ -server cluster UnitLocalization = 45 { +cluster UnitLocalization = 45 { revision 1; enum TempUnitEnum : enum8 { @@ -406,6 +427,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } + attribute access(write: manage) optional TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -415,7 +437,7 @@ server cluster UnitLocalization = 45 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -454,17 +476,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -475,13 +497,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -562,12 +587,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -580,6 +608,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -599,48 +634,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -724,6 +770,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -742,12 +794,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ -server cluster ThreadNetworkDiagnostics = 53 { +cluster ThreadNetworkDiagnostics = 53 { revision 1; // NOTE: Default/not specifically set enum ConnectionStatusEnum : enum8 { @@ -844,6 +898,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u panId = 3; readonly attribute nullable int64u extendedPanId = 4; readonly attribute nullable octet_string<17> meshLocalPrefix = 5; + readonly attribute optional int64u overrunCount = 6; readonly attribute NeighborTableStruct neighborTable[] = 7; readonly attribute RouteTableStruct routeTable[] = 8; readonly attribute nullable int32u partitionId = 9; @@ -851,6 +906,51 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u dataVersion = 11; readonly attribute nullable int16u stableDataVersion = 12; readonly attribute nullable int8u leaderRouterId = 13; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; readonly attribute nullable SecurityPolicy securityPolicy = 59; readonly attribute nullable octet_string<4> channelPage0Mask = 60; readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; @@ -861,10 +961,13 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ + command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster WiFiNetworkDiagnostics = 54 { +cluster WiFiNetworkDiagnostics = 54 { revision 1; // NOTE: Default/not specifically set enum AssociationFailureCauseEnum : enum8 { @@ -921,16 +1024,27 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; + readonly attribute optional nullable int32u beaconLostCount = 5; + readonly attribute optional nullable int32u beaconRxCount = 6; + readonly attribute optional nullable int32u packetMulticastRxCount = 7; + readonly attribute optional nullable int32u packetMulticastTxCount = 8; + readonly attribute optional nullable int32u packetUnicastRxCount = 9; + readonly attribute optional nullable int32u packetUnicastTxCount = 10; + readonly attribute optional nullable int64u currentMaxRate = 11; + readonly attribute optional nullable int64u overrunCount = 12; 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; + + /** Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 */ + command ResetCounts(): DefaultSuccess = 0; } /** The Ethernet Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster EthernetNetworkDiagnostics = 55 { +cluster EthernetNetworkDiagnostics = 55 { revision 1; // NOTE: Default/not specifically set enum PHYRateEnum : enum8 { @@ -951,15 +1065,15 @@ server cluster EthernetNetworkDiagnostics = 55 { kErrorCounts = 0x2; } - readonly attribute nullable PHYRateEnum PHYRate = 0; - readonly attribute nullable boolean fullDuplex = 1; - readonly attribute int64u packetRxCount = 2; - readonly attribute int64u packetTxCount = 3; - readonly attribute int64u txErrCount = 4; - readonly attribute int64u collisionCount = 5; - readonly attribute int64u overrunCount = 6; - readonly attribute nullable boolean carrierDetect = 7; - readonly attribute int64u timeSinceReset = 8; + readonly attribute optional nullable PHYRateEnum PHYRate = 0; + readonly attribute optional nullable boolean fullDuplex = 1; + readonly attribute optional int64u packetRxCount = 2; + readonly attribute optional int64u packetTxCount = 3; + readonly attribute optional int64u txErrCount = 4; + readonly attribute optional int64u collisionCount = 5; + readonly attribute optional int64u overrunCount = 6; + readonly attribute optional nullable boolean carrierDetect = 7; + readonly attribute optional int64u timeSinceReset = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -967,11 +1081,12 @@ server cluster EthernetNetworkDiagnostics = 55 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the attributes: PacketRxCount, PacketTxCount, TxErrCount, CollisionCount, OverrunCount to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1008,12 +1123,20 @@ server cluster AdministratorCommissioning = 60 { octet_string<32> salt = 4; } + request struct OpenBasicCommissioningWindowRequest { + int16u commissioningTimeout = 0; + } + + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1066,15 +1189,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1088,6 +1225,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1100,38 +1243,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1186,27 +1317,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1224,7 +1359,7 @@ server cluster FixedLabel = 64 { } /** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ -server cluster UserLabel = 65 { +cluster UserLabel = 65 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1242,7 +1377,7 @@ server cluster UserLabel = 65 { } /** Allows servers to ensure that listed clients are notified when a server is available for communication. */ -server cluster IcdManagement = 70 { +cluster IcdManagement = 70 { revision 2; bitmap Feature : bitmap32 { @@ -1280,11 +1415,11 @@ server cluster IcdManagement = 70 { readonly attribute int32u idleModeDuration = 0; readonly attribute int32u activeModeDuration = 1; readonly attribute int16u activeModeThreshold = 2; - readonly attribute access(read: administer) MonitoringRegistrationStruct registeredClients[] = 3; - readonly attribute access(read: administer) int32u ICDCounter = 4; - readonly attribute int16u clientsSupportedPerFabric = 5; - readonly attribute UserActiveModeTriggerBitmap userActiveModeTriggerHint = 6; - readonly attribute char_string<128> userActiveModeTriggerInstruction = 7; + readonly attribute access(read: administer) optional MonitoringRegistrationStruct registeredClients[] = 3; + readonly attribute access(read: administer) optional int32u ICDCounter = 4; + readonly attribute optional int16u clientsSupportedPerFabric = 5; + readonly attribute optional UserActiveModeTriggerBitmap userActiveModeTriggerHint = 6; + readonly attribute optional char_string<128> userActiveModeTriggerInstruction = 7; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1299,21 +1434,24 @@ server cluster IcdManagement = 70 { optional octet_string<16> verificationKey = 3; } + response struct RegisterClientResponse = 1 { + int32u ICDCounter = 0; + } + request struct UnregisterClientRequest { node_id checkInNodeID = 0; optional octet_string<16> verificationKey = 1; } - response struct RegisterClientResponse = 1 { - int32u ICDCounter = 0; - } - response struct StayActiveResponse = 4 { int32u promisedActiveDuration = 0; } + /** Register a client to the end device */ fabric command access(invoke: manage) RegisterClient(RegisterClientRequest): RegisterClientResponse = 0; + /** Unregister a client from an end device */ fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2; + /** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */ command access(invoke: manage) StayActiveRequest(): StayActiveResponse = 3; } diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 22e1b16b9cca0c..d1da22ba12145a 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -73,6 +75,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -85,7 +88,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -144,7 +147,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -159,7 +162,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -231,14 +234,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -247,10 +252,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -326,7 +333,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -399,6 +406,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -406,7 +414,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -423,7 +431,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for the units in which values are conveyed in communication to a user. As such, Nodes that visually or audibly convey measurable values to the user need a mechanism by which they can be configured to use a user’s preferred unit. */ -server cluster UnitLocalization = 45 { +cluster UnitLocalization = 45 { revision 1; enum TempUnitEnum : enum8 { @@ -436,6 +444,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } + attribute access(write: manage) optional TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -445,7 +454,7 @@ server cluster UnitLocalization = 45 { } /** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ -server cluster PowerSource = 47 { +cluster PowerSource = 47 { revision 1; // NOTE: Default/not specifically set enum BatApprovedChemistryEnum : enum16 { @@ -666,13 +675,34 @@ server cluster PowerSource = 47 { readonly attribute PowerSourceStatusEnum status = 0; readonly attribute int8u order = 1; readonly attribute char_string<60> description = 2; - readonly attribute WiredCurrentTypeEnum wiredCurrentType = 5; - readonly attribute nullable int32u wiredAssessedCurrent = 6; - readonly attribute BatChargeLevelEnum batChargeLevel = 14; - readonly attribute boolean batReplacementNeeded = 15; - readonly attribute BatReplaceabilityEnum batReplaceability = 16; - readonly attribute char_string<60> batReplacementDescription = 19; - readonly attribute int8u batQuantity = 25; + readonly attribute optional nullable int32u wiredAssessedInputVoltage = 3; + readonly attribute optional nullable int16u wiredAssessedInputFrequency = 4; + readonly attribute optional WiredCurrentTypeEnum wiredCurrentType = 5; + readonly attribute optional nullable int32u wiredAssessedCurrent = 6; + readonly attribute optional int32u wiredNominalVoltage = 7; + readonly attribute optional int32u wiredMaximumCurrent = 8; + readonly attribute optional boolean wiredPresent = 9; + readonly attribute optional WiredFaultEnum activeWiredFaults[] = 10; + readonly attribute optional nullable int32u batVoltage = 11; + readonly attribute optional nullable int8u batPercentRemaining = 12; + readonly attribute optional nullable int32u batTimeRemaining = 13; + readonly attribute optional BatChargeLevelEnum batChargeLevel = 14; + readonly attribute optional boolean batReplacementNeeded = 15; + readonly attribute optional BatReplaceabilityEnum batReplaceability = 16; + readonly attribute optional boolean batPresent = 17; + readonly attribute optional BatFaultEnum activeBatFaults[] = 18; + readonly attribute optional char_string<60> batReplacementDescription = 19; + readonly attribute optional BatCommonDesignationEnum batCommonDesignation = 20; + readonly attribute optional char_string<20> batANSIDesignation = 21; + readonly attribute optional char_string<20> batIECDesignation = 22; + readonly attribute optional BatApprovedChemistryEnum batApprovedChemistry = 23; + readonly attribute optional int32u batCapacity = 24; + readonly attribute optional int8u batQuantity = 25; + readonly attribute optional BatChargeStateEnum batChargeState = 26; + readonly attribute optional nullable int32u batTimeToFullCharge = 27; + readonly attribute optional boolean batFunctionalWhileCharging = 28; + readonly attribute optional nullable int32u batChargingCurrent = 29; + readonly attribute optional BatChargeFaultEnum activeBatChargeFaults[] = 30; readonly attribute endpoint_no endpointList[] = 31; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -683,7 +713,7 @@ server cluster PowerSource = 47 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -722,17 +752,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -743,13 +773,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -830,12 +863,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -848,6 +884,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -867,48 +910,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -943,11 +997,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -1031,12 +1093,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1055,12 +1117,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -1081,10 +1145,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1092,11 +1156,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ -server cluster ThreadNetworkDiagnostics = 53 { +cluster ThreadNetworkDiagnostics = 53 { revision 1; // NOTE: Default/not specifically set enum ConnectionStatusEnum : enum8 { @@ -1193,7 +1258,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u panId = 3; readonly attribute nullable int64u extendedPanId = 4; readonly attribute nullable octet_string<17> meshLocalPrefix = 5; - readonly attribute int64u overrunCount = 6; + readonly attribute optional int64u overrunCount = 6; readonly attribute NeighborTableStruct neighborTable[] = 7; readonly attribute RouteTableStruct routeTable[] = 8; readonly attribute nullable int32u partitionId = 9; @@ -1201,51 +1266,51 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u dataVersion = 11; readonly attribute nullable int16u stableDataVersion = 12; readonly attribute nullable int8u leaderRouterId = 13; - readonly attribute int16u detachedRoleCount = 14; - readonly attribute int16u childRoleCount = 15; - readonly attribute int16u routerRoleCount = 16; - readonly attribute int16u leaderRoleCount = 17; - readonly attribute int16u attachAttemptCount = 18; - readonly attribute int16u partitionIdChangeCount = 19; - readonly attribute int16u betterPartitionAttachAttemptCount = 20; - readonly attribute int16u parentChangeCount = 21; - readonly attribute int32u txTotalCount = 22; - readonly attribute int32u txUnicastCount = 23; - readonly attribute int32u txBroadcastCount = 24; - readonly attribute int32u txAckRequestedCount = 25; - readonly attribute int32u txAckedCount = 26; - readonly attribute int32u txNoAckRequestedCount = 27; - readonly attribute int32u txDataCount = 28; - readonly attribute int32u txDataPollCount = 29; - readonly attribute int32u txBeaconCount = 30; - readonly attribute int32u txBeaconRequestCount = 31; - readonly attribute int32u txOtherCount = 32; - readonly attribute int32u txRetryCount = 33; - readonly attribute int32u txDirectMaxRetryExpiryCount = 34; - readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; - readonly attribute int32u txErrCcaCount = 36; - readonly attribute int32u txErrAbortCount = 37; - readonly attribute int32u txErrBusyChannelCount = 38; - readonly attribute int32u rxTotalCount = 39; - readonly attribute int32u rxUnicastCount = 40; - readonly attribute int32u rxBroadcastCount = 41; - readonly attribute int32u rxDataCount = 42; - readonly attribute int32u rxDataPollCount = 43; - readonly attribute int32u rxBeaconCount = 44; - readonly attribute int32u rxBeaconRequestCount = 45; - readonly attribute int32u rxOtherCount = 46; - readonly attribute int32u rxAddressFilteredCount = 47; - readonly attribute int32u rxDestAddrFilteredCount = 48; - readonly attribute int32u rxDuplicatedCount = 49; - readonly attribute int32u rxErrNoFrameCount = 50; - readonly attribute int32u rxErrUnknownNeighborCount = 51; - readonly attribute int32u rxErrInvalidSrcAddrCount = 52; - readonly attribute int32u rxErrSecCount = 53; - readonly attribute int32u rxErrFcsCount = 54; - readonly attribute int32u rxErrOtherCount = 55; - readonly attribute nullable int64u activeTimestamp = 56; - readonly attribute nullable int64u pendingTimestamp = 57; - readonly attribute nullable int32u delay = 58; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; readonly attribute nullable SecurityPolicy securityPolicy = 59; readonly attribute nullable octet_string<4> channelPage0Mask = 60; readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; @@ -1257,11 +1322,12 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster WiFiNetworkDiagnostics = 54 { +cluster WiFiNetworkDiagnostics = 54 { revision 1; // NOTE: Default/not specifically set enum AssociationFailureCauseEnum : enum8 { @@ -1318,14 +1384,14 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; - readonly attribute nullable int32u beaconLostCount = 5; - readonly attribute nullable int32u beaconRxCount = 6; - readonly attribute nullable int32u packetMulticastRxCount = 7; - readonly attribute nullable int32u packetMulticastTxCount = 8; - readonly attribute nullable int32u packetUnicastRxCount = 9; - readonly attribute nullable int32u packetUnicastTxCount = 10; - readonly attribute nullable int64u currentMaxRate = 11; - readonly attribute nullable int64u overrunCount = 12; + readonly attribute optional nullable int32u beaconLostCount = 5; + readonly attribute optional nullable int32u beaconRxCount = 6; + readonly attribute optional nullable int32u packetMulticastRxCount = 7; + readonly attribute optional nullable int32u packetMulticastTxCount = 8; + readonly attribute optional nullable int32u packetUnicastRxCount = 9; + readonly attribute optional nullable int32u packetUnicastTxCount = 10; + readonly attribute optional nullable int64u currentMaxRate = 11; + readonly attribute optional nullable int64u overrunCount = 12; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1333,11 +1399,12 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 */ command ResetCounts(): DefaultSuccess = 0; } /** The Ethernet Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster EthernetNetworkDiagnostics = 55 { +cluster EthernetNetworkDiagnostics = 55 { revision 1; // NOTE: Default/not specifically set enum PHYRateEnum : enum8 { @@ -1358,15 +1425,15 @@ server cluster EthernetNetworkDiagnostics = 55 { kErrorCounts = 0x2; } - readonly attribute nullable PHYRateEnum PHYRate = 0; - readonly attribute nullable boolean fullDuplex = 1; - readonly attribute int64u packetRxCount = 2; - readonly attribute int64u packetTxCount = 3; - readonly attribute int64u txErrCount = 4; - readonly attribute int64u collisionCount = 5; - readonly attribute int64u overrunCount = 6; - readonly attribute nullable boolean carrierDetect = 7; - readonly attribute int64u timeSinceReset = 8; + readonly attribute optional nullable PHYRateEnum PHYRate = 0; + readonly attribute optional nullable boolean fullDuplex = 1; + readonly attribute optional int64u packetRxCount = 2; + readonly attribute optional int64u packetTxCount = 3; + readonly attribute optional int64u txErrCount = 4; + readonly attribute optional int64u collisionCount = 5; + readonly attribute optional int64u overrunCount = 6; + readonly attribute optional nullable boolean carrierDetect = 7; + readonly attribute optional int64u timeSinceReset = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1374,11 +1441,12 @@ server cluster EthernetNetworkDiagnostics = 55 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the attributes: PacketRxCount, PacketTxCount, TxErrCount, CollisionCount, OverrunCount to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1415,12 +1483,20 @@ server cluster AdministratorCommissioning = 60 { octet_string<32> salt = 4; } + request struct OpenBasicCommissioningWindowRequest { + int16u commissioningTimeout = 0; + } + + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1473,15 +1549,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1495,6 +1585,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1507,38 +1603,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1593,27 +1677,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1631,7 +1719,7 @@ server cluster FixedLabel = 64 { } /** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ -server cluster UserLabel = 65 { +cluster UserLabel = 65 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1649,7 +1737,7 @@ server cluster UserLabel = 65 { } /** Allows servers to ensure that listed clients are notified when a server is available for communication. */ -server cluster IcdManagement = 70 { +cluster IcdManagement = 70 { revision 2; bitmap Feature : bitmap32 { @@ -1687,16 +1775,48 @@ server cluster IcdManagement = 70 { readonly attribute int32u idleModeDuration = 0; readonly attribute int32u activeModeDuration = 1; readonly attribute int16u activeModeThreshold = 2; + readonly attribute access(read: administer) optional MonitoringRegistrationStruct registeredClients[] = 3; + readonly attribute access(read: administer) optional int32u ICDCounter = 4; + readonly attribute optional int16u clientsSupportedPerFabric = 5; + readonly attribute optional UserActiveModeTriggerBitmap userActiveModeTriggerHint = 6; + readonly attribute optional char_string<128> userActiveModeTriggerInstruction = 7; 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; + + request struct RegisterClientRequest { + node_id checkInNodeID = 0; + int64u monitoredSubject = 1; + octet_string<16> key = 2; + optional octet_string<16> verificationKey = 3; + } + + response struct RegisterClientResponse = 1 { + int32u ICDCounter = 0; + } + + request struct UnregisterClientRequest { + node_id checkInNodeID = 0; + optional octet_string<16> verificationKey = 1; + } + + response struct StayActiveResponse = 4 { + int32u promisedActiveDuration = 0; + } + + /** Register a client to the end device */ + fabric command access(invoke: manage) RegisterClient(RegisterClientRequest): RegisterClientResponse = 0; + /** Unregister a client from an end device */ + fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2; + /** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */ + command access(invoke: manage) StayActiveRequest(): StayActiveResponse = 3; } /** An interface to a generic way to secure a door */ -server cluster DoorLock = 257 { +cluster DoorLock = 257 { revision 7; enum AlarmCodeEnum : enum8 { @@ -2079,29 +2199,39 @@ server cluster DoorLock = 257 { readonly attribute nullable DlLockState lockState = 0; readonly attribute DlLockType lockType = 1; readonly attribute boolean actuatorEnabled = 2; - readonly attribute nullable DoorStateEnum doorState = 3; - readonly attribute int16u numberOfTotalUsersSupported = 17; - readonly attribute int16u numberOfPINUsersSupported = 18; - readonly attribute int16u numberOfRFIDUsersSupported = 19; - readonly attribute int8u numberOfWeekDaySchedulesSupportedPerUser = 20; - readonly attribute int8u numberOfYearDaySchedulesSupportedPerUser = 21; - readonly attribute int8u numberOfHolidaySchedulesSupported = 22; - readonly attribute int8u maxPINCodeLength = 23; - readonly attribute int8u minPINCodeLength = 24; - readonly attribute int8u maxRFIDCodeLength = 25; - readonly attribute int8u minRFIDCodeLength = 26; - readonly attribute DlCredentialRuleMask credentialRulesSupport = 27; - readonly attribute int8u numberOfCredentialsSupportedPerUser = 28; - attribute access(write: manage) char_string<3> language = 33; + readonly attribute optional nullable DoorStateEnum doorState = 3; + attribute access(write: manage) optional int32u doorOpenEvents = 4; + attribute access(write: manage) optional int32u doorClosedEvents = 5; + attribute access(write: manage) optional int16u openPeriod = 6; + readonly attribute optional int16u numberOfTotalUsersSupported = 17; + readonly attribute optional int16u numberOfPINUsersSupported = 18; + readonly attribute optional int16u numberOfRFIDUsersSupported = 19; + readonly attribute optional int8u numberOfWeekDaySchedulesSupportedPerUser = 20; + readonly attribute optional int8u numberOfYearDaySchedulesSupportedPerUser = 21; + readonly attribute optional int8u numberOfHolidaySchedulesSupported = 22; + readonly attribute optional int8u maxPINCodeLength = 23; + readonly attribute optional int8u minPINCodeLength = 24; + readonly attribute optional int8u maxRFIDCodeLength = 25; + readonly attribute optional int8u minRFIDCodeLength = 26; + readonly attribute optional DlCredentialRuleMask credentialRulesSupport = 27; + readonly attribute optional int8u numberOfCredentialsSupportedPerUser = 28; + attribute access(write: manage) optional char_string<3> language = 33; + attribute access(write: manage) optional int8u LEDSettings = 34; attribute access(write: manage) int32u autoRelockTime = 35; - attribute access(write: manage) int8u soundVolume = 36; + attribute access(write: manage) optional int8u soundVolume = 36; attribute access(write: manage) OperatingModeEnum operatingMode = 37; readonly attribute DlSupportedOperatingModes supportedOperatingModes = 38; - attribute access(write: manage) boolean enableOneTouchLocking = 41; - attribute access(write: manage) boolean enablePrivacyModeButton = 43; - attribute access(write: administer) int8u wrongCodeEntryLimit = 48; - attribute access(write: administer) int8u userCodeTemporaryDisableTime = 49; - attribute access(write: administer) boolean requirePINforRemoteOperation = 51; + readonly attribute optional DlDefaultConfigurationRegister defaultConfigurationRegister = 39; + attribute access(write: administer) optional boolean enableLocalProgramming = 40; + attribute access(write: manage) optional boolean enableOneTouchLocking = 41; + attribute access(write: manage) optional boolean enableInsideStatusLED = 42; + attribute access(write: manage) optional boolean enablePrivacyModeButton = 43; + attribute access(write: administer) optional DlLocalProgrammingFeatures localProgrammingFeatures = 44; + attribute access(write: administer) optional int8u wrongCodeEntryLimit = 48; + attribute access(write: administer) optional int8u userCodeTemporaryDisableTime = 49; + attribute access(write: administer) optional boolean sendPINOverTheAir = 50; + attribute access(write: administer) optional boolean requirePINforRemoteOperation = 51; + attribute access(write: administer) optional int16u expiringUserTimeout = 53; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2137,6 +2267,17 @@ server cluster DoorLock = 257 { int16u userIndex = 1; } + response struct GetWeekDayScheduleResponse = 12 { + int8u weekDayIndex = 0; + int16u userIndex = 1; + DlStatus status = 2; + optional DaysMaskMap daysMask = 3; + optional int8u startHour = 4; + optional int8u startMinute = 5; + optional int8u endHour = 6; + optional int8u endMinute = 7; + } + request struct ClearWeekDayScheduleRequest { int8u weekDayIndex = 0; int16u userIndex = 1; @@ -2154,6 +2295,14 @@ server cluster DoorLock = 257 { int16u userIndex = 1; } + response struct GetYearDayScheduleResponse = 15 { + int8u yearDayIndex = 0; + int16u userIndex = 1; + DlStatus status = 2; + optional epoch_s localStartTime = 3; + optional epoch_s localEndTime = 4; + } + request struct ClearYearDayScheduleRequest { int8u yearDayIndex = 0; int16u userIndex = 1; @@ -2170,6 +2319,14 @@ server cluster DoorLock = 257 { int8u holidayIndex = 0; } + response struct GetHolidayScheduleResponse = 18 { + int8u holidayIndex = 0; + DlStatus status = 1; + optional epoch_s localStartTime = 2; + optional epoch_s localEndTime = 3; + optional OperatingModeEnum operatingMode = 4; + } + request struct ClearHolidayScheduleRequest { int8u holidayIndex = 0; } @@ -2188,58 +2345,6 @@ server cluster DoorLock = 257 { int16u userIndex = 0; } - request struct ClearUserRequest { - int16u userIndex = 0; - } - - request struct SetCredentialRequest { - DataOperationTypeEnum operationType = 0; - CredentialStruct credential = 1; - LONG_OCTET_STRING credentialData = 2; - nullable int16u userIndex = 3; - nullable UserStatusEnum userStatus = 4; - nullable UserTypeEnum userType = 5; - } - - request struct GetCredentialStatusRequest { - CredentialStruct credential = 0; - } - - request struct ClearCredentialRequest { - nullable CredentialStruct credential = 0; - } - - request struct UnboltDoorRequest { - optional octet_string PINCode = 0; - } - - response struct GetWeekDayScheduleResponse = 12 { - int8u weekDayIndex = 0; - int16u userIndex = 1; - DlStatus status = 2; - optional DaysMaskMap daysMask = 3; - optional int8u startHour = 4; - optional int8u startMinute = 5; - optional int8u endHour = 6; - optional int8u endMinute = 7; - } - - response struct GetYearDayScheduleResponse = 15 { - int8u yearDayIndex = 0; - int16u userIndex = 1; - DlStatus status = 2; - optional epoch_s localStartTime = 3; - optional epoch_s localEndTime = 4; - } - - response struct GetHolidayScheduleResponse = 18 { - int8u holidayIndex = 0; - DlStatus status = 1; - optional epoch_s localStartTime = 2; - optional epoch_s localEndTime = 3; - optional OperatingModeEnum operatingMode = 4; - } - response struct GetUserResponse = 28 { int16u userIndex = 0; nullable char_string userName = 1; @@ -2253,12 +2358,29 @@ server cluster DoorLock = 257 { nullable int16u nextUserIndex = 9; } + request struct ClearUserRequest { + int16u userIndex = 0; + } + + request struct SetCredentialRequest { + DataOperationTypeEnum operationType = 0; + CredentialStruct credential = 1; + LONG_OCTET_STRING credentialData = 2; + nullable int16u userIndex = 3; + nullable UserStatusEnum userStatus = 4; + nullable UserTypeEnum userType = 5; + } + response struct SetCredentialResponse = 35 { DlStatus status = 0; nullable int16u userIndex = 1; nullable int16u nextCredentialIndex = 2; } + request struct GetCredentialStatusRequest { + CredentialStruct credential = 0; + } + response struct GetCredentialStatusResponse = 37 { boolean credentialExists = 0; nullable int16u userIndex = 1; @@ -2267,24 +2389,51 @@ server cluster DoorLock = 257 { nullable int16u nextCredentialIndex = 4; } + request struct ClearCredentialRequest { + nullable CredentialStruct credential = 0; + } + + request struct UnboltDoorRequest { + optional octet_string PINCode = 0; + } + + /** This command causes the lock device to lock the door. */ timed command LockDoor(LockDoorRequest): DefaultSuccess = 0; + /** This command causes the lock device to unlock the door. */ timed command UnlockDoor(UnlockDoorRequest): DefaultSuccess = 1; + /** This command causes the lock device to unlock the door with a timeout parameter. */ timed command UnlockWithTimeout(UnlockWithTimeoutRequest): DefaultSuccess = 3; + /** Set a weekly repeating schedule for a specified user. */ command access(invoke: administer) SetWeekDaySchedule(SetWeekDayScheduleRequest): DefaultSuccess = 11; + /** Retrieve the specific weekly schedule for the specific user. */ command access(invoke: administer) GetWeekDaySchedule(GetWeekDayScheduleRequest): GetWeekDayScheduleResponse = 12; + /** Clear the specific weekly schedule or all weekly schedules for the specific user. */ command access(invoke: administer) ClearWeekDaySchedule(ClearWeekDayScheduleRequest): DefaultSuccess = 13; + /** Set a time-specific schedule ID for a specified user. */ command access(invoke: administer) SetYearDaySchedule(SetYearDayScheduleRequest): DefaultSuccess = 14; + /** Returns the year day schedule data for the specified schedule and user indexes. */ command access(invoke: administer) GetYearDaySchedule(GetYearDayScheduleRequest): GetYearDayScheduleResponse = 15; + /** Clears the specific year day schedule or all year day schedules for the specific user. */ command access(invoke: administer) ClearYearDaySchedule(ClearYearDayScheduleRequest): DefaultSuccess = 16; + /** Set the holiday Schedule by specifying local start time and local end time with respect to any Lock Operating Mode. */ command access(invoke: administer) SetHolidaySchedule(SetHolidayScheduleRequest): DefaultSuccess = 17; + /** Get the holiday schedule for the specified index. */ command access(invoke: administer) GetHolidaySchedule(GetHolidayScheduleRequest): GetHolidayScheduleResponse = 18; + /** Clears the holiday schedule or all holiday schedules. */ command access(invoke: administer) ClearHolidaySchedule(ClearHolidayScheduleRequest): DefaultSuccess = 19; + /** Set User into the lock. */ timed command access(invoke: administer) SetUser(SetUserRequest): DefaultSuccess = 26; + /** Retrieve User. */ command access(invoke: administer) GetUser(GetUserRequest): GetUserResponse = 27; + /** Clears a User or all Users. */ timed command access(invoke: administer) ClearUser(ClearUserRequest): DefaultSuccess = 29; + /** Set a credential (e.g. PIN, RFID, Fingerprint, etc.) into the lock for a new user, existing user, or ProgrammingUser. */ timed command access(invoke: administer) SetCredential(SetCredentialRequest): SetCredentialResponse = 34; + /** Retrieve the status of a particular credential (e.g. PIN, RFID, Fingerprint, etc.) by index. */ command access(invoke: administer) GetCredentialStatus(GetCredentialStatusRequest): GetCredentialStatusResponse = 36; + /** Clear one, one type, or all credentials except ProgrammingPIN credential. */ timed command access(invoke: administer) ClearCredential(ClearCredentialRequest): DefaultSuccess = 38; + /** This command causes the lock device to unlock the door without pulling the latch. */ timed command UnboltDoor(UnboltDoorRequest): DefaultSuccess = 39; } diff --git a/examples/lock-app/nxp/zap/lock-app.matter b/examples/lock-app/nxp/zap/lock-app.matter index 8f0ad8c10e4efa..74b13839366fa4 100644 --- a/examples/lock-app/nxp/zap/lock-app.matter +++ b/examples/lock-app/nxp/zap/lock-app.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -73,6 +75,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -85,7 +88,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -144,6 +147,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -158,7 +162,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -230,7 +234,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -239,10 +252,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -281,17 +296,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -302,13 +317,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -389,12 +407,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -407,6 +428,22 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + request struct AddOrUpdateWiFiNetworkRequest { + octet_string<32> ssid = 0; + octet_string<64> credentials = 1; + optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; + } + request struct AddOrUpdateThreadNetworkRequest { octet_string<254> operationalDataset = 0; optional int64u breadcrumb = 1; @@ -417,47 +454,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -541,7 +590,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -560,12 +614,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -586,10 +642,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -597,11 +653,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ -server cluster ThreadNetworkDiagnostics = 53 { +cluster ThreadNetworkDiagnostics = 53 { revision 1; // NOTE: Default/not specifically set enum ConnectionStatusEnum : enum8 { @@ -698,7 +755,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u panId = 3; readonly attribute nullable int64u extendedPanId = 4; readonly attribute nullable octet_string<17> meshLocalPrefix = 5; - readonly attribute int64u overrunCount = 6; + readonly attribute optional int64u overrunCount = 6; readonly attribute NeighborTableStruct neighborTable[] = 7; readonly attribute RouteTableStruct routeTable[] = 8; readonly attribute nullable int32u partitionId = 9; @@ -706,48 +763,51 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u dataVersion = 11; readonly attribute nullable int16u stableDataVersion = 12; readonly attribute nullable int8u leaderRouterId = 13; - readonly attribute int16u detachedRoleCount = 14; - readonly attribute int16u childRoleCount = 15; - readonly attribute int16u routerRoleCount = 16; - readonly attribute int16u leaderRoleCount = 17; - readonly attribute int16u attachAttemptCount = 18; - readonly attribute int16u partitionIdChangeCount = 19; - readonly attribute int16u betterPartitionAttachAttemptCount = 20; - readonly attribute int16u parentChangeCount = 21; - readonly attribute int32u txTotalCount = 22; - readonly attribute int32u txUnicastCount = 23; - readonly attribute int32u txBroadcastCount = 24; - readonly attribute int32u txAckRequestedCount = 25; - readonly attribute int32u txAckedCount = 26; - readonly attribute int32u txNoAckRequestedCount = 27; - readonly attribute int32u txDataCount = 28; - readonly attribute int32u txDataPollCount = 29; - readonly attribute int32u txBeaconCount = 30; - readonly attribute int32u txBeaconRequestCount = 31; - readonly attribute int32u txOtherCount = 32; - readonly attribute int32u txRetryCount = 33; - readonly attribute int32u txDirectMaxRetryExpiryCount = 34; - readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; - readonly attribute int32u txErrCcaCount = 36; - readonly attribute int32u txErrAbortCount = 37; - readonly attribute int32u txErrBusyChannelCount = 38; - readonly attribute int32u rxTotalCount = 39; - readonly attribute int32u rxUnicastCount = 40; - readonly attribute int32u rxBroadcastCount = 41; - readonly attribute int32u rxDataCount = 42; - readonly attribute int32u rxDataPollCount = 43; - readonly attribute int32u rxBeaconCount = 44; - readonly attribute int32u rxBeaconRequestCount = 45; - readonly attribute int32u rxOtherCount = 46; - readonly attribute int32u rxAddressFilteredCount = 47; - readonly attribute int32u rxDestAddrFilteredCount = 48; - readonly attribute int32u rxDuplicatedCount = 49; - readonly attribute int32u rxErrNoFrameCount = 50; - readonly attribute int32u rxErrUnknownNeighborCount = 51; - readonly attribute int32u rxErrInvalidSrcAddrCount = 52; - readonly attribute int32u rxErrSecCount = 53; - readonly attribute int32u rxErrFcsCount = 54; - readonly attribute int32u rxErrOtherCount = 55; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; readonly attribute nullable SecurityPolicy securityPolicy = 59; readonly attribute nullable octet_string<4> channelPage0Mask = 60; readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; @@ -759,11 +819,12 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -800,12 +861,20 @@ server cluster AdministratorCommissioning = 60 { octet_string<32> salt = 4; } + request struct OpenBasicCommissioningWindowRequest { + int16u commissioningTimeout = 0; + } + + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -858,15 +927,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -880,6 +963,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -892,38 +981,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -978,26 +1055,30 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** An interface to a generic way to secure a door */ -server cluster DoorLock = 257 { +cluster DoorLock = 257 { revision 7; enum AlarmCodeEnum : enum8 { @@ -1380,12 +1461,39 @@ server cluster DoorLock = 257 { readonly attribute nullable DlLockState lockState = 0; readonly attribute DlLockType lockType = 1; readonly attribute boolean actuatorEnabled = 2; - readonly attribute int16u numberOfTotalUsersSupported = 17; - readonly attribute DlCredentialRuleMask credentialRulesSupport = 27; + readonly attribute optional nullable DoorStateEnum doorState = 3; + attribute access(write: manage) optional int32u doorOpenEvents = 4; + attribute access(write: manage) optional int32u doorClosedEvents = 5; + attribute access(write: manage) optional int16u openPeriod = 6; + readonly attribute optional int16u numberOfTotalUsersSupported = 17; + readonly attribute optional int16u numberOfPINUsersSupported = 18; + readonly attribute optional int16u numberOfRFIDUsersSupported = 19; + readonly attribute optional int8u numberOfWeekDaySchedulesSupportedPerUser = 20; + readonly attribute optional int8u numberOfYearDaySchedulesSupportedPerUser = 21; + readonly attribute optional int8u numberOfHolidaySchedulesSupported = 22; + readonly attribute optional int8u maxPINCodeLength = 23; + readonly attribute optional int8u minPINCodeLength = 24; + readonly attribute optional int8u maxRFIDCodeLength = 25; + readonly attribute optional int8u minRFIDCodeLength = 26; + readonly attribute optional DlCredentialRuleMask credentialRulesSupport = 27; + readonly attribute optional int8u numberOfCredentialsSupportedPerUser = 28; + attribute access(write: manage) optional char_string<3> language = 33; + attribute access(write: manage) optional int8u LEDSettings = 34; attribute access(write: manage) int32u autoRelockTime = 35; + attribute access(write: manage) optional int8u soundVolume = 36; attribute access(write: manage) OperatingModeEnum operatingMode = 37; readonly attribute DlSupportedOperatingModes supportedOperatingModes = 38; - attribute access(write: administer) int16u expiringUserTimeout = 53; + readonly attribute optional DlDefaultConfigurationRegister defaultConfigurationRegister = 39; + attribute access(write: administer) optional boolean enableLocalProgramming = 40; + attribute access(write: manage) optional boolean enableOneTouchLocking = 41; + attribute access(write: manage) optional boolean enableInsideStatusLED = 42; + attribute access(write: manage) optional boolean enablePrivacyModeButton = 43; + attribute access(write: administer) optional DlLocalProgrammingFeatures localProgrammingFeatures = 44; + attribute access(write: administer) optional int8u wrongCodeEntryLimit = 48; + attribute access(write: administer) optional int8u userCodeTemporaryDisableTime = 49; + attribute access(write: administer) optional boolean sendPINOverTheAir = 50; + attribute access(write: administer) optional boolean requirePINforRemoteOperation = 51; + attribute access(write: administer) optional int16u expiringUserTimeout = 53; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1401,35 +1509,102 @@ server cluster DoorLock = 257 { optional octet_string PINCode = 0; } - request struct SetUserRequest { - DataOperationTypeEnum operationType = 0; + request struct UnlockWithTimeoutRequest { + int16u timeout = 0; + optional octet_string PINCode = 1; + } + + request struct SetWeekDayScheduleRequest { + int8u weekDayIndex = 0; int16u userIndex = 1; - nullable char_string userName = 2; - nullable int32u userUniqueID = 3; - nullable UserStatusEnum userStatus = 4; - nullable UserTypeEnum userType = 5; - nullable CredentialRuleEnum credentialRule = 6; + DaysMaskMap daysMask = 2; + int8u startHour = 3; + int8u startMinute = 4; + int8u endHour = 5; + int8u endMinute = 6; } - request struct GetUserRequest { - int16u userIndex = 0; + request struct GetWeekDayScheduleRequest { + int8u weekDayIndex = 0; + int16u userIndex = 1; } - request struct ClearUserRequest { - int16u userIndex = 0; + response struct GetWeekDayScheduleResponse = 12 { + int8u weekDayIndex = 0; + int16u userIndex = 1; + DlStatus status = 2; + optional DaysMaskMap daysMask = 3; + optional int8u startHour = 4; + optional int8u startMinute = 5; + optional int8u endHour = 6; + optional int8u endMinute = 7; } - request struct SetCredentialRequest { + request struct ClearWeekDayScheduleRequest { + int8u weekDayIndex = 0; + int16u userIndex = 1; + } + + request struct SetYearDayScheduleRequest { + int8u yearDayIndex = 0; + int16u userIndex = 1; + epoch_s localStartTime = 2; + epoch_s localEndTime = 3; + } + + request struct GetYearDayScheduleRequest { + int8u yearDayIndex = 0; + int16u userIndex = 1; + } + + response struct GetYearDayScheduleResponse = 15 { + int8u yearDayIndex = 0; + int16u userIndex = 1; + DlStatus status = 2; + optional epoch_s localStartTime = 3; + optional epoch_s localEndTime = 4; + } + + request struct ClearYearDayScheduleRequest { + int8u yearDayIndex = 0; + int16u userIndex = 1; + } + + request struct SetHolidayScheduleRequest { + int8u holidayIndex = 0; + epoch_s localStartTime = 1; + epoch_s localEndTime = 2; + OperatingModeEnum operatingMode = 3; + } + + request struct GetHolidayScheduleRequest { + int8u holidayIndex = 0; + } + + response struct GetHolidayScheduleResponse = 18 { + int8u holidayIndex = 0; + DlStatus status = 1; + optional epoch_s localStartTime = 2; + optional epoch_s localEndTime = 3; + optional OperatingModeEnum operatingMode = 4; + } + + request struct ClearHolidayScheduleRequest { + int8u holidayIndex = 0; + } + + request struct SetUserRequest { DataOperationTypeEnum operationType = 0; - CredentialStruct credential = 1; - LONG_OCTET_STRING credentialData = 2; - nullable int16u userIndex = 3; + int16u userIndex = 1; + nullable char_string userName = 2; + nullable int32u userUniqueID = 3; nullable UserStatusEnum userStatus = 4; nullable UserTypeEnum userType = 5; + nullable CredentialRuleEnum credentialRule = 6; } - request struct GetCredentialStatusRequest { - CredentialStruct credential = 0; + request struct GetUserRequest { + int16u userIndex = 0; } response struct GetUserResponse = 28 { @@ -1445,12 +1620,29 @@ server cluster DoorLock = 257 { nullable int16u nextUserIndex = 9; } + request struct ClearUserRequest { + int16u userIndex = 0; + } + + request struct SetCredentialRequest { + DataOperationTypeEnum operationType = 0; + CredentialStruct credential = 1; + LONG_OCTET_STRING credentialData = 2; + nullable int16u userIndex = 3; + nullable UserStatusEnum userStatus = 4; + nullable UserTypeEnum userType = 5; + } + response struct SetCredentialResponse = 35 { DlStatus status = 0; nullable int16u userIndex = 1; nullable int16u nextCredentialIndex = 2; } + request struct GetCredentialStatusRequest { + CredentialStruct credential = 0; + } + response struct GetCredentialStatusResponse = 37 { boolean credentialExists = 0; nullable int16u userIndex = 1; @@ -1459,13 +1651,52 @@ server cluster DoorLock = 257 { nullable int16u nextCredentialIndex = 4; } + request struct ClearCredentialRequest { + nullable CredentialStruct credential = 0; + } + + request struct UnboltDoorRequest { + optional octet_string PINCode = 0; + } + + /** This command causes the lock device to lock the door. */ timed command LockDoor(LockDoorRequest): DefaultSuccess = 0; + /** This command causes the lock device to unlock the door. */ timed command UnlockDoor(UnlockDoorRequest): DefaultSuccess = 1; + /** This command causes the lock device to unlock the door with a timeout parameter. */ + timed command UnlockWithTimeout(UnlockWithTimeoutRequest): DefaultSuccess = 3; + /** Set a weekly repeating schedule for a specified user. */ + command access(invoke: administer) SetWeekDaySchedule(SetWeekDayScheduleRequest): DefaultSuccess = 11; + /** Retrieve the specific weekly schedule for the specific user. */ + command access(invoke: administer) GetWeekDaySchedule(GetWeekDayScheduleRequest): GetWeekDayScheduleResponse = 12; + /** Clear the specific weekly schedule or all weekly schedules for the specific user. */ + command access(invoke: administer) ClearWeekDaySchedule(ClearWeekDayScheduleRequest): DefaultSuccess = 13; + /** Set a time-specific schedule ID for a specified user. */ + command access(invoke: administer) SetYearDaySchedule(SetYearDayScheduleRequest): DefaultSuccess = 14; + /** Returns the year day schedule data for the specified schedule and user indexes. */ + command access(invoke: administer) GetYearDaySchedule(GetYearDayScheduleRequest): GetYearDayScheduleResponse = 15; + /** Clears the specific year day schedule or all year day schedules for the specific user. */ + command access(invoke: administer) ClearYearDaySchedule(ClearYearDayScheduleRequest): DefaultSuccess = 16; + /** Set the holiday Schedule by specifying local start time and local end time with respect to any Lock Operating Mode. */ + command access(invoke: administer) SetHolidaySchedule(SetHolidayScheduleRequest): DefaultSuccess = 17; + /** Get the holiday schedule for the specified index. */ + command access(invoke: administer) GetHolidaySchedule(GetHolidayScheduleRequest): GetHolidayScheduleResponse = 18; + /** Clears the holiday schedule or all holiday schedules. */ + command access(invoke: administer) ClearHolidaySchedule(ClearHolidayScheduleRequest): DefaultSuccess = 19; + /** Set User into the lock. */ timed command access(invoke: administer) SetUser(SetUserRequest): DefaultSuccess = 26; + /** Retrieve User. */ command access(invoke: administer) GetUser(GetUserRequest): GetUserResponse = 27; + /** Clears a User or all Users. */ timed command access(invoke: administer) ClearUser(ClearUserRequest): DefaultSuccess = 29; + /** Set a credential (e.g. PIN, RFID, Fingerprint, etc.) into the lock for a new user, existing user, or ProgrammingUser. */ timed command access(invoke: administer) SetCredential(SetCredentialRequest): SetCredentialResponse = 34; + /** Retrieve the status of a particular credential (e.g. PIN, RFID, Fingerprint, etc.) by index. */ command access(invoke: administer) GetCredentialStatus(GetCredentialStatusRequest): GetCredentialStatusResponse = 36; + /** Clear one, one type, or all credentials except ProgrammingPIN credential. */ + timed command access(invoke: administer) ClearCredential(ClearCredentialRequest): DefaultSuccess = 38; + /** This command causes the lock device to unlock the door without pulling the latch. */ + timed command UnboltDoor(UnboltDoorRequest): DefaultSuccess = 39; } endpoint 0 { diff --git a/examples/lock-app/qpg/zap/lock.matter b/examples/lock-app/qpg/zap/lock.matter index e0c6c561c59bff..62be47ca88653a 100644 --- a/examples/lock-app/qpg/zap/lock.matter +++ b/examples/lock-app/qpg/zap/lock.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -74,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -144,6 +152,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -156,7 +165,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -215,7 +224,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -230,7 +239,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -302,14 +311,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -318,10 +329,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -397,7 +410,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -470,11 +483,12 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -513,17 +527,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -534,13 +548,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -621,12 +638,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -639,6 +659,22 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + request struct AddOrUpdateWiFiNetworkRequest { + octet_string<32> ssid = 0; + octet_string<64> credentials = 1; + optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; + } + request struct AddOrUpdateThreadNetworkRequest { octet_string<254> operationalDataset = 0; optional int64u breadcrumb = 1; @@ -649,47 +685,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -731,11 +779,12 @@ server cluster DiagnosticLogs = 50 { optional systime_us timeSinceBoot = 3; } + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -819,11 +868,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -842,12 +892,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -868,10 +920,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -879,11 +931,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ -server cluster ThreadNetworkDiagnostics = 53 { +cluster ThreadNetworkDiagnostics = 53 { revision 1; // NOTE: Default/not specifically set enum ConnectionStatusEnum : enum8 { @@ -980,7 +1033,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u panId = 3; readonly attribute nullable int64u extendedPanId = 4; readonly attribute nullable octet_string<17> meshLocalPrefix = 5; - readonly attribute int64u overrunCount = 6; + readonly attribute optional int64u overrunCount = 6; readonly attribute NeighborTableStruct neighborTable[] = 7; readonly attribute RouteTableStruct routeTable[] = 8; readonly attribute nullable int32u partitionId = 9; @@ -988,48 +1041,51 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u dataVersion = 11; readonly attribute nullable int16u stableDataVersion = 12; readonly attribute nullable int8u leaderRouterId = 13; - readonly attribute int16u detachedRoleCount = 14; - readonly attribute int16u childRoleCount = 15; - readonly attribute int16u routerRoleCount = 16; - readonly attribute int16u leaderRoleCount = 17; - readonly attribute int16u attachAttemptCount = 18; - readonly attribute int16u partitionIdChangeCount = 19; - readonly attribute int16u betterPartitionAttachAttemptCount = 20; - readonly attribute int16u parentChangeCount = 21; - readonly attribute int32u txTotalCount = 22; - readonly attribute int32u txUnicastCount = 23; - readonly attribute int32u txBroadcastCount = 24; - readonly attribute int32u txAckRequestedCount = 25; - readonly attribute int32u txAckedCount = 26; - readonly attribute int32u txNoAckRequestedCount = 27; - readonly attribute int32u txDataCount = 28; - readonly attribute int32u txDataPollCount = 29; - readonly attribute int32u txBeaconCount = 30; - readonly attribute int32u txBeaconRequestCount = 31; - readonly attribute int32u txOtherCount = 32; - readonly attribute int32u txRetryCount = 33; - readonly attribute int32u txDirectMaxRetryExpiryCount = 34; - readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; - readonly attribute int32u txErrCcaCount = 36; - readonly attribute int32u txErrAbortCount = 37; - readonly attribute int32u txErrBusyChannelCount = 38; - readonly attribute int32u rxTotalCount = 39; - readonly attribute int32u rxUnicastCount = 40; - readonly attribute int32u rxBroadcastCount = 41; - readonly attribute int32u rxDataCount = 42; - readonly attribute int32u rxDataPollCount = 43; - readonly attribute int32u rxBeaconCount = 44; - readonly attribute int32u rxBeaconRequestCount = 45; - readonly attribute int32u rxOtherCount = 46; - readonly attribute int32u rxAddressFilteredCount = 47; - readonly attribute int32u rxDestAddrFilteredCount = 48; - readonly attribute int32u rxDuplicatedCount = 49; - readonly attribute int32u rxErrNoFrameCount = 50; - readonly attribute int32u rxErrUnknownNeighborCount = 51; - readonly attribute int32u rxErrInvalidSrcAddrCount = 52; - readonly attribute int32u rxErrSecCount = 53; - readonly attribute int32u rxErrFcsCount = 54; - readonly attribute int32u rxErrOtherCount = 55; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; readonly attribute nullable SecurityPolicy securityPolicy = 59; readonly attribute nullable octet_string<4> channelPage0Mask = 60; readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; @@ -1041,11 +1097,12 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1086,13 +1143,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1145,15 +1205,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1167,6 +1241,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1179,38 +1259,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1265,27 +1333,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1303,7 +1375,7 @@ server cluster FixedLabel = 64 { } /** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ -server cluster UserLabel = 65 { +cluster UserLabel = 65 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1321,7 +1393,7 @@ server cluster UserLabel = 65 { } /** Allows servers to ensure that listed clients are notified when a server is available for communication. */ -server cluster IcdManagement = 70 { +cluster IcdManagement = 70 { revision 2; bitmap Feature : bitmap32 { @@ -1359,16 +1431,48 @@ server cluster IcdManagement = 70 { readonly attribute int32u idleModeDuration = 0; readonly attribute int32u activeModeDuration = 1; readonly attribute int16u activeModeThreshold = 2; + readonly attribute access(read: administer) optional MonitoringRegistrationStruct registeredClients[] = 3; + readonly attribute access(read: administer) optional int32u ICDCounter = 4; + readonly attribute optional int16u clientsSupportedPerFabric = 5; + readonly attribute optional UserActiveModeTriggerBitmap userActiveModeTriggerHint = 6; + readonly attribute optional char_string<128> userActiveModeTriggerInstruction = 7; 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; + + request struct RegisterClientRequest { + node_id checkInNodeID = 0; + int64u monitoredSubject = 1; + octet_string<16> key = 2; + optional octet_string<16> verificationKey = 3; + } + + response struct RegisterClientResponse = 1 { + int32u ICDCounter = 0; + } + + request struct UnregisterClientRequest { + node_id checkInNodeID = 0; + optional octet_string<16> verificationKey = 1; + } + + response struct StayActiveResponse = 4 { + int32u promisedActiveDuration = 0; + } + + /** Register a client to the end device */ + fabric command access(invoke: manage) RegisterClient(RegisterClientRequest): RegisterClientResponse = 0; + /** Unregister a client from an end device */ + fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2; + /** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */ + command access(invoke: manage) StayActiveRequest(): StayActiveResponse = 3; } /** An interface to a generic way to secure a door */ -server cluster DoorLock = 257 { +cluster DoorLock = 257 { revision 7; enum AlarmCodeEnum : enum8 { @@ -1751,18 +1855,39 @@ server cluster DoorLock = 257 { readonly attribute nullable DlLockState lockState = 0; readonly attribute DlLockType lockType = 1; readonly attribute boolean actuatorEnabled = 2; - readonly attribute int16u numberOfTotalUsersSupported = 17; - readonly attribute int16u numberOfPINUsersSupported = 18; - readonly attribute int8u maxPINCodeLength = 23; - readonly attribute int8u minPINCodeLength = 24; - readonly attribute DlCredentialRuleMask credentialRulesSupport = 27; - readonly attribute int8u numberOfCredentialsSupportedPerUser = 28; + readonly attribute optional nullable DoorStateEnum doorState = 3; + attribute access(write: manage) optional int32u doorOpenEvents = 4; + attribute access(write: manage) optional int32u doorClosedEvents = 5; + attribute access(write: manage) optional int16u openPeriod = 6; + readonly attribute optional int16u numberOfTotalUsersSupported = 17; + readonly attribute optional int16u numberOfPINUsersSupported = 18; + readonly attribute optional int16u numberOfRFIDUsersSupported = 19; + readonly attribute optional int8u numberOfWeekDaySchedulesSupportedPerUser = 20; + readonly attribute optional int8u numberOfYearDaySchedulesSupportedPerUser = 21; + readonly attribute optional int8u numberOfHolidaySchedulesSupported = 22; + readonly attribute optional int8u maxPINCodeLength = 23; + readonly attribute optional int8u minPINCodeLength = 24; + readonly attribute optional int8u maxRFIDCodeLength = 25; + readonly attribute optional int8u minRFIDCodeLength = 26; + readonly attribute optional DlCredentialRuleMask credentialRulesSupport = 27; + readonly attribute optional int8u numberOfCredentialsSupportedPerUser = 28; + attribute access(write: manage) optional char_string<3> language = 33; + attribute access(write: manage) optional int8u LEDSettings = 34; attribute access(write: manage) int32u autoRelockTime = 35; + attribute access(write: manage) optional int8u soundVolume = 36; attribute access(write: manage) OperatingModeEnum operatingMode = 37; readonly attribute DlSupportedOperatingModes supportedOperatingModes = 38; - attribute access(write: administer) int8u wrongCodeEntryLimit = 48; - attribute access(write: administer) int8u userCodeTemporaryDisableTime = 49; - attribute access(write: administer) boolean requirePINforRemoteOperation = 51; + readonly attribute optional DlDefaultConfigurationRegister defaultConfigurationRegister = 39; + attribute access(write: administer) optional boolean enableLocalProgramming = 40; + attribute access(write: manage) optional boolean enableOneTouchLocking = 41; + attribute access(write: manage) optional boolean enableInsideStatusLED = 42; + attribute access(write: manage) optional boolean enablePrivacyModeButton = 43; + attribute access(write: administer) optional DlLocalProgrammingFeatures localProgrammingFeatures = 44; + attribute access(write: administer) optional int8u wrongCodeEntryLimit = 48; + attribute access(write: administer) optional int8u userCodeTemporaryDisableTime = 49; + attribute access(write: administer) optional boolean sendPINOverTheAir = 50; + attribute access(write: administer) optional boolean requirePINforRemoteOperation = 51; + attribute access(write: administer) optional int16u expiringUserTimeout = 53; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1783,39 +1908,97 @@ server cluster DoorLock = 257 { optional octet_string PINCode = 1; } - request struct SetUserRequest { - DataOperationTypeEnum operationType = 0; + request struct SetWeekDayScheduleRequest { + int8u weekDayIndex = 0; int16u userIndex = 1; - nullable char_string userName = 2; - nullable int32u userUniqueID = 3; - nullable UserStatusEnum userStatus = 4; - nullable UserTypeEnum userType = 5; - nullable CredentialRuleEnum credentialRule = 6; + DaysMaskMap daysMask = 2; + int8u startHour = 3; + int8u startMinute = 4; + int8u endHour = 5; + int8u endMinute = 6; } - request struct GetUserRequest { - int16u userIndex = 0; + request struct GetWeekDayScheduleRequest { + int8u weekDayIndex = 0; + int16u userIndex = 1; } - request struct ClearUserRequest { - int16u userIndex = 0; + response struct GetWeekDayScheduleResponse = 12 { + int8u weekDayIndex = 0; + int16u userIndex = 1; + DlStatus status = 2; + optional DaysMaskMap daysMask = 3; + optional int8u startHour = 4; + optional int8u startMinute = 5; + optional int8u endHour = 6; + optional int8u endMinute = 7; } - request struct SetCredentialRequest { + request struct ClearWeekDayScheduleRequest { + int8u weekDayIndex = 0; + int16u userIndex = 1; + } + + request struct SetYearDayScheduleRequest { + int8u yearDayIndex = 0; + int16u userIndex = 1; + epoch_s localStartTime = 2; + epoch_s localEndTime = 3; + } + + request struct GetYearDayScheduleRequest { + int8u yearDayIndex = 0; + int16u userIndex = 1; + } + + response struct GetYearDayScheduleResponse = 15 { + int8u yearDayIndex = 0; + int16u userIndex = 1; + DlStatus status = 2; + optional epoch_s localStartTime = 3; + optional epoch_s localEndTime = 4; + } + + request struct ClearYearDayScheduleRequest { + int8u yearDayIndex = 0; + int16u userIndex = 1; + } + + request struct SetHolidayScheduleRequest { + int8u holidayIndex = 0; + epoch_s localStartTime = 1; + epoch_s localEndTime = 2; + OperatingModeEnum operatingMode = 3; + } + + request struct GetHolidayScheduleRequest { + int8u holidayIndex = 0; + } + + response struct GetHolidayScheduleResponse = 18 { + int8u holidayIndex = 0; + DlStatus status = 1; + optional epoch_s localStartTime = 2; + optional epoch_s localEndTime = 3; + optional OperatingModeEnum operatingMode = 4; + } + + request struct ClearHolidayScheduleRequest { + int8u holidayIndex = 0; + } + + request struct SetUserRequest { DataOperationTypeEnum operationType = 0; - CredentialStruct credential = 1; - LONG_OCTET_STRING credentialData = 2; - nullable int16u userIndex = 3; + int16u userIndex = 1; + nullable char_string userName = 2; + nullable int32u userUniqueID = 3; nullable UserStatusEnum userStatus = 4; nullable UserTypeEnum userType = 5; + nullable CredentialRuleEnum credentialRule = 6; } - request struct GetCredentialStatusRequest { - CredentialStruct credential = 0; - } - - request struct ClearCredentialRequest { - nullable CredentialStruct credential = 0; + request struct GetUserRequest { + int16u userIndex = 0; } response struct GetUserResponse = 28 { @@ -1831,12 +2014,29 @@ server cluster DoorLock = 257 { nullable int16u nextUserIndex = 9; } + request struct ClearUserRequest { + int16u userIndex = 0; + } + + request struct SetCredentialRequest { + DataOperationTypeEnum operationType = 0; + CredentialStruct credential = 1; + LONG_OCTET_STRING credentialData = 2; + nullable int16u userIndex = 3; + nullable UserStatusEnum userStatus = 4; + nullable UserTypeEnum userType = 5; + } + response struct SetCredentialResponse = 35 { DlStatus status = 0; nullable int16u userIndex = 1; nullable int16u nextCredentialIndex = 2; } + request struct GetCredentialStatusRequest { + CredentialStruct credential = 0; + } + response struct GetCredentialStatusResponse = 37 { boolean credentialExists = 0; nullable int16u userIndex = 1; @@ -1845,15 +2045,52 @@ server cluster DoorLock = 257 { nullable int16u nextCredentialIndex = 4; } + request struct ClearCredentialRequest { + nullable CredentialStruct credential = 0; + } + + request struct UnboltDoorRequest { + optional octet_string PINCode = 0; + } + + /** This command causes the lock device to lock the door. */ timed command LockDoor(LockDoorRequest): DefaultSuccess = 0; + /** This command causes the lock device to unlock the door. */ timed command UnlockDoor(UnlockDoorRequest): DefaultSuccess = 1; + /** This command causes the lock device to unlock the door with a timeout parameter. */ timed command UnlockWithTimeout(UnlockWithTimeoutRequest): DefaultSuccess = 3; + /** Set a weekly repeating schedule for a specified user. */ + command access(invoke: administer) SetWeekDaySchedule(SetWeekDayScheduleRequest): DefaultSuccess = 11; + /** Retrieve the specific weekly schedule for the specific user. */ + command access(invoke: administer) GetWeekDaySchedule(GetWeekDayScheduleRequest): GetWeekDayScheduleResponse = 12; + /** Clear the specific weekly schedule or all weekly schedules for the specific user. */ + command access(invoke: administer) ClearWeekDaySchedule(ClearWeekDayScheduleRequest): DefaultSuccess = 13; + /** Set a time-specific schedule ID for a specified user. */ + command access(invoke: administer) SetYearDaySchedule(SetYearDayScheduleRequest): DefaultSuccess = 14; + /** Returns the year day schedule data for the specified schedule and user indexes. */ + command access(invoke: administer) GetYearDaySchedule(GetYearDayScheduleRequest): GetYearDayScheduleResponse = 15; + /** Clears the specific year day schedule or all year day schedules for the specific user. */ + command access(invoke: administer) ClearYearDaySchedule(ClearYearDayScheduleRequest): DefaultSuccess = 16; + /** Set the holiday Schedule by specifying local start time and local end time with respect to any Lock Operating Mode. */ + command access(invoke: administer) SetHolidaySchedule(SetHolidayScheduleRequest): DefaultSuccess = 17; + /** Get the holiday schedule for the specified index. */ + command access(invoke: administer) GetHolidaySchedule(GetHolidayScheduleRequest): GetHolidayScheduleResponse = 18; + /** Clears the holiday schedule or all holiday schedules. */ + command access(invoke: administer) ClearHolidaySchedule(ClearHolidayScheduleRequest): DefaultSuccess = 19; + /** Set User into the lock. */ timed command access(invoke: administer) SetUser(SetUserRequest): DefaultSuccess = 26; + /** Retrieve User. */ command access(invoke: administer) GetUser(GetUserRequest): GetUserResponse = 27; + /** Clears a User or all Users. */ timed command access(invoke: administer) ClearUser(ClearUserRequest): DefaultSuccess = 29; + /** Set a credential (e.g. PIN, RFID, Fingerprint, etc.) into the lock for a new user, existing user, or ProgrammingUser. */ timed command access(invoke: administer) SetCredential(SetCredentialRequest): SetCredentialResponse = 34; + /** Retrieve the status of a particular credential (e.g. PIN, RFID, Fingerprint, etc.) by index. */ command access(invoke: administer) GetCredentialStatus(GetCredentialStatusRequest): GetCredentialStatusResponse = 36; + /** Clear one, one type, or all credentials except ProgrammingPIN credential. */ timed command access(invoke: administer) ClearCredential(ClearCredentialRequest): DefaultSuccess = 38; + /** This command causes the lock device to unlock the door without pulling the latch. */ + timed command UnboltDoor(UnboltDoorRequest): DefaultSuccess = 39; } endpoint 0 { diff --git a/examples/lock-app/silabs/build_for_wifi_args.gni b/examples/lock-app/silabs/build_for_wifi_args.gni index 3769c90066ad7a..a9a7ee66170687 100644 --- a/examples/lock-app/silabs/build_for_wifi_args.gni +++ b/examples/lock-app/silabs/build_for_wifi_args.gni @@ -20,3 +20,13 @@ import("${chip_root}/src/platform/silabs/wifi_args.gni") chip_enable_ota_requestor = true app_data_model = "${chip_root}/examples/lock-app/lock-common" + +# ICD Default configurations +chip_enable_icd_server = true +chip_subscription_timeout_resumption = false +sl_use_subscription_synching = true + +# ICD Matter Configuration flags +sl_idle_mode_interval_s = 600 # 10min Idle Mode Interval +sl_active_mode_interval_ms = 10000 # 10s Active Mode Interval +sl_active_mode_threshold_ms = 1000 # 1s Active Mode Threshold diff --git a/examples/log-source-app/log-source-common/log-source-app.matter b/examples/log-source-app/log-source-common/log-source-app.matter index 4459a659b2cee0..40eecf4217ea49 100644 --- a/examples/log-source-app/log-source-common/log-source-app.matter +++ b/examples/log-source-app/log-source-common/log-source-app.matter @@ -5,7 +5,7 @@ Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -64,7 +64,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -77,7 +77,7 @@ server cluster AccessControl = 31 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -101,6 +101,8 @@ server cluster GeneralCommissioning = 48 { attribute access(write: administer) int64u breadcrumb = 0; readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; + readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; + readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; readonly attribute boolean supportsConcurrentConnection = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -114,17 +116,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -135,13 +137,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -220,6 +225,17 @@ server cluster NetworkCommissioning = 49 { int8s rssi = 5; } + readonly attribute access(read: administer) int8u maxNetworks = 0; + readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; + attribute access(write: administer) boolean interfaceEnabled = 4; + readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; + readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; + readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -232,6 +248,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -251,48 +274,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -334,11 +368,12 @@ server cluster DiagnosticLogs = 50 { optional systime_us timeSinceBoot = 3; } + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -374,10 +409,12 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } + readonly attribute access(read: administer) NOCStruct NOCs[] = 0; readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute octet_string trustedRootCertificates[] = 4; + readonly attribute int8u currentFabricIndex = 5; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -389,15 +426,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -406,6 +457,17 @@ server cluster OperationalCredentials = 62 { vendor_id adminVendorId = 4; } + request struct UpdateNOCRequest { + octet_string NOCValue = 0; + optional octet_string ICACValue = 1; + } + + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -418,32 +480,21 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ + fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } diff --git a/examples/network-manager-app/README.md b/examples/network-manager-app/README.md new file mode 100644 index 00000000000000..01921e0d1c82c7 --- /dev/null +++ b/examples/network-manager-app/README.md @@ -0,0 +1,4 @@ +# network-manager-app + +This is a reference application that implements the Network Infrastructure +Manager device type. diff --git a/examples/network-manager-app/linux/.gn b/examples/network-manager-app/linux/.gn new file mode 100644 index 00000000000000..747b125d35d3c2 --- /dev/null +++ b/examples/network-manager-app/linux/.gn @@ -0,0 +1,25 @@ +# Copyright (c) 2023 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + import("//args.gni") +} diff --git a/examples/network-manager-app/linux/BUILD.gn b/examples/network-manager-app/linux/BUILD.gn new file mode 100644 index 00000000000000..1dee694c38616e --- /dev/null +++ b/examples/network-manager-app/linux/BUILD.gn @@ -0,0 +1,40 @@ +# Copyright (c) 2023 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") + +executable("network-manager-app") { + sources = [ + "include/CHIPProjectAppConfig.h", + "main.cpp", + ] + + deps = [ + "${chip_root}/examples/network-manager-app/network-manager-common", + "${chip_root}/examples/platform/linux:app-main", + "${chip_root}/src/lib", + ] + + include_dirs = [ "include" ] + output_dir = root_out_dir +} + +group("linux") { + deps = [ ":network-manager-app" ] +} + +group("default") { + deps = [ ":linux" ] +} diff --git a/examples/network-manager-app/linux/args.gni b/examples/network-manager-app/linux/args.gni new file mode 100644 index 00000000000000..53bb53d2b1b2a1 --- /dev/null +++ b/examples/network-manager-app/linux/args.gni @@ -0,0 +1,24 @@ +# Copyright (c) 2023 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/chip.gni") +import("${chip_root}/config/standalone/args.gni") + +chip_project_config_include = "" +chip_project_config_include_dirs = [ + "//include", + "${chip_root}/config/standalone", +] + +chip_config_network_layer_ble = false diff --git a/examples/network-manager-app/linux/build_overrides b/examples/network-manager-app/linux/build_overrides new file mode 120000 index 00000000000000..e578e73312ebd1 --- /dev/null +++ b/examples/network-manager-app/linux/build_overrides @@ -0,0 +1 @@ +../../build_overrides \ No newline at end of file diff --git a/examples/network-manager-app/linux/include/CHIPProjectAppConfig.h b/examples/network-manager-app/linux/include/CHIPProjectAppConfig.h new file mode 100644 index 00000000000000..6fa4c82568eb70 --- /dev/null +++ b/examples/network-manager-app/linux/include/CHIPProjectAppConfig.h @@ -0,0 +1,25 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#define CHIP_DEVICE_CONFIG_DEVICE_TYPE 0xFFF10010 // TODO: ID-TBD +#define CHIP_DEVICE_CONFIG_DEVICE_NAME "Network Infrastructure Manager" + +// Inherit defaults from config/standalone/CHIPProjectConfig.h +#include diff --git a/examples/network-manager-app/linux/main.cpp b/examples/network-manager-app/linux/main.cpp new file mode 100644 index 00000000000000..362ecb3100ad6a --- /dev/null +++ b/examples/network-manager-app/linux/main.cpp @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using namespace chip; +using namespace chip::app; + +void ApplicationInit() {} +void ApplicationShutdown() {} + +int main(int argc, char * argv[]) +{ + if (ChipLinuxAppInit(argc, argv) != 0) + { + return -1; + } + + ChipLinuxAppMainLoop(); + return 0; +} diff --git a/examples/network-manager-app/linux/third_party/connectedhomeip b/examples/network-manager-app/linux/third_party/connectedhomeip new file mode 120000 index 00000000000000..c866b86874994d --- /dev/null +++ b/examples/network-manager-app/linux/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../.. \ No newline at end of file diff --git a/examples/network-manager-app/network-manager-common/BUILD.gn b/examples/network-manager-app/network-manager-common/BUILD.gn new file mode 100644 index 00000000000000..eced7ddbbbff7a --- /dev/null +++ b/examples/network-manager-app/network-manager-common/BUILD.gn @@ -0,0 +1,24 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/chip.gni") +import("${chip_root}/src/app/chip_data_model.gni") + +chip_data_model("network-manager-common") { + zap_file = "network-manager-app.zap" + + zap_pregenerated_dir = + "${chip_root}/zzz_generated/network-manager-app/zap-generated" + is_server = true +} diff --git a/examples/network-manager-app/network-manager-common/network-manager-app.matter b/examples/network-manager-app/network-manager-common/network-manager-app.matter new file mode 100644 index 00000000000000..b5760ecb46703b --- /dev/null +++ b/examples/network-manager-app/network-manager-common/network-manager-app.matter @@ -0,0 +1,1429 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ +cluster Identify = 3 { + revision 4; + + enum EffectIdentifierEnum : enum8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum EffectVariantEnum : enum8 { + kDefault = 0; + } + + enum IdentifyTypeEnum : enum8 { + kNone = 0; + kLightOutput = 1; + kVisibleIndicator = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute int16u identifyTime = 0; + readonly attribute IdentifyTypeEnum identifyType = 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; + + request struct IdentifyRequest { + int16u identifyTime = 0; + } + + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ + command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +/** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ +cluster Descriptor = 29 { + revision 2; + + bitmap Feature : bitmap32 { + kTagList = 0x1; + } + + struct DeviceTypeStruct { + devtype_id deviceType = 0; + int16u revision = 1; + } + + struct SemanticTagStruct { + nullable vendor_id mfgCode = 0; + enum8 namespaceID = 1; + enum8 tag = 2; + optional nullable char_string label = 3; + } + + readonly attribute DeviceTypeStruct deviceTypeList[] = 0; + readonly attribute cluster_id serverList[] = 1; + readonly attribute cluster_id clientList[] = 2; + readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; + 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; +} + +/** The Access Control Cluster exposes a data model view of a + Node's Access Control List (ACL), which codifies the rules used to manage + and enforce Access Control for the Node's endpoints and their associated + cluster instances. */ +cluster AccessControl = 31 { + revision 1; // NOTE: Default/not specifically set + + enum AccessControlEntryAuthModeEnum : enum8 { + kPASE = 1; + kCASE = 2; + kGroup = 3; + } + + enum AccessControlEntryPrivilegeEnum : enum8 { + kView = 1; + kProxyView = 2; + kOperate = 3; + kManage = 4; + kAdminister = 5; + } + + enum ChangeTypeEnum : enum8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + struct AccessControlTargetStruct { + nullable cluster_id cluster = 0; + nullable endpoint_no endpoint = 1; + nullable devtype_id deviceType = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; + nullable fabric_sensitive int64u subjects[] = 3; + nullable fabric_sensitive AccessControlTargetStruct targets[] = 4; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct AccessControlExtensionStruct { + fabric_sensitive octet_string<128> data = 1; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 { + nullable node_id adminNodeID = 1; + nullable int16u adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlEntryStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlExtensionChanged = 1 { + nullable node_id adminNodeID = 1; + nullable int16u adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlExtensionStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) optional 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; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** This cluster provides attributes and events for determining basic information about Nodes, which supports both + Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, + which apply to the whole Node. Also allows setting user device information such as location. */ +cluster BasicInformation = 40 { + revision 3; + + enum ColorEnum : enum8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : enum8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + + struct CapabilityMinimaStruct { + int16u caseSessionsPerFabric = 0; + int16u subscriptionsPerFabric = 1; + } + + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + + critical event StartUp = 0 { + int32u softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + fabric_idx fabricIndex = 0; + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + readonly attribute int16u dataModelRevision = 0; + readonly attribute char_string<32> vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string<32> productName = 3; + readonly attribute int16u productID = 4; + attribute access(write: manage) char_string<32> nodeLabel = 5; + attribute access(write: administer) char_string<2> location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string<64> hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; + readonly attribute int32u specificationVersion = 21; + readonly attribute int16u maxPathsPerInvoke = 22; + 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; + + command MfgSpecificPing(): DefaultSuccess = 0; +} + +/** This cluster is used to manage global aspects of the Commissioning flow. */ +cluster GeneralCommissioning = 48 { + revision 1; // NOTE: Default/not specifically set + + enum CommissioningErrorEnum : enum8 { + kOK = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNoFailSafe = 3; + kBusyWithOtherAdmin = 4; + } + + enum RegulatoryLocationTypeEnum : enum8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfo { + int16u failSafeExpiryLengthSeconds = 0; + int16u maxCumulativeFailsafeSeconds = 1; + } + + attribute access(write: administer) int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; + readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; + readonly attribute RegulatoryLocationTypeEnum 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; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + int16u expiryLengthSeconds = 0; + int64u breadcrumb = 1; + } + + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationTypeEnum newRegulatoryConfig = 0; + char_string<2> countryCode = 1; + int64u breadcrumb = 2; + } + + response struct SetRegulatoryConfigResponse = 3 { + CommissioningErrorEnum errorCode = 0; + char_string debugText = 1; + } + + response struct CommissioningCompleteResponse = 5 { + CommissioningErrorEnum errorCode = 0; + char_string debugText = 1; + } + + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ + command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ + command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; +} + +/** Functionality to configure, enable, disable network credentials and access on a Matter device. */ +cluster NetworkCommissioning = 49 { + revision 1; // NOTE: Default/not specifically set + + enum NetworkCommissioningStatusEnum : enum8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBandEnum : enum8 { + k2G4 = 0; + k3G65 = 1; + k5G = 2; + k6G = 3; + k60G = 4; + k1G = 5; + } + + bitmap Feature : bitmap32 { + kWiFiNetworkInterface = 0x1; + kThreadNetworkInterface = 0x2; + kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; + } + + bitmap ThreadCapabilitiesBitmap : bitmap16 { + kIsBorderRouterCapable = 0x1; + kIsRouterCapable = 0x2; + kIsSleepyEndDeviceCapable = 0x4; + kIsFullThreadDevice = 0x8; + kIsSynchronizedSleepyEndDeviceCapable = 0x10; + } + + bitmap WiFiSecurityBitmap : bitmap8 { + kUnencrypted = 0x1; + kWEP = 0x2; + kWPAPersonal = 0x4; + kWPA2Personal = 0x8; + kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; + } + + struct NetworkInfoStruct { + octet_string<32> networkID = 0; + boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; + } + + struct ThreadInterfaceScanResultStruct { + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; + } + + struct WiFiInterfaceScanResultStruct { + WiFiSecurityBitmap security = 0; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; + WiFiBandEnum wiFiBand = 4; + int8s rssi = 5; + } + + readonly attribute access(read: administer) int8u maxNetworks = 0; + readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; + attribute access(write: administer) boolean interfaceEnabled = 4; + readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; + readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; + readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; + 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; + + request struct ScanNetworksRequest { + optional nullable octet_string<32> ssid = 0; + optional int64u breadcrumb = 1; + } + + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + request struct AddOrUpdateWiFiNetworkRequest { + octet_string<32> ssid = 0; + octet_string<64> credentials = 1; + optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; + } + + request struct AddOrUpdateThreadNetworkRequest { + octet_string<254> operationalDataset = 0; + optional int64u breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + octet_string<32> networkID = 0; + optional int64u breadcrumb = 1; + } + + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + + request struct ConnectNetworkRequest { + octet_string<32> networkID = 0; + optional int64u breadcrumb = 1; + } + + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + + request struct ReorderNetworkRequest { + octet_string<32> networkID = 0; + int8u networkIndex = 1; + optional int64u breadcrumb = 2; + } + + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; + } + + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; + } + + /** Detemine the set of networks the device sees as available. */ + command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ + command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ + command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ + command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ + command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; +} + +/** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster GeneralDiagnostics = 51 { + revision 1; // NOTE: Default/not specifically set + + enum BootReasonEnum : enum8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultEnum : enum8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceTypeEnum : enum8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultEnum : enum8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultEnum : enum8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterface { + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; + InterfaceTypeEnum type = 7; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultEnum current[] = 0; + HardwareFaultEnum previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultEnum current[] = 0; + RadioFaultEnum previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultEnum current[] = 0; + NetworkFaultEnum previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonEnum bootReason = 0; + } + + readonly attribute NetworkInterface networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute boolean testEventTriggersEnabled = 8; + 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; + + request struct TestEventTriggerRequest { + octet_string<16> enableKey = 0; + int64u eventTrigger = 1; + } + + response struct TimeSnapshotResponse = 2 { + systime_us systemTimeUs = 0; + nullable epoch_us UTCTimeUs = 1; + } + + /** Provide a means for certification tests to trigger some test-plan-specific events */ + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ + command TimeSnapshot(): TimeSnapshotResponse = 1; +} + +/** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ +cluster ThreadNetworkDiagnostics = 53 { + revision 1; // NOTE: Default/not specifically set + + enum ConnectionStatusEnum : enum8 { + kConnected = 0; + kNotConnected = 1; + } + + enum NetworkFaultEnum : enum8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRoleEnum : enum8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kREED = 4; + kRouter = 5; + kLeader = 6; + } + + bitmap Feature : bitmap32 { + kPacketCounts = 0x1; + kErrorCounts = 0x2; + kMLECounts = 0x4; + kMACCounts = 0x8; + } + + struct NeighborTableStruct { + int64u extAddress = 0; + int32u age = 1; + int16u rloc16 = 2; + int32u linkFrameCounter = 3; + int32u mleFrameCounter = 4; + int8u lqi = 5; + nullable int8s averageRssi = 6; + nullable int8s lastRssi = 7; + int8u frameErrorRate = 8; + int8u messageErrorRate = 9; + boolean rxOnWhenIdle = 10; + boolean fullThreadDevice = 11; + boolean fullNetworkData = 12; + boolean isChild = 13; + } + + struct OperationalDatasetComponents { + boolean activeTimestampPresent = 0; + boolean pendingTimestampPresent = 1; + boolean masterKeyPresent = 2; + boolean networkNamePresent = 3; + boolean extendedPanIdPresent = 4; + boolean meshLocalPrefixPresent = 5; + boolean delayPresent = 6; + boolean panIdPresent = 7; + boolean channelPresent = 8; + boolean pskcPresent = 9; + boolean securityPolicyPresent = 10; + boolean channelMaskPresent = 11; + } + + struct RouteTableStruct { + int64u extAddress = 0; + int16u rloc16 = 1; + int8u routerId = 2; + int8u nextHop = 3; + int8u pathCost = 4; + int8u LQIIn = 5; + int8u LQIOut = 6; + int8u age = 7; + boolean allocated = 8; + boolean linkEstablished = 9; + } + + struct SecurityPolicy { + int16u rotationTime = 0; + int16u flags = 1; + } + + info event ConnectionStatus = 0 { + ConnectionStatusEnum connectionStatus = 0; + } + + info event NetworkFaultChange = 1 { + NetworkFaultEnum current[] = 0; + NetworkFaultEnum previous[] = 1; + } + + readonly attribute nullable int16u channel = 0; + readonly attribute nullable RoutingRoleEnum routingRole = 1; + readonly attribute nullable char_string<16> networkName = 2; + readonly attribute nullable int16u panId = 3; + readonly attribute nullable int64u extendedPanId = 4; + readonly attribute nullable octet_string<17> meshLocalPrefix = 5; + readonly attribute optional int64u overrunCount = 6; + readonly attribute NeighborTableStruct neighborTable[] = 7; + readonly attribute RouteTableStruct routeTable[] = 8; + readonly attribute nullable int32u partitionId = 9; + readonly attribute nullable int16u weighting = 10; + readonly attribute nullable int16u dataVersion = 11; + readonly attribute nullable int16u stableDataVersion = 12; + readonly attribute nullable int8u leaderRouterId = 13; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; + readonly attribute nullable SecurityPolicy securityPolicy = 59; + readonly attribute nullable octet_string<4> channelPage0Mask = 60; + readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; + readonly attribute NetworkFaultEnum activeNetworkFaultsList[] = 62; + 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; + + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ + command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; +} + +/** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster WiFiNetworkDiagnostics = 54 { + revision 1; // NOTE: Default/not specifically set + + enum AssociationFailureCauseEnum : enum8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum ConnectionStatusEnum : enum8 { + kConnected = 0; + kNotConnected = 1; + } + + enum SecurityTypeEnum : enum8 { + kUnspecified = 0; + kNone = 1; + kWEP = 2; + kWPA = 3; + kWPA2 = 4; + kWPA3 = 5; + } + + enum WiFiVersionEnum : enum8 { + kA = 0; + kB = 1; + kG = 2; + kN = 3; + kAc = 4; + kAx = 5; + kAh = 6; + } + + bitmap Feature : bitmap32 { + kPacketCounts = 0x1; + kErrorCounts = 0x2; + } + + info event Disconnection = 0 { + int16u reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCauseEnum associationFailureCause = 0; + int16u status = 1; + } + + info event ConnectionStatus = 2 { + ConnectionStatusEnum connectionStatus = 0; + } + + readonly attribute nullable octet_string<6> bssid = 0; + readonly attribute nullable SecurityTypeEnum securityType = 1; + readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; + readonly attribute nullable int16u channelNumber = 3; + readonly attribute nullable int8s rssi = 4; + readonly attribute optional nullable int32u beaconLostCount = 5; + readonly attribute optional nullable int32u beaconRxCount = 6; + readonly attribute optional nullable int32u packetMulticastRxCount = 7; + readonly attribute optional nullable int32u packetMulticastTxCount = 8; + readonly attribute optional nullable int32u packetUnicastRxCount = 9; + readonly attribute optional nullable int32u packetUnicastTxCount = 10; + readonly attribute optional nullable int64u currentMaxRate = 11; + readonly attribute optional nullable int64u overrunCount = 12; + 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; + + /** Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 */ + command ResetCounts(): DefaultSuccess = 0; +} + +/** The Ethernet Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster EthernetNetworkDiagnostics = 55 { + revision 1; // NOTE: Default/not specifically set + + enum PHYRateEnum : enum8 { + kRate10M = 0; + kRate100M = 1; + kRate1G = 2; + kRate25G = 3; + kRate5G = 4; + kRate10G = 5; + kRate40G = 6; + kRate100G = 7; + kRate200G = 8; + kRate400G = 9; + } + + bitmap Feature : bitmap32 { + kPacketCounts = 0x1; + kErrorCounts = 0x2; + } + + readonly attribute optional nullable PHYRateEnum PHYRate = 0; + readonly attribute optional nullable boolean fullDuplex = 1; + readonly attribute optional int64u packetRxCount = 2; + readonly attribute optional int64u packetTxCount = 3; + readonly attribute optional int64u txErrCount = 4; + readonly attribute optional int64u collisionCount = 5; + readonly attribute optional int64u overrunCount = 6; + readonly attribute optional nullable boolean carrierDetect = 7; + readonly attribute optional int64u timeSinceReset = 8; + 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; + + /** Reception of this command SHALL reset the attributes: PacketRxCount, PacketTxCount, TxErrCount, CollisionCount, OverrunCount to 0 */ + command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; +} + +/** Commands to trigger a Node to allow a new Administrator to commission it. */ +cluster AdministratorCommissioning = 60 { + revision 1; // NOTE: Default/not specifically set + + enum CommissioningWindowStatusEnum : enum8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : enum8 { + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; + } + + bitmap Feature : bitmap32 { + kBasic = 0x1; + } + + readonly attribute CommissioningWindowStatusEnum windowStatus = 0; + readonly attribute nullable fabric_idx adminFabricIndex = 1; + readonly attribute nullable vendor_id adminVendorId = 2; + 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; + + request struct OpenCommissioningWindowRequest { + int16u commissioningTimeout = 0; + octet_string PAKEPasscodeVerifier = 1; + int16u discriminator = 2; + int32u iterations = 3; + octet_string<32> salt = 4; + } + + request struct OpenBasicCommissioningWindowRequest { + int16u commissioningTimeout = 0; + } + + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ + timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ + timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; +} + +/** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ +cluster OperationalCredentials = 62 { + revision 1; // NOTE: Default/not specifically set + + enum CertificateChainTypeEnum : enum8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : enum8 { + kOK = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInvalidAdminSubject = 6; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + fabric_scoped struct FabricDescriptorStruct { + octet_string<65> rootPublicKey = 1; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; + char_string<32> label = 5; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct NOCStruct { + fabric_sensitive octet_string noc = 1; + nullable fabric_sensitive octet_string icac = 2; + fabric_idx fabricIndex = 254; + } + + readonly attribute access(read: administer) NOCStruct NOCs[] = 0; + readonly attribute FabricDescriptorStruct fabrics[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute octet_string trustedRootCertificates[] = 4; + readonly attribute int8u currentFabricIndex = 5; + 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; + + request struct AttestationRequestRequest { + octet_string<32> attestationNonce = 0; + } + + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + + request struct CertificateChainRequestRequest { + CertificateChainTypeEnum certificateType = 0; + } + + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + + request struct CSRRequestRequest { + octet_string<32> CSRNonce = 0; + optional boolean isForUpdateNOC = 1; + } + + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + + request struct AddNOCRequest { + octet_string<400> NOCValue = 0; + optional octet_string<400> ICACValue = 1; + octet_string<16> IPKValue = 2; + int64u caseAdminSubject = 3; + vendor_id adminVendorId = 4; + } + + request struct UpdateNOCRequest { + octet_string NOCValue = 0; + optional octet_string ICACValue = 1; + } + + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + + request struct UpdateFabricLabelRequest { + char_string<32> label = 0; + } + + request struct RemoveFabricRequest { + fabric_idx fabricIndex = 0; + } + + request struct AddTrustedRootCertificateRequest { + octet_string rootCACertificate = 0; + } + + /** Sender is requesting attestation information from the receiver. */ + command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ + command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ + command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ + command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ + fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ + fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ + command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ + command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; +} + +/** The Group Key Management Cluster is the mechanism by which group keys are managed. */ +cluster GroupKeyManagement = 63 { + revision 1; // NOTE: Default/not specifically set + + enum GroupKeySecurityPolicyEnum : enum8 { + kTrustFirst = 0; + kCacheAndSync = 1; + } + + bitmap Feature : bitmap32 { + kCacheAndSync = 0x1; + } + + fabric_scoped struct GroupInfoMapStruct { + group_id groupId = 1; + endpoint_no endpoints[] = 2; + optional char_string<16> groupName = 3; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct GroupKeyMapStruct { + group_id groupId = 1; + int16u groupKeySetID = 2; + fabric_idx fabricIndex = 254; + } + + struct GroupKeySetStruct { + int16u groupKeySetID = 0; + GroupKeySecurityPolicyEnum groupKeySecurityPolicy = 1; + nullable octet_string<16> epochKey0 = 2; + nullable epoch_us epochStartTime0 = 3; + nullable octet_string<16> epochKey1 = 4; + nullable epoch_us epochStartTime1 = 5; + nullable octet_string<16> epochKey2 = 6; + nullable epoch_us epochStartTime2 = 7; + } + + attribute access(write: manage) GroupKeyMapStruct groupKeyMap[] = 0; + readonly attribute GroupInfoMapStruct groupTable[] = 1; + readonly attribute int16u maxGroupsPerFabric = 2; + readonly attribute int16u maxGroupKeysPerFabric = 3; + 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; + + request struct KeySetWriteRequest { + GroupKeySetStruct groupKeySet = 0; + } + + request struct KeySetReadRequest { + int16u groupKeySetID = 0; + } + + response struct KeySetReadResponse = 2 { + GroupKeySetStruct groupKeySet = 0; + } + + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + + response struct KeySetReadAllIndicesResponse = 5 { + int16u groupKeySetIDs[] = 0; + } + + /** Write a new set of keys for the given key set id. */ + fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ + fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ + fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; +} + +endpoint 0 { + device type ma_rootdevice = 22, version 1; + + + server cluster Identify { + ram attribute identifyTime default = 0x0000; + ram attribute identifyType default = 0x00; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + + handle command Identify; + handle command TriggerEffect; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + callback attribute clusterRevision default = 1; + } + + server cluster AccessControl { + emits event AccessControlEntryChanged; + emits event AccessControlExtensionChanged; + callback attribute acl; + callback attribute extension; + callback attribute subjectsPerAccessControlEntry default = 4; + callback attribute targetsPerAccessControlEntry default = 3; + callback attribute accessControlEntriesPerFabric default = 3; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList; + ram attribute featureMap default = 0; + callback attribute clusterRevision default = 1; + } + + server cluster BasicInformation { + emits event StartUp; + emits event ShutDown; + emits event Leave; + callback attribute dataModelRevision default = 10; + callback attribute vendorName; + callback attribute vendorID; + callback attribute productName; + callback attribute productID; + persist attribute nodeLabel; + callback attribute location default = "XX"; + callback attribute hardwareVersion default = 0; + callback attribute hardwareVersionString; + callback attribute softwareVersion default = 0; + callback attribute softwareVersionString; + callback attribute manufacturingDate default = "20210614123456ZZ"; + callback attribute partNumber; + callback attribute productURL; + callback attribute productLabel; + callback attribute serialNumber; + persist attribute localConfigDisabled default = 0; + ram attribute reachable default = 1; + callback attribute uniqueID; + callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster GeneralCommissioning { + ram attribute breadcrumb default = 0x0000000000000000; + callback attribute basicCommissioningInfo; + callback attribute regulatoryConfig default = 0; + callback attribute locationCapability default = 0; + callback attribute supportsConcurrentConnection default = 1; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command ArmFailSafe; + handle command ArmFailSafeResponse; + handle command SetRegulatoryConfig; + handle command SetRegulatoryConfigResponse; + handle command CommissioningComplete; + handle command CommissioningCompleteResponse; + } + + server cluster NetworkCommissioning { + ram attribute maxNetworks; + callback attribute networks; + callback attribute interfaceEnabled default = 0; + callback attribute lastNetworkingStatus; + callback attribute lastNetworkID; + callback attribute lastConnectErrorValue; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + callback attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralDiagnostics { + emits event HardwareFaultChange; + emits event RadioFaultChange; + emits event NetworkFaultChange; + emits event BootReason; + callback attribute networkInterfaces; + callback attribute rebootCount default = 0x0000; + callback attribute upTime default = 0x0000000000000000; + callback attribute totalOperationalHours default = 0x00000000; + callback attribute bootReason; + callback attribute activeHardwareFaults; + callback attribute activeRadioFaults; + callback attribute activeNetworkFaults; + callback attribute testEventTriggersEnabled default = false; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0002; + + handle command TestEventTrigger; + handle command TimeSnapshot; + handle command TimeSnapshotResponse; + } + + server cluster ThreadNetworkDiagnostics { + callback attribute channel; + callback attribute routingRole; + callback attribute networkName; + callback attribute panId default = 0x0000; + callback attribute extendedPanId default = 0x0000000000000000; + callback attribute meshLocalPrefix; + callback attribute neighborTable; + callback attribute routeTable; + callback attribute partitionId; + callback attribute weighting; + callback attribute dataVersion; + callback attribute stableDataVersion; + callback attribute leaderRouterId; + callback attribute securityPolicy; + callback attribute channelPage0Mask; + callback attribute operationalDatasetComponents; + callback attribute activeNetworkFaultsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster WiFiNetworkDiagnostics { + emits event Disconnection; + emits event AssociationFailure; + emits event ConnectionStatus; + callback attribute bssid; + callback attribute securityType; + callback attribute wiFiVersion; + callback attribute channelNumber default = 0x0000; + callback attribute rssi default = 0x00; + callback attribute beaconLostCount default = 0x00000000; + callback attribute beaconRxCount default = 0x00000000; + callback attribute packetMulticastRxCount default = 0x00000000; + callback attribute packetMulticastTxCount default = 0x00000000; + callback attribute packetUnicastRxCount default = 0x00000000; + callback attribute packetUnicastTxCount default = 0x00000000; + callback attribute currentMaxRate default = 0x0000000000000000; + callback attribute overrunCount default = 0x0000000000000000; + ram attribute featureMap default = 3; + ram attribute clusterRevision default = 1; + + handle command ResetCounts; + } + + server cluster EthernetNetworkDiagnostics { + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command ResetCounts; + } + + server cluster AdministratorCommissioning { + callback attribute windowStatus default = 0; + callback attribute adminFabricIndex default = 1; + callback attribute adminVendorId default = 0; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command OpenCommissioningWindow; + handle command RevokeCommissioning; + } + + server cluster OperationalCredentials { + callback attribute NOCs; + callback attribute fabrics; + callback attribute supportedFabrics; + callback attribute commissionedFabrics; + callback attribute trustedRootCertificates; + callback attribute currentFabricIndex; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command AttestationRequest; + handle command AttestationResponse; + handle command CertificateChainRequest; + handle command CertificateChainResponse; + handle command CSRRequest; + handle command CSRResponse; + handle command AddNOC; + handle command UpdateNOC; + handle command NOCResponse; + handle command UpdateFabricLabel; + handle command RemoveFabric; + handle command AddTrustedRootCertificate; + } + + server cluster GroupKeyManagement { + callback attribute groupKeyMap; + callback attribute groupTable; + callback attribute maxGroupsPerFabric; + callback attribute maxGroupKeysPerFabric; + callback attribute featureMap default = 0; + callback attribute clusterRevision default = 1; + + handle command KeySetWrite; + handle command KeySetRead; + handle command KeySetReadResponse; + handle command KeySetRemove; + handle command KeySetReadAllIndices; + handle command KeySetReadAllIndicesResponse; + } +} +endpoint 1 { + device type ma_network_infrastructure_manager = 4293984272, version 1; + + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + callback attribute clusterRevision default = 2; + } +} + + diff --git a/examples/network-manager-app/network-manager-common/network-manager-app.zap b/examples/network-manager-app/network-manager-common/network-manager-app.zap new file mode 100644 index 00000000000000..c6e8a0de50659d --- /dev/null +++ b/examples/network-manager-app/network-manager-common/network-manager-app.zap @@ -0,0 +1,3232 @@ +{ + "fileFormat": 2, + "featureLevel": 99, + "creator": "zap", + "keyValuePairs": [ + { + "key": "commandDiscovery", + "value": "1" + }, + { + "key": "defaultResponsePolicy", + "value": "always" + }, + { + "key": "manufacturerCodes", + "value": "0x1002" + } + ], + "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/zcl/zcl.json", + "type": "zcl-properties", + "category": "matter", + "version": 1, + "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" + } + ], + "endpointTypes": [ + { + "id": 1, + "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "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": "0", + "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": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ACL", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Extension", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "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": "3", + "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": "3", + "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": "0", + "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": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "AccessControlEntryChanged", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AccessControlExtensionChanged", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DataModelRevision", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "10", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorName", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductName", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductID", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NodeLabel", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Location", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "XX", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersion", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersionString", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersion", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersionString", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ManufacturingDate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "20210614123456ZZ", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductURL", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "long_char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductLabel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SerialNumber", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LocalConfigDisabled", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Reachable", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UniqueID", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxPathsPerInvoke", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "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": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "StartUp", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ShutDown", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "Leave", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ArmFailSafe", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ArmFailSafeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "Breadcrumb", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BasicCommissioningInfo", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "BasicCommissioningInfo", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RegulatoryConfig", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocationCapability", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "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": "0", + "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": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MaxNetworks", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Networks", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InterfaceEnabled", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkingStatus", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "NetworkCommissioningStatusEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkID", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastConnectErrorValue", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": "0", + "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": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "TestEventTrigger", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshot", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshotResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NetworkInterfaces", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RebootCount", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TotalOperationalHours", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BootReason", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "BootReasonEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveHardwareFaults", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveRadioFaults", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaults", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TestEventTriggersEnabled", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "false", + "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": "0", + "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": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0002", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "HardwareFaultChange", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "RadioFaultChange", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "NetworkFaultChange", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "BootReason", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Channel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RoutingRole", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "RoutingRoleEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NetworkName", + "code": 2, + "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": "PanId", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ExtendedPanId", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeshLocalPrefix", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NeighborTable", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RouteTable", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartitionId", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Weighting", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DataVersion", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StableDataVersion", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LeaderRouterId", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SecurityPolicy", + "code": 59, + "mfgCode": null, + "side": "server", + "type": "SecurityPolicy", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ChannelPage0Mask", + "code": 60, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalDatasetComponents", + "code": 61, + "mfgCode": null, + "side": "server", + "type": "OperationalDatasetComponents", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaultsList", + "code": 62, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "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": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "BSSID", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SecurityType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "SecurityTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "WiFiVersion", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "WiFiVersionEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChannelNumber", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RSSI", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BeaconLostCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BeaconRxCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastRxCount", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastTxCount", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastRxCount", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastTxCount", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMaxRate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "Disconnection", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AssociationFailure", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ConnectionStatus", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Ethernet Network Diagnostics", + "code": 55, + "mfgCode": null, + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "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": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "OpenCommissioningWindow", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RevokeCommissioning", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "WindowStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "CommissioningWindowStatusEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminFabricIndex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "fabric_idx", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminVendorId", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "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": "0", + "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": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AttestationRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AttestationResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CertificateChainRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CertificateChainResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CSRRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CSRResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddNOC", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "UpdateNOC", + "code": 7, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NOCResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "UpdateFabricLabel", + "code": 9, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveFabric", + "code": 10, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddTrustedRootCertificate", + "code": 11, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Fabrics", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedFabrics", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CommissionedFabrics", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TrustedRootCertificates", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentFabricIndex", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "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": "0", + "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": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "KeySetWrite", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetRead", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "KeySetRemove", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndices", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndicesResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "GroupKeyMap", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GroupTable", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupsPerFabric", + "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": "MaxGroupKeysPerFabric", + "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": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "id": 2, + "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 4293984272, + "profileId": 259, + "label": "MA-network-infrastructure-manager", + "name": "MA-network-infrastructure-manager" + }, + "deviceTypes": [ + { + "code": 4293984272, + "profileId": 259, + "label": "MA-network-infrastructure-manager", + "name": "MA-network-infrastructure-manager" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 4293984272 + ], + "deviceTypeName": "MA-network-infrastructure-manager", + "deviceTypeCode": 4293984272, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "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": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0 + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0 + } + ], + "log": [] +} \ No newline at end of file diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter index 182fab3bd3232b..c5c54bb9261bd6 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -25,6 +25,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -37,7 +38,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -client cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -112,7 +113,7 @@ client cluster AccessControl = 31 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -171,7 +172,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -186,7 +187,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -258,14 +259,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -274,10 +277,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -server cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -318,16 +323,6 @@ server cluster OtaSoftwareUpdateProvider = 41 { optional octet_string<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - octet_string<32> updateToken = 0; - int32u newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - octet_string<32> updateToken = 0; - int32u softwareVersion = 1; - } - response struct QueryImageResponse = 1 { StatusEnum status = 0; optional int32u delayedActionTime = 1; @@ -339,13 +334,26 @@ server cluster OtaSoftwareUpdateProvider = 41 { optional octet_string<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + octet_string<32> updateToken = 0; + int32u newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { ApplyUpdateActionEnum action = 0; int32u delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + octet_string<32> updateToken = 0; + int32u softwareVersion = 1; + } + + /** Determine availability of a new Software Image */ command QueryImage(QueryImageRequest): QueryImageResponse = 0; + /** Determine next action to take for a downloaded Software Image */ command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + /** Notify OTA Provider that an update was applied */ command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; } @@ -353,7 +361,7 @@ server cluster OtaSoftwareUpdateProvider = 41 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -370,7 +378,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -398,8 +406,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -409,7 +417,7 @@ server cluster TimeFormatLocalization = 44 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -448,17 +456,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -469,13 +477,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -556,12 +567,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -574,6 +588,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -593,48 +614,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -718,12 +750,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -742,12 +774,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -788,13 +822,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -847,15 +884,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -869,6 +920,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -881,38 +938,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -967,27 +1012,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1005,7 +1054,7 @@ server cluster FixedLabel = 64 { } /** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ -server cluster UserLabel = 65 { +cluster UserLabel = 65 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter index 96b2a8d2da9ad7..14e95bc8ea4a2c 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -74,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -156,10 +164,10 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; - readonly attribute boolean globalSceneControl = 16384; - attribute int16u onTime = 16385; - attribute int16u offWaitTime = 16386; - attribute access(write: manage) nullable StartUpOnOffEnum startUpOnOff = 16387; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -178,16 +186,22 @@ server cluster OnOff = 6 { int16u offWaitTime = 2; } + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -210,6 +224,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -222,7 +237,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -281,7 +296,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -296,7 +311,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -368,14 +383,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -384,10 +401,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -463,7 +482,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -536,6 +555,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -543,7 +563,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -560,7 +580,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -588,8 +608,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -599,7 +619,7 @@ server cluster TimeFormatLocalization = 44 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -638,17 +658,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -659,13 +679,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -746,12 +769,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -764,6 +790,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -783,48 +816,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -908,12 +952,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -932,12 +976,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -978,13 +1024,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1037,15 +1086,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1059,6 +1122,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1071,38 +1140,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1157,27 +1214,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1195,7 +1256,7 @@ server cluster FixedLabel = 64 { } /** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ -server cluster UserLabel = 65 { +cluster UserLabel = 65 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 6eca51cf360d29..7010be2c4f006a 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -client cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -52,7 +52,7 @@ client cluster Identify = 3 { } /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -95,12 +95,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -124,54 +126,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** Attributes and commands for scene configuration and manipulation. */ -provisional server cluster Scenes = 5 { +provisional cluster Scenes = 5 { revision 5; bitmap CopyModeBitmap : bitmap8 { @@ -208,7 +216,12 @@ provisional server cluster Scenes = 5 { fabric_idx fabricIndex = 254; } + readonly attribute optional int8u sceneCount = 0; + readonly attribute optional int8u currentScene = 1; + readonly attribute optional group_id currentGroup = 2; + readonly attribute optional boolean sceneValid = 3; readonly attribute NameSupportBitmap nameSupport = 4; + readonly attribute optional nullable node_id lastConfiguredBy = 5; readonly attribute int16u sceneTableSize = 6; readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; readonly attribute command_id generatedCommandList[] = 65528; @@ -226,25 +239,57 @@ provisional server cluster Scenes = 5 { ExtensionFieldSet extensionFieldSets[] = 4; } + response struct AddSceneResponse = 0 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + request struct ViewSceneRequest { group_id groupID = 0; int8u sceneID = 1; } + response struct ViewSceneResponse = 1 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + request struct RemoveSceneRequest { group_id groupID = 0; int8u sceneID = 1; } + response struct RemoveSceneResponse = 2 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + request struct RemoveAllScenesRequest { group_id groupID = 0; } + response struct RemoveAllScenesResponse = 3 { + status status = 0; + group_id groupID = 1; + } + request struct StoreSceneRequest { group_id groupID = 0; int8u sceneID = 1; } + response struct StoreSceneResponse = 4 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + request struct RecallSceneRequest { group_id groupID = 0; int8u sceneID = 1; @@ -255,56 +300,79 @@ provisional server cluster Scenes = 5 { group_id groupID = 0; } - response struct AddSceneResponse = 0 { + response struct GetSceneMembershipResponse = 6 { status status = 0; - group_id groupID = 1; - int8u sceneID = 2; + nullable int8u capacity = 1; + group_id groupID = 2; + optional int8u sceneList[] = 3; } - response struct ViewSceneResponse = 1 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - optional int16u transitionTime = 3; - optional char_string sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; + request struct EnhancedAddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int16u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; } - response struct RemoveSceneResponse = 2 { + response struct EnhancedAddSceneResponse = 64 { status status = 0; group_id groupID = 1; int8u sceneID = 2; } - response struct RemoveAllScenesResponse = 3 { - status status = 0; - group_id groupID = 1; + request struct EnhancedViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; } - response struct StoreSceneResponse = 4 { + response struct EnhancedViewSceneResponse = 65 { status status = 0; group_id groupID = 1; int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; } - response struct GetSceneMembershipResponse = 6 { + request struct CopySceneRequest { + CopyModeBitmap mode = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + group_id groupIdentifierTo = 3; + int8u sceneIdentifierTo = 4; + } + + response struct CopySceneResponse = 66 { status status = 0; - nullable int8u capacity = 1; - group_id groupID = 2; - optional int8u sceneList[] = 3; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; } + /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; + /** Retrieves the requested scene entry from its Scene table. */ fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; + /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ + fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; + /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ + fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; + /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ + fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -client cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -376,7 +444,7 @@ client cluster OnOff = 6 { } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -411,10 +479,10 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; - readonly attribute boolean globalSceneControl = 16384; - attribute int16u onTime = 16385; - attribute int16u offWaitTime = 16386; - attribute access(write: manage) nullable StartUpOnOffEnum startUpOnOff = 16387; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -433,16 +501,22 @@ server cluster OnOff = 6 { int16u offWaitTime = 2; } + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ -client cluster LevelControl = 8 { +cluster LevelControl = 8 { revision 5; enum MoveModeEnum : enum8 { @@ -567,7 +641,7 @@ client cluster LevelControl = 8 { } /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ -server cluster LevelControl = 8 { +cluster LevelControl = 8 { revision 5; enum MoveModeEnum : enum8 { @@ -592,19 +666,19 @@ server cluster LevelControl = 8 { } readonly attribute nullable int8u currentLevel = 0; - readonly attribute int16u remainingTime = 1; - readonly attribute int8u minLevel = 2; - readonly attribute int8u maxLevel = 3; - readonly attribute int16u currentFrequency = 4; - readonly attribute int16u minFrequency = 5; - readonly attribute int16u maxFrequency = 6; + readonly attribute optional int16u remainingTime = 1; + readonly attribute optional int8u minLevel = 2; + readonly attribute optional int8u maxLevel = 3; + readonly attribute optional int16u currentFrequency = 4; + readonly attribute optional int16u minFrequency = 5; + readonly attribute optional int16u maxFrequency = 6; attribute OptionsBitmap options = 15; - attribute int16u onOffTransitionTime = 16; + attribute optional int16u onOffTransitionTime = 16; attribute nullable int8u onLevel = 17; - attribute nullable int16u onTransitionTime = 18; - attribute nullable int16u offTransitionTime = 19; - attribute nullable int8u defaultMoveRate = 20; - attribute access(write: manage) nullable int8u startUpCurrentLevel = 16384; + attribute optional nullable int16u onTransitionTime = 18; + attribute optional nullable int16u offTransitionTime = 19; + attribute optional nullable int8u defaultMoveRate = 20; + attribute access(write: manage) optional nullable int8u startUpCurrentLevel = 16384; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -666,18 +740,33 @@ server cluster LevelControl = 8 { OptionsBitmap optionsOverride = 1; } + request struct MoveToClosestFrequencyRequest { + int16u frequency = 0; + } + + /** Command description for MoveToLevel */ command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + /** Command description for Move */ command Move(MoveRequest): DefaultSuccess = 1; + /** Command description for Step */ command Step(StepRequest): DefaultSuccess = 2; + /** Command description for Stop */ command Stop(StopRequest): DefaultSuccess = 3; + /** Command description for MoveToLevelWithOnOff */ command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + /** Command description for MoveWithOnOff */ command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + /** Command description for StepWithOnOff */ command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + /** Command description for StopWithOnOff */ command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; + /** Change the currrent frequency to the provided one, or a close + approximation if the exact provided one is not possible. */ + command MoveToClosestFrequency(MoveToClosestFrequencyRequest): DefaultSuccess = 8; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -700,6 +789,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -712,7 +802,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -771,7 +861,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -784,7 +874,7 @@ server cluster AccessControl = 31 { } /** This cluster provides a standardized way for a Node (typically a Bridge, but could be any Node) to expose action information. */ -server cluster Actions = 37 { +cluster Actions = 37 { revision 1; // NOTE: Default/not specifically set enum ActionErrorEnum : enum8 { @@ -861,19 +951,109 @@ server cluster Actions = 37 { readonly attribute ActionStruct actionList[] = 0; readonly attribute EndpointListStruct endpointLists[] = 1; - readonly attribute long_char_string<512> setupURL = 2; + readonly attribute optional long_char_string<512> setupURL = 2; 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; + + request struct InstantActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct InstantActionWithTransitionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + int16u transitionTime = 2; + } + + request struct StartActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct StartActionWithDurationRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + int32u duration = 2; + } + + request struct StopActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct PauseActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct PauseActionWithDurationRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + int32u duration = 2; + } + + request struct ResumeActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct EnableActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct EnableActionWithDurationRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + int32u duration = 2; + } + + request struct DisableActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct DisableActionWithDurationRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + int32u duration = 2; + } + + /** This command triggers an action (state change) on the involved endpoints. */ + command InstantAction(InstantActionRequest): DefaultSuccess = 0; + /** This command triggers an action (state change) on the involved endpoints, with a specified time to transition from the current state to the new state. */ + command InstantActionWithTransition(InstantActionWithTransitionRequest): DefaultSuccess = 1; + /** This command triggers the commencement of an action on the involved endpoints. */ + command StartAction(StartActionRequest): DefaultSuccess = 2; + /** This command triggers the commencement of an action (with a duration) on the involved endpoints. */ + command StartActionWithDuration(StartActionWithDurationRequest): DefaultSuccess = 3; + /** This command stops the ongoing action on the involved endpoints. */ + command StopAction(StopActionRequest): DefaultSuccess = 4; + /** This command pauses an ongoing action. */ + command PauseAction(PauseActionRequest): DefaultSuccess = 5; + /** This command pauses an ongoing action with a duration. */ + command PauseActionWithDuration(PauseActionWithDurationRequest): DefaultSuccess = 6; + /** This command resumes a previously paused action. */ + command ResumeAction(ResumeActionRequest): DefaultSuccess = 7; + /** This command enables a certain action or automation. */ + command EnableAction(EnableActionRequest): DefaultSuccess = 8; + /** This command enables a certain action or automation with a duration. */ + command EnableActionWithDuration(EnableActionWithDurationRequest): DefaultSuccess = 9; + /** This command disables a certain action or automation. */ + command DisableAction(DisableActionRequest): DefaultSuccess = 10; + /** This command disables a certain action or automation with a duration. */ + command DisableActionWithDuration(DisableActionWithDurationRequest): DefaultSuccess = 11; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -945,28 +1125,33 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute boolean reachable = 17; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; + readonly attribute int32u specificationVersion = 21; + readonly attribute int16u maxPathsPerInvoke = 22; 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; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Nodes should be expected to be deployed to any and all regions of the world. These global regions may have differing common languages, units of measurements, and numerical formatting 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 */ -client cluster LocalizationConfiguration = 43 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -983,7 +1168,7 @@ client cluster LocalizationConfiguration = 43 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -1000,7 +1185,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -1028,8 +1213,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1042,7 +1227,7 @@ server cluster TimeFormatLocalization = 44 { may have differing preferences for the units in which values are conveyed in communication to a user. As such, Nodes that visually or audibly convey measurable values to the user need a mechanism by which they can be configured to use a user’s preferred unit. */ -client cluster UnitLocalization = 45 { +cluster UnitLocalization = 45 { revision 1; enum TempUnitEnum : enum8 { @@ -1068,7 +1253,7 @@ client cluster UnitLocalization = 45 { may have differing preferences for the units in which values are conveyed in communication to a user. As such, Nodes that visually or audibly convey measurable values to the user need a mechanism by which they can be configured to use a user’s preferred unit. */ -server cluster UnitLocalization = 45 { +cluster UnitLocalization = 45 { revision 1; enum TempUnitEnum : enum8 { @@ -1081,7 +1266,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute access(write: manage) TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) optional TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1091,7 +1276,7 @@ server cluster UnitLocalization = 45 { } /** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ -server cluster PowerSource = 47 { +cluster PowerSource = 47 { revision 1; // NOTE: Default/not specifically set enum BatApprovedChemistryEnum : enum16 { @@ -1312,34 +1497,34 @@ server cluster PowerSource = 47 { readonly attribute PowerSourceStatusEnum status = 0; readonly attribute int8u order = 1; readonly attribute char_string<60> description = 2; - readonly attribute nullable int32u wiredAssessedInputVoltage = 3; - readonly attribute nullable int16u wiredAssessedInputFrequency = 4; - readonly attribute WiredCurrentTypeEnum wiredCurrentType = 5; - readonly attribute nullable int32u wiredAssessedCurrent = 6; - readonly attribute int32u wiredNominalVoltage = 7; - readonly attribute int32u wiredMaximumCurrent = 8; - readonly attribute boolean wiredPresent = 9; - readonly attribute WiredFaultEnum activeWiredFaults[] = 10; - readonly attribute nullable int32u batVoltage = 11; - readonly attribute nullable int8u batPercentRemaining = 12; - readonly attribute nullable int32u batTimeRemaining = 13; - readonly attribute BatChargeLevelEnum batChargeLevel = 14; - readonly attribute boolean batReplacementNeeded = 15; - readonly attribute BatReplaceabilityEnum batReplaceability = 16; - readonly attribute boolean batPresent = 17; - readonly attribute BatFaultEnum activeBatFaults[] = 18; - readonly attribute char_string<60> batReplacementDescription = 19; - readonly attribute BatCommonDesignationEnum batCommonDesignation = 20; - readonly attribute char_string<20> batANSIDesignation = 21; - readonly attribute char_string<20> batIECDesignation = 22; - readonly attribute BatApprovedChemistryEnum batApprovedChemistry = 23; - readonly attribute int32u batCapacity = 24; - readonly attribute int8u batQuantity = 25; - readonly attribute BatChargeStateEnum batChargeState = 26; - readonly attribute nullable int32u batTimeToFullCharge = 27; - readonly attribute boolean batFunctionalWhileCharging = 28; - readonly attribute nullable int32u batChargingCurrent = 29; - readonly attribute BatChargeFaultEnum activeBatChargeFaults[] = 30; + readonly attribute optional nullable int32u wiredAssessedInputVoltage = 3; + readonly attribute optional nullable int16u wiredAssessedInputFrequency = 4; + readonly attribute optional WiredCurrentTypeEnum wiredCurrentType = 5; + readonly attribute optional nullable int32u wiredAssessedCurrent = 6; + readonly attribute optional int32u wiredNominalVoltage = 7; + readonly attribute optional int32u wiredMaximumCurrent = 8; + readonly attribute optional boolean wiredPresent = 9; + readonly attribute optional WiredFaultEnum activeWiredFaults[] = 10; + readonly attribute optional nullable int32u batVoltage = 11; + readonly attribute optional nullable int8u batPercentRemaining = 12; + readonly attribute optional nullable int32u batTimeRemaining = 13; + readonly attribute optional BatChargeLevelEnum batChargeLevel = 14; + readonly attribute optional boolean batReplacementNeeded = 15; + readonly attribute optional BatReplaceabilityEnum batReplaceability = 16; + readonly attribute optional boolean batPresent = 17; + readonly attribute optional BatFaultEnum activeBatFaults[] = 18; + readonly attribute optional char_string<60> batReplacementDescription = 19; + readonly attribute optional BatCommonDesignationEnum batCommonDesignation = 20; + readonly attribute optional char_string<20> batANSIDesignation = 21; + readonly attribute optional char_string<20> batIECDesignation = 22; + readonly attribute optional BatApprovedChemistryEnum batApprovedChemistry = 23; + readonly attribute optional int32u batCapacity = 24; + readonly attribute optional int8u batQuantity = 25; + readonly attribute optional BatChargeStateEnum batChargeState = 26; + readonly attribute optional nullable int32u batTimeToFullCharge = 27; + readonly attribute optional boolean batFunctionalWhileCharging = 28; + readonly attribute optional nullable int32u batChargingCurrent = 29; + readonly attribute optional BatChargeFaultEnum activeBatChargeFaults[] = 30; readonly attribute endpoint_no endpointList[] = 31; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1350,7 +1535,7 @@ server cluster PowerSource = 47 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -client cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -1419,7 +1604,7 @@ client cluster GeneralCommissioning = 48 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -1458,17 +1643,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -1479,13 +1664,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -1566,12 +1754,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1584,6 +1775,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -1603,48 +1801,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -1728,12 +1937,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1752,12 +1961,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -1778,10 +1989,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1789,11 +2000,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ -client cluster ThreadNetworkDiagnostics = 53 { +cluster ThreadNetworkDiagnostics = 53 { revision 1; // NOTE: Default/not specifically set enum ConnectionStatusEnum : enum8 { @@ -1959,7 +2171,7 @@ client cluster ThreadNetworkDiagnostics = 53 { } /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ -server cluster ThreadNetworkDiagnostics = 53 { +cluster ThreadNetworkDiagnostics = 53 { revision 1; // NOTE: Default/not specifically set enum ConnectionStatusEnum : enum8 { @@ -2056,7 +2268,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u panId = 3; readonly attribute nullable int64u extendedPanId = 4; readonly attribute nullable octet_string<17> meshLocalPrefix = 5; - readonly attribute int64u overrunCount = 6; + readonly attribute optional int64u overrunCount = 6; readonly attribute NeighborTableStruct neighborTable[] = 7; readonly attribute RouteTableStruct routeTable[] = 8; readonly attribute nullable int32u partitionId = 9; @@ -2064,78 +2276,79 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u dataVersion = 11; readonly attribute nullable int16u stableDataVersion = 12; readonly attribute nullable int8u leaderRouterId = 13; - readonly attribute int16u detachedRoleCount = 14; - readonly attribute int16u childRoleCount = 15; - readonly attribute int16u routerRoleCount = 16; - readonly attribute int16u leaderRoleCount = 17; - readonly attribute int16u attachAttemptCount = 18; - readonly attribute int16u partitionIdChangeCount = 19; - readonly attribute int16u betterPartitionAttachAttemptCount = 20; - readonly attribute int16u parentChangeCount = 21; - readonly attribute int32u txTotalCount = 22; - readonly attribute int32u txUnicastCount = 23; - readonly attribute int32u txBroadcastCount = 24; - readonly attribute int32u txAckRequestedCount = 25; - readonly attribute int32u txAckedCount = 26; - readonly attribute int32u txNoAckRequestedCount = 27; - readonly attribute int32u txDataCount = 28; - readonly attribute int32u txDataPollCount = 29; - readonly attribute int32u txBeaconCount = 30; - readonly attribute int32u txBeaconRequestCount = 31; - readonly attribute int32u txOtherCount = 32; - readonly attribute int32u txRetryCount = 33; - readonly attribute int32u txDirectMaxRetryExpiryCount = 34; - readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; - readonly attribute int32u txErrCcaCount = 36; - readonly attribute int32u txErrAbortCount = 37; - readonly attribute int32u txErrBusyChannelCount = 38; - readonly attribute int32u rxTotalCount = 39; - readonly attribute int32u rxUnicastCount = 40; - readonly attribute int32u rxBroadcastCount = 41; - readonly attribute int32u rxDataCount = 42; - readonly attribute int32u rxDataPollCount = 43; - readonly attribute int32u rxBeaconCount = 44; - readonly attribute int32u rxBeaconRequestCount = 45; - readonly attribute int32u rxOtherCount = 46; - readonly attribute int32u rxAddressFilteredCount = 47; - readonly attribute int32u rxDestAddrFilteredCount = 48; - readonly attribute int32u rxDuplicatedCount = 49; - readonly attribute int32u rxErrNoFrameCount = 50; - readonly attribute int32u rxErrUnknownNeighborCount = 51; - readonly attribute int32u rxErrInvalidSrcAddrCount = 52; - readonly attribute int32u rxErrSecCount = 53; - readonly attribute int32u rxErrFcsCount = 54; - readonly attribute int32u rxErrOtherCount = 55; - readonly attribute nullable int64u activeTimestamp = 56; - readonly attribute nullable int64u pendingTimestamp = 57; - readonly attribute nullable int32u delay = 58; - readonly attribute nullable SecurityPolicy securityPolicy = 59; - readonly attribute nullable octet_string<4> channelPage0Mask = 60; - readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; - readonly attribute NetworkFaultEnum activeNetworkFaultsList[] = 62; - 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; - - command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; -} - -/** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster WiFiNetworkDiagnostics = 54 { - revision 1; // NOTE: Default/not specifically set - - enum AssociationFailureCauseEnum : enum8 { - kUnknown = 0; - kAssociationFailed = 1; - kAuthenticationFailed = 2; - kSsidNotFound = 3; - } - - enum ConnectionStatusEnum : enum8 { - kConnected = 0; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; + readonly attribute nullable SecurityPolicy securityPolicy = 59; + readonly attribute nullable octet_string<4> channelPage0Mask = 60; + readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; + readonly attribute NetworkFaultEnum activeNetworkFaultsList[] = 62; + 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; + + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ + command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; +} + +/** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster WiFiNetworkDiagnostics = 54 { + revision 1; // NOTE: Default/not specifically set + + enum AssociationFailureCauseEnum : enum8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum ConnectionStatusEnum : enum8 { + kConnected = 0; kNotConnected = 1; } @@ -2181,14 +2394,14 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; - readonly attribute nullable int32u beaconLostCount = 5; - readonly attribute nullable int32u beaconRxCount = 6; - readonly attribute nullable int32u packetMulticastRxCount = 7; - readonly attribute nullable int32u packetMulticastTxCount = 8; - readonly attribute nullable int32u packetUnicastRxCount = 9; - readonly attribute nullable int32u packetUnicastTxCount = 10; - readonly attribute nullable int64u currentMaxRate = 11; - readonly attribute nullable int64u overrunCount = 12; + readonly attribute optional nullable int32u beaconLostCount = 5; + readonly attribute optional nullable int32u beaconRxCount = 6; + readonly attribute optional nullable int32u packetMulticastRxCount = 7; + readonly attribute optional nullable int32u packetMulticastTxCount = 8; + readonly attribute optional nullable int32u packetUnicastRxCount = 9; + readonly attribute optional nullable int32u packetUnicastTxCount = 10; + readonly attribute optional nullable int64u currentMaxRate = 11; + readonly attribute optional nullable int64u overrunCount = 12; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2196,11 +2409,12 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 */ command ResetCounts(): DefaultSuccess = 0; } /** The Ethernet Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster EthernetNetworkDiagnostics = 55 { +cluster EthernetNetworkDiagnostics = 55 { revision 1; // NOTE: Default/not specifically set enum PHYRateEnum : enum8 { @@ -2221,15 +2435,15 @@ server cluster EthernetNetworkDiagnostics = 55 { kErrorCounts = 0x2; } - readonly attribute nullable PHYRateEnum PHYRate = 0; - readonly attribute nullable boolean fullDuplex = 1; - readonly attribute int64u packetRxCount = 2; - readonly attribute int64u packetTxCount = 3; - readonly attribute int64u txErrCount = 4; - readonly attribute int64u collisionCount = 5; - readonly attribute int64u overrunCount = 6; - readonly attribute nullable boolean carrierDetect = 7; - readonly attribute int64u timeSinceReset = 8; + readonly attribute optional nullable PHYRateEnum PHYRate = 0; + readonly attribute optional nullable boolean fullDuplex = 1; + readonly attribute optional int64u packetRxCount = 2; + readonly attribute optional int64u packetTxCount = 3; + readonly attribute optional int64u txErrCount = 4; + readonly attribute optional int64u collisionCount = 5; + readonly attribute optional int64u overrunCount = 6; + readonly attribute optional nullable boolean carrierDetect = 7; + readonly attribute optional int64u timeSinceReset = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2237,6 +2451,7 @@ server cluster EthernetNetworkDiagnostics = 55 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the attributes: PacketRxCount, PacketTxCount, TxErrCount, CollisionCount, OverrunCount to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } @@ -2244,7 +2459,7 @@ server cluster EthernetNetworkDiagnostics = 55 { the Endpoint where it is placed (and its Parts) is bridged from a non-CHIP technology; and provide a centralized collection of attributes that the Node MAY collect to aid in conveying information regarding the Bridged Device to a user, such as the vendor name, the model name, or user-assigned name. */ -server cluster BridgedDeviceBasicInformation = 57 { +cluster BridgedDeviceBasicInformation = 57 { revision 3; enum ColorEnum : enum8 { @@ -2299,22 +2514,22 @@ server cluster BridgedDeviceBasicInformation = 57 { boolean reachableNewValue = 0; } - readonly attribute char_string<32> vendorName = 1; - readonly attribute vendor_id vendorID = 2; - readonly attribute char_string<32> productName = 3; - attribute char_string<32> nodeLabel = 5; - readonly attribute int16u hardwareVersion = 7; - readonly attribute char_string<64> hardwareVersionString = 8; - readonly attribute int32u softwareVersion = 9; - readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; + readonly attribute optional char_string<32> vendorName = 1; + readonly attribute optional vendor_id vendorID = 2; + readonly attribute optional char_string<32> productName = 3; + attribute optional char_string<32> nodeLabel = 5; + readonly attribute optional int16u hardwareVersion = 7; + readonly attribute optional char_string<64> hardwareVersionString = 8; + readonly attribute optional int32u softwareVersion = 9; + readonly attribute optional char_string<64> softwareVersionString = 10; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; readonly attribute boolean reachable = 17; - readonly attribute char_string<32> uniqueID = 18; - readonly attribute ProductAppearanceStruct productAppearance = 20; + readonly attribute optional char_string<32> uniqueID = 18; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2326,7 +2541,7 @@ server cluster BridgedDeviceBasicInformation = 57 { /** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -client cluster Switch = 59 { +cluster Switch = 59 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -2381,7 +2596,7 @@ client cluster Switch = 59 { /** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { +cluster Switch = 59 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -2424,7 +2639,7 @@ server cluster Switch = 59 { readonly attribute int8u numberOfPositions = 0; readonly attribute int8u currentPosition = 1; - readonly attribute int8u multiPressMax = 2; + readonly attribute optional int8u multiPressMax = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2434,7 +2649,7 @@ server cluster Switch = 59 { } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -2475,13 +2690,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -client cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -2607,7 +2825,7 @@ client cluster OperationalCredentials = 62 { } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -2660,15 +2878,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -2682,6 +2914,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -2694,38 +2932,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -2780,27 +3006,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -client cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -2819,7 +3049,7 @@ client cluster FixedLabel = 64 { /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -2837,7 +3067,7 @@ server cluster FixedLabel = 64 { } /** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ -server cluster UserLabel = 65 { +cluster UserLabel = 65 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -2855,7 +3085,7 @@ server cluster UserLabel = 65 { } /** This cluster provides an interface to a boolean state called StateValue. */ -server cluster BooleanState = 69 { +cluster BooleanState = 69 { revision 1; info event StateChange = 0 { @@ -2872,7 +3102,7 @@ server cluster BooleanState = 69 { } /** Attributes and commands for selecting a mode from a list of supported options. */ -client cluster ModeSelect = 80 { +cluster ModeSelect = 80 { revision 2; bitmap Feature : bitmap32 { @@ -2912,7 +3142,7 @@ client cluster ModeSelect = 80 { } /** Attributes and commands for selecting a mode from a list of supported options. */ -server cluster ModeSelect = 80 { +cluster ModeSelect = 80 { revision 2; bitmap Feature : bitmap32 { @@ -2934,7 +3164,8 @@ server cluster ModeSelect = 80 { readonly attribute nullable enum16 standardNamespace = 1; readonly attribute ModeOptionStruct supportedModes[] = 2; readonly attribute int8u currentMode = 3; - attribute nullable int8u startUpMode = 4; + attribute optional nullable int8u startUpMode = 4; + attribute optional nullable int8u onMode = 5; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2946,11 +3177,12 @@ server cluster ModeSelect = 80 { int8u newMode = 0; } + /** On receipt of this command, if the NewMode field matches the Mode field in an entry of the SupportedModes list, the server SHALL set the CurrentMode attribute to the NewMode value, otherwise, the server SHALL respond with an INVALID_COMMAND status response. */ command ChangeToMode(ChangeToModeRequest): DefaultSuccess = 0; } /** An interface to a generic way to secure a door */ -client cluster DoorLock = 257 { +cluster DoorLock = 257 { revision 7; enum AlarmCodeEnum : enum8 { @@ -3572,7 +3804,7 @@ client cluster DoorLock = 257 { } /** An interface to a generic way to secure a door */ -server cluster DoorLock = 257 { +cluster DoorLock = 257 { revision 7; enum AlarmCodeEnum : enum8 { @@ -3955,39 +4187,39 @@ server cluster DoorLock = 257 { readonly attribute nullable DlLockState lockState = 0; readonly attribute DlLockType lockType = 1; readonly attribute boolean actuatorEnabled = 2; - readonly attribute nullable DoorStateEnum doorState = 3; - attribute access(write: manage) int32u doorOpenEvents = 4; - attribute access(write: manage) int32u doorClosedEvents = 5; - attribute access(write: manage) int16u openPeriod = 6; - readonly attribute int16u numberOfTotalUsersSupported = 17; - readonly attribute int16u numberOfPINUsersSupported = 18; - readonly attribute int16u numberOfRFIDUsersSupported = 19; - readonly attribute int8u numberOfWeekDaySchedulesSupportedPerUser = 20; - readonly attribute int8u numberOfYearDaySchedulesSupportedPerUser = 21; - readonly attribute int8u numberOfHolidaySchedulesSupported = 22; - readonly attribute int8u maxPINCodeLength = 23; - readonly attribute int8u minPINCodeLength = 24; - readonly attribute int8u maxRFIDCodeLength = 25; - readonly attribute int8u minRFIDCodeLength = 26; - readonly attribute DlCredentialRuleMask credentialRulesSupport = 27; - readonly attribute int8u numberOfCredentialsSupportedPerUser = 28; - attribute access(write: manage) char_string<3> language = 33; - attribute access(write: manage) int8u LEDSettings = 34; + readonly attribute optional nullable DoorStateEnum doorState = 3; + attribute access(write: manage) optional int32u doorOpenEvents = 4; + attribute access(write: manage) optional int32u doorClosedEvents = 5; + attribute access(write: manage) optional int16u openPeriod = 6; + readonly attribute optional int16u numberOfTotalUsersSupported = 17; + readonly attribute optional int16u numberOfPINUsersSupported = 18; + readonly attribute optional int16u numberOfRFIDUsersSupported = 19; + readonly attribute optional int8u numberOfWeekDaySchedulesSupportedPerUser = 20; + readonly attribute optional int8u numberOfYearDaySchedulesSupportedPerUser = 21; + readonly attribute optional int8u numberOfHolidaySchedulesSupported = 22; + readonly attribute optional int8u maxPINCodeLength = 23; + readonly attribute optional int8u minPINCodeLength = 24; + readonly attribute optional int8u maxRFIDCodeLength = 25; + readonly attribute optional int8u minRFIDCodeLength = 26; + readonly attribute optional DlCredentialRuleMask credentialRulesSupport = 27; + readonly attribute optional int8u numberOfCredentialsSupportedPerUser = 28; + attribute access(write: manage) optional char_string<3> language = 33; + attribute access(write: manage) optional int8u LEDSettings = 34; attribute access(write: manage) int32u autoRelockTime = 35; - attribute access(write: manage) int8u soundVolume = 36; + attribute access(write: manage) optional int8u soundVolume = 36; attribute access(write: manage) OperatingModeEnum operatingMode = 37; readonly attribute DlSupportedOperatingModes supportedOperatingModes = 38; - readonly attribute DlDefaultConfigurationRegister defaultConfigurationRegister = 39; - attribute access(write: administer) boolean enableLocalProgramming = 40; - attribute access(write: manage) boolean enableOneTouchLocking = 41; - attribute access(write: manage) boolean enableInsideStatusLED = 42; - attribute access(write: manage) boolean enablePrivacyModeButton = 43; - attribute access(write: administer) DlLocalProgrammingFeatures localProgrammingFeatures = 44; - attribute access(write: administer) int8u wrongCodeEntryLimit = 48; - attribute access(write: administer) int8u userCodeTemporaryDisableTime = 49; - attribute access(write: administer) boolean sendPINOverTheAir = 50; - attribute access(write: administer) boolean requirePINforRemoteOperation = 51; - attribute access(write: administer) int16u expiringUserTimeout = 53; + readonly attribute optional DlDefaultConfigurationRegister defaultConfigurationRegister = 39; + attribute access(write: administer) optional boolean enableLocalProgramming = 40; + attribute access(write: manage) optional boolean enableOneTouchLocking = 41; + attribute access(write: manage) optional boolean enableInsideStatusLED = 42; + attribute access(write: manage) optional boolean enablePrivacyModeButton = 43; + attribute access(write: administer) optional DlLocalProgrammingFeatures localProgrammingFeatures = 44; + attribute access(write: administer) optional int8u wrongCodeEntryLimit = 48; + attribute access(write: administer) optional int8u userCodeTemporaryDisableTime = 49; + attribute access(write: administer) optional boolean sendPINOverTheAir = 50; + attribute access(write: administer) optional boolean requirePINforRemoteOperation = 51; + attribute access(write: administer) optional int16u expiringUserTimeout = 53; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4018,6 +4250,22 @@ server cluster DoorLock = 257 { int8u endMinute = 6; } + request struct GetWeekDayScheduleRequest { + int8u weekDayIndex = 0; + int16u userIndex = 1; + } + + response struct GetWeekDayScheduleResponse = 12 { + int8u weekDayIndex = 0; + int16u userIndex = 1; + DlStatus status = 2; + optional DaysMaskMap daysMask = 3; + optional int8u startHour = 4; + optional int8u startMinute = 5; + optional int8u endHour = 6; + optional int8u endMinute = 7; + } + request struct ClearWeekDayScheduleRequest { int8u weekDayIndex = 0; int16u userIndex = 1; @@ -4030,6 +4278,19 @@ server cluster DoorLock = 257 { epoch_s localEndTime = 3; } + request struct GetYearDayScheduleRequest { + int8u yearDayIndex = 0; + int16u userIndex = 1; + } + + response struct GetYearDayScheduleResponse = 15 { + int8u yearDayIndex = 0; + int16u userIndex = 1; + DlStatus status = 2; + optional epoch_s localStartTime = 3; + optional epoch_s localEndTime = 4; + } + request struct ClearYearDayScheduleRequest { int8u yearDayIndex = 0; int16u userIndex = 1; @@ -4042,6 +4303,18 @@ server cluster DoorLock = 257 { OperatingModeEnum operatingMode = 3; } + request struct GetHolidayScheduleRequest { + int8u holidayIndex = 0; + } + + response struct GetHolidayScheduleResponse = 18 { + int8u holidayIndex = 0; + DlStatus status = 1; + optional epoch_s localStartTime = 2; + optional epoch_s localEndTime = 3; + optional OperatingModeEnum operatingMode = 4; + } + request struct ClearHolidayScheduleRequest { int8u holidayIndex = 0; } @@ -4056,25 +4329,104 @@ server cluster DoorLock = 257 { nullable CredentialRuleEnum credentialRule = 6; } + request struct GetUserRequest { + int16u userIndex = 0; + } + + response struct GetUserResponse = 28 { + int16u userIndex = 0; + nullable char_string userName = 1; + nullable int32u userUniqueID = 2; + nullable UserStatusEnum userStatus = 3; + nullable UserTypeEnum userType = 4; + nullable CredentialRuleEnum credentialRule = 5; + nullable CredentialStruct credentials[] = 6; + nullable fabric_idx creatorFabricIndex = 7; + nullable fabric_idx lastModifiedFabricIndex = 8; + nullable int16u nextUserIndex = 9; + } + + request struct ClearUserRequest { + int16u userIndex = 0; + } + + request struct SetCredentialRequest { + DataOperationTypeEnum operationType = 0; + CredentialStruct credential = 1; + LONG_OCTET_STRING credentialData = 2; + nullable int16u userIndex = 3; + nullable UserStatusEnum userStatus = 4; + nullable UserTypeEnum userType = 5; + } + + response struct SetCredentialResponse = 35 { + DlStatus status = 0; + nullable int16u userIndex = 1; + nullable int16u nextCredentialIndex = 2; + } + + request struct GetCredentialStatusRequest { + CredentialStruct credential = 0; + } + + response struct GetCredentialStatusResponse = 37 { + boolean credentialExists = 0; + nullable int16u userIndex = 1; + nullable fabric_idx creatorFabricIndex = 2; + nullable fabric_idx lastModifiedFabricIndex = 3; + nullable int16u nextCredentialIndex = 4; + } + request struct ClearCredentialRequest { nullable CredentialStruct credential = 0; } + request struct UnboltDoorRequest { + optional octet_string PINCode = 0; + } + + /** This command causes the lock device to lock the door. */ timed command LockDoor(LockDoorRequest): DefaultSuccess = 0; + /** This command causes the lock device to unlock the door. */ timed command UnlockDoor(UnlockDoorRequest): DefaultSuccess = 1; + /** This command causes the lock device to unlock the door with a timeout parameter. */ timed command UnlockWithTimeout(UnlockWithTimeoutRequest): DefaultSuccess = 3; + /** Set a weekly repeating schedule for a specified user. */ command access(invoke: administer) SetWeekDaySchedule(SetWeekDayScheduleRequest): DefaultSuccess = 11; + /** Retrieve the specific weekly schedule for the specific user. */ + command access(invoke: administer) GetWeekDaySchedule(GetWeekDayScheduleRequest): GetWeekDayScheduleResponse = 12; + /** Clear the specific weekly schedule or all weekly schedules for the specific user. */ command access(invoke: administer) ClearWeekDaySchedule(ClearWeekDayScheduleRequest): DefaultSuccess = 13; + /** Set a time-specific schedule ID for a specified user. */ command access(invoke: administer) SetYearDaySchedule(SetYearDayScheduleRequest): DefaultSuccess = 14; + /** Returns the year day schedule data for the specified schedule and user indexes. */ + command access(invoke: administer) GetYearDaySchedule(GetYearDayScheduleRequest): GetYearDayScheduleResponse = 15; + /** Clears the specific year day schedule or all year day schedules for the specific user. */ command access(invoke: administer) ClearYearDaySchedule(ClearYearDayScheduleRequest): DefaultSuccess = 16; + /** Set the holiday Schedule by specifying local start time and local end time with respect to any Lock Operating Mode. */ command access(invoke: administer) SetHolidaySchedule(SetHolidayScheduleRequest): DefaultSuccess = 17; + /** Get the holiday schedule for the specified index. */ + command access(invoke: administer) GetHolidaySchedule(GetHolidayScheduleRequest): GetHolidayScheduleResponse = 18; + /** Clears the holiday schedule or all holiday schedules. */ command access(invoke: administer) ClearHolidaySchedule(ClearHolidayScheduleRequest): DefaultSuccess = 19; + /** Set User into the lock. */ timed command access(invoke: administer) SetUser(SetUserRequest): DefaultSuccess = 26; + /** Retrieve User. */ + command access(invoke: administer) GetUser(GetUserRequest): GetUserResponse = 27; + /** Clears a User or all Users. */ + timed command access(invoke: administer) ClearUser(ClearUserRequest): DefaultSuccess = 29; + /** Set a credential (e.g. PIN, RFID, Fingerprint, etc.) into the lock for a new user, existing user, or ProgrammingUser. */ + timed command access(invoke: administer) SetCredential(SetCredentialRequest): SetCredentialResponse = 34; + /** Retrieve the status of a particular credential (e.g. PIN, RFID, Fingerprint, etc.) by index. */ + command access(invoke: administer) GetCredentialStatus(GetCredentialStatusRequest): GetCredentialStatusResponse = 36; + /** Clear one, one type, or all credentials except ProgrammingPIN credential. */ timed command access(invoke: administer) ClearCredential(ClearCredentialRequest): DefaultSuccess = 38; + /** This command causes the lock device to unlock the door without pulling the latch. */ + timed command UnboltDoor(UnboltDoorRequest): DefaultSuccess = 39; } /** Provides an interface for controlling and adjusting automatic window coverings. */ -server cluster WindowCovering = 258 { +cluster WindowCovering = 258 { revision 5; enum EndProductType : enum8 { @@ -4166,23 +4518,27 @@ server cluster WindowCovering = 258 { } readonly attribute Type type = 0; - readonly attribute nullable int16u currentPositionLift = 3; - readonly attribute nullable int16u currentPositionTilt = 4; + readonly attribute optional int16u physicalClosedLimitLift = 1; + readonly attribute optional int16u physicalClosedLimitTilt = 2; + readonly attribute optional nullable int16u currentPositionLift = 3; + readonly attribute optional nullable int16u currentPositionTilt = 4; + readonly attribute optional int16u numberOfActuationsLift = 5; + readonly attribute optional int16u numberOfActuationsTilt = 6; readonly attribute ConfigStatus configStatus = 7; - readonly attribute nullable percent currentPositionLiftPercentage = 8; - readonly attribute nullable percent currentPositionTiltPercentage = 9; + readonly attribute optional nullable percent currentPositionLiftPercentage = 8; + readonly attribute optional nullable percent currentPositionTiltPercentage = 9; readonly attribute OperationalStatus operationalStatus = 10; - readonly attribute nullable percent100ths targetPositionLiftPercent100ths = 11; - readonly attribute nullable percent100ths targetPositionTiltPercent100ths = 12; + readonly attribute optional nullable percent100ths targetPositionLiftPercent100ths = 11; + readonly attribute optional nullable percent100ths targetPositionTiltPercent100ths = 12; readonly attribute EndProductType endProductType = 13; - readonly attribute nullable percent100ths currentPositionLiftPercent100ths = 14; - readonly attribute nullable percent100ths currentPositionTiltPercent100ths = 15; - readonly attribute int16u installedOpenLimitLift = 16; - readonly attribute int16u installedClosedLimitLift = 17; - readonly attribute int16u installedOpenLimitTilt = 18; - readonly attribute int16u installedClosedLimitTilt = 19; + readonly attribute optional nullable percent100ths currentPositionLiftPercent100ths = 14; + readonly attribute optional nullable percent100ths currentPositionTiltPercent100ths = 15; + readonly attribute optional int16u installedOpenLimitLift = 16; + readonly attribute optional int16u installedClosedLimitLift = 17; + readonly attribute optional int16u installedOpenLimitTilt = 18; + readonly attribute optional int16u installedClosedLimitTilt = 19; attribute access(write: manage) Mode mode = 23; - readonly attribute SafetyStatus safetyStatus = 26; + readonly attribute optional SafetyStatus safetyStatus = 26; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4206,17 +4562,24 @@ server cluster WindowCovering = 258 { percent100ths tiltPercent100thsValue = 0; } + /** Moves window covering to InstalledOpenLimitLift and InstalledOpenLimitTilt */ command UpOrOpen(): DefaultSuccess = 0; + /** Moves window covering to InstalledClosedLimitLift and InstalledCloseLimitTilt */ command DownOrClose(): DefaultSuccess = 1; + /** Stop any adjusting of window covering */ command StopMotion(): DefaultSuccess = 2; + /** Go to lift value specified */ command GoToLiftValue(GoToLiftValueRequest): DefaultSuccess = 4; + /** Go to lift percentage specified */ command GoToLiftPercentage(GoToLiftPercentageRequest): DefaultSuccess = 5; + /** Go to tilt value specified */ command GoToTiltValue(GoToTiltValueRequest): DefaultSuccess = 7; + /** Go to tilt percentage specified */ command GoToTiltPercentage(GoToTiltPercentageRequest): DefaultSuccess = 8; } /** An interface for configuring and controlling pumps. */ -server cluster PumpConfigurationAndControl = 512 { +cluster PumpConfigurationAndControl = 512 { revision 3; enum ControlModeEnum : enum8 { @@ -4311,26 +4674,26 @@ server cluster PumpConfigurationAndControl = 512 { readonly attribute nullable int16s maxPressure = 0; readonly attribute nullable int16u maxSpeed = 1; readonly attribute nullable int16u maxFlow = 2; - readonly attribute nullable int16s minConstPressure = 3; - readonly attribute nullable int16s maxConstPressure = 4; - readonly attribute nullable int16s minCompPressure = 5; - readonly attribute nullable int16s maxCompPressure = 6; - readonly attribute nullable int16u minConstSpeed = 7; - readonly attribute nullable int16u maxConstSpeed = 8; - readonly attribute nullable int16u minConstFlow = 9; - readonly attribute nullable int16u maxConstFlow = 10; - readonly attribute nullable int16s minConstTemp = 11; - readonly attribute nullable int16s maxConstTemp = 12; - readonly attribute PumpStatusBitmap pumpStatus = 16; + readonly attribute optional nullable int16s minConstPressure = 3; + readonly attribute optional nullable int16s maxConstPressure = 4; + readonly attribute optional nullable int16s minCompPressure = 5; + readonly attribute optional nullable int16s maxCompPressure = 6; + readonly attribute optional nullable int16u minConstSpeed = 7; + readonly attribute optional nullable int16u maxConstSpeed = 8; + readonly attribute optional nullable int16u minConstFlow = 9; + readonly attribute optional nullable int16u maxConstFlow = 10; + readonly attribute optional nullable int16s minConstTemp = 11; + readonly attribute optional nullable int16s maxConstTemp = 12; + readonly attribute optional PumpStatusBitmap pumpStatus = 16; readonly attribute OperationModeEnum effectiveOperationMode = 17; readonly attribute ControlModeEnum effectiveControlMode = 18; readonly attribute nullable int16s capacity = 19; - readonly attribute nullable int16u speed = 20; - attribute access(write: manage) nullable int24u lifetimeRunningHours = 21; - readonly attribute nullable int24u power = 22; - attribute access(write: manage) nullable int32u lifetimeEnergyConsumed = 23; + readonly attribute optional nullable int16u speed = 20; + attribute access(write: manage) optional nullable int24u lifetimeRunningHours = 21; + readonly attribute optional nullable int24u power = 22; + attribute access(write: manage) optional nullable int32u lifetimeEnergyConsumed = 23; attribute access(write: manage) OperationModeEnum operationMode = 32; - attribute access(write: manage) ControlModeEnum controlMode = 33; + attribute access(write: manage) optional ControlModeEnum controlMode = 33; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4340,7 +4703,7 @@ server cluster PumpConfigurationAndControl = 512 { } /** An interface for configuring and controlling the functionality of a thermostat. */ -client cluster Thermostat = 513 { +cluster Thermostat = 513 { revision 6; enum SetpointAdjustMode : enum8 { @@ -4499,7 +4862,7 @@ client cluster Thermostat = 513 { } /** An interface for configuring and controlling the functionality of a thermostat. */ -server cluster Thermostat = 513 { +cluster Thermostat = 513 { revision 6; enum SetpointAdjustMode : enum8 { @@ -4535,96 +4898,130 @@ server cluster Thermostat = 513 { kSleep = 9; } - bitmap DayOfWeek : bitmap8 { - kSunday = 0x1; - kMonday = 0x2; - kTuesday = 0x4; - kWednesday = 0x8; - kThursday = 0x10; - kFriday = 0x20; - kSaturday = 0x40; - kAway = 0x80; + bitmap DayOfWeek : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap Feature : bitmap32 { + kHeating = 0x1; + kCooling = 0x2; + kOccupancy = 0x4; + kScheduleConfiguration = 0x8; + kSetback = 0x10; + kAutoMode = 0x20; + kLocalTemperatureNotExposed = 0x40; + } + + bitmap ModeForSequence : bitmap8 { + kHeatSetpointPresent = 0x1; + kCoolSetpointPresent = 0x2; + } + + struct ThermostatScheduleTransition { + int16u transitionTime = 0; + nullable int16s heatSetpoint = 1; + nullable int16s coolSetpoint = 2; + } + + readonly attribute nullable int16s localTemperature = 0; + readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute optional bitmap8 occupancy = 2; + readonly attribute optional int16s absMinHeatSetpointLimit = 3; + readonly attribute optional int16s absMaxHeatSetpointLimit = 4; + readonly attribute optional int16s absMinCoolSetpointLimit = 5; + readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional int8u PICoolingDemand = 7; + readonly attribute optional int8u PIHeatingDemand = 8; + attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; + attribute access(write: manage) optional int8s localTemperatureCalibration = 16; + attribute optional int16s occupiedCoolingSetpoint = 17; + attribute optional int16s occupiedHeatingSetpoint = 18; + attribute optional int16s unoccupiedCoolingSetpoint = 19; + attribute optional int16s unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; + attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; + attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; + attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute access(write: manage) optional int8s minSetpointDeadBand = 25; + attribute access(write: manage) optional bitmap8 remoteSensing = 26; + attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; + attribute access(write: manage) enum8 systemMode = 28; + readonly attribute optional enum8 thermostatRunningMode = 30; + readonly attribute optional enum8 startOfWeek = 32; + readonly attribute optional int8u numberOfWeeklyTransitions = 33; + readonly attribute optional int8u numberOfDailyTransitions = 34; + attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; + attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; + readonly attribute optional bitmap16 thermostatRunningState = 41; + readonly attribute optional enum8 setpointChangeSource = 48; + readonly attribute optional nullable int16s setpointChangeAmount = 49; + readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; + attribute access(write: manage) optional nullable int8u occupiedSetback = 52; + readonly attribute optional nullable int8u occupiedSetbackMin = 53; + readonly attribute optional nullable int8u occupiedSetbackMax = 54; + attribute access(write: manage) optional nullable int8u unoccupiedSetback = 55; + readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; + readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; + attribute access(write: manage) optional int8u emergencyHeatDelta = 58; + attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional int16u ACCapacity = 65; + attribute access(write: manage) optional enum8 ACRefrigerantType = 66; + attribute access(write: manage) optional enum8 ACCompressorType = 67; + attribute access(write: manage) optional bitmap32 ACErrorCode = 68; + attribute access(write: manage) optional enum8 ACLouverPosition = 69; + readonly attribute optional nullable int16s ACCoilTemperature = 70; + attribute access(write: manage) optional enum8 ACCapacityformat = 71; + 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; + + request struct SetpointRaiseLowerRequest { + SetpointAdjustMode mode = 0; + int8s amount = 1; } - bitmap Feature : bitmap32 { - kHeating = 0x1; - kCooling = 0x2; - kOccupancy = 0x4; - kScheduleConfiguration = 0x8; - kSetback = 0x10; - kAutoMode = 0x20; - kLocalTemperatureNotExposed = 0x40; + response struct GetWeeklyScheduleResponse = 0 { + int8u numberOfTransitionsForSequence = 0; + DayOfWeek dayOfWeekForSequence = 1; + ModeForSequence modeForSequence = 2; + ThermostatScheduleTransition transitions[] = 3; } - bitmap ModeForSequence : bitmap8 { - kHeatSetpointPresent = 0x1; - kCoolSetpointPresent = 0x2; + request struct SetWeeklyScheduleRequest { + int8u numberOfTransitionsForSequence = 0; + DayOfWeek dayOfWeekForSequence = 1; + ModeForSequence modeForSequence = 2; + ThermostatScheduleTransition transitions[] = 3; } - struct ThermostatScheduleTransition { - int16u transitionTime = 0; - nullable int16s heatSetpoint = 1; - nullable int16s coolSetpoint = 2; + request struct GetWeeklyScheduleRequest { + DayOfWeek daysToReturn = 0; + ModeForSequence modeToReturn = 1; } - readonly attribute nullable int16s localTemperature = 0; - readonly attribute nullable int16s outdoorTemperature = 1; - readonly attribute bitmap8 occupancy = 2; - readonly attribute int16s absMinHeatSetpointLimit = 3; - readonly attribute int16s absMaxHeatSetpointLimit = 4; - readonly attribute int16s absMinCoolSetpointLimit = 5; - readonly attribute int16s absMaxCoolSetpointLimit = 6; - readonly attribute int8u PICoolingDemand = 7; - readonly attribute int8u PIHeatingDemand = 8; - attribute access(write: manage) bitmap8 HVACSystemTypeConfiguration = 9; - attribute access(write: manage) int8s localTemperatureCalibration = 16; - attribute int16s occupiedCoolingSetpoint = 17; - attribute int16s occupiedHeatingSetpoint = 18; - attribute int16s unoccupiedCoolingSetpoint = 19; - attribute int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) int16s minHeatSetpointLimit = 21; - attribute access(write: manage) int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) int16s minCoolSetpointLimit = 23; - attribute access(write: manage) int16s maxCoolSetpointLimit = 24; - attribute access(write: manage) int8s minSetpointDeadBand = 25; - attribute access(write: manage) bitmap8 remoteSensing = 26; - attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; - attribute access(write: manage) enum8 systemMode = 28; - readonly attribute enum8 thermostatRunningMode = 30; - readonly attribute enum8 startOfWeek = 32; - readonly attribute int8u numberOfWeeklyTransitions = 33; - readonly attribute int8u numberOfDailyTransitions = 34; - attribute access(write: manage) enum8 temperatureSetpointHold = 35; - attribute access(write: manage) nullable int16u temperatureSetpointHoldDuration = 36; - attribute access(write: manage) bitmap8 thermostatProgrammingOperationMode = 37; - readonly attribute bitmap16 thermostatRunningState = 41; - readonly attribute enum8 setpointChangeSource = 48; - readonly attribute nullable int16s setpointChangeAmount = 49; - readonly attribute epoch_s setpointChangeSourceTimestamp = 50; - attribute access(write: manage) nullable int8u occupiedSetback = 52; - readonly attribute nullable int8u occupiedSetbackMin = 53; - readonly attribute nullable int8u occupiedSetbackMax = 54; - attribute access(write: manage) nullable int8u unoccupiedSetback = 55; - readonly attribute nullable int8u unoccupiedSetbackMin = 56; - readonly attribute nullable int8u unoccupiedSetbackMax = 57; - attribute access(write: manage) int8u emergencyHeatDelta = 58; - attribute access(write: manage) enum8 ACType = 64; - attribute access(write: manage) int16u ACCapacity = 65; - attribute access(write: manage) enum8 ACRefrigerantType = 66; - attribute access(write: manage) enum8 ACCompressorType = 67; - attribute access(write: manage) enum8 ACLouverPosition = 69; - readonly attribute nullable int16s ACCoilTemperature = 70; - attribute access(write: manage) enum8 ACCapacityformat = 71; - 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; + /** Command description for SetpointRaiseLower */ + command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; + /** Command description for SetWeeklySchedule */ + command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; + /** Command description for GetWeeklySchedule */ + command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; + /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ + command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; } /** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */ -client cluster ThermostatUserInterfaceConfiguration = 516 { +cluster ThermostatUserInterfaceConfiguration = 516 { revision 2; enum KeypadLockoutEnum : enum8 { @@ -4658,7 +5055,7 @@ client cluster ThermostatUserInterfaceConfiguration = 516 { } /** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */ -server cluster ThermostatUserInterfaceConfiguration = 516 { +cluster ThermostatUserInterfaceConfiguration = 516 { revision 2; enum KeypadLockoutEnum : enum8 { @@ -4682,7 +5079,7 @@ server cluster ThermostatUserInterfaceConfiguration = 516 { attribute TemperatureDisplayModeEnum temperatureDisplayMode = 0; attribute access(write: manage) KeypadLockoutEnum keypadLockout = 1; - attribute access(write: manage) ScheduleProgrammingVisibilityEnum scheduleProgrammingVisibility = 2; + attribute access(write: manage) optional ScheduleProgrammingVisibilityEnum scheduleProgrammingVisibility = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4692,7 +5089,7 @@ server cluster ThermostatUserInterfaceConfiguration = 516 { } /** Attributes and commands for controlling the color properties of a color-capable light. */ -client cluster ColorControl = 768 { +cluster ColorControl = 768 { revision 6; enum ColorLoopAction : enum8 { @@ -5012,7 +5409,7 @@ client cluster ColorControl = 768 { } /** Attributes and commands for controlling the color properties of a color-capable light. */ -server cluster ColorControl = 768 { +cluster ColorControl = 768 { revision 6; enum ColorLoopAction : enum8 { @@ -5084,58 +5481,58 @@ server cluster ColorControl = 768 { kColorTemperature = 0x10; } - readonly attribute int8u currentHue = 0; - readonly attribute int8u currentSaturation = 1; - readonly attribute int16u remainingTime = 2; - readonly attribute int16u currentX = 3; - readonly attribute int16u currentY = 4; - readonly attribute enum8 driftCompensation = 5; - readonly attribute char_string<254> compensationText = 6; - readonly attribute int16u colorTemperatureMireds = 7; + readonly attribute optional int8u currentHue = 0; + readonly attribute optional int8u currentSaturation = 1; + readonly attribute optional int16u remainingTime = 2; + readonly attribute optional int16u currentX = 3; + readonly attribute optional int16u currentY = 4; + readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional char_string<254> compensationText = 6; + readonly attribute optional int16u colorTemperatureMireds = 7; readonly attribute enum8 colorMode = 8; attribute bitmap8 options = 15; readonly attribute nullable int8u numberOfPrimaries = 16; - readonly attribute int16u primary1X = 17; - readonly attribute int16u primary1Y = 18; - readonly attribute nullable int8u primary1Intensity = 19; - readonly attribute int16u primary2X = 21; - readonly attribute int16u primary2Y = 22; - readonly attribute nullable int8u primary2Intensity = 23; - readonly attribute int16u primary3X = 25; - readonly attribute int16u primary3Y = 26; - readonly attribute nullable int8u primary3Intensity = 27; - readonly attribute int16u primary4X = 32; - readonly attribute int16u primary4Y = 33; - readonly attribute nullable int8u primary4Intensity = 34; - readonly attribute int16u primary5X = 36; - readonly attribute int16u primary5Y = 37; - readonly attribute nullable int8u primary5Intensity = 38; - readonly attribute int16u primary6X = 40; - readonly attribute int16u primary6Y = 41; - readonly attribute nullable int8u primary6Intensity = 42; - attribute access(write: manage) int16u whitePointX = 48; - attribute access(write: manage) int16u whitePointY = 49; - attribute access(write: manage) int16u colorPointRX = 50; - attribute access(write: manage) int16u colorPointRY = 51; - attribute access(write: manage) nullable int8u colorPointRIntensity = 52; - attribute access(write: manage) int16u colorPointGX = 54; - attribute access(write: manage) int16u colorPointGY = 55; - attribute access(write: manage) nullable int8u colorPointGIntensity = 56; - attribute access(write: manage) int16u colorPointBX = 58; - attribute access(write: manage) int16u colorPointBY = 59; - attribute access(write: manage) nullable int8u colorPointBIntensity = 60; - readonly attribute int16u enhancedCurrentHue = 16384; + readonly attribute optional int16u primary1X = 17; + readonly attribute optional int16u primary1Y = 18; + readonly attribute optional nullable int8u primary1Intensity = 19; + readonly attribute optional int16u primary2X = 21; + readonly attribute optional int16u primary2Y = 22; + readonly attribute optional nullable int8u primary2Intensity = 23; + readonly attribute optional int16u primary3X = 25; + readonly attribute optional int16u primary3Y = 26; + readonly attribute optional nullable int8u primary3Intensity = 27; + readonly attribute optional int16u primary4X = 32; + readonly attribute optional int16u primary4Y = 33; + readonly attribute optional nullable int8u primary4Intensity = 34; + readonly attribute optional int16u primary5X = 36; + readonly attribute optional int16u primary5Y = 37; + readonly attribute optional nullable int8u primary5Intensity = 38; + readonly attribute optional int16u primary6X = 40; + readonly attribute optional int16u primary6Y = 41; + readonly attribute optional nullable int8u primary6Intensity = 42; + attribute access(write: manage) optional int16u whitePointX = 48; + attribute access(write: manage) optional int16u whitePointY = 49; + attribute access(write: manage) optional int16u colorPointRX = 50; + attribute access(write: manage) optional int16u colorPointRY = 51; + attribute access(write: manage) optional nullable int8u colorPointRIntensity = 52; + attribute access(write: manage) optional int16u colorPointGX = 54; + attribute access(write: manage) optional int16u colorPointGY = 55; + attribute access(write: manage) optional nullable int8u colorPointGIntensity = 56; + attribute access(write: manage) optional int16u colorPointBX = 58; + attribute access(write: manage) optional int16u colorPointBY = 59; + attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; + readonly attribute optional int16u enhancedCurrentHue = 16384; readonly attribute enum8 enhancedColorMode = 16385; - readonly attribute int8u colorLoopActive = 16386; - readonly attribute int8u colorLoopDirection = 16387; - readonly attribute int16u colorLoopTime = 16388; - readonly attribute int16u colorLoopStartEnhancedHue = 16389; - readonly attribute int16u colorLoopStoredEnhancedHue = 16390; + readonly attribute optional int8u colorLoopActive = 16386; + readonly attribute optional int8u colorLoopDirection = 16387; + readonly attribute optional int16u colorLoopTime = 16388; + readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; + readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; readonly attribute bitmap16 colorCapabilities = 16394; - readonly attribute int16u colorTempPhysicalMinMireds = 16395; - readonly attribute int16u colorTempPhysicalMaxMireds = 16396; - readonly attribute int16u coupleColorTempToLevelMinMireds = 16397; - attribute access(write: manage) nullable int16u startUpColorTemperatureMireds = 16400; + readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; + readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; + readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; + attribute access(write: manage) optional nullable int16u startUpColorTemperatureMireds = 16400; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5291,29 +5688,48 @@ server cluster ColorControl = 768 { bitmap8 optionsOverride = 6; } + /** Move to specified hue. */ command MoveToHue(MoveToHueRequest): DefaultSuccess = 0; + /** Move hue up or down at specified rate. */ command MoveHue(MoveHueRequest): DefaultSuccess = 1; + /** Step hue up or down by specified size at specified rate. */ command StepHue(StepHueRequest): DefaultSuccess = 2; + /** Move to specified saturation. */ command MoveToSaturation(MoveToSaturationRequest): DefaultSuccess = 3; + /** Move saturation up or down at specified rate. */ command MoveSaturation(MoveSaturationRequest): DefaultSuccess = 4; + /** Step saturation up or down by specified size at specified rate. */ command StepSaturation(StepSaturationRequest): DefaultSuccess = 5; + /** Move to hue and saturation. */ command MoveToHueAndSaturation(MoveToHueAndSaturationRequest): DefaultSuccess = 6; + /** Move to specified color. */ command MoveToColor(MoveToColorRequest): DefaultSuccess = 7; + /** Moves the color. */ command MoveColor(MoveColorRequest): DefaultSuccess = 8; + /** Steps the lighting to a specific color. */ command StepColor(StepColorRequest): DefaultSuccess = 9; + /** Move to a specific color temperature. */ command MoveToColorTemperature(MoveToColorTemperatureRequest): DefaultSuccess = 10; + /** Command description for EnhancedMoveToHue */ command EnhancedMoveToHue(EnhancedMoveToHueRequest): DefaultSuccess = 64; + /** Command description for EnhancedMoveHue */ command EnhancedMoveHue(EnhancedMoveHueRequest): DefaultSuccess = 65; + /** Command description for EnhancedStepHue */ command EnhancedStepHue(EnhancedStepHueRequest): DefaultSuccess = 66; + /** Command description for EnhancedMoveToHueAndSaturation */ command EnhancedMoveToHueAndSaturation(EnhancedMoveToHueAndSaturationRequest): DefaultSuccess = 67; + /** Command description for ColorLoopSet */ command ColorLoopSet(ColorLoopSetRequest): DefaultSuccess = 68; + /** Command description for StopMoveStep */ command StopMoveStep(StopMoveStepRequest): DefaultSuccess = 71; + /** Command description for MoveColorTemperature */ command MoveColorTemperature(MoveColorTemperatureRequest): DefaultSuccess = 75; + /** Command description for StepColorTemperature */ command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76; } /** Attributes and commands for configuring the measurement of illuminance, and reporting illuminance measurements. */ -server cluster IlluminanceMeasurement = 1024 { +cluster IlluminanceMeasurement = 1024 { revision 3; enum LightSensorTypeEnum : enum8 { @@ -5324,8 +5740,8 @@ server cluster IlluminanceMeasurement = 1024 { readonly attribute nullable int16u measuredValue = 0; readonly attribute nullable int16u minMeasuredValue = 1; readonly attribute nullable int16u maxMeasuredValue = 2; - readonly attribute int16u tolerance = 3; - readonly attribute nullable LightSensorTypeEnum lightSensorType = 4; + readonly attribute optional int16u tolerance = 3; + readonly attribute optional nullable LightSensorTypeEnum lightSensorType = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5335,7 +5751,7 @@ server cluster IlluminanceMeasurement = 1024 { } /** Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. */ -client cluster TemperatureMeasurement = 1026 { +cluster TemperatureMeasurement = 1026 { revision 1; // NOTE: Default/not specifically set readonly attribute nullable temperature measuredValue = 0; @@ -5351,13 +5767,13 @@ client cluster TemperatureMeasurement = 1026 { } /** Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. */ -server cluster TemperatureMeasurement = 1026 { +cluster TemperatureMeasurement = 1026 { revision 1; // NOTE: Default/not specifically set readonly attribute nullable temperature measuredValue = 0; readonly attribute nullable temperature minMeasuredValue = 1; readonly attribute nullable temperature maxMeasuredValue = 2; - readonly attribute int16u tolerance = 3; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5367,7 +5783,7 @@ server cluster TemperatureMeasurement = 1026 { } /** Attributes and commands for configuring the measurement of pressure, and reporting pressure measurements. */ -server cluster PressureMeasurement = 1027 { +cluster PressureMeasurement = 1027 { revision 3; bitmap Feature : bitmap32 { @@ -5377,12 +5793,12 @@ server cluster PressureMeasurement = 1027 { readonly attribute nullable int16s measuredValue = 0; readonly attribute nullable int16s minMeasuredValue = 1; readonly attribute nullable int16s maxMeasuredValue = 2; - readonly attribute int16u tolerance = 3; - readonly attribute nullable int16s scaledValue = 16; - readonly attribute nullable int16s minScaledValue = 17; - readonly attribute nullable int16s maxScaledValue = 18; - readonly attribute int16u scaledTolerance = 19; - readonly attribute int8s scale = 20; + readonly attribute optional int16u tolerance = 3; + readonly attribute optional nullable int16s scaledValue = 16; + readonly attribute optional nullable int16s minScaledValue = 17; + readonly attribute optional nullable int16s maxScaledValue = 18; + readonly attribute optional int16u scaledTolerance = 19; + readonly attribute optional int8s scale = 20; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5392,13 +5808,13 @@ server cluster PressureMeasurement = 1027 { } /** Attributes and commands for configuring the measurement of flow, and reporting flow measurements. */ -server cluster FlowMeasurement = 1028 { +cluster FlowMeasurement = 1028 { revision 1; // NOTE: Default/not specifically set readonly attribute nullable int16u measuredValue = 0; readonly attribute nullable int16u minMeasuredValue = 1; readonly attribute nullable int16u maxMeasuredValue = 2; - readonly attribute int16u tolerance = 3; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5408,7 +5824,7 @@ server cluster FlowMeasurement = 1028 { } /** Attributes and commands for configuring the measurement of relative humidity, and reporting relative humidity measurements. */ -client cluster RelativeHumidityMeasurement = 1029 { +cluster RelativeHumidityMeasurement = 1029 { revision 3; readonly attribute nullable int16u measuredValue = 0; @@ -5424,13 +5840,13 @@ client cluster RelativeHumidityMeasurement = 1029 { } /** Attributes and commands for configuring the measurement of relative humidity, and reporting relative humidity measurements. */ -server cluster RelativeHumidityMeasurement = 1029 { +cluster RelativeHumidityMeasurement = 1029 { revision 3; readonly attribute nullable int16u measuredValue = 0; readonly attribute nullable int16u minMeasuredValue = 1; readonly attribute nullable int16u maxMeasuredValue = 2; - readonly attribute int16u tolerance = 3; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5440,7 +5856,7 @@ server cluster RelativeHumidityMeasurement = 1029 { } /** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ -server cluster OccupancySensing = 1030 { +cluster OccupancySensing = 1030 { revision 3; enum OccupancySensorTypeEnum : enum8 { @@ -5463,15 +5879,15 @@ server cluster OccupancySensing = 1030 { readonly attribute OccupancyBitmap occupancy = 0; readonly attribute OccupancySensorTypeEnum occupancySensorType = 1; readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2; - attribute access(write: manage) int16u PIROccupiedToUnoccupiedDelay = 16; - attribute access(write: manage) int16u PIRUnoccupiedToOccupiedDelay = 17; - attribute access(write: manage) int8u PIRUnoccupiedToOccupiedThreshold = 18; - attribute access(write: manage) int16u ultrasonicOccupiedToUnoccupiedDelay = 32; - attribute access(write: manage) int16u ultrasonicUnoccupiedToOccupiedDelay = 33; - attribute access(write: manage) int8u ultrasonicUnoccupiedToOccupiedThreshold = 34; - attribute access(write: manage) int16u physicalContactOccupiedToUnoccupiedDelay = 48; - attribute access(write: manage) int16u physicalContactUnoccupiedToOccupiedDelay = 49; - attribute access(write: manage) int8u physicalContactUnoccupiedToOccupiedThreshold = 50; + attribute access(write: manage) optional int16u PIROccupiedToUnoccupiedDelay = 16; + attribute access(write: manage) optional int16u PIRUnoccupiedToOccupiedDelay = 17; + attribute access(write: manage) optional int8u PIRUnoccupiedToOccupiedThreshold = 18; + attribute access(write: manage) optional int16u ultrasonicOccupiedToUnoccupiedDelay = 32; + attribute access(write: manage) optional int16u ultrasonicUnoccupiedToOccupiedDelay = 33; + attribute access(write: manage) optional int8u ultrasonicUnoccupiedToOccupiedThreshold = 34; + attribute access(write: manage) optional int16u physicalContactOccupiedToUnoccupiedDelay = 48; + attribute access(write: manage) optional int16u physicalContactUnoccupiedToOccupiedDelay = 49; + attribute access(write: manage) optional int8u physicalContactUnoccupiedToOccupiedThreshold = 50; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5481,7 +5897,7 @@ server cluster OccupancySensing = 1030 { } /** This cluster provides an interface for controlling the current Channel on a device. */ -client cluster Channel = 1284 { +cluster Channel = 1284 { revision 1; // NOTE: Default/not specifically set enum LineupInfoTypeEnum : enum8 { @@ -5551,7 +5967,7 @@ client cluster Channel = 1284 { } /** This cluster provides an interface for controlling the current Channel on a device. */ -server cluster Channel = 1284 { +cluster Channel = 1284 { revision 1; // NOTE: Default/not specifically set enum LineupInfoTypeEnum : enum8 { @@ -5584,9 +6000,9 @@ server cluster Channel = 1284 { LineupInfoTypeEnum lineupInfoType = 3; } - readonly attribute ChannelInfoStruct channelList[] = 0; - readonly attribute nullable LineupInfoStruct lineup = 1; - readonly attribute nullable ChannelInfoStruct currentChannel = 2; + readonly attribute optional ChannelInfoStruct channelList[] = 0; + readonly attribute optional nullable LineupInfoStruct lineup = 1; + readonly attribute optional nullable ChannelInfoStruct currentChannel = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5598,6 +6014,11 @@ server cluster Channel = 1284 { char_string match = 0; } + response struct ChangeChannelResponse = 1 { + StatusEnum status = 0; + optional char_string data = 1; + } + request struct ChangeChannelByNumberRequest { int16u majorNumber = 0; int16u minorNumber = 1; @@ -5607,13 +6028,16 @@ server cluster Channel = 1284 { int16s count = 0; } + /** Change the channel on the media player to the channel case-insensitive exact matching the value passed as an argument. */ command ChangeChannel(ChangeChannelRequest): ChangeChannelResponse = 0; + /** Change the channel on the media plaeyer to the channel with the given Number in the ChannelList attribute. */ command ChangeChannelByNumber(ChangeChannelByNumberRequest): DefaultSuccess = 2; + /** This command provides channel up and channel down functionality, but allows channel index jumps of size Count. When the value of the increase or decrease is larger than the number of channels remaining in the given direction, then the behavior SHALL be to return to the beginning (or end) of the channel list and continue. For example, if the current channel is at index 0 and count value of -1 is given, then the current channel should change to the last channel. */ command SkipChannel(SkipChannelRequest): DefaultSuccess = 3; } /** This cluster provides an interface for UX navigation within a set of targets on a device or endpoint. */ -client cluster TargetNavigator = 1285 { +cluster TargetNavigator = 1285 { revision 1; // NOTE: Default/not specifically set enum StatusEnum : enum8 { @@ -5651,7 +6075,7 @@ client cluster TargetNavigator = 1285 { } /** This cluster provides an interface for UX navigation within a set of targets on a device or endpoint. */ -server cluster TargetNavigator = 1285 { +cluster TargetNavigator = 1285 { revision 1; // NOTE: Default/not specifically set enum StatusEnum : enum8 { @@ -5666,17 +6090,30 @@ server cluster TargetNavigator = 1285 { } readonly attribute TargetInfoStruct targetList[] = 0; - readonly attribute int8u currentTarget = 1; + readonly attribute optional int8u currentTarget = 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; + + request struct NavigateTargetRequest { + int8u target = 0; + optional char_string data = 1; + } + + response struct NavigateTargetResponse = 1 { + StatusEnum status = 0; + optional char_string data = 1; + } + + /** Upon receipt, this SHALL navigation the UX to the target identified. */ + command NavigateTarget(NavigateTargetRequest): NavigateTargetResponse = 0; } /** This cluster provides an interface for controlling Media Playback (PLAY, PAUSE, etc) on a media device such as a TV or Speaker. */ -client cluster MediaPlayback = 1286 { +cluster MediaPlayback = 1286 { revision 1; // NOTE: Default/not specifically set enum PlaybackStateEnum : enum8 { @@ -5761,7 +6198,7 @@ client cluster MediaPlayback = 1286 { } /** This cluster provides an interface for controlling Media Playback (PLAY, PAUSE, etc) on a media device such as a TV or Speaker. */ -server cluster MediaPlayback = 1286 { +cluster MediaPlayback = 1286 { revision 1; // NOTE: Default/not specifically set enum PlaybackStateEnum : enum8 { @@ -5791,12 +6228,12 @@ server cluster MediaPlayback = 1286 { } readonly attribute PlaybackStateEnum currentState = 0; - readonly attribute nullable epoch_us startTime = 1; - readonly attribute nullable int64u duration = 2; - readonly attribute nullable PlaybackPositionStruct sampledPosition = 3; - readonly attribute single playbackSpeed = 4; - readonly attribute nullable int64u seekRangeEnd = 5; - readonly attribute nullable int64u seekRangeStart = 6; + readonly attribute optional nullable epoch_us startTime = 1; + readonly attribute optional nullable int64u duration = 2; + readonly attribute optional nullable PlaybackPositionStruct sampledPosition = 3; + readonly attribute optional single playbackSpeed = 4; + readonly attribute optional nullable int64u seekRangeEnd = 5; + readonly attribute optional nullable int64u seekRangeStart = 6; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5812,30 +6249,41 @@ server cluster MediaPlayback = 1286 { int64u deltaPositionMilliseconds = 0; } - request struct SeekRequest { - int64u position = 0; - } - response struct PlaybackResponse = 10 { StatusEnum status = 0; optional char_string data = 1; } + request struct SeekRequest { + int64u position = 0; + } + + /** Upon receipt, this SHALL play media. */ command Play(): PlaybackResponse = 0; + /** Upon receipt, this SHALL pause media. */ command Pause(): PlaybackResponse = 1; + /** Upon receipt, this SHALL stop media. User experience is context-specific. This will often navigate the user back to the location where media was originally launched. */ command Stop(): PlaybackResponse = 2; + /** Upon receipt, this SHALL Start Over with the current media playback item. */ command StartOver(): PlaybackResponse = 3; + /** Upon receipt, this SHALL cause the handler to be invoked for "Previous". User experience is context-specific. This will often Go back to the previous media playback item. */ command Previous(): PlaybackResponse = 4; + /** Upon receipt, this SHALL cause the handler to be invoked for "Next". User experience is context-specific. This will often Go forward to the next media playback item. */ command Next(): PlaybackResponse = 5; + /** Upon receipt, this SHALL Rewind through media. Different Rewind speeds can be used on the TV based upon the number of sequential calls to this function. This is to avoid needing to define every speed now (multiple fast, slow motion, etc). */ command Rewind(): PlaybackResponse = 6; + /** Upon receipt, this SHALL Advance through media. Different FF speeds can be used on the TV based upon the number of sequential calls to this function. This is to avoid needing to define every speed now (multiple fast, slow motion, etc). */ command FastForward(): PlaybackResponse = 7; + /** Upon receipt, this SHALL Skip forward in the media by the given number of seconds, using the data as follows: */ command SkipForward(SkipForwardRequest): PlaybackResponse = 8; + /** Upon receipt, this SHALL Skip backward in the media by the given number of seconds, using the data as follows: */ command SkipBackward(SkipBackwardRequest): PlaybackResponse = 9; + /** Upon receipt, this SHALL Skip backward in the media by the given number of seconds, using the data as follows: */ command Seek(SeekRequest): PlaybackResponse = 11; } /** This cluster provides an interface for controlling the Input Selector on a media device such as a TV. */ -client cluster MediaInput = 1287 { +cluster MediaInput = 1287 { revision 1; // NOTE: Default/not specifically set enum InputTypeEnum : enum8 { @@ -5893,7 +6341,7 @@ client cluster MediaInput = 1287 { } /** This cluster provides an interface for controlling the Input Selector on a media device such as a TV. */ -server cluster MediaInput = 1287 { +cluster MediaInput = 1287 { revision 1; // NOTE: Default/not specifically set enum InputTypeEnum : enum8 { @@ -5940,14 +6388,18 @@ server cluster MediaInput = 1287 { char_string name = 1; } + /** Upon receipt, this SHALL change the input on the media device to the input at a specific index in the Input List. */ command SelectInput(SelectInputRequest): DefaultSuccess = 0; + /** Upon receipt, this SHALL display the active status of the input list on screen. */ command ShowInputStatus(): DefaultSuccess = 1; + /** Upon receipt, this SHALL hide the input list from the screen. */ command HideInputStatus(): DefaultSuccess = 2; + /** Upon receipt, this SHALL rename the input at a specific index in the Input List. Updates to the input name SHALL appear in the TV settings menus. */ command access(invoke: manage) RenameInput(RenameInputRequest): DefaultSuccess = 3; } /** This cluster provides an interface for managing low power mode on a device. */ -client cluster LowPower = 1288 { +cluster LowPower = 1288 { revision 1; // NOTE: Default/not specifically set readonly attribute command_id generatedCommandList[] = 65528; @@ -5962,7 +6414,7 @@ client cluster LowPower = 1288 { } /** This cluster provides an interface for controlling a device like a TV using action commands such as UP, DOWN, and SELECT. */ -client cluster KeypadInput = 1289 { +cluster KeypadInput = 1289 { revision 1; // NOTE: Default/not specifically set enum CECKeyCodeEnum : enum8 { @@ -6086,7 +6538,7 @@ client cluster KeypadInput = 1289 { } /** This cluster provides an interface for controlling a device like a TV using action commands such as UP, DOWN, and SELECT. */ -server cluster KeypadInput = 1289 { +cluster KeypadInput = 1289 { revision 1; // NOTE: Default/not specifically set enum CECKeyCodeEnum : enum8 { @@ -6196,10 +6648,21 @@ server cluster KeypadInput = 1289 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + request struct SendKeyRequest { + CECKeyCodeEnum keyCode = 0; + } + + response struct SendKeyResponse = 1 { + StatusEnum status = 0; + } + + /** Upon receipt, this SHALL process a keycode as input to the media device. */ + command SendKey(SendKeyRequest): SendKeyResponse = 0; } /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ -client cluster ContentLauncher = 1290 { +cluster ContentLauncher = 1290 { revision 1; // NOTE: Default/not specifically set enum MetricTypeEnum : enum8 { @@ -6309,7 +6772,7 @@ client cluster ContentLauncher = 1290 { } /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ -server cluster ContentLauncher = 1290 { +cluster ContentLauncher = 1290 { revision 1; // NOTE: Default/not specifically set enum MetricTypeEnum : enum8 { @@ -6386,8 +6849,8 @@ server cluster ContentLauncher = 1290 { optional StyleInformationStruct waterMark = 5; } - readonly attribute char_string acceptHeader[] = 0; - readonly attribute SupportedProtocolsBitmap supportedStreamingProtocols = 1; + readonly attribute optional char_string acceptHeader[] = 0; + readonly attribute optional SupportedProtocolsBitmap supportedStreamingProtocols = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -6412,12 +6875,14 @@ server cluster ContentLauncher = 1290 { optional char_string data = 1; } + /** Upon receipt, this SHALL launch the specified content with optional search criteria. */ command LaunchContent(LaunchContentRequest): LauncherResponse = 0; + /** Upon receipt, this SHALL launch content from the specified URL. */ command LaunchURL(LaunchURLRequest): LauncherResponse = 1; } /** This cluster provides an interface for controlling the Output on a media device such as a TV. */ -client cluster AudioOutput = 1291 { +cluster AudioOutput = 1291 { revision 1; // NOTE: Default/not specifically set enum OutputTypeEnum : enum8 { @@ -6464,7 +6929,7 @@ client cluster AudioOutput = 1291 { } /** This cluster provides an interface for controlling the Output on a media device such as a TV. */ -server cluster AudioOutput = 1291 { +cluster AudioOutput = 1291 { revision 1; // NOTE: Default/not specifically set enum OutputTypeEnum : enum8 { @@ -6504,12 +6969,14 @@ server cluster AudioOutput = 1291 { char_string name = 1; } + /** Upon receipt, this SHALL change the output on the media device to the output at a specific index in the Output List. */ command SelectOutput(SelectOutputRequest): DefaultSuccess = 0; + /** Upon receipt, this SHALL rename the output at a specific index in the Output List. Updates to the output name SHALL appear in the TV settings menus. */ command access(invoke: manage) RenameOutput(RenameOutputRequest): DefaultSuccess = 1; } /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ -client cluster ApplicationLauncher = 1292 { +cluster ApplicationLauncher = 1292 { revision 1; // NOTE: Default/not specifically set enum StatusEnum : enum8 { @@ -6568,7 +7035,7 @@ client cluster ApplicationLauncher = 1292 { } /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ -server cluster ApplicationLauncher = 1292 { +cluster ApplicationLauncher = 1292 { revision 1; // NOTE: Default/not specifically set enum StatusEnum : enum8 { @@ -6591,18 +7058,43 @@ server cluster ApplicationLauncher = 1292 { optional endpoint_no endpoint = 1; } - readonly attribute int16u catalogList[] = 0; - readonly attribute nullable ApplicationEPStruct currentApp = 1; + readonly attribute optional int16u catalogList[] = 0; + readonly attribute optional nullable ApplicationEPStruct currentApp = 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; + + request struct LaunchAppRequest { + optional ApplicationStruct application = 0; + optional octet_string data = 1; + } + + request struct StopAppRequest { + optional ApplicationStruct application = 0; + } + + request struct HideAppRequest { + optional ApplicationStruct application = 0; + } + + response struct LauncherResponse = 3 { + StatusEnum status = 0; + optional octet_string data = 1; + } + + /** Upon receipt, this SHALL launch the specified app with optional data. The TV Device SHALL launch and bring to foreground the identified application in the command if the application is not already launched and in foreground. The TV Device SHALL update state attribute on the Application Basic cluster of the Endpoint corresponding to the launched application. This command returns a Launch Response. */ + command LaunchApp(LaunchAppRequest): LauncherResponse = 0; + /** Upon receipt on a Video Player endpoint this SHALL stop the specified application if it is running. */ + command StopApp(StopAppRequest): LauncherResponse = 1; + /** Upon receipt on a Video Player endpoint this SHALL hide the specified application if it is running and visible. */ + command HideApp(HideAppRequest): LauncherResponse = 2; } /** This cluster provides information about an application running on a TV or media player device which is represented as an endpoint. */ -client cluster ApplicationBasic = 1293 { +cluster ApplicationBasic = 1293 { revision 1; // NOTE: Default/not specifically set enum ApplicationStatusEnum : enum8 { @@ -6634,7 +7126,7 @@ client cluster ApplicationBasic = 1293 { } /** This cluster provides information about an application running on a TV or media player device which is represented as an endpoint. */ -server cluster ApplicationBasic = 1293 { +cluster ApplicationBasic = 1293 { revision 1; // NOTE: Default/not specifically set enum ApplicationStatusEnum : enum8 { @@ -6649,10 +7141,10 @@ server cluster ApplicationBasic = 1293 { char_string applicationID = 1; } - readonly attribute char_string<32> vendorName = 0; - readonly attribute vendor_id vendorID = 1; + readonly attribute optional char_string<32> vendorName = 0; + readonly attribute optional vendor_id vendorID = 1; readonly attribute long_char_string<256> applicationName = 2; - readonly attribute int16u productID = 3; + readonly attribute optional int16u productID = 3; readonly attribute ApplicationStruct application = 4; readonly attribute ApplicationStatusEnum status = 5; readonly attribute char_string<32> applicationVersion = 6; @@ -6666,7 +7158,7 @@ server cluster ApplicationBasic = 1293 { } /** This cluster provides commands that facilitate user account login on a Content App or a node. For example, a Content App running on a Video Player device, which is represented as an endpoint (see [TV Architecture]), can use this cluster to help make the user account on the Content App match the user account on the Client. */ -client cluster AccountLogin = 1294 { +cluster AccountLogin = 1294 { revision 1; // NOTE: Default/not specifically set readonly attribute command_id generatedCommandList[] = 65528; @@ -6698,7 +7190,7 @@ client cluster AccountLogin = 1294 { } /** This cluster provides commands that facilitate user account login on a Content App or a node. For example, a Content App running on a Video Player device, which is represented as an endpoint (see [TV Architecture]), can use this cluster to help make the user account on the Content App match the user account on the Client. */ -server cluster AccountLogin = 1294 { +cluster AccountLogin = 1294 { revision 1; // NOTE: Default/not specifically set readonly attribute command_id generatedCommandList[] = 65528; @@ -6712,17 +7204,20 @@ server cluster AccountLogin = 1294 { char_string<100> tempAccountIdentifier = 0; } + response struct GetSetupPINResponse = 1 { + char_string setupPIN = 0; + } + request struct LoginRequest { char_string<100> tempAccountIdentifier = 0; char_string setupPIN = 1; } - response struct GetSetupPINResponse = 1 { - char_string setupPIN = 0; - } - + /** Upon receipt, the Content App checks if the account associated with the client Temp Account Identifier Rotating ID is the same acount that is active on the given Content App. If the accounts are the same, then the Content App includes the Setup PIN in the GetSetupPIN Response. */ fabric timed command access(invoke: administer) GetSetupPIN(GetSetupPINRequest): GetSetupPINResponse = 0; + /** Upon receipt, the Content App checks if the account associated with the client’s Temp Account Identifier (Rotating ID) has a current active Setup PIN with the given value. If the Setup PIN is valid for the user account associated with the Temp Account Identifier, then the Content App MAY make that user account active. */ fabric timed command access(invoke: administer) Login(LoginRequest): DefaultSuccess = 2; + /** The purpose of this command is to instruct the Content App to clear the current user account. This command SHOULD be used by clients of a Content App to indicate the end of a user session. */ fabric timed command Logout(): DefaultSuccess = 3; } diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index d7b0e66b4c88f9..e5995a4b6b07bc 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -client cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -52,7 +52,7 @@ client cluster Identify = 3 { } /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -95,12 +95,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -124,54 +126,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** Attributes and commands for scene configuration and manipulation. */ -provisional server cluster Scenes = 5 { +provisional cluster Scenes = 5 { revision 5; bitmap CopyModeBitmap : bitmap8 { @@ -208,7 +216,12 @@ provisional server cluster Scenes = 5 { fabric_idx fabricIndex = 254; } + readonly attribute optional int8u sceneCount = 0; + readonly attribute optional int8u currentScene = 1; + readonly attribute optional group_id currentGroup = 2; + readonly attribute optional boolean sceneValid = 3; readonly attribute NameSupportBitmap nameSupport = 4; + readonly attribute optional nullable node_id lastConfiguredBy = 5; readonly attribute int16u sceneTableSize = 6; readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; readonly attribute command_id generatedCommandList[] = 65528; @@ -226,25 +239,57 @@ provisional server cluster Scenes = 5 { ExtensionFieldSet extensionFieldSets[] = 4; } + response struct AddSceneResponse = 0 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + request struct ViewSceneRequest { group_id groupID = 0; int8u sceneID = 1; } + response struct ViewSceneResponse = 1 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + request struct RemoveSceneRequest { group_id groupID = 0; int8u sceneID = 1; } + response struct RemoveSceneResponse = 2 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + request struct RemoveAllScenesRequest { group_id groupID = 0; } + response struct RemoveAllScenesResponse = 3 { + status status = 0; + group_id groupID = 1; + } + request struct StoreSceneRequest { group_id groupID = 0; int8u sceneID = 1; } + response struct StoreSceneResponse = 4 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + request struct RecallSceneRequest { group_id groupID = 0; int8u sceneID = 1; @@ -255,56 +300,79 @@ provisional server cluster Scenes = 5 { group_id groupID = 0; } - response struct AddSceneResponse = 0 { + response struct GetSceneMembershipResponse = 6 { status status = 0; - group_id groupID = 1; - int8u sceneID = 2; + nullable int8u capacity = 1; + group_id groupID = 2; + optional int8u sceneList[] = 3; } - response struct ViewSceneResponse = 1 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - optional int16u transitionTime = 3; - optional char_string sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; + request struct EnhancedAddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int16u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; } - response struct RemoveSceneResponse = 2 { + response struct EnhancedAddSceneResponse = 64 { status status = 0; group_id groupID = 1; int8u sceneID = 2; } - response struct RemoveAllScenesResponse = 3 { - status status = 0; - group_id groupID = 1; + request struct EnhancedViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; } - response struct StoreSceneResponse = 4 { + response struct EnhancedViewSceneResponse = 65 { status status = 0; group_id groupID = 1; int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; } - response struct GetSceneMembershipResponse = 6 { + request struct CopySceneRequest { + CopyModeBitmap mode = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + group_id groupIdentifierTo = 3; + int8u sceneIdentifierTo = 4; + } + + response struct CopySceneResponse = 66 { status status = 0; - nullable int8u capacity = 1; - group_id groupID = 2; - optional int8u sceneList[] = 3; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; } + /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; + /** Retrieves the requested scene entry from its Scene table. */ fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; + /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ + fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; + /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ + fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; + /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ + fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -client cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -376,7 +444,7 @@ client cluster OnOff = 6 { } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -411,10 +479,10 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; - readonly attribute boolean globalSceneControl = 16384; - attribute int16u onTime = 16385; - attribute int16u offWaitTime = 16386; - attribute access(write: manage) nullable StartUpOnOffEnum startUpOnOff = 16387; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -433,16 +501,22 @@ server cluster OnOff = 6 { int16u offWaitTime = 2; } + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ -client cluster LevelControl = 8 { +cluster LevelControl = 8 { revision 5; enum MoveModeEnum : enum8 { @@ -567,7 +641,7 @@ client cluster LevelControl = 8 { } /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ -server cluster LevelControl = 8 { +cluster LevelControl = 8 { revision 5; enum MoveModeEnum : enum8 { @@ -592,17 +666,19 @@ server cluster LevelControl = 8 { } readonly attribute nullable int8u currentLevel = 0; - readonly attribute int16u remainingTime = 1; - readonly attribute int8u minLevel = 2; - readonly attribute int8u maxLevel = 3; - readonly attribute int16u minFrequency = 5; - readonly attribute int16u maxFrequency = 6; + readonly attribute optional int16u remainingTime = 1; + readonly attribute optional int8u minLevel = 2; + readonly attribute optional int8u maxLevel = 3; + readonly attribute optional int16u currentFrequency = 4; + readonly attribute optional int16u minFrequency = 5; + readonly attribute optional int16u maxFrequency = 6; attribute OptionsBitmap options = 15; - attribute int16u onOffTransitionTime = 16; + attribute optional int16u onOffTransitionTime = 16; attribute nullable int8u onLevel = 17; - attribute nullable int16u onTransitionTime = 18; - attribute nullable int16u offTransitionTime = 19; - attribute access(write: manage) nullable int8u startUpCurrentLevel = 16384; + attribute optional nullable int16u onTransitionTime = 18; + attribute optional nullable int16u offTransitionTime = 19; + attribute optional nullable int8u defaultMoveRate = 20; + attribute access(write: manage) optional nullable int8u startUpCurrentLevel = 16384; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -664,18 +740,33 @@ server cluster LevelControl = 8 { OptionsBitmap optionsOverride = 1; } + request struct MoveToClosestFrequencyRequest { + int16u frequency = 0; + } + + /** Command description for MoveToLevel */ command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + /** Command description for Move */ command Move(MoveRequest): DefaultSuccess = 1; + /** Command description for Step */ command Step(StepRequest): DefaultSuccess = 2; + /** Command description for Stop */ command Stop(StopRequest): DefaultSuccess = 3; + /** Command description for MoveToLevelWithOnOff */ command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + /** Command description for MoveWithOnOff */ command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + /** Command description for StepWithOnOff */ command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + /** Command description for StopWithOnOff */ command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; + /** Change the currrent frequency to the provided one, or a close + approximation if the exact provided one is not possible. */ + command MoveToClosestFrequency(MoveToClosestFrequencyRequest): DefaultSuccess = 8; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -698,6 +789,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -710,7 +802,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -769,7 +861,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -782,7 +874,7 @@ server cluster AccessControl = 31 { } /** This cluster provides a standardized way for a Node (typically a Bridge, but could be any Node) to expose action information. */ -server cluster Actions = 37 { +cluster Actions = 37 { revision 1; // NOTE: Default/not specifically set enum ActionErrorEnum : enum8 { @@ -859,19 +951,109 @@ server cluster Actions = 37 { readonly attribute ActionStruct actionList[] = 0; readonly attribute EndpointListStruct endpointLists[] = 1; - readonly attribute long_char_string<512> setupURL = 2; + readonly attribute optional long_char_string<512> setupURL = 2; 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; + + request struct InstantActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct InstantActionWithTransitionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + int16u transitionTime = 2; + } + + request struct StartActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct StartActionWithDurationRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + int32u duration = 2; + } + + request struct StopActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct PauseActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct PauseActionWithDurationRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + int32u duration = 2; + } + + request struct ResumeActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct EnableActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct EnableActionWithDurationRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + int32u duration = 2; + } + + request struct DisableActionRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + } + + request struct DisableActionWithDurationRequest { + int16u actionID = 0; + optional int32u invokeID = 1; + int32u duration = 2; + } + + /** This command triggers an action (state change) on the involved endpoints. */ + command InstantAction(InstantActionRequest): DefaultSuccess = 0; + /** This command triggers an action (state change) on the involved endpoints, with a specified time to transition from the current state to the new state. */ + command InstantActionWithTransition(InstantActionWithTransitionRequest): DefaultSuccess = 1; + /** This command triggers the commencement of an action on the involved endpoints. */ + command StartAction(StartActionRequest): DefaultSuccess = 2; + /** This command triggers the commencement of an action (with a duration) on the involved endpoints. */ + command StartActionWithDuration(StartActionWithDurationRequest): DefaultSuccess = 3; + /** This command stops the ongoing action on the involved endpoints. */ + command StopAction(StopActionRequest): DefaultSuccess = 4; + /** This command pauses an ongoing action. */ + command PauseAction(PauseActionRequest): DefaultSuccess = 5; + /** This command pauses an ongoing action with a duration. */ + command PauseActionWithDuration(PauseActionWithDurationRequest): DefaultSuccess = 6; + /** This command resumes a previously paused action. */ + command ResumeAction(ResumeActionRequest): DefaultSuccess = 7; + /** This command enables a certain action or automation. */ + command EnableAction(EnableActionRequest): DefaultSuccess = 8; + /** This command enables a certain action or automation with a duration. */ + command EnableActionWithDuration(EnableActionWithDurationRequest): DefaultSuccess = 9; + /** This command disables a certain action or automation. */ + command DisableAction(DisableActionRequest): DefaultSuccess = 10; + /** This command disables a certain action or automation with a duration. */ + command DisableActionWithDuration(DisableActionWithDurationRequest): DefaultSuccess = 11; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -943,28 +1125,33 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute boolean reachable = 17; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; + readonly attribute int32u specificationVersion = 21; + readonly attribute int16u maxPathsPerInvoke = 22; 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; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Nodes should be expected to be deployed to any and all regions of the world. These global regions may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -981,7 +1168,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -1009,8 +1196,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1023,7 +1210,7 @@ server cluster TimeFormatLocalization = 44 { may have differing preferences for the units in which values are conveyed in communication to a user. As such, Nodes that visually or audibly convey measurable values to the user need a mechanism by which they can be configured to use a user’s preferred unit. */ -server cluster UnitLocalization = 45 { +cluster UnitLocalization = 45 { revision 1; enum TempUnitEnum : enum8 { @@ -1036,7 +1223,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute access(write: manage) TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) optional TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1046,7 +1233,7 @@ server cluster UnitLocalization = 45 { } /** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ -server cluster PowerSource = 47 { +cluster PowerSource = 47 { revision 1; // NOTE: Default/not specifically set enum BatApprovedChemistryEnum : enum16 { @@ -1267,34 +1454,34 @@ server cluster PowerSource = 47 { readonly attribute PowerSourceStatusEnum status = 0; readonly attribute int8u order = 1; readonly attribute char_string<60> description = 2; - readonly attribute nullable int32u wiredAssessedInputVoltage = 3; - readonly attribute nullable int16u wiredAssessedInputFrequency = 4; - readonly attribute WiredCurrentTypeEnum wiredCurrentType = 5; - readonly attribute nullable int32u wiredAssessedCurrent = 6; - readonly attribute int32u wiredNominalVoltage = 7; - readonly attribute int32u wiredMaximumCurrent = 8; - readonly attribute boolean wiredPresent = 9; - readonly attribute WiredFaultEnum activeWiredFaults[] = 10; - readonly attribute nullable int32u batVoltage = 11; - readonly attribute nullable int8u batPercentRemaining = 12; - readonly attribute nullable int32u batTimeRemaining = 13; - readonly attribute BatChargeLevelEnum batChargeLevel = 14; - readonly attribute boolean batReplacementNeeded = 15; - readonly attribute BatReplaceabilityEnum batReplaceability = 16; - readonly attribute boolean batPresent = 17; - readonly attribute BatFaultEnum activeBatFaults[] = 18; - readonly attribute char_string<60> batReplacementDescription = 19; - readonly attribute BatCommonDesignationEnum batCommonDesignation = 20; - readonly attribute char_string<20> batANSIDesignation = 21; - readonly attribute char_string<20> batIECDesignation = 22; - readonly attribute BatApprovedChemistryEnum batApprovedChemistry = 23; - readonly attribute int32u batCapacity = 24; - readonly attribute int8u batQuantity = 25; - readonly attribute BatChargeStateEnum batChargeState = 26; - readonly attribute nullable int32u batTimeToFullCharge = 27; - readonly attribute boolean batFunctionalWhileCharging = 28; - readonly attribute nullable int32u batChargingCurrent = 29; - readonly attribute BatChargeFaultEnum activeBatChargeFaults[] = 30; + readonly attribute optional nullable int32u wiredAssessedInputVoltage = 3; + readonly attribute optional nullable int16u wiredAssessedInputFrequency = 4; + readonly attribute optional WiredCurrentTypeEnum wiredCurrentType = 5; + readonly attribute optional nullable int32u wiredAssessedCurrent = 6; + readonly attribute optional int32u wiredNominalVoltage = 7; + readonly attribute optional int32u wiredMaximumCurrent = 8; + readonly attribute optional boolean wiredPresent = 9; + readonly attribute optional WiredFaultEnum activeWiredFaults[] = 10; + readonly attribute optional nullable int32u batVoltage = 11; + readonly attribute optional nullable int8u batPercentRemaining = 12; + readonly attribute optional nullable int32u batTimeRemaining = 13; + readonly attribute optional BatChargeLevelEnum batChargeLevel = 14; + readonly attribute optional boolean batReplacementNeeded = 15; + readonly attribute optional BatReplaceabilityEnum batReplaceability = 16; + readonly attribute optional boolean batPresent = 17; + readonly attribute optional BatFaultEnum activeBatFaults[] = 18; + readonly attribute optional char_string<60> batReplacementDescription = 19; + readonly attribute optional BatCommonDesignationEnum batCommonDesignation = 20; + readonly attribute optional char_string<20> batANSIDesignation = 21; + readonly attribute optional char_string<20> batIECDesignation = 22; + readonly attribute optional BatApprovedChemistryEnum batApprovedChemistry = 23; + readonly attribute optional int32u batCapacity = 24; + readonly attribute optional int8u batQuantity = 25; + readonly attribute optional BatChargeStateEnum batChargeState = 26; + readonly attribute optional nullable int32u batTimeToFullCharge = 27; + readonly attribute optional boolean batFunctionalWhileCharging = 28; + readonly attribute optional nullable int32u batChargingCurrent = 29; + readonly attribute optional BatChargeFaultEnum activeBatChargeFaults[] = 30; readonly attribute endpoint_no endpointList[] = 31; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1305,7 +1492,7 @@ server cluster PowerSource = 47 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -client cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -1374,7 +1561,7 @@ client cluster GeneralCommissioning = 48 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -1413,17 +1600,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -1434,13 +1621,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -1521,12 +1711,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1539,6 +1732,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -1558,48 +1758,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -1683,12 +1894,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1707,12 +1918,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -1733,10 +1946,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1744,11 +1957,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ -client cluster ThreadNetworkDiagnostics = 53 { +cluster ThreadNetworkDiagnostics = 53 { revision 1; // NOTE: Default/not specifically set enum ConnectionStatusEnum : enum8 { @@ -1914,7 +2128,7 @@ client cluster ThreadNetworkDiagnostics = 53 { } /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ -server cluster ThreadNetworkDiagnostics = 53 { +cluster ThreadNetworkDiagnostics = 53 { revision 1; // NOTE: Default/not specifically set enum ConnectionStatusEnum : enum8 { @@ -2011,7 +2225,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u panId = 3; readonly attribute nullable int64u extendedPanId = 4; readonly attribute nullable octet_string<17> meshLocalPrefix = 5; - readonly attribute int64u overrunCount = 6; + readonly attribute optional int64u overrunCount = 6; readonly attribute NeighborTableStruct neighborTable[] = 7; readonly attribute RouteTableStruct routeTable[] = 8; readonly attribute nullable int32u partitionId = 9; @@ -2019,79 +2233,80 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u dataVersion = 11; readonly attribute nullable int16u stableDataVersion = 12; readonly attribute nullable int8u leaderRouterId = 13; - readonly attribute int16u detachedRoleCount = 14; - readonly attribute int16u childRoleCount = 15; - readonly attribute int16u routerRoleCount = 16; - readonly attribute int16u leaderRoleCount = 17; - readonly attribute int16u attachAttemptCount = 18; - readonly attribute int16u partitionIdChangeCount = 19; - readonly attribute int16u betterPartitionAttachAttemptCount = 20; - readonly attribute int16u parentChangeCount = 21; - readonly attribute int32u txTotalCount = 22; - readonly attribute int32u txUnicastCount = 23; - readonly attribute int32u txBroadcastCount = 24; - readonly attribute int32u txAckRequestedCount = 25; - readonly attribute int32u txAckedCount = 26; - readonly attribute int32u txNoAckRequestedCount = 27; - readonly attribute int32u txDataCount = 28; - readonly attribute int32u txDataPollCount = 29; - readonly attribute int32u txBeaconCount = 30; - readonly attribute int32u txBeaconRequestCount = 31; - readonly attribute int32u txOtherCount = 32; - readonly attribute int32u txRetryCount = 33; - readonly attribute int32u txDirectMaxRetryExpiryCount = 34; - readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; - readonly attribute int32u txErrCcaCount = 36; - readonly attribute int32u txErrAbortCount = 37; - readonly attribute int32u txErrBusyChannelCount = 38; - readonly attribute int32u rxTotalCount = 39; - readonly attribute int32u rxUnicastCount = 40; - readonly attribute int32u rxBroadcastCount = 41; - readonly attribute int32u rxDataCount = 42; - readonly attribute int32u rxDataPollCount = 43; - readonly attribute int32u rxBeaconCount = 44; - readonly attribute int32u rxBeaconRequestCount = 45; - readonly attribute int32u rxOtherCount = 46; - readonly attribute int32u rxAddressFilteredCount = 47; - readonly attribute int32u rxDestAddrFilteredCount = 48; - readonly attribute int32u rxDuplicatedCount = 49; - readonly attribute int32u rxErrNoFrameCount = 50; - readonly attribute int32u rxErrUnknownNeighborCount = 51; - readonly attribute int32u rxErrInvalidSrcAddrCount = 52; - readonly attribute int32u rxErrSecCount = 53; - readonly attribute int32u rxErrFcsCount = 54; - readonly attribute int32u rxErrOtherCount = 55; - readonly attribute nullable int64u activeTimestamp = 56; - readonly attribute nullable int64u pendingTimestamp = 57; - readonly attribute nullable int32u delay = 58; - readonly attribute nullable SecurityPolicy securityPolicy = 59; - readonly attribute nullable octet_string<4> channelPage0Mask = 60; - readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; - readonly attribute NetworkFaultEnum activeNetworkFaultsList[] = 62; - 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; - - command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; -} - -/** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster WiFiNetworkDiagnostics = 54 { - revision 1; // NOTE: Default/not specifically set - - enum AssociationFailureCauseEnum : enum8 { - kUnknown = 0; - kAssociationFailed = 1; - kAuthenticationFailed = 2; - kSsidNotFound = 3; - } - - enum ConnectionStatusEnum : enum8 { - kConnected = 0; - kNotConnected = 1; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; + readonly attribute nullable SecurityPolicy securityPolicy = 59; + readonly attribute nullable octet_string<4> channelPage0Mask = 60; + readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; + readonly attribute NetworkFaultEnum activeNetworkFaultsList[] = 62; + 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; + + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ + command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; +} + +/** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster WiFiNetworkDiagnostics = 54 { + revision 1; // NOTE: Default/not specifically set + + enum AssociationFailureCauseEnum : enum8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum ConnectionStatusEnum : enum8 { + kConnected = 0; + kNotConnected = 1; } enum SecurityTypeEnum : enum8 { @@ -2136,14 +2351,14 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; - readonly attribute nullable int32u beaconLostCount = 5; - readonly attribute nullable int32u beaconRxCount = 6; - readonly attribute nullable int32u packetMulticastRxCount = 7; - readonly attribute nullable int32u packetMulticastTxCount = 8; - readonly attribute nullable int32u packetUnicastRxCount = 9; - readonly attribute nullable int32u packetUnicastTxCount = 10; - readonly attribute nullable int64u currentMaxRate = 11; - readonly attribute nullable int64u overrunCount = 12; + readonly attribute optional nullable int32u beaconLostCount = 5; + readonly attribute optional nullable int32u beaconRxCount = 6; + readonly attribute optional nullable int32u packetMulticastRxCount = 7; + readonly attribute optional nullable int32u packetMulticastTxCount = 8; + readonly attribute optional nullable int32u packetUnicastRxCount = 9; + readonly attribute optional nullable int32u packetUnicastTxCount = 10; + readonly attribute optional nullable int64u currentMaxRate = 11; + readonly attribute optional nullable int64u overrunCount = 12; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2151,11 +2366,12 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 */ command ResetCounts(): DefaultSuccess = 0; } /** The Ethernet Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster EthernetNetworkDiagnostics = 55 { +cluster EthernetNetworkDiagnostics = 55 { revision 1; // NOTE: Default/not specifically set enum PHYRateEnum : enum8 { @@ -2176,15 +2392,15 @@ server cluster EthernetNetworkDiagnostics = 55 { kErrorCounts = 0x2; } - readonly attribute nullable PHYRateEnum PHYRate = 0; - readonly attribute nullable boolean fullDuplex = 1; - readonly attribute int64u packetRxCount = 2; - readonly attribute int64u packetTxCount = 3; - readonly attribute int64u txErrCount = 4; - readonly attribute int64u collisionCount = 5; - readonly attribute int64u overrunCount = 6; - readonly attribute nullable boolean carrierDetect = 7; - readonly attribute int64u timeSinceReset = 8; + readonly attribute optional nullable PHYRateEnum PHYRate = 0; + readonly attribute optional nullable boolean fullDuplex = 1; + readonly attribute optional int64u packetRxCount = 2; + readonly attribute optional int64u packetTxCount = 3; + readonly attribute optional int64u txErrCount = 4; + readonly attribute optional int64u collisionCount = 5; + readonly attribute optional int64u overrunCount = 6; + readonly attribute optional nullable boolean carrierDetect = 7; + readonly attribute optional int64u timeSinceReset = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2192,6 +2408,7 @@ server cluster EthernetNetworkDiagnostics = 55 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the attributes: PacketRxCount, PacketTxCount, TxErrCount, CollisionCount, OverrunCount to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } @@ -2199,7 +2416,7 @@ server cluster EthernetNetworkDiagnostics = 55 { the Endpoint where it is placed (and its Parts) is bridged from a non-CHIP technology; and provide a centralized collection of attributes that the Node MAY collect to aid in conveying information regarding the Bridged Device to a user, such as the vendor name, the model name, or user-assigned name. */ -server cluster BridgedDeviceBasicInformation = 57 { +cluster BridgedDeviceBasicInformation = 57 { revision 3; enum ColorEnum : enum8 { @@ -2254,22 +2471,22 @@ server cluster BridgedDeviceBasicInformation = 57 { boolean reachableNewValue = 0; } - readonly attribute char_string<32> vendorName = 1; - readonly attribute vendor_id vendorID = 2; - readonly attribute char_string<32> productName = 3; - attribute char_string<32> nodeLabel = 5; - readonly attribute int16u hardwareVersion = 7; - readonly attribute char_string<64> hardwareVersionString = 8; - readonly attribute int32u softwareVersion = 9; - readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; + readonly attribute optional char_string<32> vendorName = 1; + readonly attribute optional vendor_id vendorID = 2; + readonly attribute optional char_string<32> productName = 3; + attribute optional char_string<32> nodeLabel = 5; + readonly attribute optional int16u hardwareVersion = 7; + readonly attribute optional char_string<64> hardwareVersionString = 8; + readonly attribute optional int32u softwareVersion = 9; + readonly attribute optional char_string<64> softwareVersionString = 10; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; readonly attribute boolean reachable = 17; - readonly attribute char_string<32> uniqueID = 18; - readonly attribute ProductAppearanceStruct productAppearance = 20; + readonly attribute optional char_string<32> uniqueID = 18; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2281,7 +2498,7 @@ server cluster BridgedDeviceBasicInformation = 57 { /** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -client cluster Switch = 59 { +cluster Switch = 59 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -2336,7 +2553,7 @@ client cluster Switch = 59 { /** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { +cluster Switch = 59 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -2379,7 +2596,7 @@ server cluster Switch = 59 { readonly attribute int8u numberOfPositions = 0; readonly attribute int8u currentPosition = 1; - readonly attribute int8u multiPressMax = 2; + readonly attribute optional int8u multiPressMax = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2389,7 +2606,7 @@ server cluster Switch = 59 { } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -2430,13 +2647,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -client cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -2562,7 +2782,7 @@ client cluster OperationalCredentials = 62 { } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -2615,15 +2835,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -2637,6 +2871,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -2649,38 +2889,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -2735,27 +2963,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -client cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -2774,7 +3006,7 @@ client cluster FixedLabel = 64 { /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -2792,7 +3024,7 @@ server cluster FixedLabel = 64 { } /** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ -server cluster UserLabel = 65 { +cluster UserLabel = 65 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -2810,7 +3042,7 @@ server cluster UserLabel = 65 { } /** This cluster provides an interface to a boolean state called StateValue. */ -server cluster BooleanState = 69 { +cluster BooleanState = 69 { revision 1; info event StateChange = 0 { @@ -2827,7 +3059,7 @@ server cluster BooleanState = 69 { } /** Attributes and commands for selecting a mode from a list of supported options. */ -client cluster ModeSelect = 80 { +cluster ModeSelect = 80 { revision 2; bitmap Feature : bitmap32 { @@ -2867,7 +3099,7 @@ client cluster ModeSelect = 80 { } /** Attributes and commands for selecting a mode from a list of supported options. */ -server cluster ModeSelect = 80 { +cluster ModeSelect = 80 { revision 2; bitmap Feature : bitmap32 { @@ -2889,7 +3121,8 @@ server cluster ModeSelect = 80 { readonly attribute nullable enum16 standardNamespace = 1; readonly attribute ModeOptionStruct supportedModes[] = 2; readonly attribute int8u currentMode = 3; - attribute nullable int8u startUpMode = 4; + attribute optional nullable int8u startUpMode = 4; + attribute optional nullable int8u onMode = 5; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2901,11 +3134,12 @@ server cluster ModeSelect = 80 { int8u newMode = 0; } + /** On receipt of this command, if the NewMode field matches the Mode field in an entry of the SupportedModes list, the server SHALL set the CurrentMode attribute to the NewMode value, otherwise, the server SHALL respond with an INVALID_COMMAND status response. */ command ChangeToMode(ChangeToModeRequest): DefaultSuccess = 0; } /** An interface to a generic way to secure a door */ -client cluster DoorLock = 257 { +cluster DoorLock = 257 { revision 7; enum AlarmCodeEnum : enum8 { @@ -3527,7 +3761,7 @@ client cluster DoorLock = 257 { } /** An interface to a generic way to secure a door */ -server cluster DoorLock = 257 { +cluster DoorLock = 257 { revision 7; enum AlarmCodeEnum : enum8 { @@ -3910,39 +4144,39 @@ server cluster DoorLock = 257 { readonly attribute nullable DlLockState lockState = 0; readonly attribute DlLockType lockType = 1; readonly attribute boolean actuatorEnabled = 2; - readonly attribute nullable DoorStateEnum doorState = 3; - attribute access(write: manage) int32u doorOpenEvents = 4; - attribute access(write: manage) int32u doorClosedEvents = 5; - attribute access(write: manage) int16u openPeriod = 6; - readonly attribute int16u numberOfTotalUsersSupported = 17; - readonly attribute int16u numberOfPINUsersSupported = 18; - readonly attribute int16u numberOfRFIDUsersSupported = 19; - readonly attribute int8u numberOfWeekDaySchedulesSupportedPerUser = 20; - readonly attribute int8u numberOfYearDaySchedulesSupportedPerUser = 21; - readonly attribute int8u numberOfHolidaySchedulesSupported = 22; - readonly attribute int8u maxPINCodeLength = 23; - readonly attribute int8u minPINCodeLength = 24; - readonly attribute int8u maxRFIDCodeLength = 25; - readonly attribute int8u minRFIDCodeLength = 26; - readonly attribute DlCredentialRuleMask credentialRulesSupport = 27; - readonly attribute int8u numberOfCredentialsSupportedPerUser = 28; - attribute access(write: manage) char_string<3> language = 33; - attribute access(write: manage) int8u LEDSettings = 34; + readonly attribute optional nullable DoorStateEnum doorState = 3; + attribute access(write: manage) optional int32u doorOpenEvents = 4; + attribute access(write: manage) optional int32u doorClosedEvents = 5; + attribute access(write: manage) optional int16u openPeriod = 6; + readonly attribute optional int16u numberOfTotalUsersSupported = 17; + readonly attribute optional int16u numberOfPINUsersSupported = 18; + readonly attribute optional int16u numberOfRFIDUsersSupported = 19; + readonly attribute optional int8u numberOfWeekDaySchedulesSupportedPerUser = 20; + readonly attribute optional int8u numberOfYearDaySchedulesSupportedPerUser = 21; + readonly attribute optional int8u numberOfHolidaySchedulesSupported = 22; + readonly attribute optional int8u maxPINCodeLength = 23; + readonly attribute optional int8u minPINCodeLength = 24; + readonly attribute optional int8u maxRFIDCodeLength = 25; + readonly attribute optional int8u minRFIDCodeLength = 26; + readonly attribute optional DlCredentialRuleMask credentialRulesSupport = 27; + readonly attribute optional int8u numberOfCredentialsSupportedPerUser = 28; + attribute access(write: manage) optional char_string<3> language = 33; + attribute access(write: manage) optional int8u LEDSettings = 34; attribute access(write: manage) int32u autoRelockTime = 35; - attribute access(write: manage) int8u soundVolume = 36; + attribute access(write: manage) optional int8u soundVolume = 36; attribute access(write: manage) OperatingModeEnum operatingMode = 37; readonly attribute DlSupportedOperatingModes supportedOperatingModes = 38; - readonly attribute DlDefaultConfigurationRegister defaultConfigurationRegister = 39; - attribute access(write: administer) boolean enableLocalProgramming = 40; - attribute access(write: manage) boolean enableOneTouchLocking = 41; - attribute access(write: manage) boolean enableInsideStatusLED = 42; - attribute access(write: manage) boolean enablePrivacyModeButton = 43; - attribute access(write: administer) DlLocalProgrammingFeatures localProgrammingFeatures = 44; - attribute access(write: administer) int8u wrongCodeEntryLimit = 48; - attribute access(write: administer) int8u userCodeTemporaryDisableTime = 49; - attribute access(write: administer) boolean sendPINOverTheAir = 50; - attribute access(write: administer) boolean requirePINforRemoteOperation = 51; - attribute access(write: administer) int16u expiringUserTimeout = 53; + readonly attribute optional DlDefaultConfigurationRegister defaultConfigurationRegister = 39; + attribute access(write: administer) optional boolean enableLocalProgramming = 40; + attribute access(write: manage) optional boolean enableOneTouchLocking = 41; + attribute access(write: manage) optional boolean enableInsideStatusLED = 42; + attribute access(write: manage) optional boolean enablePrivacyModeButton = 43; + attribute access(write: administer) optional DlLocalProgrammingFeatures localProgrammingFeatures = 44; + attribute access(write: administer) optional int8u wrongCodeEntryLimit = 48; + attribute access(write: administer) optional int8u userCodeTemporaryDisableTime = 49; + attribute access(write: administer) optional boolean sendPINOverTheAir = 50; + attribute access(write: administer) optional boolean requirePINforRemoteOperation = 51; + attribute access(write: administer) optional int16u expiringUserTimeout = 53; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3973,6 +4207,22 @@ server cluster DoorLock = 257 { int8u endMinute = 6; } + request struct GetWeekDayScheduleRequest { + int8u weekDayIndex = 0; + int16u userIndex = 1; + } + + response struct GetWeekDayScheduleResponse = 12 { + int8u weekDayIndex = 0; + int16u userIndex = 1; + DlStatus status = 2; + optional DaysMaskMap daysMask = 3; + optional int8u startHour = 4; + optional int8u startMinute = 5; + optional int8u endHour = 6; + optional int8u endMinute = 7; + } + request struct ClearWeekDayScheduleRequest { int8u weekDayIndex = 0; int16u userIndex = 1; @@ -3985,6 +4235,19 @@ server cluster DoorLock = 257 { epoch_s localEndTime = 3; } + request struct GetYearDayScheduleRequest { + int8u yearDayIndex = 0; + int16u userIndex = 1; + } + + response struct GetYearDayScheduleResponse = 15 { + int8u yearDayIndex = 0; + int16u userIndex = 1; + DlStatus status = 2; + optional epoch_s localStartTime = 3; + optional epoch_s localEndTime = 4; + } + request struct ClearYearDayScheduleRequest { int8u yearDayIndex = 0; int16u userIndex = 1; @@ -3997,6 +4260,18 @@ server cluster DoorLock = 257 { OperatingModeEnum operatingMode = 3; } + request struct GetHolidayScheduleRequest { + int8u holidayIndex = 0; + } + + response struct GetHolidayScheduleResponse = 18 { + int8u holidayIndex = 0; + DlStatus status = 1; + optional epoch_s localStartTime = 2; + optional epoch_s localEndTime = 3; + optional OperatingModeEnum operatingMode = 4; + } + request struct ClearHolidayScheduleRequest { int8u holidayIndex = 0; } @@ -4011,25 +4286,104 @@ server cluster DoorLock = 257 { nullable CredentialRuleEnum credentialRule = 6; } + request struct GetUserRequest { + int16u userIndex = 0; + } + + response struct GetUserResponse = 28 { + int16u userIndex = 0; + nullable char_string userName = 1; + nullable int32u userUniqueID = 2; + nullable UserStatusEnum userStatus = 3; + nullable UserTypeEnum userType = 4; + nullable CredentialRuleEnum credentialRule = 5; + nullable CredentialStruct credentials[] = 6; + nullable fabric_idx creatorFabricIndex = 7; + nullable fabric_idx lastModifiedFabricIndex = 8; + nullable int16u nextUserIndex = 9; + } + + request struct ClearUserRequest { + int16u userIndex = 0; + } + + request struct SetCredentialRequest { + DataOperationTypeEnum operationType = 0; + CredentialStruct credential = 1; + LONG_OCTET_STRING credentialData = 2; + nullable int16u userIndex = 3; + nullable UserStatusEnum userStatus = 4; + nullable UserTypeEnum userType = 5; + } + + response struct SetCredentialResponse = 35 { + DlStatus status = 0; + nullable int16u userIndex = 1; + nullable int16u nextCredentialIndex = 2; + } + + request struct GetCredentialStatusRequest { + CredentialStruct credential = 0; + } + + response struct GetCredentialStatusResponse = 37 { + boolean credentialExists = 0; + nullable int16u userIndex = 1; + nullable fabric_idx creatorFabricIndex = 2; + nullable fabric_idx lastModifiedFabricIndex = 3; + nullable int16u nextCredentialIndex = 4; + } + request struct ClearCredentialRequest { nullable CredentialStruct credential = 0; } + request struct UnboltDoorRequest { + optional octet_string PINCode = 0; + } + + /** This command causes the lock device to lock the door. */ timed command LockDoor(LockDoorRequest): DefaultSuccess = 0; + /** This command causes the lock device to unlock the door. */ timed command UnlockDoor(UnlockDoorRequest): DefaultSuccess = 1; + /** This command causes the lock device to unlock the door with a timeout parameter. */ timed command UnlockWithTimeout(UnlockWithTimeoutRequest): DefaultSuccess = 3; + /** Set a weekly repeating schedule for a specified user. */ command access(invoke: administer) SetWeekDaySchedule(SetWeekDayScheduleRequest): DefaultSuccess = 11; + /** Retrieve the specific weekly schedule for the specific user. */ + command access(invoke: administer) GetWeekDaySchedule(GetWeekDayScheduleRequest): GetWeekDayScheduleResponse = 12; + /** Clear the specific weekly schedule or all weekly schedules for the specific user. */ command access(invoke: administer) ClearWeekDaySchedule(ClearWeekDayScheduleRequest): DefaultSuccess = 13; + /** Set a time-specific schedule ID for a specified user. */ command access(invoke: administer) SetYearDaySchedule(SetYearDayScheduleRequest): DefaultSuccess = 14; + /** Returns the year day schedule data for the specified schedule and user indexes. */ + command access(invoke: administer) GetYearDaySchedule(GetYearDayScheduleRequest): GetYearDayScheduleResponse = 15; + /** Clears the specific year day schedule or all year day schedules for the specific user. */ command access(invoke: administer) ClearYearDaySchedule(ClearYearDayScheduleRequest): DefaultSuccess = 16; + /** Set the holiday Schedule by specifying local start time and local end time with respect to any Lock Operating Mode. */ command access(invoke: administer) SetHolidaySchedule(SetHolidayScheduleRequest): DefaultSuccess = 17; + /** Get the holiday schedule for the specified index. */ + command access(invoke: administer) GetHolidaySchedule(GetHolidayScheduleRequest): GetHolidayScheduleResponse = 18; + /** Clears the holiday schedule or all holiday schedules. */ command access(invoke: administer) ClearHolidaySchedule(ClearHolidayScheduleRequest): DefaultSuccess = 19; + /** Set User into the lock. */ timed command access(invoke: administer) SetUser(SetUserRequest): DefaultSuccess = 26; + /** Retrieve User. */ + command access(invoke: administer) GetUser(GetUserRequest): GetUserResponse = 27; + /** Clears a User or all Users. */ + timed command access(invoke: administer) ClearUser(ClearUserRequest): DefaultSuccess = 29; + /** Set a credential (e.g. PIN, RFID, Fingerprint, etc.) into the lock for a new user, existing user, or ProgrammingUser. */ + timed command access(invoke: administer) SetCredential(SetCredentialRequest): SetCredentialResponse = 34; + /** Retrieve the status of a particular credential (e.g. PIN, RFID, Fingerprint, etc.) by index. */ + command access(invoke: administer) GetCredentialStatus(GetCredentialStatusRequest): GetCredentialStatusResponse = 36; + /** Clear one, one type, or all credentials except ProgrammingPIN credential. */ timed command access(invoke: administer) ClearCredential(ClearCredentialRequest): DefaultSuccess = 38; + /** This command causes the lock device to unlock the door without pulling the latch. */ + timed command UnboltDoor(UnboltDoorRequest): DefaultSuccess = 39; } /** Provides an interface for controlling and adjusting automatic window coverings. */ -server cluster WindowCovering = 258 { +cluster WindowCovering = 258 { revision 5; enum EndProductType : enum8 { @@ -4121,23 +4475,27 @@ server cluster WindowCovering = 258 { } readonly attribute Type type = 0; - readonly attribute nullable int16u currentPositionLift = 3; - readonly attribute nullable int16u currentPositionTilt = 4; + readonly attribute optional int16u physicalClosedLimitLift = 1; + readonly attribute optional int16u physicalClosedLimitTilt = 2; + readonly attribute optional nullable int16u currentPositionLift = 3; + readonly attribute optional nullable int16u currentPositionTilt = 4; + readonly attribute optional int16u numberOfActuationsLift = 5; + readonly attribute optional int16u numberOfActuationsTilt = 6; readonly attribute ConfigStatus configStatus = 7; - readonly attribute nullable percent currentPositionLiftPercentage = 8; - readonly attribute nullable percent currentPositionTiltPercentage = 9; + readonly attribute optional nullable percent currentPositionLiftPercentage = 8; + readonly attribute optional nullable percent currentPositionTiltPercentage = 9; readonly attribute OperationalStatus operationalStatus = 10; - readonly attribute nullable percent100ths targetPositionLiftPercent100ths = 11; - readonly attribute nullable percent100ths targetPositionTiltPercent100ths = 12; + readonly attribute optional nullable percent100ths targetPositionLiftPercent100ths = 11; + readonly attribute optional nullable percent100ths targetPositionTiltPercent100ths = 12; readonly attribute EndProductType endProductType = 13; - readonly attribute nullable percent100ths currentPositionLiftPercent100ths = 14; - readonly attribute nullable percent100ths currentPositionTiltPercent100ths = 15; - readonly attribute int16u installedOpenLimitLift = 16; - readonly attribute int16u installedClosedLimitLift = 17; - readonly attribute int16u installedOpenLimitTilt = 18; - readonly attribute int16u installedClosedLimitTilt = 19; + readonly attribute optional nullable percent100ths currentPositionLiftPercent100ths = 14; + readonly attribute optional nullable percent100ths currentPositionTiltPercent100ths = 15; + readonly attribute optional int16u installedOpenLimitLift = 16; + readonly attribute optional int16u installedClosedLimitLift = 17; + readonly attribute optional int16u installedOpenLimitTilt = 18; + readonly attribute optional int16u installedClosedLimitTilt = 19; attribute access(write: manage) Mode mode = 23; - readonly attribute SafetyStatus safetyStatus = 26; + readonly attribute optional SafetyStatus safetyStatus = 26; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4161,17 +4519,24 @@ server cluster WindowCovering = 258 { percent100ths tiltPercent100thsValue = 0; } + /** Moves window covering to InstalledOpenLimitLift and InstalledOpenLimitTilt */ command UpOrOpen(): DefaultSuccess = 0; + /** Moves window covering to InstalledClosedLimitLift and InstalledCloseLimitTilt */ command DownOrClose(): DefaultSuccess = 1; + /** Stop any adjusting of window covering */ command StopMotion(): DefaultSuccess = 2; + /** Go to lift value specified */ command GoToLiftValue(GoToLiftValueRequest): DefaultSuccess = 4; + /** Go to lift percentage specified */ command GoToLiftPercentage(GoToLiftPercentageRequest): DefaultSuccess = 5; + /** Go to tilt value specified */ command GoToTiltValue(GoToTiltValueRequest): DefaultSuccess = 7; + /** Go to tilt percentage specified */ command GoToTiltPercentage(GoToTiltPercentageRequest): DefaultSuccess = 8; } /** An interface for configuring and controlling pumps. */ -server cluster PumpConfigurationAndControl = 512 { +cluster PumpConfigurationAndControl = 512 { revision 3; enum ControlModeEnum : enum8 { @@ -4266,26 +4631,26 @@ server cluster PumpConfigurationAndControl = 512 { readonly attribute nullable int16s maxPressure = 0; readonly attribute nullable int16u maxSpeed = 1; readonly attribute nullable int16u maxFlow = 2; - readonly attribute nullable int16s minConstPressure = 3; - readonly attribute nullable int16s maxConstPressure = 4; - readonly attribute nullable int16s minCompPressure = 5; - readonly attribute nullable int16s maxCompPressure = 6; - readonly attribute nullable int16u minConstSpeed = 7; - readonly attribute nullable int16u maxConstSpeed = 8; - readonly attribute nullable int16u minConstFlow = 9; - readonly attribute nullable int16u maxConstFlow = 10; - readonly attribute nullable int16s minConstTemp = 11; - readonly attribute nullable int16s maxConstTemp = 12; - readonly attribute PumpStatusBitmap pumpStatus = 16; + readonly attribute optional nullable int16s minConstPressure = 3; + readonly attribute optional nullable int16s maxConstPressure = 4; + readonly attribute optional nullable int16s minCompPressure = 5; + readonly attribute optional nullable int16s maxCompPressure = 6; + readonly attribute optional nullable int16u minConstSpeed = 7; + readonly attribute optional nullable int16u maxConstSpeed = 8; + readonly attribute optional nullable int16u minConstFlow = 9; + readonly attribute optional nullable int16u maxConstFlow = 10; + readonly attribute optional nullable int16s minConstTemp = 11; + readonly attribute optional nullable int16s maxConstTemp = 12; + readonly attribute optional PumpStatusBitmap pumpStatus = 16; readonly attribute OperationModeEnum effectiveOperationMode = 17; readonly attribute ControlModeEnum effectiveControlMode = 18; readonly attribute nullable int16s capacity = 19; - readonly attribute nullable int16u speed = 20; - attribute access(write: manage) nullable int24u lifetimeRunningHours = 21; - readonly attribute nullable int24u power = 22; - attribute access(write: manage) nullable int32u lifetimeEnergyConsumed = 23; + readonly attribute optional nullable int16u speed = 20; + attribute access(write: manage) optional nullable int24u lifetimeRunningHours = 21; + readonly attribute optional nullable int24u power = 22; + attribute access(write: manage) optional nullable int32u lifetimeEnergyConsumed = 23; attribute access(write: manage) OperationModeEnum operationMode = 32; - attribute access(write: manage) ControlModeEnum controlMode = 33; + attribute access(write: manage) optional ControlModeEnum controlMode = 33; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4295,7 +4660,7 @@ server cluster PumpConfigurationAndControl = 512 { } /** An interface for configuring and controlling the functionality of a thermostat. */ -client cluster Thermostat = 513 { +cluster Thermostat = 513 { revision 6; enum SetpointAdjustMode : enum8 { @@ -4454,7 +4819,7 @@ client cluster Thermostat = 513 { } /** An interface for configuring and controlling the functionality of a thermostat. */ -server cluster Thermostat = 513 { +cluster Thermostat = 513 { revision 6; enum SetpointAdjustMode : enum8 { @@ -4490,96 +4855,130 @@ server cluster Thermostat = 513 { kSleep = 9; } - bitmap DayOfWeek : bitmap8 { - kSunday = 0x1; - kMonday = 0x2; - kTuesday = 0x4; - kWednesday = 0x8; - kThursday = 0x10; - kFriday = 0x20; - kSaturday = 0x40; - kAway = 0x80; + bitmap DayOfWeek : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap Feature : bitmap32 { + kHeating = 0x1; + kCooling = 0x2; + kOccupancy = 0x4; + kScheduleConfiguration = 0x8; + kSetback = 0x10; + kAutoMode = 0x20; + kLocalTemperatureNotExposed = 0x40; + } + + bitmap ModeForSequence : bitmap8 { + kHeatSetpointPresent = 0x1; + kCoolSetpointPresent = 0x2; + } + + struct ThermostatScheduleTransition { + int16u transitionTime = 0; + nullable int16s heatSetpoint = 1; + nullable int16s coolSetpoint = 2; + } + + readonly attribute nullable int16s localTemperature = 0; + readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute optional bitmap8 occupancy = 2; + readonly attribute optional int16s absMinHeatSetpointLimit = 3; + readonly attribute optional int16s absMaxHeatSetpointLimit = 4; + readonly attribute optional int16s absMinCoolSetpointLimit = 5; + readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional int8u PICoolingDemand = 7; + readonly attribute optional int8u PIHeatingDemand = 8; + attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; + attribute access(write: manage) optional int8s localTemperatureCalibration = 16; + attribute optional int16s occupiedCoolingSetpoint = 17; + attribute optional int16s occupiedHeatingSetpoint = 18; + attribute optional int16s unoccupiedCoolingSetpoint = 19; + attribute optional int16s unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; + attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; + attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; + attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute access(write: manage) optional int8s minSetpointDeadBand = 25; + attribute access(write: manage) optional bitmap8 remoteSensing = 26; + attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; + attribute access(write: manage) enum8 systemMode = 28; + readonly attribute optional enum8 thermostatRunningMode = 30; + readonly attribute optional enum8 startOfWeek = 32; + readonly attribute optional int8u numberOfWeeklyTransitions = 33; + readonly attribute optional int8u numberOfDailyTransitions = 34; + attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; + attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; + readonly attribute optional bitmap16 thermostatRunningState = 41; + readonly attribute optional enum8 setpointChangeSource = 48; + readonly attribute optional nullable int16s setpointChangeAmount = 49; + readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; + attribute access(write: manage) optional nullable int8u occupiedSetback = 52; + readonly attribute optional nullable int8u occupiedSetbackMin = 53; + readonly attribute optional nullable int8u occupiedSetbackMax = 54; + attribute access(write: manage) optional nullable int8u unoccupiedSetback = 55; + readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; + readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; + attribute access(write: manage) optional int8u emergencyHeatDelta = 58; + attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional int16u ACCapacity = 65; + attribute access(write: manage) optional enum8 ACRefrigerantType = 66; + attribute access(write: manage) optional enum8 ACCompressorType = 67; + attribute access(write: manage) optional bitmap32 ACErrorCode = 68; + attribute access(write: manage) optional enum8 ACLouverPosition = 69; + readonly attribute optional nullable int16s ACCoilTemperature = 70; + attribute access(write: manage) optional enum8 ACCapacityformat = 71; + 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; + + request struct SetpointRaiseLowerRequest { + SetpointAdjustMode mode = 0; + int8s amount = 1; } - bitmap Feature : bitmap32 { - kHeating = 0x1; - kCooling = 0x2; - kOccupancy = 0x4; - kScheduleConfiguration = 0x8; - kSetback = 0x10; - kAutoMode = 0x20; - kLocalTemperatureNotExposed = 0x40; + response struct GetWeeklyScheduleResponse = 0 { + int8u numberOfTransitionsForSequence = 0; + DayOfWeek dayOfWeekForSequence = 1; + ModeForSequence modeForSequence = 2; + ThermostatScheduleTransition transitions[] = 3; } - bitmap ModeForSequence : bitmap8 { - kHeatSetpointPresent = 0x1; - kCoolSetpointPresent = 0x2; + request struct SetWeeklyScheduleRequest { + int8u numberOfTransitionsForSequence = 0; + DayOfWeek dayOfWeekForSequence = 1; + ModeForSequence modeForSequence = 2; + ThermostatScheduleTransition transitions[] = 3; } - struct ThermostatScheduleTransition { - int16u transitionTime = 0; - nullable int16s heatSetpoint = 1; - nullable int16s coolSetpoint = 2; + request struct GetWeeklyScheduleRequest { + DayOfWeek daysToReturn = 0; + ModeForSequence modeToReturn = 1; } - readonly attribute nullable int16s localTemperature = 0; - readonly attribute nullable int16s outdoorTemperature = 1; - readonly attribute bitmap8 occupancy = 2; - readonly attribute int16s absMinHeatSetpointLimit = 3; - readonly attribute int16s absMaxHeatSetpointLimit = 4; - readonly attribute int16s absMinCoolSetpointLimit = 5; - readonly attribute int16s absMaxCoolSetpointLimit = 6; - readonly attribute int8u PICoolingDemand = 7; - readonly attribute int8u PIHeatingDemand = 8; - attribute access(write: manage) bitmap8 HVACSystemTypeConfiguration = 9; - attribute access(write: manage) int8s localTemperatureCalibration = 16; - attribute int16s occupiedCoolingSetpoint = 17; - attribute int16s occupiedHeatingSetpoint = 18; - attribute int16s unoccupiedCoolingSetpoint = 19; - attribute int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) int16s minHeatSetpointLimit = 21; - attribute access(write: manage) int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) int16s minCoolSetpointLimit = 23; - attribute access(write: manage) int16s maxCoolSetpointLimit = 24; - attribute access(write: manage) int8s minSetpointDeadBand = 25; - attribute access(write: manage) bitmap8 remoteSensing = 26; - attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; - attribute access(write: manage) enum8 systemMode = 28; - readonly attribute enum8 thermostatRunningMode = 30; - readonly attribute enum8 startOfWeek = 32; - readonly attribute int8u numberOfWeeklyTransitions = 33; - readonly attribute int8u numberOfDailyTransitions = 34; - attribute access(write: manage) enum8 temperatureSetpointHold = 35; - attribute access(write: manage) nullable int16u temperatureSetpointHoldDuration = 36; - attribute access(write: manage) bitmap8 thermostatProgrammingOperationMode = 37; - readonly attribute bitmap16 thermostatRunningState = 41; - readonly attribute enum8 setpointChangeSource = 48; - readonly attribute nullable int16s setpointChangeAmount = 49; - readonly attribute epoch_s setpointChangeSourceTimestamp = 50; - attribute access(write: manage) nullable int8u occupiedSetback = 52; - readonly attribute nullable int8u occupiedSetbackMin = 53; - readonly attribute nullable int8u occupiedSetbackMax = 54; - attribute access(write: manage) nullable int8u unoccupiedSetback = 55; - readonly attribute nullable int8u unoccupiedSetbackMin = 56; - readonly attribute nullable int8u unoccupiedSetbackMax = 57; - attribute access(write: manage) int8u emergencyHeatDelta = 58; - attribute access(write: manage) enum8 ACType = 64; - attribute access(write: manage) int16u ACCapacity = 65; - attribute access(write: manage) enum8 ACRefrigerantType = 66; - attribute access(write: manage) enum8 ACCompressorType = 67; - attribute access(write: manage) enum8 ACLouverPosition = 69; - readonly attribute nullable int16s ACCoilTemperature = 70; - attribute access(write: manage) enum8 ACCapacityformat = 71; - 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; + /** Command description for SetpointRaiseLower */ + command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; + /** Command description for SetWeeklySchedule */ + command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; + /** Command description for GetWeeklySchedule */ + command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; + /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ + command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; } /** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */ -client cluster ThermostatUserInterfaceConfiguration = 516 { +cluster ThermostatUserInterfaceConfiguration = 516 { revision 2; enum KeypadLockoutEnum : enum8 { @@ -4613,7 +5012,7 @@ client cluster ThermostatUserInterfaceConfiguration = 516 { } /** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */ -server cluster ThermostatUserInterfaceConfiguration = 516 { +cluster ThermostatUserInterfaceConfiguration = 516 { revision 2; enum KeypadLockoutEnum : enum8 { @@ -4637,7 +5036,7 @@ server cluster ThermostatUserInterfaceConfiguration = 516 { attribute TemperatureDisplayModeEnum temperatureDisplayMode = 0; attribute access(write: manage) KeypadLockoutEnum keypadLockout = 1; - attribute access(write: manage) ScheduleProgrammingVisibilityEnum scheduleProgrammingVisibility = 2; + attribute access(write: manage) optional ScheduleProgrammingVisibilityEnum scheduleProgrammingVisibility = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4647,7 +5046,7 @@ server cluster ThermostatUserInterfaceConfiguration = 516 { } /** Attributes and commands for controlling the color properties of a color-capable light. */ -client cluster ColorControl = 768 { +cluster ColorControl = 768 { revision 6; enum ColorLoopAction : enum8 { @@ -4967,7 +5366,7 @@ client cluster ColorControl = 768 { } /** Attributes and commands for controlling the color properties of a color-capable light. */ -server cluster ColorControl = 768 { +cluster ColorControl = 768 { revision 6; enum ColorLoopAction : enum8 { @@ -5039,58 +5438,58 @@ server cluster ColorControl = 768 { kColorTemperature = 0x10; } - readonly attribute int8u currentHue = 0; - readonly attribute int8u currentSaturation = 1; - readonly attribute int16u remainingTime = 2; - readonly attribute int16u currentX = 3; - readonly attribute int16u currentY = 4; - readonly attribute enum8 driftCompensation = 5; - readonly attribute char_string<254> compensationText = 6; - readonly attribute int16u colorTemperatureMireds = 7; + readonly attribute optional int8u currentHue = 0; + readonly attribute optional int8u currentSaturation = 1; + readonly attribute optional int16u remainingTime = 2; + readonly attribute optional int16u currentX = 3; + readonly attribute optional int16u currentY = 4; + readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional char_string<254> compensationText = 6; + readonly attribute optional int16u colorTemperatureMireds = 7; readonly attribute enum8 colorMode = 8; attribute bitmap8 options = 15; readonly attribute nullable int8u numberOfPrimaries = 16; - readonly attribute int16u primary1X = 17; - readonly attribute int16u primary1Y = 18; - readonly attribute nullable int8u primary1Intensity = 19; - readonly attribute int16u primary2X = 21; - readonly attribute int16u primary2Y = 22; - readonly attribute nullable int8u primary2Intensity = 23; - readonly attribute int16u primary3X = 25; - readonly attribute int16u primary3Y = 26; - readonly attribute nullable int8u primary3Intensity = 27; - readonly attribute int16u primary4X = 32; - readonly attribute int16u primary4Y = 33; - readonly attribute nullable int8u primary4Intensity = 34; - readonly attribute int16u primary5X = 36; - readonly attribute int16u primary5Y = 37; - readonly attribute nullable int8u primary5Intensity = 38; - readonly attribute int16u primary6X = 40; - readonly attribute int16u primary6Y = 41; - readonly attribute nullable int8u primary6Intensity = 42; - attribute access(write: manage) int16u whitePointX = 48; - attribute access(write: manage) int16u whitePointY = 49; - attribute access(write: manage) int16u colorPointRX = 50; - attribute access(write: manage) int16u colorPointRY = 51; - attribute access(write: manage) nullable int8u colorPointRIntensity = 52; - attribute access(write: manage) int16u colorPointGX = 54; - attribute access(write: manage) int16u colorPointGY = 55; - attribute access(write: manage) nullable int8u colorPointGIntensity = 56; - attribute access(write: manage) int16u colorPointBX = 58; - attribute access(write: manage) int16u colorPointBY = 59; - attribute access(write: manage) nullable int8u colorPointBIntensity = 60; - readonly attribute int16u enhancedCurrentHue = 16384; + readonly attribute optional int16u primary1X = 17; + readonly attribute optional int16u primary1Y = 18; + readonly attribute optional nullable int8u primary1Intensity = 19; + readonly attribute optional int16u primary2X = 21; + readonly attribute optional int16u primary2Y = 22; + readonly attribute optional nullable int8u primary2Intensity = 23; + readonly attribute optional int16u primary3X = 25; + readonly attribute optional int16u primary3Y = 26; + readonly attribute optional nullable int8u primary3Intensity = 27; + readonly attribute optional int16u primary4X = 32; + readonly attribute optional int16u primary4Y = 33; + readonly attribute optional nullable int8u primary4Intensity = 34; + readonly attribute optional int16u primary5X = 36; + readonly attribute optional int16u primary5Y = 37; + readonly attribute optional nullable int8u primary5Intensity = 38; + readonly attribute optional int16u primary6X = 40; + readonly attribute optional int16u primary6Y = 41; + readonly attribute optional nullable int8u primary6Intensity = 42; + attribute access(write: manage) optional int16u whitePointX = 48; + attribute access(write: manage) optional int16u whitePointY = 49; + attribute access(write: manage) optional int16u colorPointRX = 50; + attribute access(write: manage) optional int16u colorPointRY = 51; + attribute access(write: manage) optional nullable int8u colorPointRIntensity = 52; + attribute access(write: manage) optional int16u colorPointGX = 54; + attribute access(write: manage) optional int16u colorPointGY = 55; + attribute access(write: manage) optional nullable int8u colorPointGIntensity = 56; + attribute access(write: manage) optional int16u colorPointBX = 58; + attribute access(write: manage) optional int16u colorPointBY = 59; + attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; + readonly attribute optional int16u enhancedCurrentHue = 16384; readonly attribute enum8 enhancedColorMode = 16385; - readonly attribute int8u colorLoopActive = 16386; - readonly attribute int8u colorLoopDirection = 16387; - readonly attribute int16u colorLoopTime = 16388; - readonly attribute int16u colorLoopStartEnhancedHue = 16389; - readonly attribute int16u colorLoopStoredEnhancedHue = 16390; + readonly attribute optional int8u colorLoopActive = 16386; + readonly attribute optional int8u colorLoopDirection = 16387; + readonly attribute optional int16u colorLoopTime = 16388; + readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; + readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; readonly attribute bitmap16 colorCapabilities = 16394; - readonly attribute int16u colorTempPhysicalMinMireds = 16395; - readonly attribute int16u colorTempPhysicalMaxMireds = 16396; - readonly attribute int16u coupleColorTempToLevelMinMireds = 16397; - attribute access(write: manage) nullable int16u startUpColorTemperatureMireds = 16400; + readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; + readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; + readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; + attribute access(write: manage) optional nullable int16u startUpColorTemperatureMireds = 16400; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5246,29 +5645,48 @@ server cluster ColorControl = 768 { bitmap8 optionsOverride = 6; } + /** Move to specified hue. */ command MoveToHue(MoveToHueRequest): DefaultSuccess = 0; + /** Move hue up or down at specified rate. */ command MoveHue(MoveHueRequest): DefaultSuccess = 1; + /** Step hue up or down by specified size at specified rate. */ command StepHue(StepHueRequest): DefaultSuccess = 2; + /** Move to specified saturation. */ command MoveToSaturation(MoveToSaturationRequest): DefaultSuccess = 3; + /** Move saturation up or down at specified rate. */ command MoveSaturation(MoveSaturationRequest): DefaultSuccess = 4; + /** Step saturation up or down by specified size at specified rate. */ command StepSaturation(StepSaturationRequest): DefaultSuccess = 5; + /** Move to hue and saturation. */ command MoveToHueAndSaturation(MoveToHueAndSaturationRequest): DefaultSuccess = 6; + /** Move to specified color. */ command MoveToColor(MoveToColorRequest): DefaultSuccess = 7; + /** Moves the color. */ command MoveColor(MoveColorRequest): DefaultSuccess = 8; + /** Steps the lighting to a specific color. */ command StepColor(StepColorRequest): DefaultSuccess = 9; + /** Move to a specific color temperature. */ command MoveToColorTemperature(MoveToColorTemperatureRequest): DefaultSuccess = 10; + /** Command description for EnhancedMoveToHue */ command EnhancedMoveToHue(EnhancedMoveToHueRequest): DefaultSuccess = 64; + /** Command description for EnhancedMoveHue */ command EnhancedMoveHue(EnhancedMoveHueRequest): DefaultSuccess = 65; + /** Command description for EnhancedStepHue */ command EnhancedStepHue(EnhancedStepHueRequest): DefaultSuccess = 66; + /** Command description for EnhancedMoveToHueAndSaturation */ command EnhancedMoveToHueAndSaturation(EnhancedMoveToHueAndSaturationRequest): DefaultSuccess = 67; + /** Command description for ColorLoopSet */ command ColorLoopSet(ColorLoopSetRequest): DefaultSuccess = 68; + /** Command description for StopMoveStep */ command StopMoveStep(StopMoveStepRequest): DefaultSuccess = 71; + /** Command description for MoveColorTemperature */ command MoveColorTemperature(MoveColorTemperatureRequest): DefaultSuccess = 75; + /** Command description for StepColorTemperature */ command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76; } /** Attributes and commands for configuring the measurement of illuminance, and reporting illuminance measurements. */ -server cluster IlluminanceMeasurement = 1024 { +cluster IlluminanceMeasurement = 1024 { revision 3; enum LightSensorTypeEnum : enum8 { @@ -5279,8 +5697,8 @@ server cluster IlluminanceMeasurement = 1024 { readonly attribute nullable int16u measuredValue = 0; readonly attribute nullable int16u minMeasuredValue = 1; readonly attribute nullable int16u maxMeasuredValue = 2; - readonly attribute int16u tolerance = 3; - readonly attribute nullable LightSensorTypeEnum lightSensorType = 4; + readonly attribute optional int16u tolerance = 3; + readonly attribute optional nullable LightSensorTypeEnum lightSensorType = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5290,7 +5708,7 @@ server cluster IlluminanceMeasurement = 1024 { } /** Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. */ -client cluster TemperatureMeasurement = 1026 { +cluster TemperatureMeasurement = 1026 { revision 1; // NOTE: Default/not specifically set readonly attribute nullable temperature measuredValue = 0; @@ -5306,13 +5724,13 @@ client cluster TemperatureMeasurement = 1026 { } /** Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. */ -server cluster TemperatureMeasurement = 1026 { +cluster TemperatureMeasurement = 1026 { revision 1; // NOTE: Default/not specifically set readonly attribute nullable temperature measuredValue = 0; readonly attribute nullable temperature minMeasuredValue = 1; readonly attribute nullable temperature maxMeasuredValue = 2; - readonly attribute int16u tolerance = 3; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5322,7 +5740,7 @@ server cluster TemperatureMeasurement = 1026 { } /** Attributes and commands for configuring the measurement of pressure, and reporting pressure measurements. */ -server cluster PressureMeasurement = 1027 { +cluster PressureMeasurement = 1027 { revision 3; bitmap Feature : bitmap32 { @@ -5332,12 +5750,12 @@ server cluster PressureMeasurement = 1027 { readonly attribute nullable int16s measuredValue = 0; readonly attribute nullable int16s minMeasuredValue = 1; readonly attribute nullable int16s maxMeasuredValue = 2; - readonly attribute int16u tolerance = 3; - readonly attribute nullable int16s scaledValue = 16; - readonly attribute nullable int16s minScaledValue = 17; - readonly attribute nullable int16s maxScaledValue = 18; - readonly attribute int16u scaledTolerance = 19; - readonly attribute int8s scale = 20; + readonly attribute optional int16u tolerance = 3; + readonly attribute optional nullable int16s scaledValue = 16; + readonly attribute optional nullable int16s minScaledValue = 17; + readonly attribute optional nullable int16s maxScaledValue = 18; + readonly attribute optional int16u scaledTolerance = 19; + readonly attribute optional int8s scale = 20; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5347,13 +5765,13 @@ server cluster PressureMeasurement = 1027 { } /** Attributes and commands for configuring the measurement of flow, and reporting flow measurements. */ -server cluster FlowMeasurement = 1028 { +cluster FlowMeasurement = 1028 { revision 1; // NOTE: Default/not specifically set readonly attribute nullable int16u measuredValue = 0; readonly attribute nullable int16u minMeasuredValue = 1; readonly attribute nullable int16u maxMeasuredValue = 2; - readonly attribute int16u tolerance = 3; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5363,7 +5781,7 @@ server cluster FlowMeasurement = 1028 { } /** Attributes and commands for configuring the measurement of relative humidity, and reporting relative humidity measurements. */ -client cluster RelativeHumidityMeasurement = 1029 { +cluster RelativeHumidityMeasurement = 1029 { revision 3; readonly attribute nullable int16u measuredValue = 0; @@ -5379,13 +5797,13 @@ client cluster RelativeHumidityMeasurement = 1029 { } /** Attributes and commands for configuring the measurement of relative humidity, and reporting relative humidity measurements. */ -server cluster RelativeHumidityMeasurement = 1029 { +cluster RelativeHumidityMeasurement = 1029 { revision 3; readonly attribute nullable int16u measuredValue = 0; readonly attribute nullable int16u minMeasuredValue = 1; readonly attribute nullable int16u maxMeasuredValue = 2; - readonly attribute int16u tolerance = 3; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5395,7 +5813,7 @@ server cluster RelativeHumidityMeasurement = 1029 { } /** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ -server cluster OccupancySensing = 1030 { +cluster OccupancySensing = 1030 { revision 3; enum OccupancySensorTypeEnum : enum8 { @@ -5418,15 +5836,15 @@ server cluster OccupancySensing = 1030 { readonly attribute OccupancyBitmap occupancy = 0; readonly attribute OccupancySensorTypeEnum occupancySensorType = 1; readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2; - attribute access(write: manage) int16u PIROccupiedToUnoccupiedDelay = 16; - attribute access(write: manage) int16u PIRUnoccupiedToOccupiedDelay = 17; - attribute access(write: manage) int8u PIRUnoccupiedToOccupiedThreshold = 18; - attribute access(write: manage) int16u ultrasonicOccupiedToUnoccupiedDelay = 32; - attribute access(write: manage) int16u ultrasonicUnoccupiedToOccupiedDelay = 33; - attribute access(write: manage) int8u ultrasonicUnoccupiedToOccupiedThreshold = 34; - attribute access(write: manage) int16u physicalContactOccupiedToUnoccupiedDelay = 48; - attribute access(write: manage) int16u physicalContactUnoccupiedToOccupiedDelay = 49; - attribute access(write: manage) int8u physicalContactUnoccupiedToOccupiedThreshold = 50; + attribute access(write: manage) optional int16u PIROccupiedToUnoccupiedDelay = 16; + attribute access(write: manage) optional int16u PIRUnoccupiedToOccupiedDelay = 17; + attribute access(write: manage) optional int8u PIRUnoccupiedToOccupiedThreshold = 18; + attribute access(write: manage) optional int16u ultrasonicOccupiedToUnoccupiedDelay = 32; + attribute access(write: manage) optional int16u ultrasonicUnoccupiedToOccupiedDelay = 33; + attribute access(write: manage) optional int8u ultrasonicUnoccupiedToOccupiedThreshold = 34; + attribute access(write: manage) optional int16u physicalContactOccupiedToUnoccupiedDelay = 48; + attribute access(write: manage) optional int16u physicalContactUnoccupiedToOccupiedDelay = 49; + attribute access(write: manage) optional int8u physicalContactUnoccupiedToOccupiedThreshold = 50; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5436,7 +5854,7 @@ server cluster OccupancySensing = 1030 { } /** This cluster provides an interface for controlling the current Channel on a device. */ -client cluster Channel = 1284 { +cluster Channel = 1284 { revision 1; // NOTE: Default/not specifically set enum LineupInfoTypeEnum : enum8 { @@ -5506,7 +5924,7 @@ client cluster Channel = 1284 { } /** This cluster provides an interface for controlling the current Channel on a device. */ -server cluster Channel = 1284 { +cluster Channel = 1284 { revision 1; // NOTE: Default/not specifically set enum LineupInfoTypeEnum : enum8 { @@ -5539,9 +5957,9 @@ server cluster Channel = 1284 { LineupInfoTypeEnum lineupInfoType = 3; } - readonly attribute ChannelInfoStruct channelList[] = 0; - readonly attribute nullable LineupInfoStruct lineup = 1; - readonly attribute nullable ChannelInfoStruct currentChannel = 2; + readonly attribute optional ChannelInfoStruct channelList[] = 0; + readonly attribute optional nullable LineupInfoStruct lineup = 1; + readonly attribute optional nullable ChannelInfoStruct currentChannel = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5553,6 +5971,11 @@ server cluster Channel = 1284 { char_string match = 0; } + response struct ChangeChannelResponse = 1 { + StatusEnum status = 0; + optional char_string data = 1; + } + request struct ChangeChannelByNumberRequest { int16u majorNumber = 0; int16u minorNumber = 1; @@ -5562,13 +5985,16 @@ server cluster Channel = 1284 { int16s count = 0; } + /** Change the channel on the media player to the channel case-insensitive exact matching the value passed as an argument. */ command ChangeChannel(ChangeChannelRequest): ChangeChannelResponse = 0; + /** Change the channel on the media plaeyer to the channel with the given Number in the ChannelList attribute. */ command ChangeChannelByNumber(ChangeChannelByNumberRequest): DefaultSuccess = 2; + /** This command provides channel up and channel down functionality, but allows channel index jumps of size Count. When the value of the increase or decrease is larger than the number of channels remaining in the given direction, then the behavior SHALL be to return to the beginning (or end) of the channel list and continue. For example, if the current channel is at index 0 and count value of -1 is given, then the current channel should change to the last channel. */ command SkipChannel(SkipChannelRequest): DefaultSuccess = 3; } /** This cluster provides an interface for UX navigation within a set of targets on a device or endpoint. */ -client cluster TargetNavigator = 1285 { +cluster TargetNavigator = 1285 { revision 1; // NOTE: Default/not specifically set enum StatusEnum : enum8 { @@ -5606,7 +6032,7 @@ client cluster TargetNavigator = 1285 { } /** This cluster provides an interface for UX navigation within a set of targets on a device or endpoint. */ -server cluster TargetNavigator = 1285 { +cluster TargetNavigator = 1285 { revision 1; // NOTE: Default/not specifically set enum StatusEnum : enum8 { @@ -5621,17 +6047,30 @@ server cluster TargetNavigator = 1285 { } readonly attribute TargetInfoStruct targetList[] = 0; - readonly attribute int8u currentTarget = 1; + readonly attribute optional int8u currentTarget = 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; + + request struct NavigateTargetRequest { + int8u target = 0; + optional char_string data = 1; + } + + response struct NavigateTargetResponse = 1 { + StatusEnum status = 0; + optional char_string data = 1; + } + + /** Upon receipt, this SHALL navigation the UX to the target identified. */ + command NavigateTarget(NavigateTargetRequest): NavigateTargetResponse = 0; } /** This cluster provides an interface for controlling Media Playback (PLAY, PAUSE, etc) on a media device such as a TV or Speaker. */ -client cluster MediaPlayback = 1286 { +cluster MediaPlayback = 1286 { revision 1; // NOTE: Default/not specifically set enum PlaybackStateEnum : enum8 { @@ -5716,7 +6155,7 @@ client cluster MediaPlayback = 1286 { } /** This cluster provides an interface for controlling Media Playback (PLAY, PAUSE, etc) on a media device such as a TV or Speaker. */ -server cluster MediaPlayback = 1286 { +cluster MediaPlayback = 1286 { revision 1; // NOTE: Default/not specifically set enum PlaybackStateEnum : enum8 { @@ -5746,12 +6185,12 @@ server cluster MediaPlayback = 1286 { } readonly attribute PlaybackStateEnum currentState = 0; - readonly attribute nullable epoch_us startTime = 1; - readonly attribute nullable int64u duration = 2; - readonly attribute nullable PlaybackPositionStruct sampledPosition = 3; - readonly attribute single playbackSpeed = 4; - readonly attribute nullable int64u seekRangeEnd = 5; - readonly attribute nullable int64u seekRangeStart = 6; + readonly attribute optional nullable epoch_us startTime = 1; + readonly attribute optional nullable int64u duration = 2; + readonly attribute optional nullable PlaybackPositionStruct sampledPosition = 3; + readonly attribute optional single playbackSpeed = 4; + readonly attribute optional nullable int64u seekRangeEnd = 5; + readonly attribute optional nullable int64u seekRangeStart = 6; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5767,30 +6206,41 @@ server cluster MediaPlayback = 1286 { int64u deltaPositionMilliseconds = 0; } - request struct SeekRequest { - int64u position = 0; - } - response struct PlaybackResponse = 10 { StatusEnum status = 0; optional char_string data = 1; } + request struct SeekRequest { + int64u position = 0; + } + + /** Upon receipt, this SHALL play media. */ command Play(): PlaybackResponse = 0; + /** Upon receipt, this SHALL pause media. */ command Pause(): PlaybackResponse = 1; + /** Upon receipt, this SHALL stop media. User experience is context-specific. This will often navigate the user back to the location where media was originally launched. */ command Stop(): PlaybackResponse = 2; + /** Upon receipt, this SHALL Start Over with the current media playback item. */ command StartOver(): PlaybackResponse = 3; + /** Upon receipt, this SHALL cause the handler to be invoked for "Previous". User experience is context-specific. This will often Go back to the previous media playback item. */ command Previous(): PlaybackResponse = 4; + /** Upon receipt, this SHALL cause the handler to be invoked for "Next". User experience is context-specific. This will often Go forward to the next media playback item. */ command Next(): PlaybackResponse = 5; + /** Upon receipt, this SHALL Rewind through media. Different Rewind speeds can be used on the TV based upon the number of sequential calls to this function. This is to avoid needing to define every speed now (multiple fast, slow motion, etc). */ command Rewind(): PlaybackResponse = 6; + /** Upon receipt, this SHALL Advance through media. Different FF speeds can be used on the TV based upon the number of sequential calls to this function. This is to avoid needing to define every speed now (multiple fast, slow motion, etc). */ command FastForward(): PlaybackResponse = 7; + /** Upon receipt, this SHALL Skip forward in the media by the given number of seconds, using the data as follows: */ command SkipForward(SkipForwardRequest): PlaybackResponse = 8; + /** Upon receipt, this SHALL Skip backward in the media by the given number of seconds, using the data as follows: */ command SkipBackward(SkipBackwardRequest): PlaybackResponse = 9; + /** Upon receipt, this SHALL Skip backward in the media by the given number of seconds, using the data as follows: */ command Seek(SeekRequest): PlaybackResponse = 11; } /** This cluster provides an interface for controlling the Input Selector on a media device such as a TV. */ -client cluster MediaInput = 1287 { +cluster MediaInput = 1287 { revision 1; // NOTE: Default/not specifically set enum InputTypeEnum : enum8 { @@ -5848,7 +6298,7 @@ client cluster MediaInput = 1287 { } /** This cluster provides an interface for controlling the Input Selector on a media device such as a TV. */ -server cluster MediaInput = 1287 { +cluster MediaInput = 1287 { revision 1; // NOTE: Default/not specifically set enum InputTypeEnum : enum8 { @@ -5895,14 +6345,18 @@ server cluster MediaInput = 1287 { char_string name = 1; } + /** Upon receipt, this SHALL change the input on the media device to the input at a specific index in the Input List. */ command SelectInput(SelectInputRequest): DefaultSuccess = 0; + /** Upon receipt, this SHALL display the active status of the input list on screen. */ command ShowInputStatus(): DefaultSuccess = 1; + /** Upon receipt, this SHALL hide the input list from the screen. */ command HideInputStatus(): DefaultSuccess = 2; + /** Upon receipt, this SHALL rename the input at a specific index in the Input List. Updates to the input name SHALL appear in the TV settings menus. */ command access(invoke: manage) RenameInput(RenameInputRequest): DefaultSuccess = 3; } /** This cluster provides an interface for managing low power mode on a device. */ -client cluster LowPower = 1288 { +cluster LowPower = 1288 { revision 1; // NOTE: Default/not specifically set readonly attribute command_id generatedCommandList[] = 65528; @@ -5917,7 +6371,7 @@ client cluster LowPower = 1288 { } /** This cluster provides an interface for controlling a device like a TV using action commands such as UP, DOWN, and SELECT. */ -client cluster KeypadInput = 1289 { +cluster KeypadInput = 1289 { revision 1; // NOTE: Default/not specifically set enum CECKeyCodeEnum : enum8 { @@ -6041,7 +6495,7 @@ client cluster KeypadInput = 1289 { } /** This cluster provides an interface for controlling a device like a TV using action commands such as UP, DOWN, and SELECT. */ -server cluster KeypadInput = 1289 { +cluster KeypadInput = 1289 { revision 1; // NOTE: Default/not specifically set enum CECKeyCodeEnum : enum8 { @@ -6151,10 +6605,21 @@ server cluster KeypadInput = 1289 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + request struct SendKeyRequest { + CECKeyCodeEnum keyCode = 0; + } + + response struct SendKeyResponse = 1 { + StatusEnum status = 0; + } + + /** Upon receipt, this SHALL process a keycode as input to the media device. */ + command SendKey(SendKeyRequest): SendKeyResponse = 0; } /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ -client cluster ContentLauncher = 1290 { +cluster ContentLauncher = 1290 { revision 1; // NOTE: Default/not specifically set enum MetricTypeEnum : enum8 { @@ -6264,7 +6729,7 @@ client cluster ContentLauncher = 1290 { } /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ -server cluster ContentLauncher = 1290 { +cluster ContentLauncher = 1290 { revision 1; // NOTE: Default/not specifically set enum MetricTypeEnum : enum8 { @@ -6341,8 +6806,8 @@ server cluster ContentLauncher = 1290 { optional StyleInformationStruct waterMark = 5; } - readonly attribute char_string acceptHeader[] = 0; - readonly attribute SupportedProtocolsBitmap supportedStreamingProtocols = 1; + readonly attribute optional char_string acceptHeader[] = 0; + readonly attribute optional SupportedProtocolsBitmap supportedStreamingProtocols = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -6367,12 +6832,14 @@ server cluster ContentLauncher = 1290 { optional char_string data = 1; } + /** Upon receipt, this SHALL launch the specified content with optional search criteria. */ command LaunchContent(LaunchContentRequest): LauncherResponse = 0; + /** Upon receipt, this SHALL launch content from the specified URL. */ command LaunchURL(LaunchURLRequest): LauncherResponse = 1; } /** This cluster provides an interface for controlling the Output on a media device such as a TV. */ -client cluster AudioOutput = 1291 { +cluster AudioOutput = 1291 { revision 1; // NOTE: Default/not specifically set enum OutputTypeEnum : enum8 { @@ -6419,7 +6886,7 @@ client cluster AudioOutput = 1291 { } /** This cluster provides an interface for controlling the Output on a media device such as a TV. */ -server cluster AudioOutput = 1291 { +cluster AudioOutput = 1291 { revision 1; // NOTE: Default/not specifically set enum OutputTypeEnum : enum8 { @@ -6459,12 +6926,14 @@ server cluster AudioOutput = 1291 { char_string name = 1; } + /** Upon receipt, this SHALL change the output on the media device to the output at a specific index in the Output List. */ command SelectOutput(SelectOutputRequest): DefaultSuccess = 0; + /** Upon receipt, this SHALL rename the output at a specific index in the Output List. Updates to the output name SHALL appear in the TV settings menus. */ command access(invoke: manage) RenameOutput(RenameOutputRequest): DefaultSuccess = 1; } /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ -client cluster ApplicationLauncher = 1292 { +cluster ApplicationLauncher = 1292 { revision 1; // NOTE: Default/not specifically set enum StatusEnum : enum8 { @@ -6523,7 +6992,7 @@ client cluster ApplicationLauncher = 1292 { } /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ -server cluster ApplicationLauncher = 1292 { +cluster ApplicationLauncher = 1292 { revision 1; // NOTE: Default/not specifically set enum StatusEnum : enum8 { @@ -6546,18 +7015,43 @@ server cluster ApplicationLauncher = 1292 { optional endpoint_no endpoint = 1; } - readonly attribute int16u catalogList[] = 0; - readonly attribute nullable ApplicationEPStruct currentApp = 1; + readonly attribute optional int16u catalogList[] = 0; + readonly attribute optional nullable ApplicationEPStruct currentApp = 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; + + request struct LaunchAppRequest { + optional ApplicationStruct application = 0; + optional octet_string data = 1; + } + + request struct StopAppRequest { + optional ApplicationStruct application = 0; + } + + request struct HideAppRequest { + optional ApplicationStruct application = 0; + } + + response struct LauncherResponse = 3 { + StatusEnum status = 0; + optional octet_string data = 1; + } + + /** Upon receipt, this SHALL launch the specified app with optional data. The TV Device SHALL launch and bring to foreground the identified application in the command if the application is not already launched and in foreground. The TV Device SHALL update state attribute on the Application Basic cluster of the Endpoint corresponding to the launched application. This command returns a Launch Response. */ + command LaunchApp(LaunchAppRequest): LauncherResponse = 0; + /** Upon receipt on a Video Player endpoint this SHALL stop the specified application if it is running. */ + command StopApp(StopAppRequest): LauncherResponse = 1; + /** Upon receipt on a Video Player endpoint this SHALL hide the specified application if it is running and visible. */ + command HideApp(HideAppRequest): LauncherResponse = 2; } /** This cluster provides information about an application running on a TV or media player device which is represented as an endpoint. */ -client cluster ApplicationBasic = 1293 { +cluster ApplicationBasic = 1293 { revision 1; // NOTE: Default/not specifically set enum ApplicationStatusEnum : enum8 { @@ -6589,7 +7083,7 @@ client cluster ApplicationBasic = 1293 { } /** This cluster provides information about an application running on a TV or media player device which is represented as an endpoint. */ -server cluster ApplicationBasic = 1293 { +cluster ApplicationBasic = 1293 { revision 1; // NOTE: Default/not specifically set enum ApplicationStatusEnum : enum8 { @@ -6604,10 +7098,10 @@ server cluster ApplicationBasic = 1293 { char_string applicationID = 1; } - readonly attribute char_string<32> vendorName = 0; - readonly attribute vendor_id vendorID = 1; + readonly attribute optional char_string<32> vendorName = 0; + readonly attribute optional vendor_id vendorID = 1; readonly attribute long_char_string<256> applicationName = 2; - readonly attribute int16u productID = 3; + readonly attribute optional int16u productID = 3; readonly attribute ApplicationStruct application = 4; readonly attribute ApplicationStatusEnum status = 5; readonly attribute char_string<32> applicationVersion = 6; @@ -6621,7 +7115,7 @@ server cluster ApplicationBasic = 1293 { } /** This cluster provides commands that facilitate user account login on a Content App or a node. For example, a Content App running on a Video Player device, which is represented as an endpoint (see [TV Architecture]), can use this cluster to help make the user account on the Content App match the user account on the Client. */ -client cluster AccountLogin = 1294 { +cluster AccountLogin = 1294 { revision 1; // NOTE: Default/not specifically set readonly attribute command_id generatedCommandList[] = 65528; @@ -6653,7 +7147,7 @@ client cluster AccountLogin = 1294 { } /** This cluster provides commands that facilitate user account login on a Content App or a node. For example, a Content App running on a Video Player device, which is represented as an endpoint (see [TV Architecture]), can use this cluster to help make the user account on the Content App match the user account on the Client. */ -server cluster AccountLogin = 1294 { +cluster AccountLogin = 1294 { revision 1; // NOTE: Default/not specifically set readonly attribute command_id generatedCommandList[] = 65528; @@ -6667,17 +7161,20 @@ server cluster AccountLogin = 1294 { char_string<100> tempAccountIdentifier = 0; } + response struct GetSetupPINResponse = 1 { + char_string setupPIN = 0; + } + request struct LoginRequest { char_string<100> tempAccountIdentifier = 0; char_string setupPIN = 1; } - response struct GetSetupPINResponse = 1 { - char_string setupPIN = 0; - } - + /** Upon receipt, the Content App checks if the account associated with the client Temp Account Identifier Rotating ID is the same acount that is active on the given Content App. If the accounts are the same, then the Content App includes the Setup PIN in the GetSetupPIN Response. */ fabric timed command access(invoke: administer) GetSetupPIN(GetSetupPINRequest): GetSetupPINResponse = 0; + /** Upon receipt, the Content App checks if the account associated with the client’s Temp Account Identifier (Rotating ID) has a current active Setup PIN with the given value. If the Setup PIN is valid for the user account associated with the Temp Account Identifier, then the Content App MAY make that user account active. */ fabric timed command access(invoke: administer) Login(LoginRequest): DefaultSuccess = 2; + /** The purpose of this command is to instruct the Content App to clear the current user account. This command SHOULD be used by clients of a Content App to indicate the end of a user session. */ fabric timed command Logout(): DefaultSuccess = 3; } diff --git a/examples/platform/silabs/BaseApplication.cpp b/examples/platform/silabs/BaseApplication.cpp index 083298df1cf72e..eefddb708ba3bf 100644 --- a/examples/platform/silabs/BaseApplication.cpp +++ b/examples/platform/silabs/BaseApplication.cpp @@ -25,6 +25,8 @@ #include "AppEvent.h" #include "AppTask.h" +#include + #if (defined(ENABLE_WSTK_LEDS) && (defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) || defined(SIWX_917))) #include "LEDWidget.h" #endif // ENABLE_WSTK_LEDS @@ -37,9 +39,10 @@ #endif // DISPLAY_ENABLED #include "SilabsDeviceDataProvider.h" -#include +#if CHIP_CONFIG_ENABLE_ICD_SERVER == 1 +#include // nogncheck +#endif #include -#include #include #include #include diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index a0199d54baf41f..18a62c5424248b 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -40,11 +40,19 @@ server cluster Identify = 3 { int16u identifyTime = 0; } + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -79,6 +87,10 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -86,13 +98,33 @@ server cluster OnOff = 6 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + request struct OffWithEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + enum8 effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControlBitmap onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ -server cluster LevelControl = 8 { +cluster LevelControl = 8 { revision 5; enum MoveModeEnum : enum8 { @@ -117,10 +149,19 @@ server cluster LevelControl = 8 { } readonly attribute nullable int8u currentLevel = 0; - readonly attribute int8u minLevel = 2; - readonly attribute int8u maxLevel = 3; + readonly attribute optional int16u remainingTime = 1; + readonly attribute optional int8u minLevel = 2; + readonly attribute optional int8u maxLevel = 3; + readonly attribute optional int16u currentFrequency = 4; + readonly attribute optional int16u minFrequency = 5; + readonly attribute optional int16u maxFrequency = 6; attribute OptionsBitmap options = 15; + attribute optional int16u onOffTransitionTime = 16; attribute nullable int8u onLevel = 17; + attribute optional nullable int16u onTransitionTime = 18; + attribute optional nullable int16u offTransitionTime = 19; + attribute optional nullable int8u defaultMoveRate = 20; + attribute access(write: manage) optional nullable int8u startUpCurrentLevel = 16384; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -182,18 +223,33 @@ server cluster LevelControl = 8 { OptionsBitmap optionsOverride = 1; } + request struct MoveToClosestFrequencyRequest { + int16u frequency = 0; + } + + /** Command description for MoveToLevel */ command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + /** Command description for Move */ command Move(MoveRequest): DefaultSuccess = 1; + /** Command description for Step */ command Step(StepRequest): DefaultSuccess = 2; + /** Command description for Stop */ command Stop(StopRequest): DefaultSuccess = 3; + /** Command description for MoveToLevelWithOnOff */ command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + /** Command description for MoveWithOnOff */ command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + /** Command description for StepWithOnOff */ command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + /** Command description for StopWithOnOff */ command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; + /** Change the currrent frequency to the provided one, or a close + approximation if the exact provided one is not possible. */ + command MoveToClosestFrequency(MoveToClosestFrequencyRequest): DefaultSuccess = 8; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -216,6 +272,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -225,7 +282,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -server cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -249,7 +306,7 @@ server cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -308,7 +365,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -323,7 +380,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -395,12 +452,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -409,10 +470,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -488,7 +551,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -561,11 +624,12 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -604,17 +668,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -625,13 +689,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -712,12 +779,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -730,6 +800,22 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + request struct AddOrUpdateWiFiNetworkRequest { + octet_string<32> ssid = 0; + octet_string<64> credentials = 1; + optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; + } + request struct AddOrUpdateThreadNetworkRequest { octet_string<254> operationalDataset = 0; optional int64u breadcrumb = 1; @@ -740,47 +826,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -864,7 +962,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -883,12 +986,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ -server cluster ThreadNetworkDiagnostics = 53 { +cluster ThreadNetworkDiagnostics = 53 { revision 1; // NOTE: Default/not specifically set enum ConnectionStatusEnum : enum8 { @@ -985,6 +1090,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u panId = 3; readonly attribute nullable int64u extendedPanId = 4; readonly attribute nullable octet_string<17> meshLocalPrefix = 5; + readonly attribute optional int64u overrunCount = 6; readonly attribute NeighborTableStruct neighborTable[] = 7; readonly attribute RouteTableStruct routeTable[] = 8; readonly attribute nullable int32u partitionId = 9; @@ -992,6 +1098,51 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u dataVersion = 11; readonly attribute nullable int16u stableDataVersion = 12; readonly attribute nullable int8u leaderRouterId = 13; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; readonly attribute nullable SecurityPolicy securityPolicy = 59; readonly attribute nullable octet_string<4> channelPage0Mask = 60; readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; @@ -1003,11 +1154,12 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1048,13 +1200,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1107,15 +1262,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1129,6 +1298,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1141,38 +1316,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1227,26 +1390,30 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** An interface for configuring and controlling pumps. */ -server cluster PumpConfigurationAndControl = 512 { +cluster PumpConfigurationAndControl = 512 { revision 3; enum ControlModeEnum : enum8 { @@ -1341,26 +1508,26 @@ server cluster PumpConfigurationAndControl = 512 { readonly attribute nullable int16s maxPressure = 0; readonly attribute nullable int16u maxSpeed = 1; readonly attribute nullable int16u maxFlow = 2; - readonly attribute nullable int16s minConstPressure = 3; - readonly attribute nullable int16s maxConstPressure = 4; - readonly attribute nullable int16s minCompPressure = 5; - readonly attribute nullable int16s maxCompPressure = 6; - readonly attribute nullable int16u minConstSpeed = 7; - readonly attribute nullable int16u maxConstSpeed = 8; - readonly attribute nullable int16u minConstFlow = 9; - readonly attribute nullable int16u maxConstFlow = 10; - readonly attribute nullable int16s minConstTemp = 11; - readonly attribute nullable int16s maxConstTemp = 12; - readonly attribute PumpStatusBitmap pumpStatus = 16; + readonly attribute optional nullable int16s minConstPressure = 3; + readonly attribute optional nullable int16s maxConstPressure = 4; + readonly attribute optional nullable int16s minCompPressure = 5; + readonly attribute optional nullable int16s maxCompPressure = 6; + readonly attribute optional nullable int16u minConstSpeed = 7; + readonly attribute optional nullable int16u maxConstSpeed = 8; + readonly attribute optional nullable int16u minConstFlow = 9; + readonly attribute optional nullable int16u maxConstFlow = 10; + readonly attribute optional nullable int16s minConstTemp = 11; + readonly attribute optional nullable int16s maxConstTemp = 12; + readonly attribute optional PumpStatusBitmap pumpStatus = 16; readonly attribute OperationModeEnum effectiveOperationMode = 17; readonly attribute ControlModeEnum effectiveControlMode = 18; readonly attribute nullable int16s capacity = 19; - readonly attribute nullable int16u speed = 20; - attribute access(write: manage) nullable int24u lifetimeRunningHours = 21; - readonly attribute nullable int24u power = 22; - attribute access(write: manage) nullable int32u lifetimeEnergyConsumed = 23; + readonly attribute optional nullable int16u speed = 20; + attribute access(write: manage) optional nullable int24u lifetimeRunningHours = 21; + readonly attribute optional nullable int24u power = 22; + attribute access(write: manage) optional nullable int32u lifetimeEnergyConsumed = 23; attribute access(write: manage) OperationModeEnum operationMode = 32; - attribute access(write: manage) ControlModeEnum controlMode = 33; + attribute access(write: manage) optional ControlModeEnum controlMode = 33; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1370,13 +1537,13 @@ server cluster PumpConfigurationAndControl = 512 { } /** Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. */ -server cluster TemperatureMeasurement = 1026 { +cluster TemperatureMeasurement = 1026 { revision 1; // NOTE: Default/not specifically set readonly attribute nullable temperature measuredValue = 0; readonly attribute nullable temperature minMeasuredValue = 1; readonly attribute nullable temperature maxMeasuredValue = 2; - readonly attribute int16u tolerance = 3; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1386,7 +1553,7 @@ server cluster TemperatureMeasurement = 1026 { } /** Attributes and commands for configuring the measurement of pressure, and reporting pressure measurements. */ -server cluster PressureMeasurement = 1027 { +cluster PressureMeasurement = 1027 { revision 3; bitmap Feature : bitmap32 { @@ -1396,12 +1563,12 @@ server cluster PressureMeasurement = 1027 { readonly attribute nullable int16s measuredValue = 0; readonly attribute nullable int16s minMeasuredValue = 1; readonly attribute nullable int16s maxMeasuredValue = 2; - readonly attribute int16u tolerance = 3; - readonly attribute nullable int16s scaledValue = 16; - readonly attribute nullable int16s minScaledValue = 17; - readonly attribute nullable int16s maxScaledValue = 18; - readonly attribute int16u scaledTolerance = 19; - readonly attribute int8s scale = 20; + readonly attribute optional int16u tolerance = 3; + readonly attribute optional nullable int16s scaledValue = 16; + readonly attribute optional nullable int16s minScaledValue = 17; + readonly attribute optional nullable int16s maxScaledValue = 18; + readonly attribute optional int16u scaledTolerance = 19; + readonly attribute optional int8s scale = 20; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1411,13 +1578,13 @@ server cluster PressureMeasurement = 1027 { } /** Attributes and commands for configuring the measurement of flow, and reporting flow measurements. */ -server cluster FlowMeasurement = 1028 { +cluster FlowMeasurement = 1028 { revision 1; // NOTE: Default/not specifically set readonly attribute nullable int16u measuredValue = 0; readonly attribute nullable int16u minMeasuredValue = 1; readonly attribute nullable int16u maxMeasuredValue = 2; - readonly attribute int16u tolerance = 3; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1427,7 +1594,7 @@ server cluster FlowMeasurement = 1028 { } /** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ -client cluster OccupancySensing = 1030 { +cluster OccupancySensing = 1030 { revision 3; enum OccupancySensorTypeEnum : enum8 { diff --git a/examples/pump-app/silabs/data_model/pump-thread-app.matter b/examples/pump-app/silabs/data_model/pump-thread-app.matter index 8a3fff69bc1624..dd27c11ea5495c 100644 --- a/examples/pump-app/silabs/data_model/pump-thread-app.matter +++ b/examples/pump-app/silabs/data_model/pump-thread-app.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -40,11 +40,19 @@ server cluster Identify = 3 { int16u identifyTime = 0; } + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -79,6 +87,10 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -86,13 +98,33 @@ server cluster OnOff = 6 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + request struct OffWithEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + enum8 effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControlBitmap onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ -server cluster LevelControl = 8 { +cluster LevelControl = 8 { revision 5; enum MoveModeEnum : enum8 { @@ -117,10 +149,19 @@ server cluster LevelControl = 8 { } readonly attribute nullable int8u currentLevel = 0; - readonly attribute int8u minLevel = 2; - readonly attribute int8u maxLevel = 3; + readonly attribute optional int16u remainingTime = 1; + readonly attribute optional int8u minLevel = 2; + readonly attribute optional int8u maxLevel = 3; + readonly attribute optional int16u currentFrequency = 4; + readonly attribute optional int16u minFrequency = 5; + readonly attribute optional int16u maxFrequency = 6; attribute OptionsBitmap options = 15; + attribute optional int16u onOffTransitionTime = 16; attribute nullable int8u onLevel = 17; + attribute optional nullable int16u onTransitionTime = 18; + attribute optional nullable int16u offTransitionTime = 19; + attribute optional nullable int8u defaultMoveRate = 20; + attribute access(write: manage) optional nullable int8u startUpCurrentLevel = 16384; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -182,18 +223,33 @@ server cluster LevelControl = 8 { OptionsBitmap optionsOverride = 1; } + request struct MoveToClosestFrequencyRequest { + int16u frequency = 0; + } + + /** Command description for MoveToLevel */ command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + /** Command description for Move */ command Move(MoveRequest): DefaultSuccess = 1; + /** Command description for Step */ command Step(StepRequest): DefaultSuccess = 2; + /** Command description for Stop */ command Stop(StopRequest): DefaultSuccess = 3; + /** Command description for MoveToLevelWithOnOff */ command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + /** Command description for MoveWithOnOff */ command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + /** Command description for StepWithOnOff */ command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + /** Command description for StopWithOnOff */ command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; + /** Change the currrent frequency to the provided one, or a close + approximation if the exact provided one is not possible. */ + command MoveToClosestFrequency(MoveToClosestFrequencyRequest): DefaultSuccess = 8; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -216,6 +272,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -225,7 +282,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -server cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -249,7 +306,7 @@ server cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -308,7 +365,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -323,7 +380,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -395,12 +452,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -409,10 +470,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -488,7 +551,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -561,11 +624,12 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -604,17 +668,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -625,13 +689,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -712,12 +779,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -730,6 +800,22 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + request struct AddOrUpdateWiFiNetworkRequest { + octet_string<32> ssid = 0; + octet_string<64> credentials = 1; + optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; + } + request struct AddOrUpdateThreadNetworkRequest { octet_string<254> operationalDataset = 0; optional int64u breadcrumb = 1; @@ -740,47 +826,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -864,7 +962,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -883,12 +986,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ -server cluster ThreadNetworkDiagnostics = 53 { +cluster ThreadNetworkDiagnostics = 53 { revision 1; // NOTE: Default/not specifically set enum ConnectionStatusEnum : enum8 { @@ -985,6 +1090,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u panId = 3; readonly attribute nullable int64u extendedPanId = 4; readonly attribute nullable octet_string<17> meshLocalPrefix = 5; + readonly attribute optional int64u overrunCount = 6; readonly attribute NeighborTableStruct neighborTable[] = 7; readonly attribute RouteTableStruct routeTable[] = 8; readonly attribute nullable int32u partitionId = 9; @@ -992,6 +1098,51 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u dataVersion = 11; readonly attribute nullable int16u stableDataVersion = 12; readonly attribute nullable int8u leaderRouterId = 13; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; readonly attribute nullable SecurityPolicy securityPolicy = 59; readonly attribute nullable octet_string<4> channelPage0Mask = 60; readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; @@ -1003,11 +1154,12 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1048,13 +1200,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1107,15 +1262,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1129,6 +1298,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1141,38 +1316,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1227,26 +1390,30 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** An interface for configuring and controlling pumps. */ -server cluster PumpConfigurationAndControl = 512 { +cluster PumpConfigurationAndControl = 512 { revision 3; enum ControlModeEnum : enum8 { @@ -1341,26 +1508,26 @@ server cluster PumpConfigurationAndControl = 512 { readonly attribute nullable int16s maxPressure = 0; readonly attribute nullable int16u maxSpeed = 1; readonly attribute nullable int16u maxFlow = 2; - readonly attribute nullable int16s minConstPressure = 3; - readonly attribute nullable int16s maxConstPressure = 4; - readonly attribute nullable int16s minCompPressure = 5; - readonly attribute nullable int16s maxCompPressure = 6; - readonly attribute nullable int16u minConstSpeed = 7; - readonly attribute nullable int16u maxConstSpeed = 8; - readonly attribute nullable int16u minConstFlow = 9; - readonly attribute nullable int16u maxConstFlow = 10; - readonly attribute nullable int16s minConstTemp = 11; - readonly attribute nullable int16s maxConstTemp = 12; - readonly attribute PumpStatusBitmap pumpStatus = 16; + readonly attribute optional nullable int16s minConstPressure = 3; + readonly attribute optional nullable int16s maxConstPressure = 4; + readonly attribute optional nullable int16s minCompPressure = 5; + readonly attribute optional nullable int16s maxCompPressure = 6; + readonly attribute optional nullable int16u minConstSpeed = 7; + readonly attribute optional nullable int16u maxConstSpeed = 8; + readonly attribute optional nullable int16u minConstFlow = 9; + readonly attribute optional nullable int16u maxConstFlow = 10; + readonly attribute optional nullable int16s minConstTemp = 11; + readonly attribute optional nullable int16s maxConstTemp = 12; + readonly attribute optional PumpStatusBitmap pumpStatus = 16; readonly attribute OperationModeEnum effectiveOperationMode = 17; readonly attribute ControlModeEnum effectiveControlMode = 18; readonly attribute nullable int16s capacity = 19; - readonly attribute nullable int16u speed = 20; - attribute access(write: manage) nullable int24u lifetimeRunningHours = 21; - readonly attribute nullable int24u power = 22; - attribute access(write: manage) nullable int32u lifetimeEnergyConsumed = 23; + readonly attribute optional nullable int16u speed = 20; + attribute access(write: manage) optional nullable int24u lifetimeRunningHours = 21; + readonly attribute optional nullable int24u power = 22; + attribute access(write: manage) optional nullable int32u lifetimeEnergyConsumed = 23; attribute access(write: manage) OperationModeEnum operationMode = 32; - attribute access(write: manage) ControlModeEnum controlMode = 33; + attribute access(write: manage) optional ControlModeEnum controlMode = 33; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1370,13 +1537,13 @@ server cluster PumpConfigurationAndControl = 512 { } /** Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. */ -server cluster TemperatureMeasurement = 1026 { +cluster TemperatureMeasurement = 1026 { revision 1; // NOTE: Default/not specifically set readonly attribute nullable temperature measuredValue = 0; readonly attribute nullable temperature minMeasuredValue = 1; readonly attribute nullable temperature maxMeasuredValue = 2; - readonly attribute int16u tolerance = 3; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1386,7 +1553,7 @@ server cluster TemperatureMeasurement = 1026 { } /** Attributes and commands for configuring the measurement of pressure, and reporting pressure measurements. */ -server cluster PressureMeasurement = 1027 { +cluster PressureMeasurement = 1027 { revision 3; bitmap Feature : bitmap32 { @@ -1396,12 +1563,12 @@ server cluster PressureMeasurement = 1027 { readonly attribute nullable int16s measuredValue = 0; readonly attribute nullable int16s minMeasuredValue = 1; readonly attribute nullable int16s maxMeasuredValue = 2; - readonly attribute int16u tolerance = 3; - readonly attribute nullable int16s scaledValue = 16; - readonly attribute nullable int16s minScaledValue = 17; - readonly attribute nullable int16s maxScaledValue = 18; - readonly attribute int16u scaledTolerance = 19; - readonly attribute int8s scale = 20; + readonly attribute optional int16u tolerance = 3; + readonly attribute optional nullable int16s scaledValue = 16; + readonly attribute optional nullable int16s minScaledValue = 17; + readonly attribute optional nullable int16s maxScaledValue = 18; + readonly attribute optional int16u scaledTolerance = 19; + readonly attribute optional int8s scale = 20; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1411,13 +1578,13 @@ server cluster PressureMeasurement = 1027 { } /** Attributes and commands for configuring the measurement of flow, and reporting flow measurements. */ -server cluster FlowMeasurement = 1028 { +cluster FlowMeasurement = 1028 { revision 1; // NOTE: Default/not specifically set readonly attribute nullable int16u measuredValue = 0; readonly attribute nullable int16u minMeasuredValue = 1; readonly attribute nullable int16u maxMeasuredValue = 2; - readonly attribute int16u tolerance = 3; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1427,7 +1594,7 @@ server cluster FlowMeasurement = 1028 { } /** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ -client cluster OccupancySensing = 1030 { +cluster OccupancySensing = 1030 { revision 3; enum OccupancySensorTypeEnum : enum8 { diff --git a/examples/pump-app/silabs/data_model/pump-wifi-app.matter b/examples/pump-app/silabs/data_model/pump-wifi-app.matter index 8a3fff69bc1624..dd27c11ea5495c 100644 --- a/examples/pump-app/silabs/data_model/pump-wifi-app.matter +++ b/examples/pump-app/silabs/data_model/pump-wifi-app.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -40,11 +40,19 @@ server cluster Identify = 3 { int16u identifyTime = 0; } + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -79,6 +87,10 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -86,13 +98,33 @@ server cluster OnOff = 6 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + request struct OffWithEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + enum8 effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControlBitmap onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ -server cluster LevelControl = 8 { +cluster LevelControl = 8 { revision 5; enum MoveModeEnum : enum8 { @@ -117,10 +149,19 @@ server cluster LevelControl = 8 { } readonly attribute nullable int8u currentLevel = 0; - readonly attribute int8u minLevel = 2; - readonly attribute int8u maxLevel = 3; + readonly attribute optional int16u remainingTime = 1; + readonly attribute optional int8u minLevel = 2; + readonly attribute optional int8u maxLevel = 3; + readonly attribute optional int16u currentFrequency = 4; + readonly attribute optional int16u minFrequency = 5; + readonly attribute optional int16u maxFrequency = 6; attribute OptionsBitmap options = 15; + attribute optional int16u onOffTransitionTime = 16; attribute nullable int8u onLevel = 17; + attribute optional nullable int16u onTransitionTime = 18; + attribute optional nullable int16u offTransitionTime = 19; + attribute optional nullable int8u defaultMoveRate = 20; + attribute access(write: manage) optional nullable int8u startUpCurrentLevel = 16384; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -182,18 +223,33 @@ server cluster LevelControl = 8 { OptionsBitmap optionsOverride = 1; } + request struct MoveToClosestFrequencyRequest { + int16u frequency = 0; + } + + /** Command description for MoveToLevel */ command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + /** Command description for Move */ command Move(MoveRequest): DefaultSuccess = 1; + /** Command description for Step */ command Step(StepRequest): DefaultSuccess = 2; + /** Command description for Stop */ command Stop(StopRequest): DefaultSuccess = 3; + /** Command description for MoveToLevelWithOnOff */ command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + /** Command description for MoveWithOnOff */ command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + /** Command description for StepWithOnOff */ command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + /** Command description for StopWithOnOff */ command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; + /** Change the currrent frequency to the provided one, or a close + approximation if the exact provided one is not possible. */ + command MoveToClosestFrequency(MoveToClosestFrequencyRequest): DefaultSuccess = 8; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -216,6 +272,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -225,7 +282,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -server cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -249,7 +306,7 @@ server cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -308,7 +365,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -323,7 +380,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -395,12 +452,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -409,10 +470,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -488,7 +551,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -561,11 +624,12 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -604,17 +668,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -625,13 +689,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -712,12 +779,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -730,6 +800,22 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + request struct AddOrUpdateWiFiNetworkRequest { + octet_string<32> ssid = 0; + octet_string<64> credentials = 1; + optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; + } + request struct AddOrUpdateThreadNetworkRequest { octet_string<254> operationalDataset = 0; optional int64u breadcrumb = 1; @@ -740,47 +826,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -864,7 +962,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -883,12 +986,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ -server cluster ThreadNetworkDiagnostics = 53 { +cluster ThreadNetworkDiagnostics = 53 { revision 1; // NOTE: Default/not specifically set enum ConnectionStatusEnum : enum8 { @@ -985,6 +1090,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u panId = 3; readonly attribute nullable int64u extendedPanId = 4; readonly attribute nullable octet_string<17> meshLocalPrefix = 5; + readonly attribute optional int64u overrunCount = 6; readonly attribute NeighborTableStruct neighborTable[] = 7; readonly attribute RouteTableStruct routeTable[] = 8; readonly attribute nullable int32u partitionId = 9; @@ -992,6 +1098,51 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u dataVersion = 11; readonly attribute nullable int16u stableDataVersion = 12; readonly attribute nullable int8u leaderRouterId = 13; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; readonly attribute nullable SecurityPolicy securityPolicy = 59; readonly attribute nullable octet_string<4> channelPage0Mask = 60; readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; @@ -1003,11 +1154,12 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1048,13 +1200,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1107,15 +1262,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1129,6 +1298,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1141,38 +1316,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1227,26 +1390,30 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** An interface for configuring and controlling pumps. */ -server cluster PumpConfigurationAndControl = 512 { +cluster PumpConfigurationAndControl = 512 { revision 3; enum ControlModeEnum : enum8 { @@ -1341,26 +1508,26 @@ server cluster PumpConfigurationAndControl = 512 { readonly attribute nullable int16s maxPressure = 0; readonly attribute nullable int16u maxSpeed = 1; readonly attribute nullable int16u maxFlow = 2; - readonly attribute nullable int16s minConstPressure = 3; - readonly attribute nullable int16s maxConstPressure = 4; - readonly attribute nullable int16s minCompPressure = 5; - readonly attribute nullable int16s maxCompPressure = 6; - readonly attribute nullable int16u minConstSpeed = 7; - readonly attribute nullable int16u maxConstSpeed = 8; - readonly attribute nullable int16u minConstFlow = 9; - readonly attribute nullable int16u maxConstFlow = 10; - readonly attribute nullable int16s minConstTemp = 11; - readonly attribute nullable int16s maxConstTemp = 12; - readonly attribute PumpStatusBitmap pumpStatus = 16; + readonly attribute optional nullable int16s minConstPressure = 3; + readonly attribute optional nullable int16s maxConstPressure = 4; + readonly attribute optional nullable int16s minCompPressure = 5; + readonly attribute optional nullable int16s maxCompPressure = 6; + readonly attribute optional nullable int16u minConstSpeed = 7; + readonly attribute optional nullable int16u maxConstSpeed = 8; + readonly attribute optional nullable int16u minConstFlow = 9; + readonly attribute optional nullable int16u maxConstFlow = 10; + readonly attribute optional nullable int16s minConstTemp = 11; + readonly attribute optional nullable int16s maxConstTemp = 12; + readonly attribute optional PumpStatusBitmap pumpStatus = 16; readonly attribute OperationModeEnum effectiveOperationMode = 17; readonly attribute ControlModeEnum effectiveControlMode = 18; readonly attribute nullable int16s capacity = 19; - readonly attribute nullable int16u speed = 20; - attribute access(write: manage) nullable int24u lifetimeRunningHours = 21; - readonly attribute nullable int24u power = 22; - attribute access(write: manage) nullable int32u lifetimeEnergyConsumed = 23; + readonly attribute optional nullable int16u speed = 20; + attribute access(write: manage) optional nullable int24u lifetimeRunningHours = 21; + readonly attribute optional nullable int24u power = 22; + attribute access(write: manage) optional nullable int32u lifetimeEnergyConsumed = 23; attribute access(write: manage) OperationModeEnum operationMode = 32; - attribute access(write: manage) ControlModeEnum controlMode = 33; + attribute access(write: manage) optional ControlModeEnum controlMode = 33; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1370,13 +1537,13 @@ server cluster PumpConfigurationAndControl = 512 { } /** Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. */ -server cluster TemperatureMeasurement = 1026 { +cluster TemperatureMeasurement = 1026 { revision 1; // NOTE: Default/not specifically set readonly attribute nullable temperature measuredValue = 0; readonly attribute nullable temperature minMeasuredValue = 1; readonly attribute nullable temperature maxMeasuredValue = 2; - readonly attribute int16u tolerance = 3; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1386,7 +1553,7 @@ server cluster TemperatureMeasurement = 1026 { } /** Attributes and commands for configuring the measurement of pressure, and reporting pressure measurements. */ -server cluster PressureMeasurement = 1027 { +cluster PressureMeasurement = 1027 { revision 3; bitmap Feature : bitmap32 { @@ -1396,12 +1563,12 @@ server cluster PressureMeasurement = 1027 { readonly attribute nullable int16s measuredValue = 0; readonly attribute nullable int16s minMeasuredValue = 1; readonly attribute nullable int16s maxMeasuredValue = 2; - readonly attribute int16u tolerance = 3; - readonly attribute nullable int16s scaledValue = 16; - readonly attribute nullable int16s minScaledValue = 17; - readonly attribute nullable int16s maxScaledValue = 18; - readonly attribute int16u scaledTolerance = 19; - readonly attribute int8s scale = 20; + readonly attribute optional int16u tolerance = 3; + readonly attribute optional nullable int16s scaledValue = 16; + readonly attribute optional nullable int16s minScaledValue = 17; + readonly attribute optional nullable int16s maxScaledValue = 18; + readonly attribute optional int16u scaledTolerance = 19; + readonly attribute optional int8s scale = 20; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1411,13 +1578,13 @@ server cluster PressureMeasurement = 1027 { } /** Attributes and commands for configuring the measurement of flow, and reporting flow measurements. */ -server cluster FlowMeasurement = 1028 { +cluster FlowMeasurement = 1028 { revision 1; // NOTE: Default/not specifically set readonly attribute nullable int16u measuredValue = 0; readonly attribute nullable int16u minMeasuredValue = 1; readonly attribute nullable int16u maxMeasuredValue = 2; - readonly attribute int16u tolerance = 3; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1427,7 +1594,7 @@ server cluster FlowMeasurement = 1028 { } /** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ -client cluster OccupancySensing = 1030 { +cluster OccupancySensing = 1030 { revision 3; enum OccupancySensorTypeEnum : enum8 { diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter index a67089b8fa06b1..bf9d4c42b165dd 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -40,11 +40,19 @@ server cluster Identify = 3 { int16u identifyTime = 0; } + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -client cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -116,7 +124,7 @@ client cluster OnOff = 6 { } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -139,6 +147,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -148,7 +157,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -server cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -172,7 +181,7 @@ server cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -231,7 +240,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -246,7 +255,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -318,12 +327,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -332,10 +345,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -411,7 +426,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -484,11 +499,12 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -527,17 +543,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -548,13 +564,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -635,12 +654,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -653,6 +675,22 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + request struct AddOrUpdateWiFiNetworkRequest { + octet_string<32> ssid = 0; + octet_string<64> credentials = 1; + optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; + } + request struct AddOrUpdateThreadNetworkRequest { octet_string<254> operationalDataset = 0; optional int64u breadcrumb = 1; @@ -663,47 +701,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -787,7 +837,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -806,12 +861,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ -server cluster ThreadNetworkDiagnostics = 53 { +cluster ThreadNetworkDiagnostics = 53 { revision 1; // NOTE: Default/not specifically set enum ConnectionStatusEnum : enum8 { @@ -908,6 +965,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u panId = 3; readonly attribute nullable int64u extendedPanId = 4; readonly attribute nullable octet_string<17> meshLocalPrefix = 5; + readonly attribute optional int64u overrunCount = 6; readonly attribute NeighborTableStruct neighborTable[] = 7; readonly attribute RouteTableStruct routeTable[] = 8; readonly attribute nullable int32u partitionId = 9; @@ -915,6 +973,51 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u dataVersion = 11; readonly attribute nullable int16u stableDataVersion = 12; readonly attribute nullable int8u leaderRouterId = 13; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; readonly attribute nullable SecurityPolicy securityPolicy = 59; readonly attribute nullable octet_string<4> channelPage0Mask = 60; readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; @@ -926,11 +1029,12 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -971,13 +1075,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1030,15 +1137,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1052,6 +1173,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1064,38 +1191,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1150,26 +1265,30 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** An interface for configuring and controlling pumps. */ -client cluster PumpConfigurationAndControl = 512 { +cluster PumpConfigurationAndControl = 512 { revision 3; enum ControlModeEnum : enum8 { @@ -1293,7 +1412,7 @@ client cluster PumpConfigurationAndControl = 512 { } /** Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. */ -client cluster TemperatureMeasurement = 1026 { +cluster TemperatureMeasurement = 1026 { revision 1; // NOTE: Default/not specifically set readonly attribute nullable temperature measuredValue = 0; @@ -1309,7 +1428,7 @@ client cluster TemperatureMeasurement = 1026 { } /** Attributes and commands for configuring the measurement of pressure, and reporting pressure measurements. */ -client cluster PressureMeasurement = 1027 { +cluster PressureMeasurement = 1027 { revision 3; bitmap Feature : bitmap32 { @@ -1334,7 +1453,7 @@ client cluster PressureMeasurement = 1027 { } /** Attributes and commands for configuring the measurement of flow, and reporting flow measurements. */ -client cluster FlowMeasurement = 1028 { +cluster FlowMeasurement = 1028 { revision 1; // NOTE: Default/not specifically set readonly attribute nullable int16u measuredValue = 0; diff --git a/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter b/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter index afa708a1ae8320..ab9d421d9436c6 100644 --- a/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter +++ b/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -25,7 +25,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; - readonly attribute SemanticTagStruct tagList[] = 4; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -38,7 +38,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -97,7 +97,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -112,7 +112,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -184,15 +184,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute boolean reachable = 17; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -201,13 +202,15 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Nodes should be expected to be deployed to any and all regions of the world. These global regions may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -224,7 +227,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -252,6 +255,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -264,7 +269,7 @@ server cluster TimeFormatLocalization = 44 { may have differing preferences for the units in which values are conveyed in communication to a user. As such, Nodes that visually or audibly convey measurable values to the user need a mechanism by which they can be configured to use a user’s preferred unit. */ -server cluster UnitLocalization = 45 { +cluster UnitLocalization = 45 { revision 1; enum TempUnitEnum : enum8 { @@ -277,7 +282,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute access(write: manage) TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) optional TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -287,7 +292,7 @@ server cluster UnitLocalization = 45 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -326,17 +331,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -347,13 +352,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -434,12 +442,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -452,6 +463,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -471,48 +489,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -596,12 +625,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -620,12 +649,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster WiFiNetworkDiagnostics = 54 { +cluster WiFiNetworkDiagnostics = 54 { revision 1; // NOTE: Default/not specifically set enum AssociationFailureCauseEnum : enum8 { @@ -682,14 +713,14 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; - readonly attribute nullable int32u beaconLostCount = 5; - readonly attribute nullable int32u beaconRxCount = 6; - readonly attribute nullable int32u packetMulticastRxCount = 7; - readonly attribute nullable int32u packetMulticastTxCount = 8; - readonly attribute nullable int32u packetUnicastRxCount = 9; - readonly attribute nullable int32u packetUnicastTxCount = 10; - readonly attribute nullable int64u currentMaxRate = 11; - readonly attribute nullable int64u overrunCount = 12; + readonly attribute optional nullable int32u beaconLostCount = 5; + readonly attribute optional nullable int32u beaconRxCount = 6; + readonly attribute optional nullable int32u packetMulticastRxCount = 7; + readonly attribute optional nullable int32u packetMulticastTxCount = 8; + readonly attribute optional nullable int32u packetUnicastRxCount = 9; + readonly attribute optional nullable int32u packetUnicastTxCount = 10; + readonly attribute optional nullable int64u currentMaxRate = 11; + readonly attribute optional nullable int64u overrunCount = 12; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -697,11 +728,12 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 */ command ResetCounts(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -738,12 +770,20 @@ server cluster AdministratorCommissioning = 60 { octet_string<32> salt = 4; } + request struct OpenBasicCommissioningWindowRequest { + int16u commissioningTimeout = 0; + } + + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -796,15 +836,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -818,6 +872,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -830,38 +890,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -916,26 +964,30 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** Attributes and commands for configuring the temperature control, and reporting temperature. */ -server cluster TemperatureControl = 86 { +cluster TemperatureControl = 86 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -944,8 +996,12 @@ server cluster TemperatureControl = 86 { kTemperatureStep = 0x4; } - readonly attribute int8u selectedTemperatureLevel = 4; - readonly attribute char_string supportedTemperatureLevels[] = 5; + readonly attribute optional temperature temperatureSetpoint = 0; + readonly attribute optional temperature minTemperature = 1; + readonly attribute optional temperature maxTemperature = 2; + readonly attribute optional temperature step = 3; + readonly attribute optional int8u selectedTemperatureLevel = 4; + readonly attribute optional char_string supportedTemperatureLevels[] = 5; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -958,6 +1014,7 @@ server cluster TemperatureControl = 86 { optional int8u targetTemperatureLevel = 1; } + /** Set Temperature */ command SetTemperature(SetTemperatureRequest): DefaultSuccess = 0; } diff --git a/examples/rvc-app/rvc-common/rvc-app.matter b/examples/rvc-app/rvc-common/rvc-app.matter index 2c565deef1c480..8fdf942148f696 100644 --- a/examples/rvc-app/rvc-common/rvc-app.matter +++ b/examples/rvc-app/rvc-common/rvc-app.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -73,6 +75,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -85,7 +88,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -144,7 +147,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -159,7 +162,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -231,14 +234,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -247,10 +252,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -289,17 +296,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -310,13 +317,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -397,12 +407,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -415,6 +428,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -434,48 +454,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -510,11 +541,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -598,12 +637,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -622,12 +661,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -664,12 +705,20 @@ server cluster AdministratorCommissioning = 60 { octet_string<32> salt = 4; } + request struct OpenBasicCommissioningWindowRequest { + int16u commissioningTimeout = 0; + } + + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -722,15 +771,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -744,6 +807,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -756,38 +825,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -842,26 +899,30 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** Attributes and commands for selecting a mode from a list of supported options. */ -server cluster RvcRunMode = 84 { +cluster RvcRunMode = 84 { revision 2; enum ModeTag : enum16 { @@ -897,6 +958,7 @@ server cluster RvcRunMode = 84 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; + attribute optional nullable int8u onMode = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -913,11 +975,13 @@ server cluster RvcRunMode = 84 { optional char_string statusText = 1; } + /** This command is used to change device modes. + On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; } /** Attributes and commands for selecting a mode from a list of supported options. */ -server cluster RvcCleanMode = 85 { +cluster RvcCleanMode = 85 { revision 2; enum ModeTag : enum16 { @@ -947,6 +1011,7 @@ server cluster RvcCleanMode = 85 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; + attribute optional nullable int8u onMode = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -963,11 +1028,13 @@ server cluster RvcCleanMode = 85 { optional char_string statusText = 1; } + /** This command is used to change device modes. + On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; } /** This cluster supports remotely monitoring and, where supported, changing the operational state of a Robotic Vacuum. */ -server cluster RvcOperationalState = 97 { +cluster RvcOperationalState = 97 { revision 1; // NOTE: Default/not specifically set enum ErrorStateEnum : enum8 { @@ -1010,6 +1077,7 @@ server cluster RvcOperationalState = 97 { readonly attribute nullable char_string phaseList[] = 0; readonly attribute nullable int8u currentPhase = 1; + readonly attribute optional nullable elapsed_s countdownTime = 2; readonly attribute OperationalStateStruct operationalStateList[] = 3; readonly attribute enum8 operationalState = 4; readonly attribute ErrorStateStruct operationalError = 5; @@ -1024,7 +1092,13 @@ server cluster RvcOperationalState = 97 { ErrorStateStruct commandResponseState = 0; } + /** Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. */ command Pause(): OperationalCommandResponse = 0; + /** Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. */ + command Stop(): OperationalCommandResponse = 1; + /** Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it can be started. */ + command Start(): OperationalCommandResponse = 2; + /** Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). */ command Resume(): OperationalCommandResponse = 3; } diff --git a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter index 88bcba64554ddc..68bee783b16e79 100644 --- a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter +++ b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -74,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -144,6 +152,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -156,7 +165,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -215,7 +224,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -230,7 +239,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -302,14 +311,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -318,10 +329,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -397,7 +410,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -470,6 +483,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -477,7 +491,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -494,7 +508,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -522,8 +536,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -533,7 +547,7 @@ server cluster TimeFormatLocalization = 44 { } /** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ -server cluster PowerSource = 47 { +cluster PowerSource = 47 { revision 1; // NOTE: Default/not specifically set enum BatApprovedChemistryEnum : enum16 { @@ -754,9 +768,34 @@ server cluster PowerSource = 47 { readonly attribute PowerSourceStatusEnum status = 0; readonly attribute int8u order = 1; readonly attribute char_string<60> description = 2; - readonly attribute BatChargeLevelEnum batChargeLevel = 14; - readonly attribute boolean batReplacementNeeded = 15; - readonly attribute BatReplaceabilityEnum batReplaceability = 16; + readonly attribute optional nullable int32u wiredAssessedInputVoltage = 3; + readonly attribute optional nullable int16u wiredAssessedInputFrequency = 4; + readonly attribute optional WiredCurrentTypeEnum wiredCurrentType = 5; + readonly attribute optional nullable int32u wiredAssessedCurrent = 6; + readonly attribute optional int32u wiredNominalVoltage = 7; + readonly attribute optional int32u wiredMaximumCurrent = 8; + readonly attribute optional boolean wiredPresent = 9; + readonly attribute optional WiredFaultEnum activeWiredFaults[] = 10; + readonly attribute optional nullable int32u batVoltage = 11; + readonly attribute optional nullable int8u batPercentRemaining = 12; + readonly attribute optional nullable int32u batTimeRemaining = 13; + readonly attribute optional BatChargeLevelEnum batChargeLevel = 14; + readonly attribute optional boolean batReplacementNeeded = 15; + readonly attribute optional BatReplaceabilityEnum batReplaceability = 16; + readonly attribute optional boolean batPresent = 17; + readonly attribute optional BatFaultEnum activeBatFaults[] = 18; + readonly attribute optional char_string<60> batReplacementDescription = 19; + readonly attribute optional BatCommonDesignationEnum batCommonDesignation = 20; + readonly attribute optional char_string<20> batANSIDesignation = 21; + readonly attribute optional char_string<20> batIECDesignation = 22; + readonly attribute optional BatApprovedChemistryEnum batApprovedChemistry = 23; + readonly attribute optional int32u batCapacity = 24; + readonly attribute optional int8u batQuantity = 25; + readonly attribute optional BatChargeStateEnum batChargeState = 26; + readonly attribute optional nullable int32u batTimeToFullCharge = 27; + readonly attribute optional boolean batFunctionalWhileCharging = 28; + readonly attribute optional nullable int32u batChargingCurrent = 29; + readonly attribute optional BatChargeFaultEnum activeBatChargeFaults[] = 30; readonly attribute endpoint_no endpointList[] = 31; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -767,7 +806,7 @@ server cluster PowerSource = 47 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -806,17 +845,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -827,13 +866,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -914,12 +956,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -932,6 +977,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -951,48 +1003,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -1027,11 +1090,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -1115,12 +1186,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1139,12 +1210,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -1165,10 +1238,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1176,11 +1249,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ -server cluster ThreadNetworkDiagnostics = 53 { +cluster ThreadNetworkDiagnostics = 53 { revision 1; // NOTE: Default/not specifically set enum ConnectionStatusEnum : enum8 { @@ -1277,7 +1351,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u panId = 3; readonly attribute nullable int64u extendedPanId = 4; readonly attribute nullable octet_string<17> meshLocalPrefix = 5; - readonly attribute int64u overrunCount = 6; + readonly attribute optional int64u overrunCount = 6; readonly attribute NeighborTableStruct neighborTable[] = 7; readonly attribute RouteTableStruct routeTable[] = 8; readonly attribute nullable int32u partitionId = 9; @@ -1285,51 +1359,51 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u dataVersion = 11; readonly attribute nullable int16u stableDataVersion = 12; readonly attribute nullable int8u leaderRouterId = 13; - readonly attribute int16u detachedRoleCount = 14; - readonly attribute int16u childRoleCount = 15; - readonly attribute int16u routerRoleCount = 16; - readonly attribute int16u leaderRoleCount = 17; - readonly attribute int16u attachAttemptCount = 18; - readonly attribute int16u partitionIdChangeCount = 19; - readonly attribute int16u betterPartitionAttachAttemptCount = 20; - readonly attribute int16u parentChangeCount = 21; - readonly attribute int32u txTotalCount = 22; - readonly attribute int32u txUnicastCount = 23; - readonly attribute int32u txBroadcastCount = 24; - readonly attribute int32u txAckRequestedCount = 25; - readonly attribute int32u txAckedCount = 26; - readonly attribute int32u txNoAckRequestedCount = 27; - readonly attribute int32u txDataCount = 28; - readonly attribute int32u txDataPollCount = 29; - readonly attribute int32u txBeaconCount = 30; - readonly attribute int32u txBeaconRequestCount = 31; - readonly attribute int32u txOtherCount = 32; - readonly attribute int32u txRetryCount = 33; - readonly attribute int32u txDirectMaxRetryExpiryCount = 34; - readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; - readonly attribute int32u txErrCcaCount = 36; - readonly attribute int32u txErrAbortCount = 37; - readonly attribute int32u txErrBusyChannelCount = 38; - readonly attribute int32u rxTotalCount = 39; - readonly attribute int32u rxUnicastCount = 40; - readonly attribute int32u rxBroadcastCount = 41; - readonly attribute int32u rxDataCount = 42; - readonly attribute int32u rxDataPollCount = 43; - readonly attribute int32u rxBeaconCount = 44; - readonly attribute int32u rxBeaconRequestCount = 45; - readonly attribute int32u rxOtherCount = 46; - readonly attribute int32u rxAddressFilteredCount = 47; - readonly attribute int32u rxDestAddrFilteredCount = 48; - readonly attribute int32u rxDuplicatedCount = 49; - readonly attribute int32u rxErrNoFrameCount = 50; - readonly attribute int32u rxErrUnknownNeighborCount = 51; - readonly attribute int32u rxErrInvalidSrcAddrCount = 52; - readonly attribute int32u rxErrSecCount = 53; - readonly attribute int32u rxErrFcsCount = 54; - readonly attribute int32u rxErrOtherCount = 55; - readonly attribute nullable int64u activeTimestamp = 56; - readonly attribute nullable int64u pendingTimestamp = 57; - readonly attribute nullable int32u delay = 58; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; readonly attribute nullable SecurityPolicy securityPolicy = 59; readonly attribute nullable octet_string<4> channelPage0Mask = 60; readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; @@ -1341,11 +1415,12 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1386,13 +1461,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1445,15 +1523,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1467,6 +1559,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1479,38 +1577,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1565,27 +1651,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1603,7 +1693,7 @@ server cluster FixedLabel = 64 { } /** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ -server cluster UserLabel = 65 { +cluster UserLabel = 65 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1621,7 +1711,7 @@ server cluster UserLabel = 65 { } /** Allows servers to ensure that listed clients are notified when a server is available for communication. */ -server cluster IcdManagement = 70 { +cluster IcdManagement = 70 { revision 2; bitmap Feature : bitmap32 { @@ -1659,9 +1749,11 @@ server cluster IcdManagement = 70 { readonly attribute int32u idleModeDuration = 0; readonly attribute int32u activeModeDuration = 1; readonly attribute int16u activeModeThreshold = 2; - readonly attribute access(read: administer) MonitoringRegistrationStruct registeredClients[] = 3; - readonly attribute access(read: administer) int32u ICDCounter = 4; - readonly attribute int16u clientsSupportedPerFabric = 5; + readonly attribute access(read: administer) optional MonitoringRegistrationStruct registeredClients[] = 3; + readonly attribute access(read: administer) optional int32u ICDCounter = 4; + readonly attribute optional int16u clientsSupportedPerFabric = 5; + readonly attribute optional UserActiveModeTriggerBitmap userActiveModeTriggerHint = 6; + readonly attribute optional char_string<128> userActiveModeTriggerInstruction = 7; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1676,22 +1768,29 @@ server cluster IcdManagement = 70 { optional octet_string<16> verificationKey = 3; } + response struct RegisterClientResponse = 1 { + int32u ICDCounter = 0; + } + request struct UnregisterClientRequest { node_id checkInNodeID = 0; optional octet_string<16> verificationKey = 1; } - response struct RegisterClientResponse = 1 { - int32u ICDCounter = 0; + response struct StayActiveResponse = 4 { + int32u promisedActiveDuration = 0; } + /** Register a client to the end device */ fabric command access(invoke: manage) RegisterClient(RegisterClientRequest): RegisterClientResponse = 0; + /** Unregister a client from an end device */ fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2; + /** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */ command access(invoke: manage) StayActiveRequest(): StayActiveResponse = 3; } /** This cluster provides an interface for observing and managing the state of smoke and CO alarms. */ -server cluster SmokeCoAlarm = 92 { +cluster SmokeCoAlarm = 92 { revision 1; enum AlarmStateEnum : enum8 { @@ -1779,18 +1878,18 @@ server cluster SmokeCoAlarm = 92 { } readonly attribute ExpressedStateEnum expressedState = 0; - readonly attribute AlarmStateEnum smokeState = 1; - readonly attribute AlarmStateEnum COState = 2; + readonly attribute optional AlarmStateEnum smokeState = 1; + readonly attribute optional AlarmStateEnum COState = 2; readonly attribute AlarmStateEnum batteryAlert = 3; - readonly attribute MuteStateEnum deviceMuted = 4; + readonly attribute optional MuteStateEnum deviceMuted = 4; readonly attribute boolean testInProgress = 5; readonly attribute boolean hardwareFaultAlert = 6; readonly attribute EndOfServiceEnum endOfServiceAlert = 7; - readonly attribute AlarmStateEnum interconnectSmokeAlarm = 8; - readonly attribute AlarmStateEnum interconnectCOAlarm = 9; - readonly attribute ContaminationStateEnum contaminationState = 10; - attribute access(write: manage) SensitivityEnum smokeSensitivityLevel = 11; - readonly attribute epoch_s expiryDate = 12; + readonly attribute optional AlarmStateEnum interconnectSmokeAlarm = 8; + readonly attribute optional AlarmStateEnum interconnectCOAlarm = 9; + readonly attribute optional ContaminationStateEnum contaminationState = 10; + attribute access(write: manage) optional SensitivityEnum smokeSensitivityLevel = 11; + readonly attribute optional epoch_s expiryDate = 12; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1798,6 +1897,7 @@ server cluster SmokeCoAlarm = 92 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** This command SHALL initiate a device self-test. */ command SelfTestRequest(): DefaultSuccess = 0; } diff --git a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter index b143f6f1eeae04..a56b590caf4d4a 100644 --- a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter +++ b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -25,6 +25,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -37,7 +38,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -96,7 +97,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -111,7 +112,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -183,14 +184,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -199,10 +202,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -278,7 +283,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -351,6 +356,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -358,7 +364,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -375,7 +381,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -403,8 +409,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -417,7 +423,7 @@ server cluster TimeFormatLocalization = 44 { may have differing preferences for the units in which values are conveyed in communication to a user. As such, Nodes that visually or audibly convey measurable values to the user need a mechanism by which they can be configured to use a user’s preferred unit. */ -server cluster UnitLocalization = 45 { +cluster UnitLocalization = 45 { revision 1; enum TempUnitEnum : enum8 { @@ -430,7 +436,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute access(write: manage) TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) optional TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -440,7 +446,7 @@ server cluster UnitLocalization = 45 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -479,17 +485,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -500,13 +506,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -587,12 +596,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -605,6 +617,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -614,29 +633,16 @@ server cluster NetworkCommissioning = 49 { optional octet_string<32> possessionNonce = 5; } - request struct RemoveNetworkRequest { - octet_string<32> networkID = 0; + request struct AddOrUpdateThreadNetworkRequest { + octet_string<254> operationalDataset = 0; optional int64u breadcrumb = 1; } - request struct ConnectNetworkRequest { + request struct RemoveNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } - request struct ReorderNetworkRequest { - octet_string<32> networkID = 0; - int8u networkIndex = 1; - optional int64u breadcrumb = 2; - } - - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - response struct NetworkConfigResponse = 5 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; @@ -645,21 +651,51 @@ server cluster NetworkCommissioning = 49 { optional octet_string<64> possessionSignature = 4; } + request struct ConnectNetworkRequest { + octet_string<32> networkID = 0; + optional int64u breadcrumb = 1; + } + response struct ConnectNetworkResponse = 7 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string debugText = 1; nullable int32s errorValue = 2; } + request struct ReorderNetworkRequest { + octet_string<32> networkID = 0; + int8u networkIndex = 1; + optional int64u breadcrumb = 2; + } + + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; + } + + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; + } + + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ + command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -694,11 +730,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -782,12 +826,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -806,12 +850,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -832,17 +878,23 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; 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; + + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ + command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster WiFiNetworkDiagnostics = 54 { +cluster WiFiNetworkDiagnostics = 54 { revision 1; // NOTE: Default/not specifically set enum AssociationFailureCauseEnum : enum8 { @@ -899,24 +951,27 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; - readonly attribute nullable int32u beaconLostCount = 5; - readonly attribute nullable int32u beaconRxCount = 6; - readonly attribute nullable int32u packetMulticastRxCount = 7; - readonly attribute nullable int32u packetMulticastTxCount = 8; - readonly attribute nullable int32u packetUnicastRxCount = 9; - readonly attribute nullable int32u packetUnicastTxCount = 10; - readonly attribute nullable int64u currentMaxRate = 11; - readonly attribute nullable int64u overrunCount = 12; + readonly attribute optional nullable int32u beaconLostCount = 5; + readonly attribute optional nullable int32u beaconRxCount = 6; + readonly attribute optional nullable int32u packetMulticastRxCount = 7; + readonly attribute optional nullable int32u packetMulticastTxCount = 8; + readonly attribute optional nullable int32u packetUnicastRxCount = 9; + readonly attribute optional nullable int32u packetUnicastTxCount = 10; + readonly attribute optional nullable int64u currentMaxRate = 11; + readonly attribute optional nullable int64u overrunCount = 12; 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; + + /** Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 */ + command ResetCounts(): DefaultSuccess = 0; } /** The Ethernet Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster EthernetNetworkDiagnostics = 55 { +cluster EthernetNetworkDiagnostics = 55 { revision 1; // NOTE: Default/not specifically set enum PHYRateEnum : enum8 { @@ -937,15 +992,15 @@ server cluster EthernetNetworkDiagnostics = 55 { kErrorCounts = 0x2; } - readonly attribute nullable PHYRateEnum PHYRate = 0; - readonly attribute nullable boolean fullDuplex = 1; - readonly attribute int64u packetRxCount = 2; - readonly attribute int64u packetTxCount = 3; - readonly attribute int64u txErrCount = 4; - readonly attribute int64u collisionCount = 5; - readonly attribute int64u overrunCount = 6; - readonly attribute nullable boolean carrierDetect = 7; - readonly attribute int64u timeSinceReset = 8; + readonly attribute optional nullable PHYRateEnum PHYRate = 0; + readonly attribute optional nullable boolean fullDuplex = 1; + readonly attribute optional int64u packetRxCount = 2; + readonly attribute optional int64u packetTxCount = 3; + readonly attribute optional int64u txErrCount = 4; + readonly attribute optional int64u collisionCount = 5; + readonly attribute optional int64u overrunCount = 6; + readonly attribute optional nullable boolean carrierDetect = 7; + readonly attribute optional int64u timeSinceReset = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -953,11 +1008,12 @@ server cluster EthernetNetworkDiagnostics = 55 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the attributes: PacketRxCount, PacketTxCount, TxErrCount, CollisionCount, OverrunCount to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -998,13 +1054,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1057,15 +1116,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1079,6 +1152,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1091,38 +1170,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1177,27 +1244,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1215,7 +1286,7 @@ server cluster FixedLabel = 64 { } /** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ -server cluster UserLabel = 65 { +cluster UserLabel = 65 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1233,12 +1304,13 @@ server cluster UserLabel = 65 { } /** Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. */ -server cluster TemperatureMeasurement = 1026 { +cluster TemperatureMeasurement = 1026 { revision 1; // NOTE: Default/not specifically set readonly attribute nullable temperature measuredValue = 0; readonly attribute nullable temperature minMeasuredValue = 1; readonly attribute nullable temperature maxMeasuredValue = 2; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter index e41f8fc45f88c9..b1db44c4f0e71c 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -client cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -52,7 +52,7 @@ client cluster Identify = 3 { } /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -90,11 +90,19 @@ server cluster Identify = 3 { int16u identifyTime = 0; } + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -118,54 +126,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** Attributes and commands for scene configuration and manipulation. */ -provisional server cluster Scenes = 5 { +provisional cluster Scenes = 5 { revision 5; bitmap CopyModeBitmap : bitmap8 { @@ -202,7 +216,12 @@ provisional server cluster Scenes = 5 { fabric_idx fabricIndex = 254; } + readonly attribute optional int8u sceneCount = 0; + readonly attribute optional int8u currentScene = 1; + readonly attribute optional group_id currentGroup = 2; + readonly attribute optional boolean sceneValid = 3; readonly attribute NameSupportBitmap nameSupport = 4; + readonly attribute optional nullable node_id lastConfiguredBy = 5; readonly attribute int16u sceneTableSize = 6; readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; readonly attribute command_id generatedCommandList[] = 65528; @@ -220,25 +239,57 @@ provisional server cluster Scenes = 5 { ExtensionFieldSet extensionFieldSets[] = 4; } + response struct AddSceneResponse = 0 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + request struct ViewSceneRequest { group_id groupID = 0; int8u sceneID = 1; } + response struct ViewSceneResponse = 1 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + request struct RemoveSceneRequest { group_id groupID = 0; int8u sceneID = 1; } + response struct RemoveSceneResponse = 2 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + request struct RemoveAllScenesRequest { group_id groupID = 0; } + response struct RemoveAllScenesResponse = 3 { + status status = 0; + group_id groupID = 1; + } + request struct StoreSceneRequest { group_id groupID = 0; int8u sceneID = 1; } + response struct StoreSceneResponse = 4 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + request struct RecallSceneRequest { group_id groupID = 0; int8u sceneID = 1; @@ -249,56 +300,79 @@ provisional server cluster Scenes = 5 { group_id groupID = 0; } - response struct AddSceneResponse = 0 { + response struct GetSceneMembershipResponse = 6 { status status = 0; - group_id groupID = 1; - int8u sceneID = 2; + nullable int8u capacity = 1; + group_id groupID = 2; + optional int8u sceneList[] = 3; } - response struct ViewSceneResponse = 1 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - optional int16u transitionTime = 3; - optional char_string sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; + request struct EnhancedAddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int16u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; } - response struct RemoveSceneResponse = 2 { + response struct EnhancedAddSceneResponse = 64 { status status = 0; group_id groupID = 1; int8u sceneID = 2; } - response struct RemoveAllScenesResponse = 3 { - status status = 0; - group_id groupID = 1; + request struct EnhancedViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; } - response struct StoreSceneResponse = 4 { + response struct EnhancedViewSceneResponse = 65 { status status = 0; group_id groupID = 1; int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; } - response struct GetSceneMembershipResponse = 6 { + request struct CopySceneRequest { + CopyModeBitmap mode = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + group_id groupIdentifierTo = 3; + int8u sceneIdentifierTo = 4; + } + + response struct CopySceneResponse = 66 { status status = 0; - nullable int8u capacity = 1; - group_id groupID = 2; - optional int8u sceneList[] = 3; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; } + /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; + /** Retrieves the requested scene entry from its Scene table. */ fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; + /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ + fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; + /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ + fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; + /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ + fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -321,6 +395,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -330,7 +405,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -server cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -354,7 +429,7 @@ server cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -413,7 +488,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -428,7 +503,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -500,15 +575,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute boolean reachable = 17; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -517,10 +593,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -596,7 +674,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -669,6 +747,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -676,7 +755,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -693,7 +772,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -721,8 +800,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -735,7 +814,7 @@ server cluster TimeFormatLocalization = 44 { may have differing preferences for the units in which values are conveyed in communication to a user. As such, Nodes that visually or audibly convey measurable values to the user need a mechanism by which they can be configured to use a user’s preferred unit. */ -server cluster UnitLocalization = 45 { +cluster UnitLocalization = 45 { revision 1; enum TempUnitEnum : enum8 { @@ -748,7 +827,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute access(write: manage) TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) optional TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -758,7 +837,7 @@ server cluster UnitLocalization = 45 { } /** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ -server cluster PowerSource = 47 { +cluster PowerSource = 47 { revision 1; // NOTE: Default/not specifically set enum BatApprovedChemistryEnum : enum16 { @@ -979,7 +1058,34 @@ server cluster PowerSource = 47 { readonly attribute PowerSourceStatusEnum status = 0; readonly attribute int8u order = 1; readonly attribute char_string<60> description = 2; - readonly attribute WiredCurrentTypeEnum wiredCurrentType = 5; + readonly attribute optional nullable int32u wiredAssessedInputVoltage = 3; + readonly attribute optional nullable int16u wiredAssessedInputFrequency = 4; + readonly attribute optional WiredCurrentTypeEnum wiredCurrentType = 5; + readonly attribute optional nullable int32u wiredAssessedCurrent = 6; + readonly attribute optional int32u wiredNominalVoltage = 7; + readonly attribute optional int32u wiredMaximumCurrent = 8; + readonly attribute optional boolean wiredPresent = 9; + readonly attribute optional WiredFaultEnum activeWiredFaults[] = 10; + readonly attribute optional nullable int32u batVoltage = 11; + readonly attribute optional nullable int8u batPercentRemaining = 12; + readonly attribute optional nullable int32u batTimeRemaining = 13; + readonly attribute optional BatChargeLevelEnum batChargeLevel = 14; + readonly attribute optional boolean batReplacementNeeded = 15; + readonly attribute optional BatReplaceabilityEnum batReplaceability = 16; + readonly attribute optional boolean batPresent = 17; + readonly attribute optional BatFaultEnum activeBatFaults[] = 18; + readonly attribute optional char_string<60> batReplacementDescription = 19; + readonly attribute optional BatCommonDesignationEnum batCommonDesignation = 20; + readonly attribute optional char_string<20> batANSIDesignation = 21; + readonly attribute optional char_string<20> batIECDesignation = 22; + readonly attribute optional BatApprovedChemistryEnum batApprovedChemistry = 23; + readonly attribute optional int32u batCapacity = 24; + readonly attribute optional int8u batQuantity = 25; + readonly attribute optional BatChargeStateEnum batChargeState = 26; + readonly attribute optional nullable int32u batTimeToFullCharge = 27; + readonly attribute optional boolean batFunctionalWhileCharging = 28; + readonly attribute optional nullable int32u batChargingCurrent = 29; + readonly attribute optional BatChargeFaultEnum activeBatChargeFaults[] = 30; readonly attribute endpoint_no endpointList[] = 31; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -990,7 +1096,7 @@ server cluster PowerSource = 47 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -1029,17 +1135,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -1050,13 +1156,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -1137,12 +1246,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1155,6 +1267,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -1174,48 +1293,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -1299,12 +1429,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1323,12 +1453,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ -server cluster ThreadNetworkDiagnostics = 53 { +cluster ThreadNetworkDiagnostics = 53 { revision 1; // NOTE: Default/not specifically set enum ConnectionStatusEnum : enum8 { @@ -1425,7 +1557,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u panId = 3; readonly attribute nullable int64u extendedPanId = 4; readonly attribute nullable octet_string<17> meshLocalPrefix = 5; - readonly attribute int64u overrunCount = 6; + readonly attribute optional int64u overrunCount = 6; readonly attribute NeighborTableStruct neighborTable[] = 7; readonly attribute RouteTableStruct routeTable[] = 8; readonly attribute nullable int32u partitionId = 9; @@ -1433,51 +1565,51 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u dataVersion = 11; readonly attribute nullable int16u stableDataVersion = 12; readonly attribute nullable int8u leaderRouterId = 13; - readonly attribute int16u detachedRoleCount = 14; - readonly attribute int16u childRoleCount = 15; - readonly attribute int16u routerRoleCount = 16; - readonly attribute int16u leaderRoleCount = 17; - readonly attribute int16u attachAttemptCount = 18; - readonly attribute int16u partitionIdChangeCount = 19; - readonly attribute int16u betterPartitionAttachAttemptCount = 20; - readonly attribute int16u parentChangeCount = 21; - readonly attribute int32u txTotalCount = 22; - readonly attribute int32u txUnicastCount = 23; - readonly attribute int32u txBroadcastCount = 24; - readonly attribute int32u txAckRequestedCount = 25; - readonly attribute int32u txAckedCount = 26; - readonly attribute int32u txNoAckRequestedCount = 27; - readonly attribute int32u txDataCount = 28; - readonly attribute int32u txDataPollCount = 29; - readonly attribute int32u txBeaconCount = 30; - readonly attribute int32u txBeaconRequestCount = 31; - readonly attribute int32u txOtherCount = 32; - readonly attribute int32u txRetryCount = 33; - readonly attribute int32u txDirectMaxRetryExpiryCount = 34; - readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; - readonly attribute int32u txErrCcaCount = 36; - readonly attribute int32u txErrAbortCount = 37; - readonly attribute int32u txErrBusyChannelCount = 38; - readonly attribute int32u rxTotalCount = 39; - readonly attribute int32u rxUnicastCount = 40; - readonly attribute int32u rxBroadcastCount = 41; - readonly attribute int32u rxDataCount = 42; - readonly attribute int32u rxDataPollCount = 43; - readonly attribute int32u rxBeaconCount = 44; - readonly attribute int32u rxBeaconRequestCount = 45; - readonly attribute int32u rxOtherCount = 46; - readonly attribute int32u rxAddressFilteredCount = 47; - readonly attribute int32u rxDestAddrFilteredCount = 48; - readonly attribute int32u rxDuplicatedCount = 49; - readonly attribute int32u rxErrNoFrameCount = 50; - readonly attribute int32u rxErrUnknownNeighborCount = 51; - readonly attribute int32u rxErrInvalidSrcAddrCount = 52; - readonly attribute int32u rxErrSecCount = 53; - readonly attribute int32u rxErrFcsCount = 54; - readonly attribute int32u rxErrOtherCount = 55; - readonly attribute nullable int64u activeTimestamp = 56; - readonly attribute nullable int64u pendingTimestamp = 57; - readonly attribute nullable int32u delay = 58; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; readonly attribute nullable SecurityPolicy securityPolicy = 59; readonly attribute nullable octet_string<4> channelPage0Mask = 60; readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; @@ -1489,11 +1621,12 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1534,13 +1667,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1593,15 +1729,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1615,6 +1765,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1627,38 +1783,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1713,27 +1857,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1751,7 +1899,7 @@ server cluster FixedLabel = 64 { } /** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ -server cluster UserLabel = 65 { +cluster UserLabel = 65 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1769,7 +1917,7 @@ server cluster UserLabel = 65 { } /** An interface for configuring and controlling the functionality of a thermostat. */ -server cluster Thermostat = 513 { +cluster Thermostat = 513 { revision 6; enum SetpointAdjustMode : enum8 { @@ -1838,20 +1986,54 @@ server cluster Thermostat = 513 { } readonly attribute nullable int16s localTemperature = 0; - readonly attribute int16s absMinHeatSetpointLimit = 3; - readonly attribute int16s absMaxHeatSetpointLimit = 4; - readonly attribute int16s absMinCoolSetpointLimit = 5; - readonly attribute int16s absMaxCoolSetpointLimit = 6; - attribute access(write: manage) bitmap8 HVACSystemTypeConfiguration = 9; - attribute int16s occupiedCoolingSetpoint = 17; - attribute int16s occupiedHeatingSetpoint = 18; - attribute access(write: manage) int16s minHeatSetpointLimit = 21; - attribute access(write: manage) int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) int16s minCoolSetpointLimit = 23; - attribute access(write: manage) int16s maxCoolSetpointLimit = 24; - attribute access(write: manage) int8s minSetpointDeadBand = 25; + readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute optional bitmap8 occupancy = 2; + readonly attribute optional int16s absMinHeatSetpointLimit = 3; + readonly attribute optional int16s absMaxHeatSetpointLimit = 4; + readonly attribute optional int16s absMinCoolSetpointLimit = 5; + readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional int8u PICoolingDemand = 7; + readonly attribute optional int8u PIHeatingDemand = 8; + attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; + attribute access(write: manage) optional int8s localTemperatureCalibration = 16; + attribute optional int16s occupiedCoolingSetpoint = 17; + attribute optional int16s occupiedHeatingSetpoint = 18; + attribute optional int16s unoccupiedCoolingSetpoint = 19; + attribute optional int16s unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; + attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; + attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; + attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute access(write: manage) optional int8s minSetpointDeadBand = 25; + attribute access(write: manage) optional bitmap8 remoteSensing = 26; attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; attribute access(write: manage) enum8 systemMode = 28; + readonly attribute optional enum8 thermostatRunningMode = 30; + readonly attribute optional enum8 startOfWeek = 32; + readonly attribute optional int8u numberOfWeeklyTransitions = 33; + readonly attribute optional int8u numberOfDailyTransitions = 34; + attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; + attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; + readonly attribute optional bitmap16 thermostatRunningState = 41; + readonly attribute optional enum8 setpointChangeSource = 48; + readonly attribute optional nullable int16s setpointChangeAmount = 49; + readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; + attribute access(write: manage) optional nullable int8u occupiedSetback = 52; + readonly attribute optional nullable int8u occupiedSetbackMin = 53; + readonly attribute optional nullable int8u occupiedSetbackMax = 54; + attribute access(write: manage) optional nullable int8u unoccupiedSetback = 55; + readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; + readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; + attribute access(write: manage) optional int8u emergencyHeatDelta = 58; + attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional int16u ACCapacity = 65; + attribute access(write: manage) optional enum8 ACRefrigerantType = 66; + attribute access(write: manage) optional enum8 ACCompressorType = 67; + attribute access(write: manage) optional bitmap32 ACErrorCode = 68; + attribute access(write: manage) optional enum8 ACLouverPosition = 69; + readonly attribute optional nullable int16s ACCoilTemperature = 70; + attribute access(write: manage) optional enum8 ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1864,7 +2046,33 @@ server cluster Thermostat = 513 { int8s amount = 1; } + response struct GetWeeklyScheduleResponse = 0 { + int8u numberOfTransitionsForSequence = 0; + DayOfWeek dayOfWeekForSequence = 1; + ModeForSequence modeForSequence = 2; + ThermostatScheduleTransition transitions[] = 3; + } + + request struct SetWeeklyScheduleRequest { + int8u numberOfTransitionsForSequence = 0; + DayOfWeek dayOfWeekForSequence = 1; + ModeForSequence modeForSequence = 2; + ThermostatScheduleTransition transitions[] = 3; + } + + request struct GetWeeklyScheduleRequest { + DayOfWeek daysToReturn = 0; + ModeForSequence modeToReturn = 1; + } + + /** Command description for SetpointRaiseLower */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; + /** Command description for SetWeeklySchedule */ + command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; + /** Command description for GetWeeklySchedule */ + command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; + /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ + command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; } endpoint 0 { diff --git a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter index 95fd9225885c95..ed5902af0ce6c0 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -client cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -52,7 +52,7 @@ client cluster Identify = 3 { } /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -90,11 +90,19 @@ server cluster Identify = 3 { int16u identifyTime = 0; } + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -118,54 +126,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** Attributes and commands for scene configuration and manipulation. */ -provisional server cluster Scenes = 5 { +provisional cluster Scenes = 5 { revision 5; bitmap CopyModeBitmap : bitmap8 { @@ -202,7 +216,12 @@ provisional server cluster Scenes = 5 { fabric_idx fabricIndex = 254; } + readonly attribute optional int8u sceneCount = 0; + readonly attribute optional int8u currentScene = 1; + readonly attribute optional group_id currentGroup = 2; + readonly attribute optional boolean sceneValid = 3; readonly attribute NameSupportBitmap nameSupport = 4; + readonly attribute optional nullable node_id lastConfiguredBy = 5; readonly attribute int16u sceneTableSize = 6; readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; readonly attribute command_id generatedCommandList[] = 65528; @@ -220,25 +239,57 @@ provisional server cluster Scenes = 5 { ExtensionFieldSet extensionFieldSets[] = 4; } + response struct AddSceneResponse = 0 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + request struct ViewSceneRequest { group_id groupID = 0; int8u sceneID = 1; } + response struct ViewSceneResponse = 1 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + request struct RemoveSceneRequest { group_id groupID = 0; int8u sceneID = 1; } + response struct RemoveSceneResponse = 2 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + request struct RemoveAllScenesRequest { group_id groupID = 0; } + response struct RemoveAllScenesResponse = 3 { + status status = 0; + group_id groupID = 1; + } + request struct StoreSceneRequest { group_id groupID = 0; int8u sceneID = 1; } + response struct StoreSceneResponse = 4 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + request struct RecallSceneRequest { group_id groupID = 0; int8u sceneID = 1; @@ -249,56 +300,79 @@ provisional server cluster Scenes = 5 { group_id groupID = 0; } - response struct AddSceneResponse = 0 { + response struct GetSceneMembershipResponse = 6 { status status = 0; - group_id groupID = 1; - int8u sceneID = 2; + nullable int8u capacity = 1; + group_id groupID = 2; + optional int8u sceneList[] = 3; } - response struct ViewSceneResponse = 1 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - optional int16u transitionTime = 3; - optional char_string sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; + request struct EnhancedAddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int16u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; } - response struct RemoveSceneResponse = 2 { + response struct EnhancedAddSceneResponse = 64 { status status = 0; group_id groupID = 1; int8u sceneID = 2; } - response struct RemoveAllScenesResponse = 3 { - status status = 0; - group_id groupID = 1; + request struct EnhancedViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; } - response struct StoreSceneResponse = 4 { + response struct EnhancedViewSceneResponse = 65 { status status = 0; group_id groupID = 1; int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; } - response struct GetSceneMembershipResponse = 6 { + request struct CopySceneRequest { + CopyModeBitmap mode = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + group_id groupIdentifierTo = 3; + int8u sceneIdentifierTo = 4; + } + + response struct CopySceneResponse = 66 { status status = 0; - nullable int8u capacity = 1; - group_id groupID = 2; - optional int8u sceneList[] = 3; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; } + /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; + /** Retrieves the requested scene entry from its Scene table. */ fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; + /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ + fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; + /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ + fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; + /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ + fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -321,6 +395,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -330,7 +405,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -server cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -354,7 +429,7 @@ server cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -413,7 +488,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -428,7 +503,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -500,15 +575,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute boolean reachable = 17; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -517,10 +593,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -596,7 +674,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -669,6 +747,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -676,7 +755,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -693,7 +772,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -721,8 +800,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -735,7 +814,7 @@ server cluster TimeFormatLocalization = 44 { may have differing preferences for the units in which values are conveyed in communication to a user. As such, Nodes that visually or audibly convey measurable values to the user need a mechanism by which they can be configured to use a user’s preferred unit. */ -server cluster UnitLocalization = 45 { +cluster UnitLocalization = 45 { revision 1; enum TempUnitEnum : enum8 { @@ -748,7 +827,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute access(write: manage) TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) optional TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -758,7 +837,7 @@ server cluster UnitLocalization = 45 { } /** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ -server cluster PowerSource = 47 { +cluster PowerSource = 47 { revision 1; // NOTE: Default/not specifically set enum BatApprovedChemistryEnum : enum16 { @@ -979,7 +1058,34 @@ server cluster PowerSource = 47 { readonly attribute PowerSourceStatusEnum status = 0; readonly attribute int8u order = 1; readonly attribute char_string<60> description = 2; - readonly attribute WiredCurrentTypeEnum wiredCurrentType = 5; + readonly attribute optional nullable int32u wiredAssessedInputVoltage = 3; + readonly attribute optional nullable int16u wiredAssessedInputFrequency = 4; + readonly attribute optional WiredCurrentTypeEnum wiredCurrentType = 5; + readonly attribute optional nullable int32u wiredAssessedCurrent = 6; + readonly attribute optional int32u wiredNominalVoltage = 7; + readonly attribute optional int32u wiredMaximumCurrent = 8; + readonly attribute optional boolean wiredPresent = 9; + readonly attribute optional WiredFaultEnum activeWiredFaults[] = 10; + readonly attribute optional nullable int32u batVoltage = 11; + readonly attribute optional nullable int8u batPercentRemaining = 12; + readonly attribute optional nullable int32u batTimeRemaining = 13; + readonly attribute optional BatChargeLevelEnum batChargeLevel = 14; + readonly attribute optional boolean batReplacementNeeded = 15; + readonly attribute optional BatReplaceabilityEnum batReplaceability = 16; + readonly attribute optional boolean batPresent = 17; + readonly attribute optional BatFaultEnum activeBatFaults[] = 18; + readonly attribute optional char_string<60> batReplacementDescription = 19; + readonly attribute optional BatCommonDesignationEnum batCommonDesignation = 20; + readonly attribute optional char_string<20> batANSIDesignation = 21; + readonly attribute optional char_string<20> batIECDesignation = 22; + readonly attribute optional BatApprovedChemistryEnum batApprovedChemistry = 23; + readonly attribute optional int32u batCapacity = 24; + readonly attribute optional int8u batQuantity = 25; + readonly attribute optional BatChargeStateEnum batChargeState = 26; + readonly attribute optional nullable int32u batTimeToFullCharge = 27; + readonly attribute optional boolean batFunctionalWhileCharging = 28; + readonly attribute optional nullable int32u batChargingCurrent = 29; + readonly attribute optional BatChargeFaultEnum activeBatChargeFaults[] = 30; readonly attribute endpoint_no endpointList[] = 31; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -990,7 +1096,7 @@ server cluster PowerSource = 47 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -1029,17 +1135,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -1050,13 +1156,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -1137,12 +1246,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1155,6 +1267,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -1174,48 +1293,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -1299,12 +1429,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1323,12 +1453,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster WiFiNetworkDiagnostics = 54 { +cluster WiFiNetworkDiagnostics = 54 { revision 1; // NOTE: Default/not specifically set enum AssociationFailureCauseEnum : enum8 { @@ -1385,24 +1517,27 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; - readonly attribute nullable int32u beaconLostCount = 5; - readonly attribute nullable int32u beaconRxCount = 6; - readonly attribute nullable int32u packetMulticastRxCount = 7; - readonly attribute nullable int32u packetMulticastTxCount = 8; - readonly attribute nullable int32u packetUnicastRxCount = 9; - readonly attribute nullable int32u packetUnicastTxCount = 10; - readonly attribute nullable int64u currentMaxRate = 11; - readonly attribute nullable int64u overrunCount = 12; + readonly attribute optional nullable int32u beaconLostCount = 5; + readonly attribute optional nullable int32u beaconRxCount = 6; + readonly attribute optional nullable int32u packetMulticastRxCount = 7; + readonly attribute optional nullable int32u packetMulticastTxCount = 8; + readonly attribute optional nullable int32u packetUnicastRxCount = 9; + readonly attribute optional nullable int32u packetUnicastTxCount = 10; + readonly attribute optional nullable int64u currentMaxRate = 11; + readonly attribute optional nullable int64u overrunCount = 12; 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; + + /** Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 */ + command ResetCounts(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1443,13 +1578,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1502,15 +1640,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1524,6 +1676,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1536,38 +1694,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1622,27 +1768,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1660,7 +1810,7 @@ server cluster FixedLabel = 64 { } /** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ -server cluster UserLabel = 65 { +cluster UserLabel = 65 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1678,7 +1828,7 @@ server cluster UserLabel = 65 { } /** An interface for configuring and controlling the functionality of a thermostat. */ -server cluster Thermostat = 513 { +cluster Thermostat = 513 { revision 6; enum SetpointAdjustMode : enum8 { @@ -1747,20 +1897,54 @@ server cluster Thermostat = 513 { } readonly attribute nullable int16s localTemperature = 0; - readonly attribute int16s absMinHeatSetpointLimit = 3; - readonly attribute int16s absMaxHeatSetpointLimit = 4; - readonly attribute int16s absMinCoolSetpointLimit = 5; - readonly attribute int16s absMaxCoolSetpointLimit = 6; - attribute access(write: manage) bitmap8 HVACSystemTypeConfiguration = 9; - attribute int16s occupiedCoolingSetpoint = 17; - attribute int16s occupiedHeatingSetpoint = 18; - attribute access(write: manage) int16s minHeatSetpointLimit = 21; - attribute access(write: manage) int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) int16s minCoolSetpointLimit = 23; - attribute access(write: manage) int16s maxCoolSetpointLimit = 24; - attribute access(write: manage) int8s minSetpointDeadBand = 25; + readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute optional bitmap8 occupancy = 2; + readonly attribute optional int16s absMinHeatSetpointLimit = 3; + readonly attribute optional int16s absMaxHeatSetpointLimit = 4; + readonly attribute optional int16s absMinCoolSetpointLimit = 5; + readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional int8u PICoolingDemand = 7; + readonly attribute optional int8u PIHeatingDemand = 8; + attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; + attribute access(write: manage) optional int8s localTemperatureCalibration = 16; + attribute optional int16s occupiedCoolingSetpoint = 17; + attribute optional int16s occupiedHeatingSetpoint = 18; + attribute optional int16s unoccupiedCoolingSetpoint = 19; + attribute optional int16s unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; + attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; + attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; + attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute access(write: manage) optional int8s minSetpointDeadBand = 25; + attribute access(write: manage) optional bitmap8 remoteSensing = 26; attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; attribute access(write: manage) enum8 systemMode = 28; + readonly attribute optional enum8 thermostatRunningMode = 30; + readonly attribute optional enum8 startOfWeek = 32; + readonly attribute optional int8u numberOfWeeklyTransitions = 33; + readonly attribute optional int8u numberOfDailyTransitions = 34; + attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; + attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; + readonly attribute optional bitmap16 thermostatRunningState = 41; + readonly attribute optional enum8 setpointChangeSource = 48; + readonly attribute optional nullable int16s setpointChangeAmount = 49; + readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; + attribute access(write: manage) optional nullable int8u occupiedSetback = 52; + readonly attribute optional nullable int8u occupiedSetbackMin = 53; + readonly attribute optional nullable int8u occupiedSetbackMax = 54; + attribute access(write: manage) optional nullable int8u unoccupiedSetback = 55; + readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; + readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; + attribute access(write: manage) optional int8u emergencyHeatDelta = 58; + attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional int16u ACCapacity = 65; + attribute access(write: manage) optional enum8 ACRefrigerantType = 66; + attribute access(write: manage) optional enum8 ACCompressorType = 67; + attribute access(write: manage) optional bitmap32 ACErrorCode = 68; + attribute access(write: manage) optional enum8 ACLouverPosition = 69; + readonly attribute optional nullable int16s ACCoilTemperature = 70; + attribute access(write: manage) optional enum8 ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1773,7 +1957,33 @@ server cluster Thermostat = 513 { int8s amount = 1; } + response struct GetWeeklyScheduleResponse = 0 { + int8u numberOfTransitionsForSequence = 0; + DayOfWeek dayOfWeekForSequence = 1; + ModeForSequence modeForSequence = 2; + ThermostatScheduleTransition transitions[] = 3; + } + + request struct SetWeeklyScheduleRequest { + int8u numberOfTransitionsForSequence = 0; + DayOfWeek dayOfWeekForSequence = 1; + ModeForSequence modeForSequence = 2; + ThermostatScheduleTransition transitions[] = 3; + } + + request struct GetWeeklyScheduleRequest { + DayOfWeek daysToReturn = 0; + ModeForSequence modeToReturn = 1; + } + + /** Command description for SetpointRaiseLower */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; + /** Command description for SetWeeklySchedule */ + command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; + /** Command description for GetWeeklySchedule */ + command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; + /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ + command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; } endpoint 0 { diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 6db895f284557e..99467f07962c8d 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -client cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -52,7 +52,7 @@ client cluster Identify = 3 { } /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -95,12 +95,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -124,54 +126,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -194,6 +202,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -203,7 +212,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -server cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -227,7 +236,7 @@ server cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -286,7 +295,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -301,7 +310,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -373,14 +382,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -389,10 +400,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -468,7 +481,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -541,6 +554,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -548,7 +562,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -565,7 +579,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -593,8 +607,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -607,7 +621,7 @@ server cluster TimeFormatLocalization = 44 { may have differing preferences for the units in which values are conveyed in communication to a user. As such, Nodes that visually or audibly convey measurable values to the user need a mechanism by which they can be configured to use a user’s preferred unit. */ -server cluster UnitLocalization = 45 { +cluster UnitLocalization = 45 { revision 1; enum TempUnitEnum : enum8 { @@ -620,7 +634,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute access(write: manage) TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) optional TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -630,7 +644,7 @@ server cluster UnitLocalization = 45 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -669,17 +683,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -690,13 +704,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -777,12 +794,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -795,6 +815,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -814,48 +841,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -890,11 +928,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -978,12 +1024,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1002,12 +1048,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -1028,20 +1076,23 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; 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; + + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ + command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ -server cluster ThreadNetworkDiagnostics = 53 { +cluster ThreadNetworkDiagnostics = 53 { revision 1; // NOTE: Default/not specifically set enum ConnectionStatusEnum : enum8 { @@ -1138,7 +1189,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u panId = 3; readonly attribute nullable int64u extendedPanId = 4; readonly attribute nullable octet_string<17> meshLocalPrefix = 5; - readonly attribute int64u overrunCount = 6; + readonly attribute optional int64u overrunCount = 6; readonly attribute NeighborTableStruct neighborTable[] = 7; readonly attribute RouteTableStruct routeTable[] = 8; readonly attribute nullable int32u partitionId = 9; @@ -1146,51 +1197,51 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u dataVersion = 11; readonly attribute nullable int16u stableDataVersion = 12; readonly attribute nullable int8u leaderRouterId = 13; - readonly attribute int16u detachedRoleCount = 14; - readonly attribute int16u childRoleCount = 15; - readonly attribute int16u routerRoleCount = 16; - readonly attribute int16u leaderRoleCount = 17; - readonly attribute int16u attachAttemptCount = 18; - readonly attribute int16u partitionIdChangeCount = 19; - readonly attribute int16u betterPartitionAttachAttemptCount = 20; - readonly attribute int16u parentChangeCount = 21; - readonly attribute int32u txTotalCount = 22; - readonly attribute int32u txUnicastCount = 23; - readonly attribute int32u txBroadcastCount = 24; - readonly attribute int32u txAckRequestedCount = 25; - readonly attribute int32u txAckedCount = 26; - readonly attribute int32u txNoAckRequestedCount = 27; - readonly attribute int32u txDataCount = 28; - readonly attribute int32u txDataPollCount = 29; - readonly attribute int32u txBeaconCount = 30; - readonly attribute int32u txBeaconRequestCount = 31; - readonly attribute int32u txOtherCount = 32; - readonly attribute int32u txRetryCount = 33; - readonly attribute int32u txDirectMaxRetryExpiryCount = 34; - readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; - readonly attribute int32u txErrCcaCount = 36; - readonly attribute int32u txErrAbortCount = 37; - readonly attribute int32u txErrBusyChannelCount = 38; - readonly attribute int32u rxTotalCount = 39; - readonly attribute int32u rxUnicastCount = 40; - readonly attribute int32u rxBroadcastCount = 41; - readonly attribute int32u rxDataCount = 42; - readonly attribute int32u rxDataPollCount = 43; - readonly attribute int32u rxBeaconCount = 44; - readonly attribute int32u rxBeaconRequestCount = 45; - readonly attribute int32u rxOtherCount = 46; - readonly attribute int32u rxAddressFilteredCount = 47; - readonly attribute int32u rxDestAddrFilteredCount = 48; - readonly attribute int32u rxDuplicatedCount = 49; - readonly attribute int32u rxErrNoFrameCount = 50; - readonly attribute int32u rxErrUnknownNeighborCount = 51; - readonly attribute int32u rxErrInvalidSrcAddrCount = 52; - readonly attribute int32u rxErrSecCount = 53; - readonly attribute int32u rxErrFcsCount = 54; - readonly attribute int32u rxErrOtherCount = 55; - readonly attribute nullable int64u activeTimestamp = 56; - readonly attribute nullable int64u pendingTimestamp = 57; - readonly attribute nullable int32u delay = 58; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; readonly attribute nullable SecurityPolicy securityPolicy = 59; readonly attribute nullable octet_string<4> channelPage0Mask = 60; readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; @@ -1202,11 +1253,12 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster WiFiNetworkDiagnostics = 54 { +cluster WiFiNetworkDiagnostics = 54 { revision 1; // NOTE: Default/not specifically set enum AssociationFailureCauseEnum : enum8 { @@ -1263,14 +1315,14 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; - readonly attribute nullable int32u beaconLostCount = 5; - readonly attribute nullable int32u beaconRxCount = 6; - readonly attribute nullable int32u packetMulticastRxCount = 7; - readonly attribute nullable int32u packetMulticastTxCount = 8; - readonly attribute nullable int32u packetUnicastRxCount = 9; - readonly attribute nullable int32u packetUnicastTxCount = 10; - readonly attribute nullable int64u currentMaxRate = 11; - readonly attribute nullable int64u overrunCount = 12; + readonly attribute optional nullable int32u beaconLostCount = 5; + readonly attribute optional nullable int32u beaconRxCount = 6; + readonly attribute optional nullable int32u packetMulticastRxCount = 7; + readonly attribute optional nullable int32u packetMulticastTxCount = 8; + readonly attribute optional nullable int32u packetUnicastRxCount = 9; + readonly attribute optional nullable int32u packetUnicastTxCount = 10; + readonly attribute optional nullable int64u currentMaxRate = 11; + readonly attribute optional nullable int64u overrunCount = 12; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1278,11 +1330,12 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 */ command ResetCounts(): DefaultSuccess = 0; } /** The Ethernet Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster EthernetNetworkDiagnostics = 55 { +cluster EthernetNetworkDiagnostics = 55 { revision 1; // NOTE: Default/not specifically set enum PHYRateEnum : enum8 { @@ -1303,25 +1356,28 @@ server cluster EthernetNetworkDiagnostics = 55 { kErrorCounts = 0x2; } - readonly attribute nullable PHYRateEnum PHYRate = 0; - readonly attribute nullable boolean fullDuplex = 1; - readonly attribute int64u packetRxCount = 2; - readonly attribute int64u packetTxCount = 3; - readonly attribute int64u txErrCount = 4; - readonly attribute int64u collisionCount = 5; - readonly attribute int64u overrunCount = 6; - readonly attribute nullable boolean carrierDetect = 7; - readonly attribute int64u timeSinceReset = 8; + readonly attribute optional nullable PHYRateEnum PHYRate = 0; + readonly attribute optional nullable boolean fullDuplex = 1; + readonly attribute optional int64u packetRxCount = 2; + readonly attribute optional int64u packetTxCount = 3; + readonly attribute optional int64u txErrCount = 4; + readonly attribute optional int64u collisionCount = 5; + readonly attribute optional int64u overrunCount = 6; + readonly attribute optional nullable boolean carrierDetect = 7; + readonly attribute optional int64u timeSinceReset = 8; 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; + + /** Reception of this command SHALL reset the attributes: PacketRxCount, PacketTxCount, TxErrCount, CollisionCount, OverrunCount to 0 */ + command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1362,13 +1418,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1421,15 +1480,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1443,6 +1516,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1455,38 +1534,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1541,27 +1608,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1579,7 +1650,7 @@ server cluster FixedLabel = 64 { } /** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ -server cluster UserLabel = 65 { +cluster UserLabel = 65 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1597,7 +1668,7 @@ server cluster UserLabel = 65 { } /** An interface for configuring and controlling the functionality of a thermostat. */ -server cluster Thermostat = 513 { +cluster Thermostat = 513 { revision 6; enum SetpointAdjustMode : enum8 { @@ -1666,19 +1737,54 @@ server cluster Thermostat = 513 { } readonly attribute nullable int16s localTemperature = 0; - readonly attribute int16s absMinHeatSetpointLimit = 3; - readonly attribute int16s absMaxHeatSetpointLimit = 4; - readonly attribute int16s absMinCoolSetpointLimit = 5; - readonly attribute int16s absMaxCoolSetpointLimit = 6; - attribute int16s occupiedCoolingSetpoint = 17; - attribute int16s occupiedHeatingSetpoint = 18; - attribute access(write: manage) int16s minHeatSetpointLimit = 21; - attribute access(write: manage) int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) int16s minCoolSetpointLimit = 23; - attribute access(write: manage) int16s maxCoolSetpointLimit = 24; - attribute access(write: manage) int8s minSetpointDeadBand = 25; + readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute optional bitmap8 occupancy = 2; + readonly attribute optional int16s absMinHeatSetpointLimit = 3; + readonly attribute optional int16s absMaxHeatSetpointLimit = 4; + readonly attribute optional int16s absMinCoolSetpointLimit = 5; + readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional int8u PICoolingDemand = 7; + readonly attribute optional int8u PIHeatingDemand = 8; + attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; + attribute access(write: manage) optional int8s localTemperatureCalibration = 16; + attribute optional int16s occupiedCoolingSetpoint = 17; + attribute optional int16s occupiedHeatingSetpoint = 18; + attribute optional int16s unoccupiedCoolingSetpoint = 19; + attribute optional int16s unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; + attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; + attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; + attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute access(write: manage) optional int8s minSetpointDeadBand = 25; + attribute access(write: manage) optional bitmap8 remoteSensing = 26; attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; attribute access(write: manage) enum8 systemMode = 28; + readonly attribute optional enum8 thermostatRunningMode = 30; + readonly attribute optional enum8 startOfWeek = 32; + readonly attribute optional int8u numberOfWeeklyTransitions = 33; + readonly attribute optional int8u numberOfDailyTransitions = 34; + attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; + attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; + readonly attribute optional bitmap16 thermostatRunningState = 41; + readonly attribute optional enum8 setpointChangeSource = 48; + readonly attribute optional nullable int16s setpointChangeAmount = 49; + readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; + attribute access(write: manage) optional nullable int8u occupiedSetback = 52; + readonly attribute optional nullable int8u occupiedSetbackMin = 53; + readonly attribute optional nullable int8u occupiedSetbackMax = 54; + attribute access(write: manage) optional nullable int8u unoccupiedSetback = 55; + readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; + readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; + attribute access(write: manage) optional int8u emergencyHeatDelta = 58; + attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional int16u ACCapacity = 65; + attribute access(write: manage) optional enum8 ACRefrigerantType = 66; + attribute access(write: manage) optional enum8 ACCompressorType = 67; + attribute access(write: manage) optional bitmap32 ACErrorCode = 68; + attribute access(write: manage) optional enum8 ACLouverPosition = 69; + readonly attribute optional nullable int16s ACCoilTemperature = 70; + attribute access(write: manage) optional enum8 ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1691,11 +1797,37 @@ server cluster Thermostat = 513 { int8s amount = 1; } + response struct GetWeeklyScheduleResponse = 0 { + int8u numberOfTransitionsForSequence = 0; + DayOfWeek dayOfWeekForSequence = 1; + ModeForSequence modeForSequence = 2; + ThermostatScheduleTransition transitions[] = 3; + } + + request struct SetWeeklyScheduleRequest { + int8u numberOfTransitionsForSequence = 0; + DayOfWeek dayOfWeekForSequence = 1; + ModeForSequence modeForSequence = 2; + ThermostatScheduleTransition transitions[] = 3; + } + + request struct GetWeeklyScheduleRequest { + DayOfWeek daysToReturn = 0; + ModeForSequence modeToReturn = 1; + } + + /** Command description for SetpointRaiseLower */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; + /** Command description for SetWeeklySchedule */ + command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; + /** Command description for GetWeeklySchedule */ + command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; + /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ + command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; } /** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */ -server cluster ThermostatUserInterfaceConfiguration = 516 { +cluster ThermostatUserInterfaceConfiguration = 516 { revision 2; enum KeypadLockoutEnum : enum8 { @@ -1719,6 +1851,7 @@ server cluster ThermostatUserInterfaceConfiguration = 516 { attribute TemperatureDisplayModeEnum temperatureDisplayMode = 0; attribute access(write: manage) KeypadLockoutEnum keypadLockout = 1; + attribute access(write: manage) optional ScheduleProgrammingVisibilityEnum scheduleProgrammingVisibility = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index 75462f51dced59..b342abd7e8136b 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -37,6 +37,10 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -44,13 +48,33 @@ server cluster OnOff = 6 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + request struct OffWithEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + enum8 effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControlBitmap onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ -server cluster LevelControl = 8 { +cluster LevelControl = 8 { revision 5; enum MoveModeEnum : enum8 { @@ -75,19 +99,19 @@ server cluster LevelControl = 8 { } readonly attribute nullable int8u currentLevel = 0; - readonly attribute int16u remainingTime = 1; - readonly attribute int8u minLevel = 2; - readonly attribute int8u maxLevel = 3; - readonly attribute int16u currentFrequency = 4; - readonly attribute int16u minFrequency = 5; - readonly attribute int16u maxFrequency = 6; + readonly attribute optional int16u remainingTime = 1; + readonly attribute optional int8u minLevel = 2; + readonly attribute optional int8u maxLevel = 3; + readonly attribute optional int16u currentFrequency = 4; + readonly attribute optional int16u minFrequency = 5; + readonly attribute optional int16u maxFrequency = 6; attribute OptionsBitmap options = 15; - attribute int16u onOffTransitionTime = 16; + attribute optional int16u onOffTransitionTime = 16; attribute nullable int8u onLevel = 17; - attribute nullable int16u onTransitionTime = 18; - attribute nullable int16u offTransitionTime = 19; - attribute nullable int8u defaultMoveRate = 20; - attribute access(write: manage) nullable int8u startUpCurrentLevel = 16384; + attribute optional nullable int16u onTransitionTime = 18; + attribute optional nullable int16u offTransitionTime = 19; + attribute optional nullable int8u defaultMoveRate = 20; + attribute access(write: manage) optional nullable int8u startUpCurrentLevel = 16384; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -149,18 +173,33 @@ server cluster LevelControl = 8 { OptionsBitmap optionsOverride = 1; } + request struct MoveToClosestFrequencyRequest { + int16u frequency = 0; + } + + /** Command description for MoveToLevel */ command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + /** Command description for Move */ command Move(MoveRequest): DefaultSuccess = 1; + /** Command description for Step */ command Step(StepRequest): DefaultSuccess = 2; + /** Command description for Stop */ command Stop(StopRequest): DefaultSuccess = 3; + /** Command description for MoveToLevelWithOnOff */ command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + /** Command description for MoveWithOnOff */ command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + /** Command description for StepWithOnOff */ command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + /** Command description for StopWithOnOff */ command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; + /** Change the currrent frequency to the provided one, or a close + approximation if the exact provided one is not possible. */ + command MoveToClosestFrequency(MoveToClosestFrequencyRequest): DefaultSuccess = 8; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -183,6 +222,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -192,7 +232,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -client cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -213,7 +253,7 @@ client cluster Binding = 30 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -server cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -237,7 +277,7 @@ server cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -296,7 +336,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -311,7 +351,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -383,14 +423,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -399,10 +441,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -server cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -443,16 +487,6 @@ server cluster OtaSoftwareUpdateProvider = 41 { optional octet_string<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - octet_string<32> updateToken = 0; - int32u newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - octet_string<32> updateToken = 0; - int32u softwareVersion = 1; - } - response struct QueryImageResponse = 1 { StatusEnum status = 0; optional int32u delayedActionTime = 1; @@ -464,13 +498,26 @@ server cluster OtaSoftwareUpdateProvider = 41 { optional octet_string<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + octet_string<32> updateToken = 0; + int32u newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { ApplyUpdateActionEnum action = 0; int32u delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + octet_string<32> updateToken = 0; + int32u softwareVersion = 1; + } + + /** Determine availability of a new Software Image */ command QueryImage(QueryImageRequest): QueryImageResponse = 0; + /** Determine next action to take for a downloaded Software Image */ command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + /** Notify OTA Provider that an update was applied */ command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; } @@ -478,7 +525,7 @@ server cluster OtaSoftwareUpdateProvider = 41 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -495,7 +542,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -523,8 +570,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -537,7 +584,7 @@ server cluster TimeFormatLocalization = 44 { may have differing preferences for the units in which values are conveyed in communication to a user. As such, Nodes that visually or audibly convey measurable values to the user need a mechanism by which they can be configured to use a user’s preferred unit. */ -server cluster UnitLocalization = 45 { +cluster UnitLocalization = 45 { revision 1; enum TempUnitEnum : enum8 { @@ -550,7 +597,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute access(write: manage) TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) optional TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -560,7 +607,7 @@ server cluster UnitLocalization = 45 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -client cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -629,7 +676,7 @@ client cluster GeneralCommissioning = 48 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -668,17 +715,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -689,13 +736,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -client cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -875,7 +925,7 @@ client cluster NetworkCommissioning = 49 { } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -956,12 +1006,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -974,6 +1027,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -993,48 +1053,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -1069,11 +1140,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -1157,12 +1236,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1181,12 +1260,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -1207,20 +1288,23 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; 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; + + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ + command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ -server cluster ThreadNetworkDiagnostics = 53 { +cluster ThreadNetworkDiagnostics = 53 { revision 1; // NOTE: Default/not specifically set enum ConnectionStatusEnum : enum8 { @@ -1317,7 +1401,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u panId = 3; readonly attribute nullable int64u extendedPanId = 4; readonly attribute nullable octet_string<17> meshLocalPrefix = 5; - readonly attribute int64u overrunCount = 6; + readonly attribute optional int64u overrunCount = 6; readonly attribute NeighborTableStruct neighborTable[] = 7; readonly attribute RouteTableStruct routeTable[] = 8; readonly attribute nullable int32u partitionId = 9; @@ -1325,51 +1409,51 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u dataVersion = 11; readonly attribute nullable int16u stableDataVersion = 12; readonly attribute nullable int8u leaderRouterId = 13; - readonly attribute int16u detachedRoleCount = 14; - readonly attribute int16u childRoleCount = 15; - readonly attribute int16u routerRoleCount = 16; - readonly attribute int16u leaderRoleCount = 17; - readonly attribute int16u attachAttemptCount = 18; - readonly attribute int16u partitionIdChangeCount = 19; - readonly attribute int16u betterPartitionAttachAttemptCount = 20; - readonly attribute int16u parentChangeCount = 21; - readonly attribute int32u txTotalCount = 22; - readonly attribute int32u txUnicastCount = 23; - readonly attribute int32u txBroadcastCount = 24; - readonly attribute int32u txAckRequestedCount = 25; - readonly attribute int32u txAckedCount = 26; - readonly attribute int32u txNoAckRequestedCount = 27; - readonly attribute int32u txDataCount = 28; - readonly attribute int32u txDataPollCount = 29; - readonly attribute int32u txBeaconCount = 30; - readonly attribute int32u txBeaconRequestCount = 31; - readonly attribute int32u txOtherCount = 32; - readonly attribute int32u txRetryCount = 33; - readonly attribute int32u txDirectMaxRetryExpiryCount = 34; - readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; - readonly attribute int32u txErrCcaCount = 36; - readonly attribute int32u txErrAbortCount = 37; - readonly attribute int32u txErrBusyChannelCount = 38; - readonly attribute int32u rxTotalCount = 39; - readonly attribute int32u rxUnicastCount = 40; - readonly attribute int32u rxBroadcastCount = 41; - readonly attribute int32u rxDataCount = 42; - readonly attribute int32u rxDataPollCount = 43; - readonly attribute int32u rxBeaconCount = 44; - readonly attribute int32u rxBeaconRequestCount = 45; - readonly attribute int32u rxOtherCount = 46; - readonly attribute int32u rxAddressFilteredCount = 47; - readonly attribute int32u rxDestAddrFilteredCount = 48; - readonly attribute int32u rxDuplicatedCount = 49; - readonly attribute int32u rxErrNoFrameCount = 50; - readonly attribute int32u rxErrUnknownNeighborCount = 51; - readonly attribute int32u rxErrInvalidSrcAddrCount = 52; - readonly attribute int32u rxErrSecCount = 53; - readonly attribute int32u rxErrFcsCount = 54; - readonly attribute int32u rxErrOtherCount = 55; - readonly attribute nullable int64u activeTimestamp = 56; - readonly attribute nullable int64u pendingTimestamp = 57; - readonly attribute nullable int32u delay = 58; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; readonly attribute nullable SecurityPolicy securityPolicy = 59; readonly attribute nullable octet_string<4> channelPage0Mask = 60; readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; @@ -1380,10 +1464,13 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ + command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster WiFiNetworkDiagnostics = 54 { +cluster WiFiNetworkDiagnostics = 54 { revision 1; // NOTE: Default/not specifically set enum AssociationFailureCauseEnum : enum8 { @@ -1440,24 +1527,27 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; - readonly attribute nullable int32u beaconLostCount = 5; - readonly attribute nullable int32u beaconRxCount = 6; - readonly attribute nullable int32u packetMulticastRxCount = 7; - readonly attribute nullable int32u packetMulticastTxCount = 8; - readonly attribute nullable int32u packetUnicastRxCount = 9; - readonly attribute nullable int32u packetUnicastTxCount = 10; - readonly attribute nullable int64u currentMaxRate = 11; - readonly attribute nullable int64u overrunCount = 12; + readonly attribute optional nullable int32u beaconLostCount = 5; + readonly attribute optional nullable int32u beaconRxCount = 6; + readonly attribute optional nullable int32u packetMulticastRxCount = 7; + readonly attribute optional nullable int32u packetMulticastTxCount = 8; + readonly attribute optional nullable int32u packetUnicastRxCount = 9; + readonly attribute optional nullable int32u packetUnicastTxCount = 10; + readonly attribute optional nullable int64u currentMaxRate = 11; + readonly attribute optional nullable int64u overrunCount = 12; 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; + + /** Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 */ + command ResetCounts(): DefaultSuccess = 0; } /** The Ethernet Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster EthernetNetworkDiagnostics = 55 { +cluster EthernetNetworkDiagnostics = 55 { revision 1; // NOTE: Default/not specifically set enum PHYRateEnum : enum8 { @@ -1478,15 +1568,15 @@ server cluster EthernetNetworkDiagnostics = 55 { kErrorCounts = 0x2; } - readonly attribute nullable PHYRateEnum PHYRate = 0; - readonly attribute nullable boolean fullDuplex = 1; - readonly attribute int64u packetRxCount = 2; - readonly attribute int64u packetTxCount = 3; - readonly attribute int64u txErrCount = 4; - readonly attribute int64u collisionCount = 5; - readonly attribute int64u overrunCount = 6; - readonly attribute nullable boolean carrierDetect = 7; - readonly attribute int64u timeSinceReset = 8; + readonly attribute optional nullable PHYRateEnum PHYRate = 0; + readonly attribute optional nullable boolean fullDuplex = 1; + readonly attribute optional int64u packetRxCount = 2; + readonly attribute optional int64u packetTxCount = 3; + readonly attribute optional int64u txErrCount = 4; + readonly attribute optional int64u collisionCount = 5; + readonly attribute optional int64u overrunCount = 6; + readonly attribute optional nullable boolean carrierDetect = 7; + readonly attribute optional int64u timeSinceReset = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1494,11 +1584,12 @@ server cluster EthernetNetworkDiagnostics = 55 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the attributes: PacketRxCount, PacketTxCount, TxErrCount, CollisionCount, OverrunCount to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1539,13 +1630,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -client cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1671,7 +1765,7 @@ client cluster OperationalCredentials = 62 { } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1724,15 +1818,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1746,6 +1854,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1758,38 +1872,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1844,27 +1946,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1882,7 +1988,7 @@ server cluster FixedLabel = 64 { } /** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ -server cluster UserLabel = 65 { +cluster UserLabel = 65 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1900,12 +2006,13 @@ server cluster UserLabel = 65 { } /** Attributes and commands for configuring the measurement of relative humidity, and reporting relative humidity measurements. */ -server cluster RelativeHumidityMeasurement = 1029 { +cluster RelativeHumidityMeasurement = 1029 { revision 3; readonly attribute nullable int16u measuredValue = 0; readonly attribute nullable int16u minMeasuredValue = 1; readonly attribute nullable int16u maxMeasuredValue = 2; + readonly attribute optional int16u tolerance = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1915,10 +2022,11 @@ server cluster RelativeHumidityMeasurement = 1029 { } /** This cluster provides an interface for managing low power mode on a device that supports the Wake On LAN protocol. */ -server cluster WakeOnLan = 1283 { +cluster WakeOnLan = 1283 { revision 1; // NOTE: Default/not specifically set - readonly attribute char_string<12> MACAddress = 0; + readonly attribute optional char_string<12> MACAddress = 0; + readonly attribute optional octet_string<16> linkLocalAddress = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1928,7 +2036,7 @@ server cluster WakeOnLan = 1283 { } /** This cluster provides an interface for controlling the current Channel on a device. */ -server cluster Channel = 1284 { +cluster Channel = 1284 { revision 1; // NOTE: Default/not specifically set enum LineupInfoTypeEnum : enum8 { @@ -1961,9 +2069,9 @@ server cluster Channel = 1284 { LineupInfoTypeEnum lineupInfoType = 3; } - readonly attribute ChannelInfoStruct channelList[] = 0; - readonly attribute nullable LineupInfoStruct lineup = 1; - readonly attribute nullable ChannelInfoStruct currentChannel = 2; + readonly attribute optional ChannelInfoStruct channelList[] = 0; + readonly attribute optional nullable LineupInfoStruct lineup = 1; + readonly attribute optional nullable ChannelInfoStruct currentChannel = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1975,6 +2083,11 @@ server cluster Channel = 1284 { char_string match = 0; } + response struct ChangeChannelResponse = 1 { + StatusEnum status = 0; + optional char_string data = 1; + } + request struct ChangeChannelByNumberRequest { int16u majorNumber = 0; int16u minorNumber = 1; @@ -1984,18 +2097,16 @@ server cluster Channel = 1284 { int16s count = 0; } - response struct ChangeChannelResponse = 1 { - StatusEnum status = 0; - optional char_string data = 1; - } - + /** Change the channel on the media player to the channel case-insensitive exact matching the value passed as an argument. */ command ChangeChannel(ChangeChannelRequest): ChangeChannelResponse = 0; + /** Change the channel on the media plaeyer to the channel with the given Number in the ChannelList attribute. */ command ChangeChannelByNumber(ChangeChannelByNumberRequest): DefaultSuccess = 2; + /** This command provides channel up and channel down functionality, but allows channel index jumps of size Count. When the value of the increase or decrease is larger than the number of channels remaining in the given direction, then the behavior SHALL be to return to the beginning (or end) of the channel list and continue. For example, if the current channel is at index 0 and count value of -1 is given, then the current channel should change to the last channel. */ command SkipChannel(SkipChannelRequest): DefaultSuccess = 3; } /** This cluster provides an interface for UX navigation within a set of targets on a device or endpoint. */ -server cluster TargetNavigator = 1285 { +cluster TargetNavigator = 1285 { revision 1; // NOTE: Default/not specifically set enum StatusEnum : enum8 { @@ -2010,7 +2121,7 @@ server cluster TargetNavigator = 1285 { } readonly attribute TargetInfoStruct targetList[] = 0; - readonly attribute int8u currentTarget = 1; + readonly attribute optional int8u currentTarget = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2028,11 +2139,12 @@ server cluster TargetNavigator = 1285 { optional char_string data = 1; } + /** Upon receipt, this SHALL navigation the UX to the target identified. */ command NavigateTarget(NavigateTargetRequest): NavigateTargetResponse = 0; } /** This cluster provides an interface for controlling Media Playback (PLAY, PAUSE, etc) on a media device such as a TV or Speaker. */ -server cluster MediaPlayback = 1286 { +cluster MediaPlayback = 1286 { revision 1; // NOTE: Default/not specifically set enum PlaybackStateEnum : enum8 { @@ -2062,12 +2174,12 @@ server cluster MediaPlayback = 1286 { } readonly attribute PlaybackStateEnum currentState = 0; - readonly attribute nullable epoch_us startTime = 1; - readonly attribute nullable int64u duration = 2; - readonly attribute nullable PlaybackPositionStruct sampledPosition = 3; - readonly attribute single playbackSpeed = 4; - readonly attribute nullable int64u seekRangeEnd = 5; - readonly attribute nullable int64u seekRangeStart = 6; + readonly attribute optional nullable epoch_us startTime = 1; + readonly attribute optional nullable int64u duration = 2; + readonly attribute optional nullable PlaybackPositionStruct sampledPosition = 3; + readonly attribute optional single playbackSpeed = 4; + readonly attribute optional nullable int64u seekRangeEnd = 5; + readonly attribute optional nullable int64u seekRangeStart = 6; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2083,30 +2195,41 @@ server cluster MediaPlayback = 1286 { int64u deltaPositionMilliseconds = 0; } - request struct SeekRequest { - int64u position = 0; - } - response struct PlaybackResponse = 10 { StatusEnum status = 0; optional char_string data = 1; } + request struct SeekRequest { + int64u position = 0; + } + + /** Upon receipt, this SHALL play media. */ command Play(): PlaybackResponse = 0; + /** Upon receipt, this SHALL pause media. */ command Pause(): PlaybackResponse = 1; + /** Upon receipt, this SHALL stop media. User experience is context-specific. This will often navigate the user back to the location where media was originally launched. */ command Stop(): PlaybackResponse = 2; + /** Upon receipt, this SHALL Start Over with the current media playback item. */ command StartOver(): PlaybackResponse = 3; + /** Upon receipt, this SHALL cause the handler to be invoked for "Previous". User experience is context-specific. This will often Go back to the previous media playback item. */ command Previous(): PlaybackResponse = 4; + /** Upon receipt, this SHALL cause the handler to be invoked for "Next". User experience is context-specific. This will often Go forward to the next media playback item. */ command Next(): PlaybackResponse = 5; + /** Upon receipt, this SHALL Rewind through media. Different Rewind speeds can be used on the TV based upon the number of sequential calls to this function. This is to avoid needing to define every speed now (multiple fast, slow motion, etc). */ command Rewind(): PlaybackResponse = 6; + /** Upon receipt, this SHALL Advance through media. Different FF speeds can be used on the TV based upon the number of sequential calls to this function. This is to avoid needing to define every speed now (multiple fast, slow motion, etc). */ command FastForward(): PlaybackResponse = 7; + /** Upon receipt, this SHALL Skip forward in the media by the given number of seconds, using the data as follows: */ command SkipForward(SkipForwardRequest): PlaybackResponse = 8; + /** Upon receipt, this SHALL Skip backward in the media by the given number of seconds, using the data as follows: */ command SkipBackward(SkipBackwardRequest): PlaybackResponse = 9; + /** Upon receipt, this SHALL Skip backward in the media by the given number of seconds, using the data as follows: */ command Seek(SeekRequest): PlaybackResponse = 11; } /** This cluster provides an interface for controlling the Input Selector on a media device such as a TV. */ -server cluster MediaInput = 1287 { +cluster MediaInput = 1287 { revision 1; // NOTE: Default/not specifically set enum InputTypeEnum : enum8 { @@ -2153,14 +2276,18 @@ server cluster MediaInput = 1287 { char_string name = 1; } + /** Upon receipt, this SHALL change the input on the media device to the input at a specific index in the Input List. */ command SelectInput(SelectInputRequest): DefaultSuccess = 0; + /** Upon receipt, this SHALL display the active status of the input list on screen. */ command ShowInputStatus(): DefaultSuccess = 1; + /** Upon receipt, this SHALL hide the input list from the screen. */ command HideInputStatus(): DefaultSuccess = 2; + /** Upon receipt, this SHALL rename the input at a specific index in the Input List. Updates to the input name SHALL appear in the TV settings menus. */ command access(invoke: manage) RenameInput(RenameInputRequest): DefaultSuccess = 3; } /** This cluster provides an interface for managing low power mode on a device. */ -server cluster LowPower = 1288 { +cluster LowPower = 1288 { revision 1; // NOTE: Default/not specifically set readonly attribute command_id generatedCommandList[] = 65528; @@ -2170,11 +2297,12 @@ server cluster LowPower = 1288 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** This command shall put the device into low power mode. */ command Sleep(): DefaultSuccess = 0; } /** This cluster provides an interface for controlling a device like a TV using action commands such as UP, DOWN, and SELECT. */ -server cluster KeypadInput = 1289 { +cluster KeypadInput = 1289 { revision 1; // NOTE: Default/not specifically set enum CECKeyCodeEnum : enum8 { @@ -2293,11 +2421,12 @@ server cluster KeypadInput = 1289 { StatusEnum status = 0; } + /** Upon receipt, this SHALL process a keycode as input to the media device. */ command SendKey(SendKeyRequest): SendKeyResponse = 0; } /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ -server cluster ContentLauncher = 1290 { +cluster ContentLauncher = 1290 { revision 1; // NOTE: Default/not specifically set enum MetricTypeEnum : enum8 { @@ -2374,8 +2503,8 @@ server cluster ContentLauncher = 1290 { optional StyleInformationStruct waterMark = 5; } - readonly attribute char_string acceptHeader[] = 0; - readonly attribute SupportedProtocolsBitmap supportedStreamingProtocols = 1; + readonly attribute optional char_string acceptHeader[] = 0; + readonly attribute optional SupportedProtocolsBitmap supportedStreamingProtocols = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2400,12 +2529,14 @@ server cluster ContentLauncher = 1290 { optional char_string data = 1; } + /** Upon receipt, this SHALL launch the specified content with optional search criteria. */ command LaunchContent(LaunchContentRequest): LauncherResponse = 0; + /** Upon receipt, this SHALL launch content from the specified URL. */ command LaunchURL(LaunchURLRequest): LauncherResponse = 1; } /** This cluster provides an interface for controlling the Output on a media device such as a TV. */ -server cluster AudioOutput = 1291 { +cluster AudioOutput = 1291 { revision 1; // NOTE: Default/not specifically set enum OutputTypeEnum : enum8 { @@ -2445,12 +2576,14 @@ server cluster AudioOutput = 1291 { char_string name = 1; } + /** Upon receipt, this SHALL change the output on the media device to the output at a specific index in the Output List. */ command SelectOutput(SelectOutputRequest): DefaultSuccess = 0; + /** Upon receipt, this SHALL rename the output at a specific index in the Output List. Updates to the output name SHALL appear in the TV settings menus. */ command access(invoke: manage) RenameOutput(RenameOutputRequest): DefaultSuccess = 1; } /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ -server cluster ApplicationLauncher = 1292 { +cluster ApplicationLauncher = 1292 { revision 1; // NOTE: Default/not specifically set enum StatusEnum : enum8 { @@ -2473,8 +2606,8 @@ server cluster ApplicationLauncher = 1292 { optional endpoint_no endpoint = 1; } - readonly attribute int16u catalogList[] = 0; - readonly attribute nullable ApplicationEPStruct currentApp = 1; + readonly attribute optional int16u catalogList[] = 0; + readonly attribute optional nullable ApplicationEPStruct currentApp = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2500,13 +2633,16 @@ server cluster ApplicationLauncher = 1292 { optional octet_string data = 1; } + /** Upon receipt, this SHALL launch the specified app with optional data. The TV Device SHALL launch and bring to foreground the identified application in the command if the application is not already launched and in foreground. The TV Device SHALL update state attribute on the Application Basic cluster of the Endpoint corresponding to the launched application. This command returns a Launch Response. */ command LaunchApp(LaunchAppRequest): LauncherResponse = 0; + /** Upon receipt on a Video Player endpoint this SHALL stop the specified application if it is running. */ command StopApp(StopAppRequest): LauncherResponse = 1; + /** Upon receipt on a Video Player endpoint this SHALL hide the specified application if it is running and visible. */ command HideApp(HideAppRequest): LauncherResponse = 2; } /** This cluster provides information about an application running on a TV or media player device which is represented as an endpoint. */ -server cluster ApplicationBasic = 1293 { +cluster ApplicationBasic = 1293 { revision 1; // NOTE: Default/not specifically set enum ApplicationStatusEnum : enum8 { @@ -2521,10 +2657,10 @@ server cluster ApplicationBasic = 1293 { char_string applicationID = 1; } - readonly attribute char_string<32> vendorName = 0; - readonly attribute vendor_id vendorID = 1; + readonly attribute optional char_string<32> vendorName = 0; + readonly attribute optional vendor_id vendorID = 1; readonly attribute long_char_string<256> applicationName = 2; - readonly attribute int16u productID = 3; + readonly attribute optional int16u productID = 3; readonly attribute ApplicationStruct application = 4; readonly attribute ApplicationStatusEnum status = 5; readonly attribute char_string<32> applicationVersion = 6; @@ -2538,7 +2674,7 @@ server cluster ApplicationBasic = 1293 { } /** This cluster provides commands that facilitate user account login on a Content App or a node. For example, a Content App running on a Video Player device, which is represented as an endpoint (see [TV Architecture]), can use this cluster to help make the user account on the Content App match the user account on the Client. */ -server cluster AccountLogin = 1294 { +cluster AccountLogin = 1294 { revision 1; // NOTE: Default/not specifically set readonly attribute command_id generatedCommandList[] = 65528; @@ -2552,17 +2688,20 @@ server cluster AccountLogin = 1294 { char_string<100> tempAccountIdentifier = 0; } + response struct GetSetupPINResponse = 1 { + char_string setupPIN = 0; + } + request struct LoginRequest { char_string<100> tempAccountIdentifier = 0; char_string setupPIN = 1; } - response struct GetSetupPINResponse = 1 { - char_string setupPIN = 0; - } - + /** Upon receipt, the Content App checks if the account associated with the client Temp Account Identifier Rotating ID is the same acount that is active on the given Content App. If the accounts are the same, then the Content App includes the Setup PIN in the GetSetupPIN Response. */ fabric timed command access(invoke: administer) GetSetupPIN(GetSetupPINRequest): GetSetupPINResponse = 0; + /** Upon receipt, the Content App checks if the account associated with the client’s Temp Account Identifier (Rotating ID) has a current active Setup PIN with the given value. If the Setup PIN is valid for the user account associated with the Temp Account Identifier, then the Content App MAY make that user account active. */ fabric timed command access(invoke: administer) Login(LoginRequest): DefaultSuccess = 2; + /** The purpose of this command is to instruct the Content App to clear the current user account. This command SHOULD be used by clients of a Content App to indicate the end of a user session. */ fabric timed command Logout(): DefaultSuccess = 3; } diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter index fadcb2ca00ce4e..a2aa876b2a0b41 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -40,11 +40,19 @@ server cluster Identify = 3 { int16u identifyTime = 0; } + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -68,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -client cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -187,7 +201,7 @@ client cluster OnOff = 6 { } /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ -client cluster LevelControl = 8 { +cluster LevelControl = 8 { revision 5; enum MoveModeEnum : enum8 { @@ -312,12 +326,18 @@ client cluster LevelControl = 8 { } /** An interface for reading the value of a binary measurement and accessing various characteristics of that measurement. */ -server cluster BinaryInputBasic = 15 { +cluster BinaryInputBasic = 15 { revision 1; // NOTE: Default/not specifically set + attribute optional char_string<16> activeText = 4; + attribute optional char_string<16> description = 28; + attribute optional char_string<16> inactiveText = 46; attribute boolean outOfService = 81; + readonly attribute optional enum8 polarity = 84; attribute boolean presentValue = 85; + attribute optional enum8 reliability = 103; readonly attribute bitmap8 statusFlags = 111; + readonly attribute optional int32u applicationType = 256; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -327,7 +347,7 @@ server cluster BinaryInputBasic = 15 { } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -client cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -360,7 +380,7 @@ client cluster Descriptor = 29 { } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -383,6 +403,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -392,7 +413,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -server cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -416,7 +437,7 @@ server cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -475,7 +496,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -490,7 +511,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -562,14 +583,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -578,13 +601,15 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Nodes should be expected to be deployed to any and all regions of the world. These global regions may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -601,7 +626,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -629,8 +654,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -643,7 +668,7 @@ server cluster TimeFormatLocalization = 44 { may have differing preferences for the units in which values are conveyed in communication to a user. As such, Nodes that visually or audibly convey measurable values to the user need a mechanism by which they can be configured to use a user’s preferred unit. */ -server cluster UnitLocalization = 45 { +cluster UnitLocalization = 45 { revision 1; enum TempUnitEnum : enum8 { @@ -656,7 +681,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute access(write: manage) TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) optional TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -666,7 +691,7 @@ server cluster UnitLocalization = 45 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -705,17 +730,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -726,13 +751,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -813,12 +841,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -831,6 +862,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -850,48 +888,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -975,12 +1024,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -999,12 +1048,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -1025,20 +1076,23 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; 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; + + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ + command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster WiFiNetworkDiagnostics = 54 { +cluster WiFiNetworkDiagnostics = 54 { revision 1; // NOTE: Default/not specifically set enum AssociationFailureCauseEnum : enum8 { @@ -1095,24 +1149,27 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; - readonly attribute nullable int32u beaconLostCount = 5; - readonly attribute nullable int32u beaconRxCount = 6; - readonly attribute nullable int32u packetMulticastRxCount = 7; - readonly attribute nullable int32u packetMulticastTxCount = 8; - readonly attribute nullable int32u packetUnicastRxCount = 9; - readonly attribute nullable int32u packetUnicastTxCount = 10; - readonly attribute nullable int64u currentMaxRate = 11; - readonly attribute nullable int64u overrunCount = 12; + readonly attribute optional nullable int32u beaconLostCount = 5; + readonly attribute optional nullable int32u beaconRxCount = 6; + readonly attribute optional nullable int32u packetMulticastRxCount = 7; + readonly attribute optional nullable int32u packetMulticastTxCount = 8; + readonly attribute optional nullable int32u packetUnicastRxCount = 9; + readonly attribute optional nullable int32u packetUnicastTxCount = 10; + readonly attribute optional nullable int64u currentMaxRate = 11; + readonly attribute optional nullable int64u overrunCount = 12; 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; + + /** Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 */ + command ResetCounts(): DefaultSuccess = 0; } /** The Ethernet Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster EthernetNetworkDiagnostics = 55 { +cluster EthernetNetworkDiagnostics = 55 { revision 1; // NOTE: Default/not specifically set enum PHYRateEnum : enum8 { @@ -1133,15 +1190,15 @@ server cluster EthernetNetworkDiagnostics = 55 { kErrorCounts = 0x2; } - readonly attribute nullable PHYRateEnum PHYRate = 0; - readonly attribute nullable boolean fullDuplex = 1; - readonly attribute int64u packetRxCount = 2; - readonly attribute int64u packetTxCount = 3; - readonly attribute int64u txErrCount = 4; - readonly attribute int64u collisionCount = 5; - readonly attribute int64u overrunCount = 6; - readonly attribute nullable boolean carrierDetect = 7; - readonly attribute int64u timeSinceReset = 8; + readonly attribute optional nullable PHYRateEnum PHYRate = 0; + readonly attribute optional nullable boolean fullDuplex = 1; + readonly attribute optional int64u packetRxCount = 2; + readonly attribute optional int64u packetTxCount = 3; + readonly attribute optional int64u txErrCount = 4; + readonly attribute optional int64u collisionCount = 5; + readonly attribute optional int64u overrunCount = 6; + readonly attribute optional nullable boolean carrierDetect = 7; + readonly attribute optional int64u timeSinceReset = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1149,11 +1206,12 @@ server cluster EthernetNetworkDiagnostics = 55 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the attributes: PacketRxCount, PacketTxCount, TxErrCount, CollisionCount, OverrunCount to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1194,13 +1252,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1253,15 +1314,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1275,6 +1350,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1287,38 +1368,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1373,19 +1442,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } + response struct KeySetReadResponse = 2 { + GroupKeySetStruct groupKeySet = 0; + } + request struct KeySetRemoveRequest { int16u groupKeySetID = 0; } + response struct KeySetReadAllIndicesResponse = 5 { + int16u groupKeySetIDs[] = 0; + } + + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1403,7 +1484,7 @@ server cluster FixedLabel = 64 { } /** This cluster provides an interface for managing low power mode on a device that supports the Wake On LAN protocol. */ -client cluster WakeOnLan = 1283 { +cluster WakeOnLan = 1283 { revision 1; // NOTE: Default/not specifically set readonly attribute optional char_string<12> MACAddress = 0; @@ -1417,7 +1498,7 @@ client cluster WakeOnLan = 1283 { } /** This cluster provides an interface for controlling the current Channel on a device. */ -client cluster Channel = 1284 { +cluster Channel = 1284 { revision 1; // NOTE: Default/not specifically set enum LineupInfoTypeEnum : enum8 { @@ -1487,7 +1568,7 @@ client cluster Channel = 1284 { } /** This cluster provides an interface for UX navigation within a set of targets on a device or endpoint. */ -client cluster TargetNavigator = 1285 { +cluster TargetNavigator = 1285 { revision 1; // NOTE: Default/not specifically set enum StatusEnum : enum8 { @@ -1525,7 +1606,7 @@ client cluster TargetNavigator = 1285 { } /** This cluster provides an interface for controlling Media Playback (PLAY, PAUSE, etc) on a media device such as a TV or Speaker. */ -client cluster MediaPlayback = 1286 { +cluster MediaPlayback = 1286 { revision 1; // NOTE: Default/not specifically set enum PlaybackStateEnum : enum8 { @@ -1610,7 +1691,7 @@ client cluster MediaPlayback = 1286 { } /** This cluster provides an interface for controlling the Input Selector on a media device such as a TV. */ -client cluster MediaInput = 1287 { +cluster MediaInput = 1287 { revision 1; // NOTE: Default/not specifically set enum InputTypeEnum : enum8 { @@ -1668,7 +1749,7 @@ client cluster MediaInput = 1287 { } /** This cluster provides an interface for managing low power mode on a device. */ -client cluster LowPower = 1288 { +cluster LowPower = 1288 { revision 1; // NOTE: Default/not specifically set readonly attribute command_id generatedCommandList[] = 65528; @@ -1683,7 +1764,7 @@ client cluster LowPower = 1288 { } /** This cluster provides an interface for controlling a device like a TV using action commands such as UP, DOWN, and SELECT. */ -client cluster KeypadInput = 1289 { +cluster KeypadInput = 1289 { revision 1; // NOTE: Default/not specifically set enum CECKeyCodeEnum : enum8 { @@ -1807,7 +1888,7 @@ client cluster KeypadInput = 1289 { } /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ -client cluster ContentLauncher = 1290 { +cluster ContentLauncher = 1290 { revision 1; // NOTE: Default/not specifically set enum MetricTypeEnum : enum8 { @@ -1917,7 +1998,7 @@ client cluster ContentLauncher = 1290 { } /** This cluster provides an interface for controlling the Output on a media device such as a TV. */ -client cluster AudioOutput = 1291 { +cluster AudioOutput = 1291 { revision 1; // NOTE: Default/not specifically set enum OutputTypeEnum : enum8 { @@ -1964,7 +2045,7 @@ client cluster AudioOutput = 1291 { } /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ -client cluster ApplicationLauncher = 1292 { +cluster ApplicationLauncher = 1292 { revision 1; // NOTE: Default/not specifically set enum StatusEnum : enum8 { @@ -2023,7 +2104,7 @@ client cluster ApplicationLauncher = 1292 { } /** This cluster provides information about an application running on a TV or media player device which is represented as an endpoint. */ -client cluster ApplicationBasic = 1293 { +cluster ApplicationBasic = 1293 { revision 1; // NOTE: Default/not specifically set enum ApplicationStatusEnum : enum8 { @@ -2055,7 +2136,7 @@ client cluster ApplicationBasic = 1293 { } /** This cluster provides commands that facilitate user account login on a Content App or a node. For example, a Content App running on a Video Player device, which is represented as an endpoint (see [TV Architecture]), can use this cluster to help make the user account on the Content App match the user account on the Client. */ -client cluster AccountLogin = 1294 { +cluster AccountLogin = 1294 { revision 1; // NOTE: Default/not specifically set readonly attribute command_id generatedCommandList[] = 65528; diff --git a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter index 5453bdcd574f55..d4c637de10ffb0 100644 --- a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter +++ b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -74,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** Attributes and commands for scene configuration and manipulation. */ -provisional server cluster Scenes = 5 { +provisional cluster Scenes = 5 { revision 5; bitmap CopyModeBitmap : bitmap8 { @@ -158,7 +166,12 @@ provisional server cluster Scenes = 5 { fabric_idx fabricIndex = 254; } + readonly attribute optional int8u sceneCount = 0; + readonly attribute optional int8u currentScene = 1; + readonly attribute optional group_id currentGroup = 2; + readonly attribute optional boolean sceneValid = 3; readonly attribute NameSupportBitmap nameSupport = 4; + readonly attribute optional nullable node_id lastConfiguredBy = 5; readonly attribute int16u sceneTableSize = 6; readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; readonly attribute command_id generatedCommandList[] = 65528; @@ -176,25 +189,57 @@ provisional server cluster Scenes = 5 { ExtensionFieldSet extensionFieldSets[] = 4; } + response struct AddSceneResponse = 0 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + request struct ViewSceneRequest { group_id groupID = 0; int8u sceneID = 1; } + response struct ViewSceneResponse = 1 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + request struct RemoveSceneRequest { group_id groupID = 0; int8u sceneID = 1; } + response struct RemoveSceneResponse = 2 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + request struct RemoveAllScenesRequest { group_id groupID = 0; } + response struct RemoveAllScenesResponse = 3 { + status status = 0; + group_id groupID = 1; + } + request struct StoreSceneRequest { group_id groupID = 0; int8u sceneID = 1; } + response struct StoreSceneResponse = 4 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + request struct RecallSceneRequest { group_id groupID = 0; int8u sceneID = 1; @@ -205,56 +250,79 @@ provisional server cluster Scenes = 5 { group_id groupID = 0; } - response struct AddSceneResponse = 0 { + response struct GetSceneMembershipResponse = 6 { status status = 0; - group_id groupID = 1; - int8u sceneID = 2; + nullable int8u capacity = 1; + group_id groupID = 2; + optional int8u sceneList[] = 3; } - response struct ViewSceneResponse = 1 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - optional int16u transitionTime = 3; - optional char_string sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; + request struct EnhancedAddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int16u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; } - response struct RemoveSceneResponse = 2 { + response struct EnhancedAddSceneResponse = 64 { status status = 0; group_id groupID = 1; int8u sceneID = 2; } - response struct RemoveAllScenesResponse = 3 { - status status = 0; - group_id groupID = 1; + request struct EnhancedViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; } - response struct StoreSceneResponse = 4 { + response struct EnhancedViewSceneResponse = 65 { status status = 0; group_id groupID = 1; int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; } - response struct GetSceneMembershipResponse = 6 { + request struct CopySceneRequest { + CopyModeBitmap mode = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + group_id groupIdentifierTo = 3; + int8u sceneIdentifierTo = 4; + } + + response struct CopySceneResponse = 66 { status status = 0; - nullable int8u capacity = 1; - group_id groupID = 2; - optional int8u sceneList[] = 3; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; } + /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; + /** Retrieves the requested scene entry from its Scene table. */ fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; + /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ + fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; + /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ + fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; + /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ + fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -288,11 +356,11 @@ server cluster OnOff = 6 { kAcceptOnlyWhenOn = 0x1; } - readonly nosubscribe attribute boolean onOff = 0; - readonly attribute boolean globalSceneControl = 16384; - attribute int16u onTime = 16385; - attribute int16u offWaitTime = 16386; - attribute access(write: manage) nullable StartUpOnOffEnum startUpOnOff = 16387; + readonly attribute boolean onOff = 0; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -311,16 +379,22 @@ server cluster OnOff = 6 { int16u offWaitTime = 2; } + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -343,6 +417,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -352,7 +427,7 @@ server cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -server cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -376,7 +451,7 @@ server cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -435,7 +510,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -450,7 +525,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -522,15 +597,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute boolean reachable = 17; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -539,10 +615,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -server cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -583,16 +661,6 @@ server cluster OtaSoftwareUpdateProvider = 41 { optional octet_string<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - octet_string<32> updateToken = 0; - int32u newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - octet_string<32> updateToken = 0; - int32u softwareVersion = 1; - } - response struct QueryImageResponse = 1 { StatusEnum status = 0; optional int32u delayedActionTime = 1; @@ -604,13 +672,26 @@ server cluster OtaSoftwareUpdateProvider = 41 { optional octet_string<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + octet_string<32> updateToken = 0; + int32u newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { ApplyUpdateActionEnum action = 0; int32u delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + octet_string<32> updateToken = 0; + int32u softwareVersion = 1; + } + + /** Determine availability of a new Software Image */ command QueryImage(QueryImageRequest): QueryImageResponse = 0; + /** Determine next action to take for a downloaded Software Image */ command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + /** Notify OTA Provider that an update was applied */ command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; } @@ -618,7 +699,7 @@ server cluster OtaSoftwareUpdateProvider = 41 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -635,7 +716,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -663,8 +744,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -677,7 +758,7 @@ server cluster TimeFormatLocalization = 44 { may have differing preferences for the units in which values are conveyed in communication to a user. As such, Nodes that visually or audibly convey measurable values to the user need a mechanism by which they can be configured to use a user’s preferred unit. */ -server cluster UnitLocalization = 45 { +cluster UnitLocalization = 45 { revision 1; enum TempUnitEnum : enum8 { @@ -690,7 +771,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute access(write: manage) TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) optional TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -700,7 +781,7 @@ server cluster UnitLocalization = 45 { } /** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ -server cluster PowerSource = 47 { +cluster PowerSource = 47 { revision 1; // NOTE: Default/not specifically set enum BatApprovedChemistryEnum : enum16 { @@ -921,7 +1002,34 @@ server cluster PowerSource = 47 { readonly attribute PowerSourceStatusEnum status = 0; readonly attribute int8u order = 1; readonly attribute char_string<60> description = 2; - readonly attribute nullable int8u batPercentRemaining = 12; + readonly attribute optional nullable int32u wiredAssessedInputVoltage = 3; + readonly attribute optional nullable int16u wiredAssessedInputFrequency = 4; + readonly attribute optional WiredCurrentTypeEnum wiredCurrentType = 5; + readonly attribute optional nullable int32u wiredAssessedCurrent = 6; + readonly attribute optional int32u wiredNominalVoltage = 7; + readonly attribute optional int32u wiredMaximumCurrent = 8; + readonly attribute optional boolean wiredPresent = 9; + readonly attribute optional WiredFaultEnum activeWiredFaults[] = 10; + readonly attribute optional nullable int32u batVoltage = 11; + readonly attribute optional nullable int8u batPercentRemaining = 12; + readonly attribute optional nullable int32u batTimeRemaining = 13; + readonly attribute optional BatChargeLevelEnum batChargeLevel = 14; + readonly attribute optional boolean batReplacementNeeded = 15; + readonly attribute optional BatReplaceabilityEnum batReplaceability = 16; + readonly attribute optional boolean batPresent = 17; + readonly attribute optional BatFaultEnum activeBatFaults[] = 18; + readonly attribute optional char_string<60> batReplacementDescription = 19; + readonly attribute optional BatCommonDesignationEnum batCommonDesignation = 20; + readonly attribute optional char_string<20> batANSIDesignation = 21; + readonly attribute optional char_string<20> batIECDesignation = 22; + readonly attribute optional BatApprovedChemistryEnum batApprovedChemistry = 23; + readonly attribute optional int32u batCapacity = 24; + readonly attribute optional int8u batQuantity = 25; + readonly attribute optional BatChargeStateEnum batChargeState = 26; + readonly attribute optional nullable int32u batTimeToFullCharge = 27; + readonly attribute optional boolean batFunctionalWhileCharging = 28; + readonly attribute optional nullable int32u batChargingCurrent = 29; + readonly attribute optional BatChargeFaultEnum activeBatChargeFaults[] = 30; readonly attribute endpoint_no endpointList[] = 31; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -932,7 +1040,7 @@ server cluster PowerSource = 47 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -971,17 +1079,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -992,13 +1100,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -1079,12 +1190,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1097,6 +1211,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -1116,48 +1237,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -1192,11 +1324,19 @@ server cluster DiagnosticLogs = 50 { optional char_string<32> transferFileDesignator = 2; } + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -1280,12 +1420,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1304,12 +1444,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -1330,20 +1472,23 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; 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; + + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ + command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ -server cluster ThreadNetworkDiagnostics = 53 { +cluster ThreadNetworkDiagnostics = 53 { revision 1; // NOTE: Default/not specifically set enum ConnectionStatusEnum : enum8 { @@ -1440,7 +1585,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u panId = 3; readonly attribute nullable int64u extendedPanId = 4; readonly attribute nullable octet_string<17> meshLocalPrefix = 5; - readonly attribute int64u overrunCount = 6; + readonly attribute optional int64u overrunCount = 6; readonly attribute NeighborTableStruct neighborTable[] = 7; readonly attribute RouteTableStruct routeTable[] = 8; readonly attribute nullable int32u partitionId = 9; @@ -1448,51 +1593,51 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u dataVersion = 11; readonly attribute nullable int16u stableDataVersion = 12; readonly attribute nullable int8u leaderRouterId = 13; - readonly attribute int16u detachedRoleCount = 14; - readonly attribute int16u childRoleCount = 15; - readonly attribute int16u routerRoleCount = 16; - readonly attribute int16u leaderRoleCount = 17; - readonly attribute int16u attachAttemptCount = 18; - readonly attribute int16u partitionIdChangeCount = 19; - readonly attribute int16u betterPartitionAttachAttemptCount = 20; - readonly attribute int16u parentChangeCount = 21; - readonly attribute int32u txTotalCount = 22; - readonly attribute int32u txUnicastCount = 23; - readonly attribute int32u txBroadcastCount = 24; - readonly attribute int32u txAckRequestedCount = 25; - readonly attribute int32u txAckedCount = 26; - readonly attribute int32u txNoAckRequestedCount = 27; - readonly attribute int32u txDataCount = 28; - readonly attribute int32u txDataPollCount = 29; - readonly attribute int32u txBeaconCount = 30; - readonly attribute int32u txBeaconRequestCount = 31; - readonly attribute int32u txOtherCount = 32; - readonly attribute int32u txRetryCount = 33; - readonly attribute int32u txDirectMaxRetryExpiryCount = 34; - readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; - readonly attribute int32u txErrCcaCount = 36; - readonly attribute int32u txErrAbortCount = 37; - readonly attribute int32u txErrBusyChannelCount = 38; - readonly attribute int32u rxTotalCount = 39; - readonly attribute int32u rxUnicastCount = 40; - readonly attribute int32u rxBroadcastCount = 41; - readonly attribute int32u rxDataCount = 42; - readonly attribute int32u rxDataPollCount = 43; - readonly attribute int32u rxBeaconCount = 44; - readonly attribute int32u rxBeaconRequestCount = 45; - readonly attribute int32u rxOtherCount = 46; - readonly attribute int32u rxAddressFilteredCount = 47; - readonly attribute int32u rxDestAddrFilteredCount = 48; - readonly attribute int32u rxDuplicatedCount = 49; - readonly attribute int32u rxErrNoFrameCount = 50; - readonly attribute int32u rxErrUnknownNeighborCount = 51; - readonly attribute int32u rxErrInvalidSrcAddrCount = 52; - readonly attribute int32u rxErrSecCount = 53; - readonly attribute int32u rxErrFcsCount = 54; - readonly attribute int32u rxErrOtherCount = 55; - readonly attribute nullable int64u activeTimestamp = 56; - readonly attribute nullable int64u pendingTimestamp = 57; - readonly attribute nullable int32u delay = 58; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; readonly attribute nullable SecurityPolicy securityPolicy = 59; readonly attribute nullable octet_string<4> channelPage0Mask = 60; readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; @@ -1503,10 +1648,13 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ + command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster WiFiNetworkDiagnostics = 54 { +cluster WiFiNetworkDiagnostics = 54 { revision 1; // NOTE: Default/not specifically set enum AssociationFailureCauseEnum : enum8 { @@ -1563,24 +1711,27 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; - readonly attribute nullable int32u beaconLostCount = 5; - readonly attribute nullable int32u beaconRxCount = 6; - readonly attribute nullable int32u packetMulticastRxCount = 7; - readonly attribute nullable int32u packetMulticastTxCount = 8; - readonly attribute nullable int32u packetUnicastRxCount = 9; - readonly attribute nullable int32u packetUnicastTxCount = 10; - readonly attribute nullable int64u currentMaxRate = 11; - readonly attribute nullable int64u overrunCount = 12; + readonly attribute optional nullable int32u beaconLostCount = 5; + readonly attribute optional nullable int32u beaconRxCount = 6; + readonly attribute optional nullable int32u packetMulticastRxCount = 7; + readonly attribute optional nullable int32u packetMulticastTxCount = 8; + readonly attribute optional nullable int32u packetUnicastRxCount = 9; + readonly attribute optional nullable int32u packetUnicastTxCount = 10; + readonly attribute optional nullable int64u currentMaxRate = 11; + readonly attribute optional nullable int64u overrunCount = 12; 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; + + /** Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 */ + command ResetCounts(): DefaultSuccess = 0; } /** The Ethernet Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster EthernetNetworkDiagnostics = 55 { +cluster EthernetNetworkDiagnostics = 55 { revision 1; // NOTE: Default/not specifically set enum PHYRateEnum : enum8 { @@ -1601,15 +1752,15 @@ server cluster EthernetNetworkDiagnostics = 55 { kErrorCounts = 0x2; } - readonly attribute nullable PHYRateEnum PHYRate = 0; - readonly attribute nullable boolean fullDuplex = 1; - readonly attribute int64u packetRxCount = 2; - readonly attribute int64u packetTxCount = 3; - readonly attribute int64u txErrCount = 4; - readonly attribute int64u collisionCount = 5; - readonly attribute int64u overrunCount = 6; - readonly attribute nullable boolean carrierDetect = 7; - readonly attribute int64u timeSinceReset = 8; + readonly attribute optional nullable PHYRateEnum PHYRate = 0; + readonly attribute optional nullable boolean fullDuplex = 1; + readonly attribute optional int64u packetRxCount = 2; + readonly attribute optional int64u packetTxCount = 3; + readonly attribute optional int64u txErrCount = 4; + readonly attribute optional int64u collisionCount = 5; + readonly attribute optional int64u overrunCount = 6; + readonly attribute optional nullable boolean carrierDetect = 7; + readonly attribute optional int64u timeSinceReset = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1617,11 +1768,12 @@ server cluster EthernetNetworkDiagnostics = 55 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the attributes: PacketRxCount, PacketTxCount, TxErrCount, CollisionCount, OverrunCount to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1662,13 +1814,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1721,15 +1876,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1743,6 +1912,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1755,38 +1930,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1841,27 +2004,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1879,7 +2046,7 @@ server cluster FixedLabel = 64 { } /** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ -server cluster UserLabel = 65 { +cluster UserLabel = 65 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1897,7 +2064,7 @@ server cluster UserLabel = 65 { } /** An interface to a generic way to secure a door */ -server cluster DoorLock = 257 { +cluster DoorLock = 257 { revision 7; enum AlarmCodeEnum : enum8 { @@ -2280,27 +2447,39 @@ server cluster DoorLock = 257 { readonly attribute nullable DlLockState lockState = 0; readonly attribute DlLockType lockType = 1; readonly attribute boolean actuatorEnabled = 2; - readonly attribute nullable DoorStateEnum doorState = 3; - readonly attribute int16u numberOfTotalUsersSupported = 17; - readonly attribute int16u numberOfPINUsersSupported = 18; - readonly attribute int16u numberOfRFIDUsersSupported = 19; - readonly attribute int8u numberOfWeekDaySchedulesSupportedPerUser = 20; - readonly attribute int8u numberOfYearDaySchedulesSupportedPerUser = 21; - readonly attribute int8u maxPINCodeLength = 23; - readonly attribute int8u minPINCodeLength = 24; - readonly attribute int8u maxRFIDCodeLength = 25; - readonly attribute int8u minRFIDCodeLength = 26; - readonly attribute DlCredentialRuleMask credentialRulesSupport = 27; - attribute access(write: manage) char_string<3> language = 33; + readonly attribute optional nullable DoorStateEnum doorState = 3; + attribute access(write: manage) optional int32u doorOpenEvents = 4; + attribute access(write: manage) optional int32u doorClosedEvents = 5; + attribute access(write: manage) optional int16u openPeriod = 6; + readonly attribute optional int16u numberOfTotalUsersSupported = 17; + readonly attribute optional int16u numberOfPINUsersSupported = 18; + readonly attribute optional int16u numberOfRFIDUsersSupported = 19; + readonly attribute optional int8u numberOfWeekDaySchedulesSupportedPerUser = 20; + readonly attribute optional int8u numberOfYearDaySchedulesSupportedPerUser = 21; + readonly attribute optional int8u numberOfHolidaySchedulesSupported = 22; + readonly attribute optional int8u maxPINCodeLength = 23; + readonly attribute optional int8u minPINCodeLength = 24; + readonly attribute optional int8u maxRFIDCodeLength = 25; + readonly attribute optional int8u minRFIDCodeLength = 26; + readonly attribute optional DlCredentialRuleMask credentialRulesSupport = 27; + readonly attribute optional int8u numberOfCredentialsSupportedPerUser = 28; + attribute access(write: manage) optional char_string<3> language = 33; + attribute access(write: manage) optional int8u LEDSettings = 34; attribute access(write: manage) int32u autoRelockTime = 35; - attribute access(write: manage) int8u soundVolume = 36; + attribute access(write: manage) optional int8u soundVolume = 36; attribute access(write: manage) OperatingModeEnum operatingMode = 37; readonly attribute DlSupportedOperatingModes supportedOperatingModes = 38; - attribute access(write: manage) boolean enableOneTouchLocking = 41; - attribute access(write: manage) boolean enablePrivacyModeButton = 43; - attribute access(write: administer) int8u wrongCodeEntryLimit = 48; - attribute access(write: administer) int8u userCodeTemporaryDisableTime = 49; - attribute access(write: administer) boolean requirePINforRemoteOperation = 51; + readonly attribute optional DlDefaultConfigurationRegister defaultConfigurationRegister = 39; + attribute access(write: administer) optional boolean enableLocalProgramming = 40; + attribute access(write: manage) optional boolean enableOneTouchLocking = 41; + attribute access(write: manage) optional boolean enableInsideStatusLED = 42; + attribute access(write: manage) optional boolean enablePrivacyModeButton = 43; + attribute access(write: administer) optional DlLocalProgrammingFeatures localProgrammingFeatures = 44; + attribute access(write: administer) optional int8u wrongCodeEntryLimit = 48; + attribute access(write: administer) optional int8u userCodeTemporaryDisableTime = 49; + attribute access(write: administer) optional boolean sendPINOverTheAir = 50; + attribute access(write: administer) optional boolean requirePINforRemoteOperation = 51; + attribute access(write: administer) optional int16u expiringUserTimeout = 53; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2336,6 +2515,17 @@ server cluster DoorLock = 257 { int16u userIndex = 1; } + response struct GetWeekDayScheduleResponse = 12 { + int8u weekDayIndex = 0; + int16u userIndex = 1; + DlStatus status = 2; + optional DaysMaskMap daysMask = 3; + optional int8u startHour = 4; + optional int8u startMinute = 5; + optional int8u endHour = 6; + optional int8u endMinute = 7; + } + request struct ClearWeekDayScheduleRequest { int8u weekDayIndex = 0; int16u userIndex = 1; @@ -2353,63 +2543,54 @@ server cluster DoorLock = 257 { int16u userIndex = 1; } - request struct ClearYearDayScheduleRequest { + response struct GetYearDayScheduleResponse = 15 { int8u yearDayIndex = 0; int16u userIndex = 1; + DlStatus status = 2; + optional epoch_s localStartTime = 3; + optional epoch_s localEndTime = 4; } - request struct SetUserRequest { - DataOperationTypeEnum operationType = 0; + request struct ClearYearDayScheduleRequest { + int8u yearDayIndex = 0; int16u userIndex = 1; - nullable char_string userName = 2; - nullable int32u userUniqueID = 3; - nullable UserStatusEnum userStatus = 4; - nullable UserTypeEnum userType = 5; - nullable CredentialRuleEnum credentialRule = 6; - } - - request struct GetUserRequest { - int16u userIndex = 0; } - request struct ClearUserRequest { - int16u userIndex = 0; + request struct SetHolidayScheduleRequest { + int8u holidayIndex = 0; + epoch_s localStartTime = 1; + epoch_s localEndTime = 2; + OperatingModeEnum operatingMode = 3; } - request struct SetCredentialRequest { - DataOperationTypeEnum operationType = 0; - CredentialStruct credential = 1; - LONG_OCTET_STRING credentialData = 2; - nullable int16u userIndex = 3; - nullable UserStatusEnum userStatus = 4; - nullable UserTypeEnum userType = 5; + request struct GetHolidayScheduleRequest { + int8u holidayIndex = 0; } - request struct GetCredentialStatusRequest { - CredentialStruct credential = 0; + response struct GetHolidayScheduleResponse = 18 { + int8u holidayIndex = 0; + DlStatus status = 1; + optional epoch_s localStartTime = 2; + optional epoch_s localEndTime = 3; + optional OperatingModeEnum operatingMode = 4; } - request struct ClearCredentialRequest { - nullable CredentialStruct credential = 0; + request struct ClearHolidayScheduleRequest { + int8u holidayIndex = 0; } - response struct GetWeekDayScheduleResponse = 12 { - int8u weekDayIndex = 0; + request struct SetUserRequest { + DataOperationTypeEnum operationType = 0; int16u userIndex = 1; - DlStatus status = 2; - optional DaysMaskMap daysMask = 3; - optional int8u startHour = 4; - optional int8u startMinute = 5; - optional int8u endHour = 6; - optional int8u endMinute = 7; + nullable char_string userName = 2; + nullable int32u userUniqueID = 3; + nullable UserStatusEnum userStatus = 4; + nullable UserTypeEnum userType = 5; + nullable CredentialRuleEnum credentialRule = 6; } - response struct GetYearDayScheduleResponse = 15 { - int8u yearDayIndex = 0; - int16u userIndex = 1; - DlStatus status = 2; - optional epoch_s localStartTime = 3; - optional epoch_s localEndTime = 4; + request struct GetUserRequest { + int16u userIndex = 0; } response struct GetUserResponse = 28 { @@ -2425,12 +2606,29 @@ server cluster DoorLock = 257 { nullable int16u nextUserIndex = 9; } + request struct ClearUserRequest { + int16u userIndex = 0; + } + + request struct SetCredentialRequest { + DataOperationTypeEnum operationType = 0; + CredentialStruct credential = 1; + LONG_OCTET_STRING credentialData = 2; + nullable int16u userIndex = 3; + nullable UserStatusEnum userStatus = 4; + nullable UserTypeEnum userType = 5; + } + response struct SetCredentialResponse = 35 { DlStatus status = 0; nullable int16u userIndex = 1; nullable int16u nextCredentialIndex = 2; } + request struct GetCredentialStatusRequest { + CredentialStruct credential = 0; + } + response struct GetCredentialStatusResponse = 37 { boolean credentialExists = 0; nullable int16u userIndex = 1; @@ -2439,25 +2637,56 @@ server cluster DoorLock = 257 { nullable int16u nextCredentialIndex = 4; } + request struct ClearCredentialRequest { + nullable CredentialStruct credential = 0; + } + + request struct UnboltDoorRequest { + optional octet_string PINCode = 0; + } + + /** This command causes the lock device to lock the door. */ timed command LockDoor(LockDoorRequest): DefaultSuccess = 0; + /** This command causes the lock device to unlock the door. */ timed command UnlockDoor(UnlockDoorRequest): DefaultSuccess = 1; + /** This command causes the lock device to unlock the door with a timeout parameter. */ timed command UnlockWithTimeout(UnlockWithTimeoutRequest): DefaultSuccess = 3; + /** Set a weekly repeating schedule for a specified user. */ command access(invoke: administer) SetWeekDaySchedule(SetWeekDayScheduleRequest): DefaultSuccess = 11; + /** Retrieve the specific weekly schedule for the specific user. */ command access(invoke: administer) GetWeekDaySchedule(GetWeekDayScheduleRequest): GetWeekDayScheduleResponse = 12; + /** Clear the specific weekly schedule or all weekly schedules for the specific user. */ command access(invoke: administer) ClearWeekDaySchedule(ClearWeekDayScheduleRequest): DefaultSuccess = 13; + /** Set a time-specific schedule ID for a specified user. */ command access(invoke: administer) SetYearDaySchedule(SetYearDayScheduleRequest): DefaultSuccess = 14; + /** Returns the year day schedule data for the specified schedule and user indexes. */ command access(invoke: administer) GetYearDaySchedule(GetYearDayScheduleRequest): GetYearDayScheduleResponse = 15; + /** Clears the specific year day schedule or all year day schedules for the specific user. */ command access(invoke: administer) ClearYearDaySchedule(ClearYearDayScheduleRequest): DefaultSuccess = 16; + /** Set the holiday Schedule by specifying local start time and local end time with respect to any Lock Operating Mode. */ + command access(invoke: administer) SetHolidaySchedule(SetHolidayScheduleRequest): DefaultSuccess = 17; + /** Get the holiday schedule for the specified index. */ + command access(invoke: administer) GetHolidaySchedule(GetHolidayScheduleRequest): GetHolidayScheduleResponse = 18; + /** Clears the holiday schedule or all holiday schedules. */ + command access(invoke: administer) ClearHolidaySchedule(ClearHolidayScheduleRequest): DefaultSuccess = 19; + /** Set User into the lock. */ timed command access(invoke: administer) SetUser(SetUserRequest): DefaultSuccess = 26; + /** Retrieve User. */ command access(invoke: administer) GetUser(GetUserRequest): GetUserResponse = 27; + /** Clears a User or all Users. */ timed command access(invoke: administer) ClearUser(ClearUserRequest): DefaultSuccess = 29; + /** Set a credential (e.g. PIN, RFID, Fingerprint, etc.) into the lock for a new user, existing user, or ProgrammingUser. */ timed command access(invoke: administer) SetCredential(SetCredentialRequest): SetCredentialResponse = 34; + /** Retrieve the status of a particular credential (e.g. PIN, RFID, Fingerprint, etc.) by index. */ command access(invoke: administer) GetCredentialStatus(GetCredentialStatusRequest): GetCredentialStatusResponse = 36; + /** Clear one, one type, or all credentials except ProgrammingPIN credential. */ timed command access(invoke: administer) ClearCredential(ClearCredentialRequest): DefaultSuccess = 38; + /** This command causes the lock device to unlock the door without pulling the latch. */ + timed command UnboltDoor(UnboltDoorRequest): DefaultSuccess = 39; } /** Attributes and commands for controlling the color properties of a color-capable light. */ -server cluster ColorControl = 768 { +cluster ColorControl = 768 { revision 6; enum ColorLoopAction : enum8 { @@ -2529,17 +2758,58 @@ server cluster ColorControl = 768 { kColorTemperature = 0x10; } - readonly attribute int8u currentHue = 0; - readonly attribute int8u currentSaturation = 1; - readonly attribute int16u remainingTime = 2; - readonly attribute int16u currentX = 3; - readonly attribute int16u currentY = 4; - readonly attribute int16u colorTemperatureMireds = 7; + readonly attribute optional int8u currentHue = 0; + readonly attribute optional int8u currentSaturation = 1; + readonly attribute optional int16u remainingTime = 2; + readonly attribute optional int16u currentX = 3; + readonly attribute optional int16u currentY = 4; + readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional char_string<254> compensationText = 6; + readonly attribute optional int16u colorTemperatureMireds = 7; readonly attribute enum8 colorMode = 8; attribute bitmap8 options = 15; readonly attribute nullable int8u numberOfPrimaries = 16; + readonly attribute optional int16u primary1X = 17; + readonly attribute optional int16u primary1Y = 18; + readonly attribute optional nullable int8u primary1Intensity = 19; + readonly attribute optional int16u primary2X = 21; + readonly attribute optional int16u primary2Y = 22; + readonly attribute optional nullable int8u primary2Intensity = 23; + readonly attribute optional int16u primary3X = 25; + readonly attribute optional int16u primary3Y = 26; + readonly attribute optional nullable int8u primary3Intensity = 27; + readonly attribute optional int16u primary4X = 32; + readonly attribute optional int16u primary4Y = 33; + readonly attribute optional nullable int8u primary4Intensity = 34; + readonly attribute optional int16u primary5X = 36; + readonly attribute optional int16u primary5Y = 37; + readonly attribute optional nullable int8u primary5Intensity = 38; + readonly attribute optional int16u primary6X = 40; + readonly attribute optional int16u primary6Y = 41; + readonly attribute optional nullable int8u primary6Intensity = 42; + attribute access(write: manage) optional int16u whitePointX = 48; + attribute access(write: manage) optional int16u whitePointY = 49; + attribute access(write: manage) optional int16u colorPointRX = 50; + attribute access(write: manage) optional int16u colorPointRY = 51; + attribute access(write: manage) optional nullable int8u colorPointRIntensity = 52; + attribute access(write: manage) optional int16u colorPointGX = 54; + attribute access(write: manage) optional int16u colorPointGY = 55; + attribute access(write: manage) optional nullable int8u colorPointGIntensity = 56; + attribute access(write: manage) optional int16u colorPointBX = 58; + attribute access(write: manage) optional int16u colorPointBY = 59; + attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; + readonly attribute optional int16u enhancedCurrentHue = 16384; readonly attribute enum8 enhancedColorMode = 16385; + readonly attribute optional int8u colorLoopActive = 16386; + readonly attribute optional int8u colorLoopDirection = 16387; + readonly attribute optional int16u colorLoopTime = 16388; + readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; + readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; readonly attribute bitmap16 colorCapabilities = 16394; + readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; + readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; + readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; + attribute access(write: manage) optional nullable int16u startUpColorTemperatureMireds = 16400; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2555,6 +2825,21 @@ server cluster ColorControl = 768 { bitmap8 optionsOverride = 4; } + request struct MoveHueRequest { + HueMoveMode moveMode = 0; + int8u rate = 1; + bitmap8 optionsMask = 2; + bitmap8 optionsOverride = 3; + } + + request struct StepHueRequest { + HueStepMode stepMode = 0; + int8u stepSize = 1; + int8u transitionTime = 2; + bitmap8 optionsMask = 3; + bitmap8 optionsOverride = 4; + } + request struct MoveToSaturationRequest { int8u saturation = 0; int16u transitionTime = 1; @@ -2562,6 +2847,21 @@ server cluster ColorControl = 768 { bitmap8 optionsOverride = 3; } + request struct MoveSaturationRequest { + SaturationMoveMode moveMode = 0; + int8u rate = 1; + bitmap8 optionsMask = 2; + bitmap8 optionsOverride = 3; + } + + request struct StepSaturationRequest { + SaturationStepMode stepMode = 0; + int8u stepSize = 1; + int8u transitionTime = 2; + bitmap8 optionsMask = 3; + bitmap8 optionsOverride = 4; + } + request struct MoveToHueAndSaturationRequest { int8u hue = 0; int8u saturation = 1; @@ -2578,6 +2878,21 @@ server cluster ColorControl = 768 { bitmap8 optionsOverride = 4; } + request struct MoveColorRequest { + int16s rateX = 0; + int16s rateY = 1; + bitmap8 optionsMask = 2; + bitmap8 optionsOverride = 3; + } + + request struct StepColorRequest { + int16s stepX = 0; + int16s stepY = 1; + int16u transitionTime = 2; + bitmap8 optionsMask = 3; + bitmap8 optionsOverride = 4; + } + request struct MoveToColorTemperatureRequest { int16u colorTemperatureMireds = 0; int16u transitionTime = 1; @@ -2585,11 +2900,109 @@ server cluster ColorControl = 768 { bitmap8 optionsOverride = 3; } + request struct EnhancedMoveToHueRequest { + int16u enhancedHue = 0; + HueDirection direction = 1; + int16u transitionTime = 2; + bitmap8 optionsMask = 3; + bitmap8 optionsOverride = 4; + } + + request struct EnhancedMoveHueRequest { + HueMoveMode moveMode = 0; + int16u rate = 1; + bitmap8 optionsMask = 2; + bitmap8 optionsOverride = 3; + } + + request struct EnhancedStepHueRequest { + HueStepMode stepMode = 0; + int16u stepSize = 1; + int16u transitionTime = 2; + bitmap8 optionsMask = 3; + bitmap8 optionsOverride = 4; + } + + request struct EnhancedMoveToHueAndSaturationRequest { + int16u enhancedHue = 0; + int8u saturation = 1; + int16u transitionTime = 2; + bitmap8 optionsMask = 3; + bitmap8 optionsOverride = 4; + } + + request struct ColorLoopSetRequest { + ColorLoopUpdateFlags updateFlags = 0; + ColorLoopAction action = 1; + ColorLoopDirection direction = 2; + int16u time = 3; + int16u startHue = 4; + bitmap8 optionsMask = 5; + bitmap8 optionsOverride = 6; + } + + request struct StopMoveStepRequest { + bitmap8 optionsMask = 0; + bitmap8 optionsOverride = 1; + } + + request struct MoveColorTemperatureRequest { + HueMoveMode moveMode = 0; + int16u rate = 1; + int16u colorTemperatureMinimumMireds = 2; + int16u colorTemperatureMaximumMireds = 3; + bitmap8 optionsMask = 4; + bitmap8 optionsOverride = 5; + } + + request struct StepColorTemperatureRequest { + HueStepMode stepMode = 0; + int16u stepSize = 1; + int16u transitionTime = 2; + int16u colorTemperatureMinimumMireds = 3; + int16u colorTemperatureMaximumMireds = 4; + bitmap8 optionsMask = 5; + bitmap8 optionsOverride = 6; + } + + /** Move to specified hue. */ command MoveToHue(MoveToHueRequest): DefaultSuccess = 0; + /** Move hue up or down at specified rate. */ + command MoveHue(MoveHueRequest): DefaultSuccess = 1; + /** Step hue up or down by specified size at specified rate. */ + command StepHue(StepHueRequest): DefaultSuccess = 2; + /** Move to specified saturation. */ command MoveToSaturation(MoveToSaturationRequest): DefaultSuccess = 3; + /** Move saturation up or down at specified rate. */ + command MoveSaturation(MoveSaturationRequest): DefaultSuccess = 4; + /** Step saturation up or down by specified size at specified rate. */ + command StepSaturation(StepSaturationRequest): DefaultSuccess = 5; + /** Move to hue and saturation. */ command MoveToHueAndSaturation(MoveToHueAndSaturationRequest): DefaultSuccess = 6; + /** Move to specified color. */ command MoveToColor(MoveToColorRequest): DefaultSuccess = 7; + /** Moves the color. */ + command MoveColor(MoveColorRequest): DefaultSuccess = 8; + /** Steps the lighting to a specific color. */ + command StepColor(StepColorRequest): DefaultSuccess = 9; + /** Move to a specific color temperature. */ command MoveToColorTemperature(MoveToColorTemperatureRequest): DefaultSuccess = 10; + /** Command description for EnhancedMoveToHue */ + command EnhancedMoveToHue(EnhancedMoveToHueRequest): DefaultSuccess = 64; + /** Command description for EnhancedMoveHue */ + command EnhancedMoveHue(EnhancedMoveHueRequest): DefaultSuccess = 65; + /** Command description for EnhancedStepHue */ + command EnhancedStepHue(EnhancedStepHueRequest): DefaultSuccess = 66; + /** Command description for EnhancedMoveToHueAndSaturation */ + command EnhancedMoveToHueAndSaturation(EnhancedMoveToHueAndSaturationRequest): DefaultSuccess = 67; + /** Command description for ColorLoopSet */ + command ColorLoopSet(ColorLoopSetRequest): DefaultSuccess = 68; + /** Command description for StopMoveStep */ + command StopMoveStep(StopMoveStepRequest): DefaultSuccess = 71; + /** Command description for MoveColorTemperature */ + command MoveColorTemperature(MoveColorTemperatureRequest): DefaultSuccess = 75; + /** Command description for StepColorTemperature */ + command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76; } endpoint 0 { diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index 09ab8c4dae19a0..a53bf7f4d5acad 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -45,12 +45,14 @@ server cluster Identify = 3 { EffectVariantEnum effectVariant = 1; } + /** Command description for Identify */ command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } /** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -74,54 +76,60 @@ server cluster Groups = 4 { char_string<16> groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - char_string<16> groupName = 1; - } - response struct AddGroupResponse = 0 { enum8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { enum8 status = 0; group_id groupID = 1; char_string<16> groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable int8u capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { enum8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -144,6 +152,7 @@ server cluster Descriptor = 29 { readonly attribute cluster_id serverList[] = 1; readonly attribute cluster_id clientList[] = 2; readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -156,7 +165,7 @@ server cluster Descriptor = 29 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -server cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -215,7 +224,7 @@ server cluster AccessControl = 31 { } attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -230,7 +239,7 @@ server cluster AccessControl = 31 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -302,14 +311,16 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute int32u specificationVersion = 21; readonly attribute int16u maxPathsPerInvoke = 22; readonly attribute command_id generatedCommandList[] = 65528; @@ -318,10 +329,12 @@ server cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -397,7 +410,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -server cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -470,6 +483,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { endpoint_no endpoint = 4; } + /** Announce the presence of an OTA Provider */ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } @@ -477,7 +491,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -494,7 +508,7 @@ server cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -522,8 +536,8 @@ server cluster TimeFormatLocalization = 44 { } attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -536,7 +550,7 @@ server cluster TimeFormatLocalization = 44 { may have differing preferences for the units in which values are conveyed in communication to a user. As such, Nodes that visually or audibly convey measurable values to the user need a mechanism by which they can be configured to use a user’s preferred unit. */ -server cluster UnitLocalization = 45 { +cluster UnitLocalization = 45 { revision 1; enum TempUnitEnum : enum8 { @@ -549,6 +563,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } + attribute access(write: manage) optional TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -558,7 +573,7 @@ server cluster UnitLocalization = 45 { } /** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ -server cluster PowerSource = 47 { +cluster PowerSource = 47 { revision 1; // NOTE: Default/not specifically set enum BatApprovedChemistryEnum : enum16 { @@ -779,12 +794,34 @@ server cluster PowerSource = 47 { readonly attribute PowerSourceStatusEnum status = 0; readonly attribute int8u order = 1; readonly attribute char_string<60> description = 2; - readonly attribute nullable int32u batVoltage = 11; - readonly attribute nullable int8u batPercentRemaining = 12; - readonly attribute nullable int32u batTimeRemaining = 13; - readonly attribute BatChargeLevelEnum batChargeLevel = 14; - readonly attribute BatFaultEnum activeBatFaults[] = 18; - readonly attribute BatChargeStateEnum batChargeState = 26; + readonly attribute optional nullable int32u wiredAssessedInputVoltage = 3; + readonly attribute optional nullable int16u wiredAssessedInputFrequency = 4; + readonly attribute optional WiredCurrentTypeEnum wiredCurrentType = 5; + readonly attribute optional nullable int32u wiredAssessedCurrent = 6; + readonly attribute optional int32u wiredNominalVoltage = 7; + readonly attribute optional int32u wiredMaximumCurrent = 8; + readonly attribute optional boolean wiredPresent = 9; + readonly attribute optional WiredFaultEnum activeWiredFaults[] = 10; + readonly attribute optional nullable int32u batVoltage = 11; + readonly attribute optional nullable int8u batPercentRemaining = 12; + readonly attribute optional nullable int32u batTimeRemaining = 13; + readonly attribute optional BatChargeLevelEnum batChargeLevel = 14; + readonly attribute optional boolean batReplacementNeeded = 15; + readonly attribute optional BatReplaceabilityEnum batReplaceability = 16; + readonly attribute optional boolean batPresent = 17; + readonly attribute optional BatFaultEnum activeBatFaults[] = 18; + readonly attribute optional char_string<60> batReplacementDescription = 19; + readonly attribute optional BatCommonDesignationEnum batCommonDesignation = 20; + readonly attribute optional char_string<20> batANSIDesignation = 21; + readonly attribute optional char_string<20> batIECDesignation = 22; + readonly attribute optional BatApprovedChemistryEnum batApprovedChemistry = 23; + readonly attribute optional int32u batCapacity = 24; + readonly attribute optional int8u batQuantity = 25; + readonly attribute optional BatChargeStateEnum batChargeState = 26; + readonly attribute optional nullable int32u batTimeToFullCharge = 27; + readonly attribute optional boolean batFunctionalWhileCharging = 28; + readonly attribute optional nullable int32u batChargingCurrent = 29; + readonly attribute optional BatChargeFaultEnum activeBatChargeFaults[] = 30; readonly attribute endpoint_no endpointList[] = 31; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -795,7 +832,7 @@ server cluster PowerSource = 47 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -834,17 +871,17 @@ server cluster GeneralCommissioning = 48 { int64u breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; char_string<2> countryCode = 1; int64u breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - char_string<128> debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningErrorEnum errorCode = 0; char_string debugText = 1; @@ -855,13 +892,16 @@ server cluster GeneralCommissioning = 48 { char_string debugText = 1; } + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -942,12 +982,15 @@ server cluster NetworkCommissioning = 49 { readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; attribute access(write: administer) boolean interfaceEnabled = 4; readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -960,6 +1003,13 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { octet_string<32> ssid = 0; octet_string<64> credentials = 1; @@ -979,48 +1029,59 @@ server cluster NetworkCommissioning = 49 { optional int64u breadcrumb = 1; } + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + request struct ConnectNetworkRequest { octet_string<32> networkID = 0; optional int64u breadcrumb = 1; } + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + request struct ReorderNetworkRequest { octet_string<32> networkID = 0; int8u networkIndex = 1; optional int64u breadcrumb = 2; } - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + request struct QueryIdentityRequest { + OCTET_STRING<20> keyIdentifier = 0; + optional OCTET_STRING<32> possessionNonce = 1; } - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string<512> debugText = 1; - optional int8u networkIndex = 2; - optional octet_string<140> clientIdentity = 3; - optional octet_string<64> possessionSignature = 4; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional char_string debugText = 1; - nullable int32s errorValue = 2; + response struct QueryIdentityResponse = 10 { + OCTET_STRING<140> identity = 0; + optional OCTET_STRING<64> possessionSignature = 1; } + /** Detemine the set of networks the device sees as available. */ command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -1104,12 +1165,12 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1128,12 +1189,14 @@ server cluster GeneralDiagnostics = 51 { nullable epoch_us UTCTimeUs = 1; } + /** Provide a means for certification tests to trigger some test-plan-specific events */ command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -1154,10 +1217,10 @@ server cluster SoftwareDiagnostics = 52 { optional octet_string faultRecording = 2; } - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1165,11 +1228,12 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; } /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ -server cluster ThreadNetworkDiagnostics = 53 { +cluster ThreadNetworkDiagnostics = 53 { revision 1; // NOTE: Default/not specifically set enum ConnectionStatusEnum : enum8 { @@ -1266,7 +1330,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u panId = 3; readonly attribute nullable int64u extendedPanId = 4; readonly attribute nullable octet_string<17> meshLocalPrefix = 5; - readonly attribute int64u overrunCount = 6; + readonly attribute optional int64u overrunCount = 6; readonly attribute NeighborTableStruct neighborTable[] = 7; readonly attribute RouteTableStruct routeTable[] = 8; readonly attribute nullable int32u partitionId = 9; @@ -1274,51 +1338,51 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u dataVersion = 11; readonly attribute nullable int16u stableDataVersion = 12; readonly attribute nullable int8u leaderRouterId = 13; - readonly attribute int16u detachedRoleCount = 14; - readonly attribute int16u childRoleCount = 15; - readonly attribute int16u routerRoleCount = 16; - readonly attribute int16u leaderRoleCount = 17; - readonly attribute int16u attachAttemptCount = 18; - readonly attribute int16u partitionIdChangeCount = 19; - readonly attribute int16u betterPartitionAttachAttemptCount = 20; - readonly attribute int16u parentChangeCount = 21; - readonly attribute int32u txTotalCount = 22; - readonly attribute int32u txUnicastCount = 23; - readonly attribute int32u txBroadcastCount = 24; - readonly attribute int32u txAckRequestedCount = 25; - readonly attribute int32u txAckedCount = 26; - readonly attribute int32u txNoAckRequestedCount = 27; - readonly attribute int32u txDataCount = 28; - readonly attribute int32u txDataPollCount = 29; - readonly attribute int32u txBeaconCount = 30; - readonly attribute int32u txBeaconRequestCount = 31; - readonly attribute int32u txOtherCount = 32; - readonly attribute int32u txRetryCount = 33; - readonly attribute int32u txDirectMaxRetryExpiryCount = 34; - readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; - readonly attribute int32u txErrCcaCount = 36; - readonly attribute int32u txErrAbortCount = 37; - readonly attribute int32u txErrBusyChannelCount = 38; - readonly attribute int32u rxTotalCount = 39; - readonly attribute int32u rxUnicastCount = 40; - readonly attribute int32u rxBroadcastCount = 41; - readonly attribute int32u rxDataCount = 42; - readonly attribute int32u rxDataPollCount = 43; - readonly attribute int32u rxBeaconCount = 44; - readonly attribute int32u rxBeaconRequestCount = 45; - readonly attribute int32u rxOtherCount = 46; - readonly attribute int32u rxAddressFilteredCount = 47; - readonly attribute int32u rxDestAddrFilteredCount = 48; - readonly attribute int32u rxDuplicatedCount = 49; - readonly attribute int32u rxErrNoFrameCount = 50; - readonly attribute int32u rxErrUnknownNeighborCount = 51; - readonly attribute int32u rxErrInvalidSrcAddrCount = 52; - readonly attribute int32u rxErrSecCount = 53; - readonly attribute int32u rxErrFcsCount = 54; - readonly attribute int32u rxErrOtherCount = 55; - readonly attribute nullable int64u activeTimestamp = 56; - readonly attribute nullable int64u pendingTimestamp = 57; - readonly attribute nullable int32u delay = 58; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; readonly attribute nullable SecurityPolicy securityPolicy = 59; readonly attribute nullable octet_string<4> channelPage0Mask = 60; readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; @@ -1330,11 +1394,12 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster WiFiNetworkDiagnostics = 54 { +cluster WiFiNetworkDiagnostics = 54 { revision 1; // NOTE: Default/not specifically set enum AssociationFailureCauseEnum : enum8 { @@ -1391,14 +1456,14 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; - readonly attribute nullable int32u beaconLostCount = 5; - readonly attribute nullable int32u beaconRxCount = 6; - readonly attribute nullable int32u packetMulticastRxCount = 7; - readonly attribute nullable int32u packetMulticastTxCount = 8; - readonly attribute nullable int32u packetUnicastRxCount = 9; - readonly attribute nullable int32u packetUnicastTxCount = 10; - readonly attribute nullable int64u currentMaxRate = 11; - readonly attribute nullable int64u overrunCount = 12; + readonly attribute optional nullable int32u beaconLostCount = 5; + readonly attribute optional nullable int32u beaconRxCount = 6; + readonly attribute optional nullable int32u packetMulticastRxCount = 7; + readonly attribute optional nullable int32u packetMulticastTxCount = 8; + readonly attribute optional nullable int32u packetUnicastRxCount = 9; + readonly attribute optional nullable int32u packetUnicastTxCount = 10; + readonly attribute optional nullable int64u currentMaxRate = 11; + readonly attribute optional nullable int64u overrunCount = 12; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1406,11 +1471,12 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + /** Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 */ command ResetCounts(): DefaultSuccess = 0; } /** The Ethernet Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster EthernetNetworkDiagnostics = 55 { +cluster EthernetNetworkDiagnostics = 55 { revision 1; // NOTE: Default/not specifically set enum PHYRateEnum : enum8 { @@ -1431,25 +1497,28 @@ server cluster EthernetNetworkDiagnostics = 55 { kErrorCounts = 0x2; } - readonly attribute nullable PHYRateEnum PHYRate = 0; - readonly attribute nullable boolean fullDuplex = 1; - readonly attribute int64u packetRxCount = 2; - readonly attribute int64u packetTxCount = 3; - readonly attribute int64u txErrCount = 4; - readonly attribute int64u collisionCount = 5; - readonly attribute int64u overrunCount = 6; - readonly attribute nullable boolean carrierDetect = 7; - readonly attribute int64u timeSinceReset = 8; + readonly attribute optional nullable PHYRateEnum PHYRate = 0; + readonly attribute optional nullable boolean fullDuplex = 1; + readonly attribute optional int64u packetRxCount = 2; + readonly attribute optional int64u packetTxCount = 3; + readonly attribute optional int64u txErrCount = 4; + readonly attribute optional int64u collisionCount = 5; + readonly attribute optional int64u overrunCount = 6; + readonly attribute optional nullable boolean carrierDetect = 7; + readonly attribute optional int64u timeSinceReset = 8; 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; + + /** Reception of this command SHALL reset the attributes: PacketRxCount, PacketTxCount, TxErrCount, CollisionCount, OverrunCount to 0 */ + command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -1490,13 +1559,16 @@ server cluster AdministratorCommissioning = 60 { int16u commissioningTimeout = 0; } + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -1549,15 +1621,29 @@ server cluster OperationalCredentials = 62 { octet_string<32> attestationNonce = 0; } + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + request struct CSRRequestRequest { octet_string<32> CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + request struct AddNOCRequest { octet_string<400> NOCValue = 0; optional octet_string<400> ICACValue = 1; @@ -1571,6 +1657,12 @@ server cluster OperationalCredentials = 62 { optional octet_string ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + request struct UpdateFabricLabelRequest { char_string<32> label = 0; } @@ -1583,38 +1675,26 @@ server cluster OperationalCredentials = 62 { octet_string rootCACertificate = 0; } - response struct AttestationResponse = 1 { - octet_string<900> attestationElements = 0; - octet_string<64> attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - octet_string<600> certificate = 0; - } - - response struct CSRResponse = 5 { - octet_string NOCSRElements = 0; - octet_string attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional char_string<128> debugText = 2; - } - + /** Sender is requesting attestation information from the receiver. */ command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -1669,27 +1749,31 @@ server cluster GroupKeyManagement = 63 { int16u groupKeySetID = 0; } - request struct KeySetRemoveRequest { - int16u groupKeySetID = 0; - } - response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + response struct KeySetReadAllIndicesResponse = 5 { int16u groupKeySetIDs[] = 0; } + /** Write a new set of keys for the given key set id. */ fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -server cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1707,7 +1791,7 @@ server cluster FixedLabel = 64 { } /** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ -server cluster UserLabel = 65 { +cluster UserLabel = 65 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -1725,7 +1809,7 @@ server cluster UserLabel = 65 { } /** Provides an interface for controlling and adjusting automatic window coverings. */ -server cluster WindowCovering = 258 { +cluster WindowCovering = 258 { revision 5; enum EndProductType : enum8 { @@ -1817,27 +1901,27 @@ server cluster WindowCovering = 258 { } readonly attribute Type type = 0; - readonly attribute int16u physicalClosedLimitLift = 1; - readonly attribute int16u physicalClosedLimitTilt = 2; - readonly attribute nullable int16u currentPositionLift = 3; - readonly attribute nullable int16u currentPositionTilt = 4; - readonly attribute int16u numberOfActuationsLift = 5; - readonly attribute int16u numberOfActuationsTilt = 6; + readonly attribute optional int16u physicalClosedLimitLift = 1; + readonly attribute optional int16u physicalClosedLimitTilt = 2; + readonly attribute optional nullable int16u currentPositionLift = 3; + readonly attribute optional nullable int16u currentPositionTilt = 4; + readonly attribute optional int16u numberOfActuationsLift = 5; + readonly attribute optional int16u numberOfActuationsTilt = 6; readonly attribute ConfigStatus configStatus = 7; - readonly attribute nullable percent currentPositionLiftPercentage = 8; - readonly attribute nullable percent currentPositionTiltPercentage = 9; + readonly attribute optional nullable percent currentPositionLiftPercentage = 8; + readonly attribute optional nullable percent currentPositionTiltPercentage = 9; readonly attribute OperationalStatus operationalStatus = 10; - readonly attribute nullable percent100ths targetPositionLiftPercent100ths = 11; - readonly attribute nullable percent100ths targetPositionTiltPercent100ths = 12; + readonly attribute optional nullable percent100ths targetPositionLiftPercent100ths = 11; + readonly attribute optional nullable percent100ths targetPositionTiltPercent100ths = 12; readonly attribute EndProductType endProductType = 13; - readonly attribute nullable percent100ths currentPositionLiftPercent100ths = 14; - readonly attribute nullable percent100ths currentPositionTiltPercent100ths = 15; - readonly attribute int16u installedOpenLimitLift = 16; - readonly attribute int16u installedClosedLimitLift = 17; - readonly attribute int16u installedOpenLimitTilt = 18; - readonly attribute int16u installedClosedLimitTilt = 19; + readonly attribute optional nullable percent100ths currentPositionLiftPercent100ths = 14; + readonly attribute optional nullable percent100ths currentPositionTiltPercent100ths = 15; + readonly attribute optional int16u installedOpenLimitLift = 16; + readonly attribute optional int16u installedClosedLimitLift = 17; + readonly attribute optional int16u installedOpenLimitTilt = 18; + readonly attribute optional int16u installedClosedLimitTilt = 19; attribute access(write: manage) Mode mode = 23; - readonly attribute SafetyStatus safetyStatus = 26; + readonly attribute optional SafetyStatus safetyStatus = 26; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1861,12 +1945,19 @@ server cluster WindowCovering = 258 { percent100ths tiltPercent100thsValue = 0; } + /** Moves window covering to InstalledOpenLimitLift and InstalledOpenLimitTilt */ command UpOrOpen(): DefaultSuccess = 0; + /** Moves window covering to InstalledClosedLimitLift and InstalledCloseLimitTilt */ command DownOrClose(): DefaultSuccess = 1; + /** Stop any adjusting of window covering */ command StopMotion(): DefaultSuccess = 2; + /** Go to lift value specified */ command GoToLiftValue(GoToLiftValueRequest): DefaultSuccess = 4; + /** Go to lift percentage specified */ command GoToLiftPercentage(GoToLiftPercentageRequest): DefaultSuccess = 5; + /** Go to tilt value specified */ command GoToTiltValue(GoToTiltValueRequest): DefaultSuccess = 7; + /** Go to tilt percentage specified */ command GoToTiltPercentage(GoToTiltPercentageRequest): DefaultSuccess = 8; } diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index 9fbc8c0ea4d638..fa4c8d65956def 100755 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -138,6 +138,7 @@ def BuildHostTarget(): TargetPart('air-purifier', app=HostApp.AIR_PURIFIER), TargetPart('lit-icd', app=HostApp.LIT_ICD), TargetPart('air-quality-sensor', app=HostApp.AIR_QUALITY_SENSOR), + TargetPart('network-manager', app=HostApp.NETWORK_MANAGER), ] if (HostBoard.NATIVE.PlatformName() == 'darwin'): diff --git a/scripts/build/builders/host.py b/scripts/build/builders/host.py index cb35dfa265aa96..7db01689ef3481 100644 --- a/scripts/build/builders/host.py +++ b/scripts/build/builders/host.py @@ -75,6 +75,7 @@ class HostApp(Enum): AIR_PURIFIER = auto() LIT_ICD = auto() AIR_QUALITY_SENSOR = auto() + NETWORK_MANAGER = auto() def ExamplePath(self): if self == HostApp.ALL_CLUSTERS: @@ -133,6 +134,8 @@ def ExamplePath(self): return 'lit-icd-app/linux' elif self == HostApp.AIR_QUALITY_SENSOR: return 'air-quality-sensor-app/linux' + elif self == HostApp.NETWORK_MANAGER: + return 'network-manager-app/linux' else: raise Exception('Unknown app type: %r' % self) diff --git a/scripts/build/testdata/all_targets_linux_x64.txt b/scripts/build/testdata/all_targets_linux_x64.txt index 5272047bf9c77f..627b2c0b15ef0d 100644 --- a/scripts/build/testdata/all_targets_linux_x64.txt +++ b/scripts/build/testdata/all_targets_linux_x64.txt @@ -10,7 +10,7 @@ efr32-{brd4161a,brd4187c,brd4186c,brd4163a,brd4164a,brd4166a,brd4170a,brd4186a,b esp32-{m5stack,c3devkit,devkitc,qemu}-{all-clusters,all-clusters-minimal,ota-provider,ota-requestor,shell,light,lock,bridge,temperature-measurement,ota-requestor,tests}[-rpc][-ipv6only][-tracing] genio-lighting-app linux-fake-tests[-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-coverage][-dmalloc][-clang] -linux-{x64,arm64}-{rpc-console,all-clusters,all-clusters-minimal,chip-tool,thermostat,java-matter-controller,kotlin-matter-controller,minmdns,light,lock,shell,ota-provider,ota-requestor,simulated-app1,simulated-app2,python-bindings,tv-app,tv-casting-app,bridge,tests,chip-cert,address-resolve-tool,contact-sensor,dishwasher,refrigerator,rvc,air-purifier,lit-icd,air-quality-sensor}[-nodeps][-platform-mdns][-minmdns-verbose][-libnl][-same-event-loop][-no-interactive][-ipv6only][-no-ble][-no-wifi][-no-thread][-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-coverage][-dmalloc][-clang][-test][-rpc][-with-ui] +linux-{x64,arm64}-{rpc-console,all-clusters,all-clusters-minimal,chip-tool,thermostat,java-matter-controller,kotlin-matter-controller,minmdns,light,lock,shell,ota-provider,ota-requestor,simulated-app1,simulated-app2,python-bindings,tv-app,tv-casting-app,bridge,tests,chip-cert,address-resolve-tool,contact-sensor,dishwasher,refrigerator,rvc,air-purifier,lit-icd,air-quality-sensor,network-manager}[-nodeps][-platform-mdns][-minmdns-verbose][-libnl][-same-event-loop][-no-interactive][-ipv6only][-no-ble][-no-wifi][-no-thread][-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-coverage][-dmalloc][-clang][-test][-rpc][-with-ui] linux-x64-efr32-test-runner[-clang] imx-{chip-tool,lighting-app,thermostat,all-clusters-app,all-clusters-minimal-app,ota-provider-app}[-release] infineon-psoc6-{lock,light,all-clusters,all-clusters-minimal}[-ota][-updateimage] diff --git a/scripts/py_matter_idl/examples/matter_idl_plugin/__init__.py b/scripts/py_matter_idl/examples/matter_idl_plugin/__init__.py index 470ee09d5181f3..762f960364cc2d 100644 --- a/scripts/py_matter_idl/examples/matter_idl_plugin/__init__.py +++ b/scripts/py_matter_idl/examples/matter_idl_plugin/__init__.py @@ -15,7 +15,7 @@ import os from matter_idl.generators import CodeGenerator, GeneratorStorage -from matter_idl.matter_idl_types import Cluster, ClusterSide, Command, Field, Idl +from matter_idl.matter_idl_types import Cluster, Command, Field, Idl def toUpperSnakeCase(s): @@ -201,7 +201,8 @@ def __init__(self, storage: GeneratorStorage, idl: Idl, **kargs): super().__init__(storage, idl, fs_loader_searchpath=os.path.dirname(__file__)) if 'package' not in kargs: - raise Exception('Please provide a "--option package:" argument') + raise Exception( + 'Please provide a "--option package:" argument') self.package = kargs['package'] # String helpers @@ -230,9 +231,6 @@ def internal_render_all(self): # Every cluster has its own impl, to avoid # very large compilations (running out of RAM) for cluster in self.idl.clusters: - if cluster.side != ClusterSide.CLIENT: - continue - filename = "proto/%s_cluster.proto" % toLowerSnakeCase( cluster.name) diff --git a/scripts/py_matter_idl/files.gni b/scripts/py_matter_idl/files.gni index d0dba4c9393722..a1b84ff5c423cc 100644 --- a/scripts/py_matter_idl/files.gni +++ b/scripts/py_matter_idl/files.gni @@ -31,6 +31,7 @@ matter_idl_generator_sources = [ "${chip_root}/scripts/py_matter_idl/matter_idl/data_model_xml/handlers/handlers.py", "${chip_root}/scripts/py_matter_idl/matter_idl/data_model_xml/handlers/parsing.py", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/__init__.py", + "${chip_root}/scripts/py_matter_idl/matter_idl/generators/cluster_selection.py", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/cpp/__init__.py", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/cpp/application/__init__.py", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/cpp/tlvmeta/__init__.py", diff --git a/scripts/py_matter_idl/matter_idl/README.md b/scripts/py_matter_idl/matter_idl/README.md index 5bb8b40da087bc..bd4d3ef468188d 100644 --- a/scripts/py_matter_idl/matter_idl/README.md +++ b/scripts/py_matter_idl/matter_idl/README.md @@ -16,28 +16,8 @@ however it may be easier to understand with an example: // so are C-style ones -// Types such as enums and structs can be defined globally -// An enum has a name and must have an underlying type (a sized integer defining -// storage size and how it gets transmitted over the wire) -enum StatusCode : ENUM8 { - kBusy = 1; // every enum MUST have an integer value - kPAKEParameterError = 0x02; // throughout, either HEX or integer can be used - kWindowNotOpen = 3; -} - -// Structures just have a name -struct LabelStruct { - CHAR_STRING<16> label = 0; // structure fields have a type. Some types can be sized (strings, octet strings) - CHAR_STRING<16> value = 1; // every structure field has an index. this is the tag when encoding over the wire -} - -// Server clusters are clusters that are expected to be exposed as servers -// -// Clusters may have optional things (e.g. optional attributes). A server -// cluster only defines attributes actually exposed by the server. -// // Every cluster has an identifier that is defined by the matter spec (31 in this case) -server cluster AccessControl = 31 { +cluster AccessControl = 31 { // Revision of the cluster being described here // If not specified, it is assumed to be 1 @@ -153,33 +133,15 @@ server cluster AccessControl = 31 { internal command FactoryReset(): DefaultSuccess = 10; } -// A client cluster represents something that is used by an app -// but no server is exposed. -// -// A code generation may generate either combination of client and server -// clusters for a given cluster name. -// -// Even if both client and server cluster are declared within an IDL, their -// content may differ. For example -// - server cluster contains only attributes that the server exposes. As such -// some optional attributes may be missing. -// -// - client cluster contains attributes that the app wants to access as a -// client. So an optional attribute may be presented because the -// underlying application can make use of that attribute. -client cluster OtaSoftwareUpdateProvider = 41 { - ///.... content removed: it is very similar to a server cluster -} - // Clusters may be provisional or internal as well -provisional client cluster SomeClusterInDevelopment = 1234 { +provisional cluster SomeClusterInDevelopment = 1234 { /// ... content removed } // On every endpoint number (non-dynamic) // a series of clusters can be exposed endpoint 0 { - // A binding cluster is a CLIENT cluster that can be bound to for the + // A binding cluster is a cluster that can be bound to for the // application to make use. // // As an example, a light switch can be bound to a light bulb or diff --git a/scripts/py_matter_idl/matter_idl/backwards_compatibility.py b/scripts/py_matter_idl/matter_idl/backwards_compatibility.py index 36898f1029849b..9a6684c8031b9a 100644 --- a/scripts/py_matter_idl/matter_idl/backwards_compatibility.py +++ b/scripts/py_matter_idl/matter_idl/backwards_compatibility.py @@ -17,7 +17,7 @@ import logging from typing import Callable, Dict, List, Optional, Protocol, TypeVar -from matter_idl.matter_idl_types import Attribute, Bitmap, Cluster, ClusterSide, Command, Enum, Event, Field, Idl, Struct +from matter_idl.matter_idl_types import Attribute, Bitmap, Cluster, Command, Enum, Event, Field, Idl, Struct class Compatibility(enum.Enum): @@ -47,14 +47,6 @@ def group_list_by_name(items: List[NAMED]) -> Dict[str, NAMED]: return group_list(items, lambda x: x.name) -def full_cluster_name(cluster: Cluster) -> str: - "Builds a unique cluster name considering the side as well" - if cluster.side == ClusterSide.CLIENT: - return f"{cluster.name}/client" - else: - return f"{cluster.name}/server" - - def attribute_name(attribute: Attribute) -> str: """Get the name of an attribute.""" return attribute.definition.name @@ -275,24 +267,23 @@ def _check_attribute_list_compatible(self, cluster_name: str, original: List[Att cluster_name, attribute, updated_attributes.get(attribute_name(attribute))) def _check_cluster_list_compatible(self, original: List[Cluster], updated: List[Cluster]): - updated_clusters = group_list(updated, full_cluster_name) + updated_clusters = group_list(updated, lambda c: c.name) for original_cluster in original: - updated_cluster = updated_clusters.get( - full_cluster_name(original_cluster)) + updated_cluster = updated_clusters.get(original_cluster.name) self._check_cluster_compatible(original_cluster, updated_cluster) def _check_cluster_compatible(self, original_cluster: Cluster, updated_cluster: Optional[Cluster]): self.logger.debug( - f"Checking cluster {full_cluster_name(original_cluster)}") + f"Checking cluster {original_cluster.name}") if not updated_cluster: self._mark_incompatible( - f"Cluster {full_cluster_name(original_cluster)} was deleted") + f"Cluster {original_cluster.name} was deleted") return if original_cluster.code != updated_cluster.code: self._mark_incompatible( - f"Cluster {full_cluster_name(original_cluster)} has different codes {original_cluster.code} != {updated_cluster.code}") + f"Cluster {original_cluster.name} has different codes {original_cluster.code} != {updated_cluster.code}") self._check_enum_list_compatible( original_cluster.name, original_cluster.enums, updated_cluster.enums) diff --git a/scripts/py_matter_idl/matter_idl/data_model_xml/handlers/context.py b/scripts/py_matter_idl/matter_idl/data_model_xml/handlers/context.py index fe96836da37463..195f3eae7a732b 100644 --- a/scripts/py_matter_idl/matter_idl/data_model_xml/handlers/context.py +++ b/scripts/py_matter_idl/matter_idl/data_model_xml/handlers/context.py @@ -16,7 +16,7 @@ import xml.sax.xmlreader from typing import List, Optional -from matter_idl.matter_idl_types import Cluster, ClusterSide, Idl, ParseMetaData +from matter_idl.matter_idl_types import Cluster, Idl, ParseMetaData class IdlPostProcessor: @@ -90,8 +90,7 @@ def AddAbstractBaseCluster(self, name: str, parse_meta: Optional[ParseMetaData] """ assert name not in self.abstract_base_clusters # be unique - cluster = Cluster(side=ClusterSide.CLIENT, name=name, - code=-1, parse_meta=parse_meta) + cluster = Cluster(name=name, code=-1, parse_meta=parse_meta) self.abstract_base_clusters[name] = cluster return cluster diff --git a/scripts/py_matter_idl/matter_idl/data_model_xml/handlers/handlers.py b/scripts/py_matter_idl/matter_idl/data_model_xml/handlers/handlers.py index 0cae26bf5207ec..ee13991f23d8df 100644 --- a/scripts/py_matter_idl/matter_idl/data_model_xml/handlers/handlers.py +++ b/scripts/py_matter_idl/matter_idl/data_model_xml/handlers/handlers.py @@ -17,8 +17,8 @@ from typing import Optional from xml.sax.xmlreader import AttributesImpl -from matter_idl.matter_idl_types import (ApiMaturity, Attribute, AttributeQuality, Bitmap, Cluster, ClusterSide, Command, - CommandQuality, ConstantEntry, DataType, Enum, Field, FieldQuality, Idl, Struct, StructTag) +from matter_idl.matter_idl_types import (ApiMaturity, Attribute, AttributeQuality, Bitmap, Cluster, Command, CommandQuality, + ConstantEntry, DataType, Enum, Field, FieldQuality, Idl, Struct, StructTag) from .base import BaseHandler, HandledDepth from .context import Context @@ -537,7 +537,6 @@ def ForAttributes(context: Context, idl: Idl, attrs: AttributesImpl): return ClusterHandler(context, idl, Cluster( - side=ClusterSide.CLIENT, name=NormalizeName(attrs["name"]), code=ParseInt(attrs["id"]), parse_meta=context.GetCurrentLocationMeta() diff --git a/scripts/py_matter_idl/matter_idl/generators/cluster_selection.py b/scripts/py_matter_idl/matter_idl/generators/cluster_selection.py new file mode 100644 index 00000000000000..f1cab2518d4751 --- /dev/null +++ b/scripts/py_matter_idl/matter_idl/generators/cluster_selection.py @@ -0,0 +1,47 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +from typing import List + +from matter_idl.matter_idl_types import Cluster, Idl + + +def server_side_clusters(idl: Idl) -> List[Cluster]: + """ + Return a list of clusters that are instantiated in at least one endpoint + within the given IDL. + """ + cluster_names = set() + + for e in idl.endpoints: + for item in e.server_clusters: + cluster_names.add(item.name) + + return [c for c in idl.clusters if c.name in cluster_names] + + +def binding_clusters(idl: Idl) -> List[Cluster]: + """ + Return a list of clusters that show up as bindings on some endpoints + within the given IDL. + """ + cluster_names = set() + + for e in idl.endpoints: + for item in e.client_bindings: + cluster_names.add(item) + + return [c for c in idl.clusters if c.name in cluster_names] diff --git a/scripts/py_matter_idl/matter_idl/generators/cpp/application/PluginApplicationCallbacksHeader.jinja b/scripts/py_matter_idl/matter_idl/generators/cpp/application/PluginApplicationCallbacksHeader.jinja index 2e31426b3d05fc..1c188612f7b7fd 100644 --- a/scripts/py_matter_idl/matter_idl/generators/cpp/application/PluginApplicationCallbacksHeader.jinja +++ b/scripts/py_matter_idl/matter_idl/generators/cpp/application/PluginApplicationCallbacksHeader.jinja @@ -1,11 +1,11 @@ #pragma once -{%- for cluster in clusters | serverClustersOnly | sort(attribute='name') %} +{%- for cluster in clusters | sort(attribute='name') %} void Matter{{ cluster.name }}PluginServerInitCallback(); {%- endfor %} #define MATTER_PLUGINS_INIT \ -{%- for cluster in clusters | serverClustersOnly | sort(attribute='name') %} +{%- for cluster in clusters | sort(attribute='name') %} Matter{{ cluster.name }}PluginServerInitCallback();{{ " \\" if not loop.last else ""}} {%- else %} (void)0; /* No server side clusters */ diff --git a/scripts/py_matter_idl/matter_idl/generators/cpp/application/__init__.py b/scripts/py_matter_idl/matter_idl/generators/cpp/application/__init__.py index 2b9158864d28e4..1c6fd248ad0c55 100644 --- a/scripts/py_matter_idl/matter_idl/generators/cpp/application/__init__.py +++ b/scripts/py_matter_idl/matter_idl/generators/cpp/application/__init__.py @@ -13,14 +13,10 @@ # limitations under the License. import os -from typing import List from matter_idl.generators import CodeGenerator, GeneratorStorage -from matter_idl.matter_idl_types import Cluster, ClusterSide, Idl - - -def serverClustersOnly(clusters: List[Cluster]) -> List[Cluster]: - return [c for c in clusters if c.side == ClusterSide.SERVER] +from matter_idl.generators.cluster_selection import server_side_clusters +from matter_idl.matter_idl_types import Idl class CppApplicationGenerator(CodeGenerator): @@ -35,8 +31,6 @@ def __init__(self, storage: GeneratorStorage, idl: Idl, **kargs): """ super().__init__(storage, idl, fs_loader_searchpath=os.path.dirname(__file__)) - self.jinja_env.filters['serverClustersOnly'] = serverClustersOnly - def internal_render_all(self): """ Renders the cpp and header files required for applications @@ -47,7 +41,7 @@ def internal_render_all(self): template_path="PluginApplicationCallbacksHeader.jinja", output_file_name="app/PluginApplicationCallbacks.h", vars={ - 'clusters': self.idl.clusters, + 'clusters': server_side_clusters(self.idl) } ) @@ -57,6 +51,6 @@ def internal_render_all(self): template_path="CallbackStubSource.jinja", output_file_name="app/callback-stub.cpp", vars={ - 'clusters': self.idl.clusters, + 'clusters': server_side_clusters(self.idl) } ) diff --git a/scripts/py_matter_idl/matter_idl/generators/cpp/tlvmeta/__init__.py b/scripts/py_matter_idl/matter_idl/generators/cpp/tlvmeta/__init__.py index 46c7de39498fac..7b46053d4600d0 100644 --- a/scripts/py_matter_idl/matter_idl/generators/cpp/tlvmeta/__init__.py +++ b/scripts/py_matter_idl/matter_idl/generators/cpp/tlvmeta/__init__.py @@ -17,7 +17,7 @@ from typing import Generator, List, Optional from matter_idl.generators import CodeGenerator, GeneratorStorage -from matter_idl.matter_idl_types import Cluster, ClusterSide, Field, Idl, StructTag +from matter_idl.matter_idl_types import Cluster, Field, Idl, StructTag @dataclass @@ -297,10 +297,9 @@ def internal_render_all(self): template_path="TLVMetaData_cpp.jinja", output_file_name=f"tlv/meta/{self.table_name}.cpp", vars={ - 'clusters': [c for c in self.idl.clusters if c.side == ClusterSide.CLIENT], + 'clusters': self.idl.clusters, 'table_name': self.table_name, 'sub_tables': tables, - } ) @@ -308,7 +307,7 @@ def internal_render_all(self): template_path="TLVMetaData_h.jinja", output_file_name=f"tlv/meta/{self.table_name}.h", vars={ - 'clusters': [c for c in self.idl.clusters if c.side == ClusterSide.CLIENT], + 'clusters': self.idl.clusters, 'table_name': self.table_name, 'sub_tables': tables, } diff --git a/scripts/py_matter_idl/matter_idl/generators/idl/MatterIdl.jinja b/scripts/py_matter_idl/matter_idl/generators/idl/MatterIdl.jinja index edfb2989668e84..23696946803963 100644 --- a/scripts/py_matter_idl/matter_idl/generators/idl/MatterIdl.jinja +++ b/scripts/py_matter_idl/matter_idl/generators/idl/MatterIdl.jinja @@ -35,7 +35,7 @@ {% for cluster in idl.clusters %} {% if cluster.description %}/** {{cluster.description}} */ {% endif %} -{{cluster.api_maturity | idltxt}}{{cluster.side | idltxt}} cluster {{cluster.name}} = {{cluster.code}} { +{{cluster.api_maturity | idltxt}}cluster {{cluster.name}} = {{cluster.code}} { revision {{cluster.revision}}; {% for enum in cluster.enums %} diff --git a/scripts/py_matter_idl/matter_idl/generators/idl/__init__.py b/scripts/py_matter_idl/matter_idl/generators/idl/__init__.py index 8f924e3405187d..3bf1714bbaf1f0 100644 --- a/scripts/py_matter_idl/matter_idl/generators/idl/__init__.py +++ b/scripts/py_matter_idl/matter_idl/generators/idl/__init__.py @@ -16,18 +16,13 @@ from typing import Union from matter_idl.generators import CodeGenerator, GeneratorStorage -from matter_idl.matter_idl_types import (AccessPrivilege, ApiMaturity, Attribute, AttributeQuality, AttributeStorage, ClusterSide, - Command, CommandQuality, Event, EventPriority, EventQuality, FieldQuality, Idl, - StructQuality, StructTag) - - -def human_text_string(value: Union[ClusterSide, StructTag, StructQuality, EventPriority, EventQuality, AccessPrivilege, AttributeQuality, CommandQuality, ApiMaturity, AttributeStorage]) -> str: - if type(value) is ClusterSide: - if value == ClusterSide.CLIENT: - return "client" - if value == ClusterSide.SERVER: - return "server" - elif type(value) is StructTag: +from matter_idl.matter_idl_types import (AccessPrivilege, ApiMaturity, Attribute, AttributeQuality, AttributeStorage, Command, + CommandQuality, Event, EventPriority, EventQuality, FieldQuality, Idl, StructQuality, + StructTag) + + +def human_text_string(value: Union[StructTag, StructQuality, EventPriority, EventQuality, AccessPrivilege, AttributeQuality, CommandQuality, ApiMaturity, AttributeStorage]) -> str: + if type(value) is StructTag: if value == StructTag.REQUEST: return "request" if value == StructTag.RESPONSE: diff --git a/scripts/py_matter_idl/matter_idl/generators/java/__init__.py b/scripts/py_matter_idl/matter_idl/generators/java/__init__.py index 7b1c80bb13bb1c..98ac58a3a4ce37 100644 --- a/scripts/py_matter_idl/matter_idl/generators/java/__init__.py +++ b/scripts/py_matter_idl/matter_idl/generators/java/__init__.py @@ -22,8 +22,8 @@ from matter_idl.generators import CodeGenerator, GeneratorStorage from matter_idl.generators.type_definitions import (BasicInteger, BasicString, FundamentalType, IdlBitmapType, IdlEnumType, IdlType, ParseDataType, TypeLookupContext) -from matter_idl.matter_idl_types import (Attribute, Cluster, ClusterSide, Command, DataType, Field, FieldQuality, Idl, Struct, - StructQuality, StructTag) +from matter_idl.matter_idl_types import (Attribute, Cluster, Command, DataType, Field, FieldQuality, Idl, Struct, StructQuality, + StructTag) from stringcase import capitalcase @@ -781,7 +781,7 @@ def internal_render_all(self): output_file_name=target.output_name, vars={ 'idl': self.idl, - 'clientClusters': [c for c in self.idl.clusters if c.side == ClusterSide.CLIENT], + 'clientClusters': self.idl.clusters, 'globalTypes': _GLOBAL_TYPES, } ) @@ -798,16 +798,13 @@ def internal_render_all(self): output_file_name="jni/CHIPCallbackTypes.h", vars={ 'idl': self.idl, - 'clientClusters': [c for c in self.idl.clusters if c.side == ClusterSide.CLIENT], + 'clientClusters': self.idl.clusters, } ) # Every cluster has its own impl, to avoid # very large compilations (running out of RAM) for cluster in self.idl.clusters: - if cluster.side != ClusterSide.CLIENT: - continue - for target in cluster_targets: self.internal_render_one_output( template_path=target.template, @@ -832,8 +829,7 @@ def internal_render_all(self): Renders .java files required for java matter support """ - clientClusters = [ - c for c in self.idl.clusters if c.side == ClusterSide.CLIENT] + clientClusters = self.idl.clusters self.internal_render_one_output( template_path="ClusterReadMapping.jinja", @@ -910,9 +906,6 @@ def internal_render_all(self): # Every cluster has its own impl, to avoid # very large compilations (running out of RAM) for cluster in self.idl.clusters: - if cluster.side != ClusterSide.CLIENT: - continue - for struct in cluster.structs: if struct.tag: continue diff --git a/scripts/py_matter_idl/matter_idl/generators/kotlin/__init__.py b/scripts/py_matter_idl/matter_idl/generators/kotlin/__init__.py index 8b1cd865ef105c..b671532df6682e 100644 --- a/scripts/py_matter_idl/matter_idl/generators/kotlin/__init__.py +++ b/scripts/py_matter_idl/matter_idl/generators/kotlin/__init__.py @@ -22,8 +22,8 @@ from matter_idl.generators import CodeGenerator, GeneratorStorage from matter_idl.generators.type_definitions import (BasicInteger, BasicString, FundamentalType, IdlBitmapType, IdlEnumType, IdlType, ParseDataType, TypeLookupContext) -from matter_idl.matter_idl_types import (Attribute, Cluster, ClusterSide, Command, DataType, Field, FieldQuality, Idl, Struct, - StructQuality, StructTag) +from matter_idl.matter_idl_types import (Attribute, Cluster, Command, DataType, Field, FieldQuality, Idl, Struct, StructQuality, + StructTag) from stringcase import capitalcase @@ -652,8 +652,7 @@ def internal_render_all(self): Renders .kt files required for kotlin matter support """ - clientClusters = [ - c for c in self.idl.clusters if c.side == ClusterSide.CLIENT] + clientClusters = self.idl.clusters self.internal_render_one_output( template_path="MatterFiles_gni.jinja", @@ -679,9 +678,6 @@ def internal_render_all(self): # Every cluster has its own impl, to avoid # very large compilations (running out of RAM) for cluster in self.idl.clusters: - if cluster.side != ClusterSide.CLIENT: - continue - for struct in cluster.structs: if struct.tag: continue diff --git a/scripts/py_matter_idl/matter_idl/lint/type_definitions.py b/scripts/py_matter_idl/matter_idl/lint/type_definitions.py index 3fdbf3d2eb1ee2..17af58562fb3aa 100644 --- a/scripts/py_matter_idl/matter_idl/lint/type_definitions.py +++ b/scripts/py_matter_idl/matter_idl/lint/type_definitions.py @@ -16,7 +16,7 @@ from dataclasses import dataclass, field from typing import List, MutableMapping, Optional, Union -from matter_idl.matter_idl_types import ClusterSide, Idl, ParseMetaData +from matter_idl.matter_idl_types import Idl, ParseMetaData class MissingIdlError(Exception): @@ -158,9 +158,7 @@ def _ClusterCode(self, name: str, location: Optional[LocationInFile]): if not self._idl: raise MissingIdlError() - cluster_definition = [ - c for c in self._idl.clusters if c.name == name and c.side == ClusterSide.SERVER - ] + cluster_definition = [c for c in self._idl.clusters if c.name == name] if not cluster_definition: self._AddLintError( "Cluster definition for %s not found" % name, location) @@ -242,9 +240,7 @@ def _ServerClusterDefinition(self, name: str, location: Optional[LocationInFile] if not self._idl: raise MissingIdlError() - cluster_definition = [ - c for c in self._idl.clusters if c.name == name and c.side == ClusterSide.SERVER - ] + cluster_definition = [c for c in self._idl.clusters if c.name == name] if not cluster_definition: self._AddLintError( "Cluster definition for %s not found" % name, location) @@ -365,9 +361,6 @@ def _LintImpl(self): raise MissingIdlError() for cluster in self._idl.clusters: - if cluster.side != ClusterSide.SERVER: - continue # only validate server-side: - if cluster.code not in self._mandatory_commands: continue # no known mandatory commands diff --git a/scripts/py_matter_idl/matter_idl/matter_grammar.lark b/scripts/py_matter_idl/matter_idl/matter_grammar.lark index f498ce4f484fc2..a2838e1fa8eb18 100644 --- a/scripts/py_matter_idl/matter_idl/matter_grammar.lark +++ b/scripts/py_matter_idl/matter_idl/matter_grammar.lark @@ -63,11 +63,12 @@ command: command_qualities command_with_access "(" id? ")" ":" id "=" positive_i cluster_revision: "revision"i positive_integer ";" -cluster: [maturity] cluster_side "cluster"i id "=" positive_integer "{" [cluster_revision] cluster_content* "}" -?cluster_side: "server"i -> server_cluster - | "client"i -> client_cluster -?cluster_content: [maturity] (enum|bitmap|event|attribute|struct|request_struct|response_struct|command) +// NOTE: +// Client or server cluster entries are for backwards compatibility only and have +// no direct meaning currently +cluster: [maturity] ( "client" | "server" )? "cluster"i id "=" positive_integer "{" [cluster_revision] cluster_content* "}" +?cluster_content: [maturity] (enum|bitmap|event|attribute|struct|request_struct|response_struct|command) endpoint: "endpoint"i positive_integer "{" endpoint_content* "}" ?endpoint_content: endpoint_cluster_binding | endpoint_server_cluster | endpoint_device_type diff --git a/scripts/py_matter_idl/matter_idl/matter_idl_parser.py b/scripts/py_matter_idl/matter_idl/matter_idl_parser.py index 967eb6ecc19a37..e33c0c7e872502 100755 --- a/scripts/py_matter_idl/matter_idl/matter_idl_parser.py +++ b/scripts/py_matter_idl/matter_idl/matter_idl_parser.py @@ -2,7 +2,7 @@ import functools import logging -from typing import Optional +from typing import Dict, Optional from lark import Lark from lark.lexer import Token @@ -19,10 +19,10 @@ from matter_idl.matter_idl_types import AccessPrivilege from matter_idl.matter_idl_types import (ApiMaturity, Attribute, AttributeInstantiation, AttributeOperation, AttributeQuality, - AttributeStorage, Bitmap, Cluster, ClusterSide, Command, CommandInstantiation, - CommandQuality, ConstantEntry, DataType, DeviceType, Endpoint, Enum, Event, EventPriority, - EventQuality, Field, FieldQuality, Idl, ParseMetaData, ServerClusterInstantiation, Struct, - StructQuality, StructTag) + AttributeStorage, Bitmap, Cluster, Command, CommandInstantiation, CommandQuality, + ConstantEntry, DataType, DeviceType, Endpoint, Enum, Event, EventPriority, EventQuality, + Field, FieldQuality, Idl, ParseMetaData, ServerClusterInstantiation, Struct, StructQuality, + StructTag) def UnionOfAllFlags(flags_list): @@ -46,14 +46,6 @@ def appply_to_idl(self, idl: Idl, content: str): while content[actual_pos] in ' \t\n\r': actual_pos += 1 - # Allow to skip api maturity flags - for maturity in ["provisional", "internal", "stable", "deprecated"]: - if content[actual_pos:].startswith(maturity): - actual_pos += len(maturity) - - while content[actual_pos] in ' \t\n\r': - actual_pos += 1 - # A doc comment will apply to any supported element assuming it immediately # preceeds id (skipping whitespace) for item in self.supported_types(idl): @@ -138,7 +130,6 @@ class MatterIdlTransformer(Transformer): def __init__(self, skip_meta): self.skip_meta = skip_meta self.doc_comments = [] - self._cluster_start_pos = None def positive_integer(self, tokens): """Numbers in the grammar are integers or hex numbers. @@ -282,16 +273,6 @@ def struct_field(self, args): field.api_maturity = args[0] return field - @v_args(meta=True) - def server_cluster(self, meta, unused_args): - self._cluster_start_pos = meta and meta.start_pos - return ClusterSide.SERVER - - @v_args(meta=True, inline=True) - def client_cluster(self, meta, *unused_args): - self._cluster_start_pos = meta and meta.start_pos - return ClusterSide.CLIENT - def command_access(self, privilege): return privilege[0] @@ -489,21 +470,17 @@ def cluster_content(self, api_maturity, element): return element @v_args(inline=True, meta=True) - def cluster(self, meta, api_maturity, side, name, code, revision, *content): + def cluster(self, meta, api_maturity, name, code, revision, *content): meta = None if self.skip_meta else ParseMetaData(meta) - # shift actual starting position where the doc comment would start - if meta and self._cluster_start_pos: - meta.start_pos = self._cluster_start_pos - if api_maturity is None: api_maturity = ApiMaturity.STABLE if not revision: revision = 1 - result = Cluster(parse_meta=meta, side=side, name=name, - code=code, revision=revision, api_maturity=api_maturity) + result = Cluster(parse_meta=meta, name=name, code=code, + revision=revision, api_maturity=api_maturity) for item in content: if isinstance(item, Enum): @@ -570,6 +547,28 @@ def parse(self, file: str, file_name: Optional[str] = None): idl = self.transformer.transform(self.parser.parse(file)) idl.parse_file_name = file_name + # ZAP may generate the same definition of clusters several times. + # Validate that if a cluster is defined, its definition is IDENTICAL + # + # TODO: this is not ideal and zap provides some iteration that seems + # to not care about side: `all_user_clusters_irrespective_of_side` + # however that one loses at least `description` and switches + # ordering. + # + # As a result, for now allow multiple definitions IF AND ONLY IF identical + # + # A zap PR to allow us to not need this is: + # https://github.com/project-chip/zap/pull/1216 + clusters: Dict[int, Cluster] = {} + for c in idl.clusters: + if c.code in clusters: + if c != clusters[c.code]: + raise Exception( + f"Different cluster definition for {c.name}/{c.code}") + else: + clusters[c.code] = c + idl.clusters = [c for c in clusters.values()] + for comment in self.transformer.doc_comments: comment.appply_to_idl(idl, file) diff --git a/scripts/py_matter_idl/matter_idl/matter_idl_types.py b/scripts/py_matter_idl/matter_idl/matter_idl_types.py index 4be2ff20b85880..3515e5e655bc7a 100644 --- a/scripts/py_matter_idl/matter_idl/matter_idl_types.py +++ b/scripts/py_matter_idl/matter_idl/matter_idl_types.py @@ -75,11 +75,6 @@ class EventQuality(enum.Flag): FABRIC_SENSITIVE = enum.auto() -class ClusterSide(enum.Enum): - CLIENT = enum.auto() - SERVER = enum.auto() - - class StructTag(enum.Enum): REQUEST = enum.auto() RESPONSE = enum.auto() @@ -220,7 +215,7 @@ class Command: api_maturity: ApiMaturity = ApiMaturity.STABLE # Parsing meta data missing only when skip meta data is requested - parse_meta: Optional[ParseMetaData] = field(default=None) + parse_meta: Optional[ParseMetaData] = field(default=None, compare=False) @property def is_timed_invoke(self): @@ -229,7 +224,6 @@ def is_timed_invoke(self): @dataclass class Cluster: - side: ClusterSide name: str code: int revision: int = 1 @@ -243,7 +237,7 @@ class Cluster: api_maturity: ApiMaturity = ApiMaturity.STABLE # Parsing meta data missing only when skip meta data is requested - parse_meta: Optional[ParseMetaData] = field(default=None) + parse_meta: Optional[ParseMetaData] = field(default=None, compare=False) @dataclass @@ -253,7 +247,7 @@ class AttributeInstantiation: default: Optional[Union[str, int, bool]] = None # Parsing meta data missing only when skip meta data is requested - parse_meta: Optional[ParseMetaData] = field(default=None) + parse_meta: Optional[ParseMetaData] = field(default=None, compare=False) @dataclass @@ -261,7 +255,7 @@ class CommandInstantiation: name: str # Parsing meta data missing only when skip meta data is requested - parse_meta: Optional[ParseMetaData] = field(default=None) + parse_meta: Optional[ParseMetaData] = field(default=None, compare=False) @dataclass @@ -272,7 +266,7 @@ class ServerClusterInstantiation: events_emitted: Set[str] = field(default_factory=set) # Parsing meta data missing only when skip meta data is requested - parse_meta: Optional[ParseMetaData] = field(default=None) + parse_meta: Optional[ParseMetaData] = field(default=None, compare=False) @dataclass diff --git a/scripts/py_matter_idl/matter_idl/test_backwards_compatibility.py b/scripts/py_matter_idl/matter_idl/test_backwards_compatibility.py index 0c002410fd1261..dece1632ac4719 100755 --- a/scripts/py_matter_idl/matter_idl/test_backwards_compatibility.py +++ b/scripts/py_matter_idl/matter_idl/test_backwards_compatibility.py @@ -125,13 +125,6 @@ def test_clusters_enum_change(self): "server cluster A = 16 { enum X : ENUM8 {}}", Compatibility.FORWARD_FAIL | Compatibility.BACKWARD_FAIL) - def test_basic_clusters_side(self): - self.ValidateUpdate( - "Detects side switch for clusters", - "client cluster A = 1 {}", - "server cluster A = 1 {}", - Compatibility.FORWARD_FAIL | Compatibility.BACKWARD_FAIL) - def test_bitmaps_delete(self): self.ValidateUpdate( "Deleting a bitmap is not ok", diff --git a/scripts/py_matter_idl/matter_idl/test_matter_idl_parser.py b/scripts/py_matter_idl/matter_idl/test_matter_idl_parser.py index c94fcb299c78fd..e5de70e940eb19 100755 --- a/scripts/py_matter_idl/matter_idl/test_matter_idl_parser.py +++ b/scripts/py_matter_idl/matter_idl/test_matter_idl_parser.py @@ -27,10 +27,9 @@ import unittest from matter_idl.matter_idl_types import (AccessPrivilege, ApiMaturity, Attribute, AttributeInstantiation, AttributeQuality, - AttributeStorage, Bitmap, Cluster, ClusterSide, Command, CommandInstantiation, - CommandQuality, ConstantEntry, DataType, DeviceType, Endpoint, Enum, Event, EventPriority, - EventQuality, Field, FieldQuality, Idl, ParseMetaData, ServerClusterInstantiation, Struct, - StructTag) + AttributeStorage, Bitmap, Cluster, Command, CommandInstantiation, CommandQuality, + ConstantEntry, DataType, DeviceType, Endpoint, Enum, Event, EventPriority, EventQuality, + Field, FieldQuality, Idl, ParseMetaData, ServerClusterInstantiation, Struct, StructTag) def parseText(txt, skip_meta=True): @@ -63,8 +62,7 @@ def test_cluster_attribute(self): """) expected = Idl(clusters=[ - Cluster(side=ClusterSide.SERVER, - name="MyCluster", + Cluster(name="MyCluster", code=0x321, attributes=[ Attribute(qualities=AttributeQuality.READABLE, definition=Field( @@ -86,7 +84,7 @@ def test_doc_comments(self): } /** Documentation for MyCluster #2 */ - client cluster MyCluster = 0x321 { + client cluster MyCluster2 = 0x322 { /* NOT a doc comment */ command WithoutArg(): DefaultSuccess = 123; @@ -115,8 +113,7 @@ def test_sized_attribute(self): """) expected = Idl(clusters=[ - Cluster(side=ClusterSide.SERVER, - name="MyCluster", + Cluster(name="MyCluster", code=1, attributes=[ Attribute(qualities=AttributeQuality.READABLE | AttributeQuality.WRITABLE, definition=Field( @@ -138,8 +135,7 @@ def test_timed_attributes(self): """) expected = Idl(clusters=[ - Cluster(side=ClusterSide.SERVER, - name="MyCluster", + Cluster(name="MyCluster", code=1, attributes=[ Attribute(qualities=AttributeQuality.READABLE | AttributeQuality.WRITABLE, definition=Field( @@ -166,8 +162,7 @@ def test_attribute_access(self): """) expected = Idl(clusters=[ - Cluster(side=ClusterSide.SERVER, - name="MyCluster", + Cluster(name="MyCluster", code=1, attributes=[ Attribute(qualities=AttributeQuality.READABLE | AttributeQuality.WRITABLE, definition=Field( @@ -212,8 +207,7 @@ def test_cluster_commands(self): } """) expected = Idl(clusters=[ - Cluster(side=ClusterSide.SERVER, - name="WithCommands", + Cluster(name="WithCommands", code=1, structs=[ Struct(name="FreeStruct", fields=[]), @@ -252,8 +246,7 @@ def test_cluster_command_access(self): } """) expected = Idl(clusters=[ - Cluster(side=ClusterSide.SERVER, - name="WithCommands", + Cluster(name="WithCommands", code=1, structs=[ Struct(name="InParam", fields=[], @@ -287,8 +280,7 @@ def test_cluster_enum(self): } """) expected = Idl(clusters=[ - Cluster(side=ClusterSide.CLIENT, - name="WithEnums", + Cluster(name="WithEnums", code=0xab, enums=[ Enum(name="TestEnum", base_type="ENUM16", @@ -310,8 +302,7 @@ def test_event_field_api_maturity(self): } """) expected = Idl(clusters=[ - Cluster(side=ClusterSide.SERVER, - name="MaturityTest", + Cluster(name="MaturityTest", code=1, events=[ Event(priority=EventPriority.CRITICAL, name="TestEvent", code=123, fields=[ @@ -338,8 +329,7 @@ def test_enum_constant_maturity(self): } """) expected = Idl(clusters=[ - Cluster(side=ClusterSide.CLIENT, - name="WithEnums", + Cluster(name="WithEnums", code=0xab, enums=[ Enum(name="TestEnum", base_type="ENUM16", @@ -364,8 +354,7 @@ def test_bitmap_constant_maturity(self): } """) expected = Idl(clusters=[ - Cluster(side=ClusterSide.CLIENT, - name="Test", + Cluster(name="Test", code=0xab, bitmaps=[ Bitmap(name="TestBitmap", base_type="BITMAP32", @@ -390,8 +379,7 @@ def test_struct_field_api_maturity(self): } """) expected = Idl(clusters=[ - Cluster(side=ClusterSide.SERVER, - name="MaturityTest", + Cluster(name="MaturityTest", code=1, structs=[ Struct(name="TestStruct", fields=[ @@ -450,8 +438,7 @@ def test_cluster_entry_maturity(self): } """) expected = Idl(clusters=[ - Cluster(side=ClusterSide.CLIENT, - name="Test", + Cluster(name="Test", code=0xab, enums=[ Enum(name="StableEnum", base_type="ENUM16", entries=[]), @@ -535,8 +522,7 @@ def test_cluster_bitmap(self): } """) expected = Idl(clusters=[ - Cluster(side=ClusterSide.CLIENT, - name="Test", + Cluster(name="Test", code=0xab, bitmaps=[ Bitmap(name="TestBitmap", base_type="BITMAP32", @@ -558,8 +544,7 @@ def test_cluster_events(self): } """) expected = Idl(clusters=[ - Cluster(side=ClusterSide.CLIENT, - name="EventTester", + Cluster(name="EventTester", code=0x123, events=[ Event(priority=EventPriority.CRITICAL, name="StartUp", code=0, fields=[ @@ -582,8 +567,7 @@ def test_cluster_event_acl(self): } """) expected = Idl(clusters=[ - Cluster(side=ClusterSide.CLIENT, - name="EventTester", + Cluster(name="EventTester", code=0x123, events=[ Event(priority=EventPriority.INFO, readacl=AccessPrivilege.VIEW, @@ -604,8 +588,7 @@ def test_fabric_sensitive_event(self): } """) expected = Idl(clusters=[ - Cluster(side=ClusterSide.CLIENT, - name="EventTester", + Cluster(name="EventTester", code=0x123, events=[ Event(priority=EventPriority.INFO, readacl=AccessPrivilege.VIEW, @@ -627,9 +610,9 @@ def test_parsing_metadata_for_cluster(self): expected = Idl(clusters=[ Cluster(parse_meta=ParseMetaData(line=2, column=1, start_pos=1), - side=ClusterSide.SERVER, name="A", code=1), + name="A", code=1), Cluster(parse_meta=ParseMetaData(line=5, column=4, start_pos=87), - side=ClusterSide.CLIENT, name="B", code=2), + name="B", code=2), ]) self.assertEqual(actual, expected) @@ -641,9 +624,9 @@ def test_multiple_clusters(self): """) expected = Idl(clusters=[ - Cluster(side=ClusterSide.SERVER, name="A", code=1), - Cluster(side=ClusterSide.CLIENT, name="B", code=2), - Cluster(side=ClusterSide.CLIENT, name="C", code=3), + Cluster(name="A", code=1), + Cluster(name="B", code=2), + Cluster(name="C", code=3), ]) self.assertEqual(actual, expected) @@ -736,11 +719,9 @@ def test_cluster_api_maturity(self): """) expected = Idl(clusters=[ - Cluster(side=ClusterSide.SERVER, name="A", code=1, - api_maturity=ApiMaturity.PROVISIONAL), - Cluster(side=ClusterSide.CLIENT, name="B", code=2, - api_maturity=ApiMaturity.INTERNAL), - Cluster(side=ClusterSide.CLIENT, name="C", code=3), + Cluster(name="A", code=1, api_maturity=ApiMaturity.PROVISIONAL), + Cluster(name="B", code=2, api_maturity=ApiMaturity.INTERNAL), + Cluster(name="C", code=3), ]) self.assertEqual(actual, expected) @@ -783,10 +764,10 @@ def test_revision(self): """) expected = Idl(clusters=[ - Cluster(side=ClusterSide.SERVER, name="A", code=1, revision=1), - Cluster(side=ClusterSide.CLIENT, name="B", code=2, revision=1), - Cluster(side=ClusterSide.CLIENT, name="C", code=3, revision=2), - Cluster(side=ClusterSide.CLIENT, name="D", code=4, revision=123), + Cluster(name="A", code=1, revision=1), + Cluster(name="B", code=2, revision=1), + Cluster(name="C", code=3, revision=2), + Cluster(name="D", code=4, revision=123), ]) self.assertEqual(actual, expected) diff --git a/scripts/py_matter_idl/matter_idl/test_zapxml.py b/scripts/py_matter_idl/matter_idl/test_zapxml.py index 8a845a05e42216..38ba9c85d1fd2a 100755 --- a/scripts/py_matter_idl/matter_idl/test_zapxml.py +++ b/scripts/py_matter_idl/matter_idl/test_zapxml.py @@ -27,9 +27,9 @@ os.path.join(os.path.dirname(__file__), '..'))) from matter_idl.zapxml import ParseSource, ParseXmls -from matter_idl.matter_idl_types import (AccessPrivilege, Attribute, AttributeQuality, Bitmap, Cluster, ClusterSide, Command, - ConstantEntry, DataType, Enum, Event, EventPriority, EventQuality, Field, FieldQuality, - Idl, Struct, StructQuality, StructTag) +from matter_idl.matter_idl_types import (AccessPrivilege, Attribute, AttributeQuality, Bitmap, Cluster, Command, ConstantEntry, + DataType, Enum, Event, EventPriority, EventQuality, Field, FieldQuality, Idl, Struct, + StructQuality, StructTag) def XmlToIdl(what: Union[str, List[str]]) -> Idl: @@ -90,7 +90,6 @@ def testCluster(self): self.assertEqual(idl, Idl(clusters=[ Cluster( - side=ClusterSide.CLIENT, name='Test', code=0x1234, description="Test", @@ -174,10 +173,8 @@ def testBitmap(self): self.assertEqual(idl, Idl(clusters=[ - Cluster(side=ClusterSide.CLIENT, - name='Test1', code=1, bitmaps=[bitmap]), - Cluster(side=ClusterSide.CLIENT, - name='Test2', code=2, bitmaps=[bitmap]), + Cluster(name='Test1', code=1, bitmaps=[bitmap]), + Cluster(name='Test2', code=2, bitmaps=[bitmap]), ])) def testFabricScopedAndSensitive(self): @@ -206,8 +203,7 @@ def testFabricScopedAndSensitive(self): ''') self.assertEqual(idl, - Idl(clusters=[Cluster(side=ClusterSide.CLIENT, - name='Test', + Idl(clusters=[Cluster(name='Test', code=1, events=[Event(priority=EventPriority.INFO, name='FabricEvent', @@ -274,10 +270,8 @@ def testEnum(self): ) self.assertEqual(idl, Idl(clusters=[ - Cluster(side=ClusterSide.CLIENT, - name='Test1', code=10, enums=[e2, e3]), - Cluster(side=ClusterSide.CLIENT, - name='Test2', code=20, enums=[e3])], + Cluster(name='Test1', code=10, enums=[e2, e3]), + Cluster(name='Test2', code=20, enums=[e3])], )) def testStruct(self): @@ -314,9 +308,8 @@ def testStruct(self): ) self.assertEqual(idl, Idl(clusters=[ - Cluster(side=ClusterSide.CLIENT, - name='Test1', code=10, structs=[struct]), - Cluster(side=ClusterSide.CLIENT, name='Test2', code=20, + Cluster(name='Test1', code=10, structs=[struct]), + Cluster(name='Test2', code=20, structs=[struct], attributes=[ Attribute( @@ -366,7 +359,7 @@ def testSkipsNotProcessedFields(self): ''') self.assertEqual(idl, Idl(clusters=[ - Cluster(side=ClusterSide.CLIENT, name='WindowCovering', code=0x102, + Cluster(name='WindowCovering', code=0x102, description='Provides an interface for controlling and adjusting automatic window coverings. ', structs=[], attributes=[ diff --git a/scripts/py_matter_idl/matter_idl/tests/available_tests.yaml b/scripts/py_matter_idl/matter_idl/tests/available_tests.yaml index 916fe339cc8341..d989f16580493c 100644 --- a/scripts/py_matter_idl/matter_idl/tests/available_tests.yaml +++ b/scripts/py_matter_idl/matter_idl/tests/available_tests.yaml @@ -88,6 +88,3 @@ custom-example-proto: proto/first_cluster.proto: outputs/proto/first_cluster.proto proto/second_cluster.proto: outputs/proto/second_cluster.proto proto/third_cluster.proto: outputs/proto/third_cluster.proto - - inputs/large_all_clusters_app.matter: - proto/ota_software_update_provider_cluster.proto: outputs/proto/ota_software_update_provider_cluster.proto diff --git a/scripts/py_matter_idl/matter_idl/tests/inputs/cluster_with_commands.matter b/scripts/py_matter_idl/matter_idl/tests/inputs/cluster_with_commands.matter index dce4c5e9308db5..cf3051bbe7bf43 100644 --- a/scripts/py_matter_idl/matter_idl/tests/inputs/cluster_with_commands.matter +++ b/scripts/py_matter_idl/matter_idl/tests/inputs/cluster_with_commands.matter @@ -1,5 +1,4 @@ - -server cluster OnOff = 6 { +cluster OnOff = 6 { enum DelayedAllOffEffectVariantEnum : ENUM8 { kDelayedOffFastFade = 0; kNoFade = 1; diff --git a/scripts/py_matter_idl/matter_idl/tests/inputs/several_clusters.matter b/scripts/py_matter_idl/matter_idl/tests/inputs/several_clusters.matter index 39e5227ba3dc8b..5b44a9518e9a12 100644 --- a/scripts/py_matter_idl/matter_idl/tests/inputs/several_clusters.matter +++ b/scripts/py_matter_idl/matter_idl/tests/inputs/several_clusters.matter @@ -1,8 +1,8 @@ -client cluster First = 1 { +cluster First = 1 { attribute int16u someInteger = 1; } -client cluster Second = 2 { +cluster Second = 2 { fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; vendor_id vendorID = 2; @@ -16,7 +16,7 @@ client cluster Second = 2 { readonly attribute octet_string<32> someBytes = 123; } -client cluster Third = 3 { +cluster Third = 3 { enum MyEnum : enum8 { kUnknown = 0; kKnown = 100; @@ -31,16 +31,6 @@ client cluster Third = 3 { attribute LevelControlOptions options = 20; } -server cluster Third = 3 { - enum MyEnum : enum8 { - kUnknown = 0; - kKnown = 100; - } - - attribute MyEnum someEnum = 10; - readonly attribute int16u clusterRevision = 65533; -} - endpoint 0 { device type rootdevice = 22, version 1; binding cluster Second; diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_with_commands/cpp-tlvmeta/clusters_meta.cpp b/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_with_commands/cpp-tlvmeta/clusters_meta.cpp index 0e63899c417c59..97838b756794e3 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_with_commands/cpp-tlvmeta/clusters_meta.cpp +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_with_commands/cpp-tlvmeta/clusters_meta.cpp @@ -50,6 +50,7 @@ const Entry _OnOff_ScenesFeature[] = { }; const Entry _all_clusters[] = { + { { ClusterTag(0x06), "OnOff", ItemType::kDefault }, 2 }, }; diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/large_all_clusters_app/cpp-app/callback-stub.cpp b/scripts/py_matter_idl/matter_idl/tests/outputs/large_all_clusters_app/cpp-app/callback-stub.cpp index 3ca10516cd3a58..f5a6cb85d0b253 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/large_all_clusters_app/cpp-app/callback-stub.cpp +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/large_all_clusters_app/cpp-app/callback-stub.cpp @@ -136,9 +136,6 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case app::Clusters::OperationalCredentials::Id: emberAfOperationalCredentialsClusterInitCallback(endpoint); break; - case app::Clusters::OtaSoftwareUpdateProvider::Id: - emberAfOtaSoftwareUpdateProviderClusterInitCallback(endpoint); - break; case app::Clusters::OtaSoftwareUpdateRequestor::Id: emberAfOtaSoftwareUpdateRequestorClusterInitCallback(endpoint); break; @@ -417,11 +414,6 @@ void __attribute__((weak)) emberAfOperationalCredentialsClusterInitCallback(Endp // To prevent warning (void) endpoint; } -void __attribute__((weak)) emberAfOtaSoftwareUpdateProviderClusterInitCallback(EndpointId endpoint) -{ - // To prevent warning - (void) endpoint; -} void __attribute__((weak)) emberAfOtaSoftwareUpdateRequestorClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/large_lighting_app/cpp-app/callback-stub.cpp b/scripts/py_matter_idl/matter_idl/tests/outputs/large_lighting_app/cpp-app/callback-stub.cpp index edaf1f292fc935..e499c4521f7a7d 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/large_lighting_app/cpp-app/callback-stub.cpp +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/large_lighting_app/cpp-app/callback-stub.cpp @@ -67,9 +67,6 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case app::Clusters::OperationalCredentials::Id: emberAfOperationalCredentialsClusterInitCallback(endpoint); break; - case app::Clusters::OtaSoftwareUpdateProvider::Id: - emberAfOtaSoftwareUpdateProviderClusterInitCallback(endpoint); - break; case app::Clusters::OtaSoftwareUpdateRequestor::Id: emberAfOtaSoftwareUpdateRequestorClusterInitCallback(endpoint); break; @@ -191,11 +188,6 @@ void __attribute__((weak)) emberAfOperationalCredentialsClusterInitCallback(Endp // To prevent warning (void) endpoint; } -void __attribute__((weak)) emberAfOtaSoftwareUpdateProviderClusterInitCallback(EndpointId endpoint) -{ - // To prevent warning - (void) endpoint; -} void __attribute__((weak)) emberAfOtaSoftwareUpdateRequestorClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/proto/ota_software_update_provider_cluster.proto b/scripts/py_matter_idl/matter_idl/tests/outputs/proto/ota_software_update_provider_cluster.proto deleted file mode 100644 index 179ade44b9fa00..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/proto/ota_software_update_provider_cluster.proto +++ /dev/null @@ -1,107 +0,0 @@ - -/// AUTO-GENERATED with matter_idl. - -syntax = "proto3"; - -package com.matter.example.proto; - -option java_multiple_files = true; - -message OtaSoftwareUpdateProviderCluster { - // option (message_type) = MATTER_TRAIT; - - enum ClusterId { - CLUSTER_ID_UNSUPPORTED = 0; - CLUSTER_ID = 41; - } - - // Enums - enum ApplyUpdateActionEnum { - AUAE_PROCEED = 0; - AUAE_AWAIT_NEXT_ACTION = 1; - AUAE_DISCONTINUE = 2; - } - - enum DownloadProtocolEnum { - DPE_BDXSYNCHRONOUS = 0; - DPE_BDXASYNCHRONOUS = 1; - DPE_HTTPS = 2; - DPE_VENDOR_SPECIFIC = 3; - } - - enum OTAQueryStatus { - OTAQS_UPDATE_AVAILABLE = 0; - OTAQS_BUSY = 1; - OTAQS_NOT_AVAILABLE = 2; - OTAQS_DOWNLOAD_PROTOCOL_NOT_SUPPORTED = 3; - } - - - // Structs - - // Attributes - /** int16u Type: 6 IsList: 0 FieldId: 65533 */ - int16u cluster_revision = 3211261; - /* - [(attribute) = { - is_subscribable: true, - }]; - */ - - - - // Commands - message QueryImageCommand { - // option (message_type) = MATTER_COMMAND; - - /** vendor_id Type: 1 IsList: 0 FieldId: 0 */ - uint32 vendor_id = 524288; - /** INT16U Type: 6 IsList: 0 FieldId: 1 */ - INT16U product_id = 3145729; - /** INT32U Type: 6 IsList: 0 FieldId: 2 */ - INT32U software_version = 3145730; - /** DownloadProtocolEnum Type: 6 IsList: 1 FieldId: 3 */ - repeated DownloadProtocolEnum protocols_supported = 3145731; - /** INT16U Type: 6 IsList: 0 FieldId: 4 */ - optional INT16U hardware_version = 3145732; - /** CHAR_STRING Type: 4 IsList: 0 FieldId: 5 */ - optional string location = 2097157; - /** BOOLEAN Type: 3 IsList: 0 FieldId: 6 */ - optional bool requestor_can_consent = 1572870; - /** OCTET_STRING Type: 5 IsList: 0 FieldId: 7 */ - optional bytes metadata_for_provider = 2621447; - } - - message QueryImageCommandResponse { - // option (message_type) = MATTER_COMMAND_RESPONSE; - - } - - message ApplyUpdateRequestCommand { - // option (message_type) = MATTER_COMMAND; - - /** OCTET_STRING Type: 5 IsList: 0 FieldId: 0 */ - bytes update_token = 2621440; - /** INT32U Type: 6 IsList: 0 FieldId: 1 */ - INT32U new_version = 3145729; - } - - message ApplyUpdateRequestCommandResponse { - // option (message_type) = MATTER_COMMAND_RESPONSE; - - /** ApplyUpdateActionEnum Type: 6 IsList: 0 FieldId: 0 */ - ApplyUpdateActionEnum action = 3145728; - /** INT32U Type: 6 IsList: 0 FieldId: 1 */ - INT32U delayed_action_time = 3145729; - } - - message NotifyUpdateAppliedCommand { - // option (message_type) = MATTER_COMMAND; - - /** OCTET_STRING Type: 5 IsList: 0 FieldId: 0 */ - bytes update_token = 2621440; - /** INT32U Type: 6 IsList: 0 FieldId: 1 */ - INT32U software_version = 3145729; - } - -} // OtaSoftwareUpdateProviderCluster diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/cpp-app/callback-stub.cpp b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/cpp-app/callback-stub.cpp index d603013606d835..5cab502755042d 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/cpp-app/callback-stub.cpp +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/cpp-app/callback-stub.cpp @@ -10,12 +10,6 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) { switch (clusterId) { - case app::Clusters::First::Id: - emberAfFirstClusterInitCallback(endpoint); - break; - case app::Clusters::Second::Id: - emberAfSecondClusterInitCallback(endpoint); - break; case app::Clusters::Third::Id: emberAfThirdClusterInitCallback(endpoint); break; @@ -24,16 +18,6 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) break; } } -void __attribute__((weak)) emberAfFirstClusterInitCallback(EndpointId endpoint) -{ - // To prevent warning - (void) endpoint; -} -void __attribute__((weak)) emberAfSecondClusterInitCallback(EndpointId endpoint) -{ - // To prevent warning - (void) endpoint; -} void __attribute__((weak)) emberAfThirdClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/scripts/py_matter_idl/matter_idl/zapxml/handlers/handlers.py b/scripts/py_matter_idl/matter_idl/zapxml/handlers/handlers.py index 477d7f2ff330fa..ae943bfc70a082 100644 --- a/scripts/py_matter_idl/matter_idl/zapxml/handlers/handlers.py +++ b/scripts/py_matter_idl/matter_idl/zapxml/handlers/handlers.py @@ -15,9 +15,8 @@ import logging from typing import Any, Optional -from matter_idl.matter_idl_types import (Attribute, Bitmap, Cluster, ClusterSide, Command, CommandQuality, ConstantEntry, DataType, - Enum, Event, EventPriority, EventQuality, Field, FieldQuality, Idl, Struct, StructQuality, - StructTag) +from matter_idl.matter_idl_types import (Attribute, Bitmap, Cluster, Command, CommandQuality, ConstantEntry, DataType, Enum, Event, + EventPriority, EventQuality, Field, FieldQuality, Idl, Struct, StructQuality, StructTag) from .base import BaseHandler, HandledDepth from .context import Context, IdlPostProcessor @@ -490,7 +489,6 @@ class ClusterHandler(BaseHandler): def __init__(self, context: Context, idl: Optional[Idl]): super().__init__(context) self._cluster = Cluster( - side=ClusterSide.CLIENT, name="NAME-MISSING", code=-1, parse_meta=context.GetCurrentLocationMeta() diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index 987bfdcaf2521f..e053756a62c928 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -57,10 +57,7 @@ buildconfig_header("app_buildconfig") { "CHIP_CONFIG_PERSIST_SUBSCRIPTIONS=${chip_persist_subscriptions}", "CHIP_CONFIG_SUBSCRIPTION_TIMEOUT_RESUMPTION=${chip_subscription_timeout_resumption}", "CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE=${enable_eventlist_attribute}", - "CHIP_CONFIG_ENABLE_ICD_SERVER=${chip_enable_icd_server}", "CHIP_CONFIG_ENABLE_READ_CLIENT=${chip_enable_read_client}", - "ICD_REPORT_ON_ENTER_ACTIVE_MODE=${chip_report_on_active_mode}", - "ICD_MAX_NOTIFICATION_SUBSCRIBERS=${icd_max_notification_subscribers}", ] visibility = [ ":app_config" ] @@ -248,7 +245,7 @@ static_library("app") { ":app_config", ":revision_info", "${chip_root}/src/access", - "${chip_root}/src/app/icd:notifier", + "${chip_root}/src/app/icd:icd_config", "${chip_root}/src/app/icd:observer", "${chip_root}/src/lib/address_resolve", "${chip_root}/src/lib/support", @@ -259,7 +256,10 @@ static_library("app") { ] if (chip_enable_icd_server) { - public_deps += [ "${chip_root}/src/app/icd:manager" ] + public_deps += [ + "${chip_root}/src/app/icd:manager", + "${chip_root}/src/app/icd:notifier", + ] } cflags = [ "-Wconversion" ] diff --git a/src/app/FailSafeContext.cpp b/src/app/FailSafeContext.cpp index 647401e7f6b5d4..9ecc3dea060340 100644 --- a/src/app/FailSafeContext.cpp +++ b/src/app/FailSafeContext.cpp @@ -19,15 +19,16 @@ * @file * Provides the implementation of the FailSafeContext object. */ - -#include +#include "FailSafeContext.h" +#include +#if CHIP_CONFIG_ENABLE_ICD_SERVER +#include // nogncheck +#endif #include #include #include #include -#include "FailSafeContext.h" - using namespace chip::DeviceLayer; namespace chip { diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index d202dc7d07c062..d2c30362944cef 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -318,6 +318,43 @@ void InteractionModelEngine::ShutdownMatchingSubscriptions(const OptionalIsType(ReadHandler::InteractionType::Subscribe)) + { + return Loop::Continue; + } + + Access::SubjectDescriptor subject = handler->GetSubjectDescriptor(); + if (subject.fabricIndex != aFabricIndex) + { + return Loop::Continue; + } + + if (subject.authMode == Access::AuthMode::kCase) + { + if (subject.cats.CheckSubjectAgainstCATs(subjectID) || subjectID == subject.subject) + { + isActive = handler->IsActiveSubscription(); + + // Exit loop only if isActive is set to true + // Otherwise keep looking for another subscription that could + // match the subject + if (isActive) + { + return Loop::Break; + } + } + } + + return Loop::Continue; + }); + + return isActive; +} + void InteractionModelEngine::OnDone(CommandHandler & apCommandObj) { mCommandHandlerObjs.ReleaseObject(&apCommandObj); diff --git a/src/app/InteractionModelEngine.h b/src/app/InteractionModelEngine.h index ca1fa92f240c58..521de9b8a3ac78 100644 --- a/src/app/InteractionModelEngine.h +++ b/src/app/InteractionModelEngine.h @@ -306,6 +306,9 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, CHIP_ERROR ResumeSubscriptions(); + // Check if a given subject (CAT or NodeId) has at least 1 active subscription + bool SubjectHasActiveSubscription(const FabricIndex aFabricIndex, const NodeId & subject); + #if CONFIG_BUILD_FOR_HOST_UNIT_TEST // // Get direct access to the underlying read handler pool diff --git a/src/app/ReadHandler.cpp b/src/app/ReadHandler.cpp index 0f79c1a1d0d5f4..411756ab22ff9c 100644 --- a/src/app/ReadHandler.cpp +++ b/src/app/ReadHandler.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -35,7 +36,7 @@ #include #if CHIP_CONFIG_ENABLE_ICD_SERVER -#include // nogncheck +#include //nogncheck #endif namespace chip { @@ -45,7 +46,7 @@ using Status = Protocols::InteractionModel::Status; uint16_t ReadHandler::GetPublisherSelectedIntervalLimit() { #if CHIP_CONFIG_ENABLE_ICD_SERVER - return static_cast(ICDManagementServer::GetInstance().GetIdleModeDurationSec()); + return static_cast(ICDConfigurationData::GetInstance().GetIdleModeDurationSec()); #else return kSubscriptionMaxIntervalPublisherLimit; #endif diff --git a/src/app/chip_data_model.cmake b/src/app/chip_data_model.cmake index 069a41c8a5143b..132a5836121f0f 100644 --- a/src/app/chip_data_model.cmake +++ b/src/app/chip_data_model.cmake @@ -139,7 +139,8 @@ function(chip_configure_data_model APP_TARGET) ${CHIP_APP_BASE_DIR}/util/attribute-table.cpp ${CHIP_APP_BASE_DIR}/util/binding-table.cpp ${CHIP_APP_BASE_DIR}/icd/ICDMonitoringTable.cpp - ${CHIP_APP_BASE_DIR}/icd/ICDManagementServer.cpp + ${CHIP_APP_BASE_DIR}/icd/ICDNotifier.cpp + ${CHIP_APP_BASE_DIR}/icd/ICDConfigurationData.cpp ${CHIP_APP_BASE_DIR}/util/DataModelHandler.cpp ${CHIP_APP_BASE_DIR}/util/ember-compatibility-functions.cpp ${CHIP_APP_BASE_DIR}/util/generic-callback-stubs.cpp diff --git a/src/app/chip_data_model.gni b/src/app/chip_data_model.gni index 67baca6fdf3dff..af048aa5917be4 100644 --- a/src/app/chip_data_model.gni +++ b/src/app/chip_data_model.gni @@ -157,7 +157,6 @@ template("chip_data_model") { "${_app_root}/clusters/color-control-server/color-control-server.h", "${_app_root}/clusters/door-lock-server/door-lock-server.h", "${_app_root}/clusters/groups-server/groups-server.h", - "${_app_root}/clusters/icd-management-server/icd-management-server.h", "${_app_root}/clusters/identify-server/identify-server.h", "${_app_root}/clusters/level-control/level-control.h", "${_app_root}/clusters/on-off-server/on-off-server.h", @@ -294,8 +293,16 @@ template("chip_data_model") { "${_app_root}/clusters/${cluster}/dishwasher-alarm-delegate.h", ] } else if (cluster == "icd-management-server") { - sources += [ "${_app_root}/clusters/${cluster}/${cluster}.cpp" ] - deps += [ "${chip_root}/src/app/icd:cluster" ] + sources += [ + "${_app_root}/clusters/${cluster}/${cluster}.cpp", + "${_app_root}/clusters/${cluster}/${cluster}.h", + ] + deps += [ + "${chip_root}/src/app/icd:configuration-data", + "${chip_root}/src/app/icd:icd_config", + "${chip_root}/src/app/icd:monitoring-table", + "${chip_root}/src/app/icd:notifier", + ] } else if (cluster == "resource-monitoring-server") { sources += [ "${_app_root}/clusters/${cluster}/${cluster}.cpp", diff --git a/src/app/clusters/icd-management-server/icd-management-server.cpp b/src/app/clusters/icd-management-server/icd-management-server.cpp index 5bec758330daa1..941789d28144cc 100644 --- a/src/app/clusters/icd-management-server/icd-management-server.cpp +++ b/src/app/clusters/icd-management-server/icd-management-server.cpp @@ -23,10 +23,8 @@ #include #include #include -#include -#include -#include #include +#include #include #include #include @@ -43,11 +41,20 @@ namespace { /** * @brief Implementation of attribute access for IcdManagement cluster */ -class IcdManagementAttributeAccess : public app::AttributeAccessInterface +class IcdManagementAttributeAccess : public AttributeAccessInterface { public: IcdManagementAttributeAccess() : AttributeAccessInterface(MakeOptional(kRootEndpointId), IcdManagement::Id) {} + void Init(PersistentStorageDelegate & storage, Crypto::SymmetricKeystore * symmetricKeystore, FabricTable & fabricTable, + ICDConfigurationData & icdConfigurationData) + { + mStorage = &storage; + mSymmetricKeystore = symmetricKeystore; + mFabricTable = &fabricTable; + mICDConfigurationData = &icdConfigurationData; + } + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; private: @@ -57,6 +64,11 @@ class IcdManagementAttributeAccess : public app::AttributeAccessInterface CHIP_ERROR ReadRegisteredClients(EndpointId endpoint, AttributeValueEncoder & encoder); CHIP_ERROR ReadICDCounter(EndpointId endpoint, AttributeValueEncoder & encoder); CHIP_ERROR ReadClientsSupportedPerFabric(EndpointId endpoint, AttributeValueEncoder & encoder); + + PersistentStorageDelegate * mStorage = nullptr; + Crypto::SymmetricKeystore * mSymmetricKeystore = nullptr; + FabricTable * mFabricTable = nullptr; + ICDConfigurationData * mICDConfigurationData = nullptr; }; CHIP_ERROR IcdManagementAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) @@ -89,32 +101,32 @@ CHIP_ERROR IcdManagementAttributeAccess::Read(const ConcreteReadAttributePath & CHIP_ERROR IcdManagementAttributeAccess::ReadIdleModeDuration(EndpointId endpoint, AttributeValueEncoder & encoder) { - return encoder.Encode(ICDManagementServer::GetInstance().GetIdleModeDurationSec()); + return encoder.Encode(mICDConfigurationData->GetIdleModeDurationSec()); } CHIP_ERROR IcdManagementAttributeAccess::ReadActiveModeDuration(EndpointId endpoint, AttributeValueEncoder & encoder) { - return encoder.Encode(ICDManagementServer::GetInstance().GetActiveModeDurationMs()); + return encoder.Encode(mICDConfigurationData->GetActiveModeDurationMs()); } CHIP_ERROR IcdManagementAttributeAccess::ReadActiveModeThreshold(EndpointId endpoint, AttributeValueEncoder & encoder) { - return encoder.Encode(ICDManagementServer::GetInstance().GetActiveModeThresholdMs()); + return encoder.Encode(mICDConfigurationData->GetActiveModeThresholdMs()); } CHIP_ERROR IcdManagementAttributeAccess::ReadRegisteredClients(EndpointId endpoint, AttributeValueEncoder & encoder) { - uint16_t supported_clients = ICDManagementServer::GetInstance().GetClientsSupportedPerFabric(); + uint16_t supported_clients = mICDConfigurationData->GetClientsSupportedPerFabric(); + PersistentStorageDelegate * storage = mStorage; + Crypto::SymmetricKeystore * symmetricKeystore = mSymmetricKeystore; + const FabricTable * fabricTable = mFabricTable; - return encoder.EncodeList([supported_clients](const auto & subEncoder) -> CHIP_ERROR { - Crypto::SessionKeystore * keyStore = Server::GetInstance().GetSessionKeystore(); - ICDMonitoringEntry e(keyStore); + return encoder.EncodeList([supported_clients, storage, symmetricKeystore, fabricTable](const auto & subEncoder) -> CHIP_ERROR { + ICDMonitoringEntry e(symmetricKeystore); - const auto & fabricTable = Server::GetInstance().GetFabricTable(); - PersistentStorageDelegate & storage = Server::GetInstance().GetPersistentStorage(); - for (const auto & fabricInfo : fabricTable) + for (const auto & fabricInfo : *fabricTable) { - ICDMonitoringTable table(storage, fabricInfo.GetFabricIndex(), supported_clients, keyStore); + ICDMonitoringTable table(*storage, fabricInfo.GetFabricIndex(), supported_clients, symmetricKeystore); for (uint16_t i = 0; i < table.Limit(); ++i) { CHIP_ERROR err = table.Get(i, e); @@ -137,40 +149,40 @@ CHIP_ERROR IcdManagementAttributeAccess::ReadRegisteredClients(EndpointId endpoi CHIP_ERROR IcdManagementAttributeAccess::ReadICDCounter(EndpointId endpoint, AttributeValueEncoder & encoder) { - return encoder.Encode(ICDManagementServer::GetInstance().GetICDCounter()); + return encoder.Encode(mICDConfigurationData->GetICDCounter()); } CHIP_ERROR IcdManagementAttributeAccess::ReadClientsSupportedPerFabric(EndpointId endpoint, AttributeValueEncoder & encoder) { - return encoder.Encode(ICDManagementServer::GetInstance().GetClientsSupportedPerFabric()); + return encoder.Encode(mICDConfigurationData->GetClientsSupportedPerFabric()); } -CHIP_ERROR CheckAdmin(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, bool & is_admin) +/** + * @brief Implementation of Fabric Delegate for ICD Management cluster + */ +class IcdManagementFabricDelegate : public FabricTable::Delegate { - RequestPath requestPath{ .cluster = commandPath.mClusterId, .endpoint = commandPath.mEndpointId }; - CHIP_ERROR err = GetAccessControl().Check(commandObj->GetSubjectDescriptor(), requestPath, Privilege::kAdminister); - if (CHIP_NO_ERROR == err) - { - is_admin = true; - } - else if (CHIP_ERROR_ACCESS_DENIED == err) +public: + void Init(PersistentStorageDelegate & storage, Crypto::SymmetricKeystore * symmetricKeystore, + ICDConfigurationData & icdConfigurationData) { - is_admin = false; - err = CHIP_NO_ERROR; + mStorage = &storage; + mSymmetricKeystore = symmetricKeystore; + mICDConfigurationData = &icdConfigurationData; } - return err; -} -class IcdManagementFabricDelegate : public chip::FabricTable::Delegate -{ void OnFabricRemoved(const FabricTable & fabricTable, FabricIndex fabricIndex) override { - uint16_t supported_clients = ICDManagementServer::GetInstance().GetClientsSupportedPerFabric(); - ICDMonitoringTable table(Server::GetInstance().GetPersistentStorage(), fabricIndex, supported_clients, - Server::GetInstance().GetSessionKeystore()); + uint16_t supported_clients = mICDConfigurationData->GetClientsSupportedPerFabric(); + ICDMonitoringTable table(*mStorage, fabricIndex, supported_clients, mSymmetricKeystore); table.RemoveAll(); - ICDManagementServer::GetInstance().TriggerICDMTableUpdatedEvent(); + ICDNotifier::GetInstance().BroadcastICDManagementEvent(ICDListener::ICDManagementEvents::kTableUpdated); } + +private: + PersistentStorageDelegate * mStorage = nullptr; + Crypto::SymmetricKeystore * mSymmetricKeystore = nullptr; + ICDConfigurationData * mICDConfigurationData = nullptr; }; IcdManagementFabricDelegate gFabricDelegate; @@ -178,35 +190,171 @@ IcdManagementAttributeAccess gAttribute; } // namespace -void emberAfIcdManagementClusterInitCallback() +/* + * ICD Management Implementation + */ + +PersistentStorageDelegate * ICDManagementServer::mStorage = nullptr; +Crypto::SymmetricKeystore * ICDManagementServer::mSymmetricKeystore = nullptr; +ICDConfigurationData * ICDManagementServer::mICDConfigurationData = nullptr; + +Status ICDManagementServer::RegisterClient(FabricIndex fabric_index, NodeId node_id, uint64_t monitored_subject, ByteSpan key, + Optional verification_key, bool isAdmin, uint32_t & icdCounter) { - Server::GetInstance().GetFabricTable().AddFabricDelegate(&gFabricDelegate); + bool isFirstEntryForFabric = false; + ICDMonitoringTable table(*mStorage, fabric_index, mICDConfigurationData->GetClientsSupportedPerFabric(), mSymmetricKeystore); + + // Get current entry, if exists + ICDMonitoringEntry entry(mSymmetricKeystore); + CHIP_ERROR err = table.Find(node_id, entry); + if (CHIP_NO_ERROR == err) + { + // Existing entry: Validate Key if, and only if, the ISD does NOT have administrator permissions + if (!isAdmin) + { + VerifyOrReturnError(verification_key.HasValue(), InteractionModel::Status::Failure); + VerifyOrReturnError(entry.IsKeyEquivalent(verification_key.Value()), InteractionModel::Status::Failure); + } + } + else if (CHIP_ERROR_NOT_FOUND == err) + { + // New entry + VerifyOrReturnError(entry.index < table.Limit(), InteractionModel::Status::ResourceExhausted); + + // Check if it's going to be the first entry for fabric + isFirstEntryForFabric = table.IsEmpty(); + } + else + { + // Error + return InteractionModel::Status::Failure; + } + + // Save + entry.checkInNodeID = node_id; + entry.monitoredSubject = monitored_subject; + if (entry.keyHandleValid) + { + entry.DeleteKey(); + } + + err = entry.SetKey(key); + VerifyOrReturnError(CHIP_ERROR_INVALID_ARGUMENT != err, InteractionModel::Status::ConstraintError); + VerifyOrReturnError(CHIP_NO_ERROR == err, InteractionModel::Status::Failure); + err = table.Set(entry.index, entry); + + // Delete key upon failure to prevent key storage leakage. + if (err != CHIP_NO_ERROR) + { + entry.DeleteKey(); + } + + VerifyOrReturnError(CHIP_ERROR_INVALID_ARGUMENT != err, InteractionModel::Status::ConstraintError); + VerifyOrReturnError(CHIP_NO_ERROR == err, InteractionModel::Status::Failure); + + if (isFirstEntryForFabric) + { + // Notify subscribers that the first entry for the fabric was successfully added + TriggerICDMTableUpdatedEvent(); + } + + icdCounter = mICDConfigurationData->GetICDCounter(); + return InteractionModel::Status::Success; } +Status ICDManagementServer::UnregisterClient(FabricIndex fabric_index, NodeId node_id, Optional verificationKey, + bool isAdmin) +{ + ICDMonitoringTable table(*mStorage, fabric_index, mICDConfigurationData->GetClientsSupportedPerFabric(), mSymmetricKeystore); + + // Get current entry, if exists + ICDMonitoringEntry entry(mSymmetricKeystore); + CHIP_ERROR err = table.Find(node_id, entry); + VerifyOrReturnError(CHIP_ERROR_NOT_FOUND != err, InteractionModel::Status::NotFound); + VerifyOrReturnError(CHIP_NO_ERROR == err, InteractionModel::Status::Failure); + + // Existing entry: Validate Key if, and only if, the ISD has NOT administrator permissions + if (!isAdmin) + { + VerifyOrReturnError(verificationKey.HasValue(), InteractionModel::Status::Failure); + VerifyOrReturnError(entry.IsKeyEquivalent(verificationKey.Value()), InteractionModel::Status::Failure); + } + + err = table.Remove(entry.index); + VerifyOrReturnError(CHIP_NO_ERROR == err, InteractionModel::Status::Failure); + + if (table.IsEmpty()) + { + TriggerICDMTableUpdatedEvent(); + } + + return InteractionModel::Status::Success; +} + +Status ICDManagementServer::StayActiveRequest(FabricIndex fabric_index) +{ + // TODO: Implementent stay awake logic for end device + // https://github.com/project-chip/connectedhomeip/issues/24259 + ICDNotifier::GetInstance().BroadcastICDManagementEvent(ICDListener::ICDManagementEvents::kStayActiveRequestReceived); + return InteractionModel::Status::UnsupportedCommand; +} + +void ICDManagementServer::TriggerICDMTableUpdatedEvent() +{ + ICDNotifier::GetInstance().BroadcastICDManagementEvent(ICDListener::ICDManagementEvents::kTableUpdated); +} + +CHIP_ERROR ICDManagementServer::CheckAdmin(CommandHandler * commandObj, const ConcreteCommandPath & commandPath, bool & isAdmin) +{ + RequestPath requestPath{ .cluster = commandPath.mClusterId, .endpoint = commandPath.mEndpointId }; + CHIP_ERROR err = GetAccessControl().Check(commandObj->GetSubjectDescriptor(), requestPath, Privilege::kAdminister); + if (CHIP_NO_ERROR == err) + { + isAdmin = true; + } + else if (CHIP_ERROR_ACCESS_DENIED == err) + { + isAdmin = false; + err = CHIP_NO_ERROR; + } + return err; +} + +void ICDManagementServer::Init(PersistentStorageDelegate & storage, Crypto::SymmetricKeystore * symmetricKeystore, + ICDConfigurationData & icdConfigurationData) +{ + mStorage = &storage; + mSymmetricKeystore = symmetricKeystore; + mICDConfigurationData = &icdConfigurationData; +} + +/********************************************************** + * Callbacks Implementation + *********************************************************/ + /** * @brief ICD Management Cluster RegisterClient Command callback (from client) * */ -bool emberAfIcdManagementClusterRegisterClientCallback(chip::app::CommandHandler * commandObj, - const chip::app::ConcreteCommandPath & commandPath, +bool emberAfIcdManagementClusterRegisterClientCallback(CommandHandler * commandObj, const ConcreteCommandPath & commandPath, const Commands::RegisterClient::DecodableType & commandData) { InteractionModel::Status status = InteractionModel::Status::Failure; - bool is_admin = false; - if (CHIP_NO_ERROR == CheckAdmin(commandObj, commandPath, is_admin)) + bool isAdmin = false; + uint32_t icdCounter = 0; + ICDManagementServer server; + + if (CHIP_NO_ERROR == server.CheckAdmin(commandObj, commandPath, isAdmin)) { - PersistentStorageDelegate & storage = chip::Server::GetInstance().GetPersistentStorage(); - FabricIndex fabric = commandObj->GetAccessingFabricIndex(); - status = ICDManagementServer::GetInstance().RegisterClient(storage, fabric, commandData.checkInNodeID, - commandData.monitoredSubject, commandData.key, - commandData.verificationKey, is_admin); + status = + server.RegisterClient(commandObj->GetAccessingFabricIndex(), commandData.checkInNodeID, commandData.monitoredSubject, + commandData.key, commandData.verificationKey, isAdmin, icdCounter); } if (InteractionModel::Status::Success == status) { // Response - IcdManagement::Commands::RegisterClientResponse::Type response{ .ICDCounter = - ICDManagementServer::GetInstance().GetICDCounter() }; + IcdManagement::Commands::RegisterClientResponse::Type response{ .ICDCounter = icdCounter }; commandObj->AddResponse(commandPath, response); return true; } @@ -220,18 +368,17 @@ bool emberAfIcdManagementClusterRegisterClientCallback(chip::app::CommandHandler * @brief ICD Management Cluster UregisterClient Command callback (from client) * */ -bool emberAfIcdManagementClusterUnregisterClientCallback(chip::app::CommandHandler * commandObj, - const chip::app::ConcreteCommandPath & commandPath, +bool emberAfIcdManagementClusterUnregisterClientCallback(CommandHandler * commandObj, const ConcreteCommandPath & commandPath, const Commands::UnregisterClient::DecodableType & commandData) { InteractionModel::Status status = InteractionModel::Status::Failure; - bool is_admin = false; - if (CHIP_NO_ERROR == CheckAdmin(commandObj, commandPath, is_admin)) + bool isAdmin = false; + ICDManagementServer server; + + if (CHIP_NO_ERROR == server.CheckAdmin(commandObj, commandPath, isAdmin)) { - PersistentStorageDelegate & storage = chip::Server::GetInstance().GetPersistentStorage(); - FabricIndex fabric = commandObj->GetAccessingFabricIndex(); - status = ICDManagementServer::GetInstance().UnregisterClient(storage, fabric, commandData.checkInNodeID, - commandData.verificationKey, is_admin); + status = server.UnregisterClient(commandObj->GetAccessingFabricIndex(), commandData.checkInNodeID, + commandData.verificationKey, isAdmin); } commandObj->AddStatus(commandPath, status); @@ -241,11 +388,11 @@ bool emberAfIcdManagementClusterUnregisterClientCallback(chip::app::CommandHandl /** * @brief ICD Management Cluster StayActiveRequest Command callback (from client) */ -bool emberAfIcdManagementClusterStayActiveRequestCallback(chip::app::CommandHandler * commandObj, - const chip::app::ConcreteCommandPath & commandPath, +bool emberAfIcdManagementClusterStayActiveRequestCallback(CommandHandler * commandObj, const ConcreteCommandPath & commandPath, const Commands::StayActiveRequest::DecodableType & commandData) { - InteractionModel::Status status = ICDManagementServer::GetInstance().StayActiveRequest(commandObj->GetAccessingFabricIndex()); + ICDManagementServer server; + InteractionModel::Status status = server.StayActiveRequest(commandObj->GetAccessingFabricIndex()); commandObj->AddStatus(commandPath, status); return true; @@ -253,5 +400,19 @@ bool emberAfIcdManagementClusterStayActiveRequestCallback(chip::app::CommandHand void MatterIcdManagementPluginServerInitCallback() { + PersistentStorageDelegate & storage = Server::GetInstance().GetPersistentStorage(); + FabricTable & fabricTable = Server::GetInstance().GetFabricTable(); + Crypto::SymmetricKeystore * symmetricKeystore = Server::GetInstance().GetSessionKeystore(); + ICDConfigurationData & icdConfigurationData = ICDConfigurationData::GetInstance().GetInstance(); + + // Configure and register Fabric delegate + gFabricDelegate.Init(storage, symmetricKeystore, icdConfigurationData); + fabricTable.AddFabricDelegate(&gFabricDelegate); + + // Configure and register Attribute Access Override + gAttribute.Init(storage, symmetricKeystore, fabricTable, icdConfigurationData); registerAttributeAccessOverride(&gAttribute); + + // Configure ICD Management + ICDManagementServer::Init(storage, symmetricKeystore, icdConfigurationData); } diff --git a/src/app/clusters/icd-management-server/icd-management-server.h b/src/app/clusters/icd-management-server/icd-management-server.h index 69c11082f14c02..76fad5ca941475 100644 --- a/src/app/clusters/icd-management-server/icd-management-server.h +++ b/src/app/clusters/icd-management-server/icd-management-server.h @@ -16,3 +16,46 @@ */ #pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using chip::Protocols::InteractionModel::Status; + +class ICDManagementServer +{ +public: + ICDManagementServer() = default; + + static void Init(chip::PersistentStorageDelegate & storage, chip::Crypto::SymmetricKeystore * symmetricKeystore, + chip::ICDConfigurationData & ICDConfigurationData); + Status RegisterClient(chip::FabricIndex fabric_index, chip::NodeId node_id, uint64_t monitored_subject, chip::ByteSpan key, + chip::Optional verification_key, bool is_admin, uint32_t & icdCounter); + + Status UnregisterClient(chip::FabricIndex fabric_index, chip::NodeId node_id, chip::Optional verificationKey, + bool is_admin); + + Status StayActiveRequest(chip::FabricIndex fabric_index); + + CHIP_ERROR CheckAdmin(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + bool & is_admin); + +private: + /** + * @brief Triggers table update events to notify subscribers that an entry was added or removed + * from the ICDMonitoringTable. + */ + void TriggerICDMTableUpdatedEvent(); + + static chip::PersistentStorageDelegate * mStorage; + static chip::Crypto::SymmetricKeystore * mSymmetricKeystore; + static chip::ICDConfigurationData * mICDConfigurationData; +}; diff --git a/src/app/icd/BUILD.gn b/src/app/icd/BUILD.gn index 99e8a23b0b699f..7fdada476e989c 100644 --- a/src/app/icd/BUILD.gn +++ b/src/app/icd/BUILD.gn @@ -13,9 +13,30 @@ # limitations under the License. import("//build_overrides/chip.gni") +import("${chip_root}/build/chip/buildconfig_header.gni") import("icd.gni") # ICD Server sources and configurations + +buildconfig_header("icd_buildconfig") { + header = "ICDBuildConfig.h" + header_dir = "app/icd" + + defines = [ + "CHIP_CONFIG_ENABLE_ICD_SERVER=${chip_enable_icd_server}", + "ICD_REPORT_ON_ENTER_ACTIVE_MODE=${chip_report_on_active_mode}", + "ICD_MAX_NOTIFICATION_SUBSCRIBERS=${icd_max_notification_subscribers}", + ] + + visibility = [ ":icd_config" ] +} + +source_set("icd_config") { + sources = [ "ICDConfig.h" ] + + deps = [ ":icd_buildconfig" ] +} + source_set("observer") { sources = [ "ICDStateObserver.h" ] } @@ -26,8 +47,10 @@ source_set("notifier") { "ICDNotifier.h", ] - deps = [ "${chip_root}/src/lib/core" ] - public_deps = [ "${chip_root}/src/app:app_config" ] + deps = [ + ":icd_config", + "${chip_root}/src/lib/core", + ] } # ICD Manager source-set is broken out of the main source-set to enable unit tests @@ -38,8 +61,11 @@ source_set("manager") { "ICDManager.h", ] + deps = [ ":icd_config" ] + public_deps = [ - ":cluster", + ":configuration-data", + ":monitoring-table", ":notifier", ":observer", ":sender", @@ -54,7 +80,7 @@ source_set("sender") { ] public_deps = [ - ":cluster", + ":monitoring-table", ":notifier", "${chip_root}/src/credentials:credentials", "${chip_root}/src/lib/address_resolve:address_resolve", @@ -62,21 +88,25 @@ source_set("sender") { ] } -# ICD management cluster source-set is broken out of the main source-set to enable unit tests -# All sources and configurations used by the ICD management cluster need to go in this source-set -source_set("cluster") { +# ICDMonitoringTable source-set is broken out of the main source-set to enable unit tests +# All sources and configurations used by the ICDMonitoringTable need to go in this source-set +source_set("monitoring-table") { sources = [ - "ICDManagementServer.cpp", - "ICDManagementServer.h", "ICDMonitoringTable.cpp", "ICDMonitoringTable.h", ] - deps = [ ":notifier" ] - public_deps = [ "${chip_root}/src/lib/core", "${chip_root}/src/platform:platform", - "${chip_root}/src/protocols:im_status", ] } + +source_set("configuration-data") { + sources = [ + "ICDConfigurationData.cpp", + "ICDConfigurationData.h", + ] + + deps = [ "${chip_root}/src/lib/core" ] +} diff --git a/src/app/icd/ICDConfig.h b/src/app/icd/ICDConfig.h new file mode 100644 index 00000000000000..4c85d39f83e9cf --- /dev/null +++ b/src/app/icd/ICDConfig.h @@ -0,0 +1,22 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#if CHIP_HAVE_CONFIG_H +#include +#endif diff --git a/src/app/icd/ICDConfigurationData.cpp b/src/app/icd/ICDConfigurationData.cpp new file mode 100644 index 00000000000000..d3f57eacced070 --- /dev/null +++ b/src/app/icd/ICDConfigurationData.cpp @@ -0,0 +1,38 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ICDConfigurationData.h" + +namespace chip { + +ICDConfigurationData ICDConfigurationData::instance; + +System::Clock::Milliseconds32 ICDConfigurationData::GetSlowPollingInterval() +{ +#if ICD_ENFORCE_SIT_SLOW_POLL_LIMIT + // When in SIT mode, the slow poll interval SHOULDN'T be greater than the SIT mode polling threshold, per spec. + // This is important for ICD device configured for LIT operation but currently operating as a SIT + // due to a lack of client registration + if (mICDMode == ICDMode::SIT && GetSlowPollingInterval() > GetSITPollingThreshold()) + { + return GetSITPollingThreshold(); + } +#endif + return mSlowPollingInterval; +} + +} // namespace chip diff --git a/src/app/icd/ICDConfigurationData.h b/src/app/icd/ICDConfigurationData.h new file mode 100644 index 00000000000000..efb4e7e73867ca --- /dev/null +++ b/src/app/icd/ICDConfigurationData.h @@ -0,0 +1,127 @@ +/** + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include + +#ifndef ICD_ENFORCE_SIT_SLOW_POLL_LIMIT +// Set to 1 to enforce SIT Slow Polling Max value to 15seconds (spec 9.16.1.5) +#define ICD_ENFORCE_SIT_SLOW_POLL_LIMIT 0 +#endif + +namespace chip { + +namespace app { +// Forward declaration of ICDManager to allow it to be friend with ICDConfigurationData +class ICDManager; +} // namespace app + +/** + * @brief ICDConfigurationData manages and stores ICD related configurations for the ICDManager. + * Goal of the class is to expose ICD information to all consummers without creating circular dependencies + * since the ICDManager is appart of the App layer + * + * Anyone can read the ICD configurations but only the ICDManager can changes those configurations. + */ +class ICDConfigurationData +{ +public: + enum class ICDMode : uint8_t + { + SIT, // Short Interval Time ICD + LIT, // Long Interval Time ICD + }; + + static ICDConfigurationData & GetInstance() { return instance; }; + + uint32_t GetIdleModeDurationSec() { return mIdleInterval_s; } + + uint32_t GetActiveModeDurationMs() { return mActiveInterval_ms; } + + uint16_t GetActiveModeThresholdMs() { return mActiveThreshold_ms; } + + uint32_t GetICDCounter() { return mICDCounter; } + + uint16_t GetClientsSupportedPerFabric() { return mFabricClientsSupported; } + + System::Clock::Milliseconds32 GetSITPollingThreshold() { return kSITPollingThreshold; } + + System::Clock::Milliseconds32 GetFastPollingInterval() { return mFastPollingInterval; } + + /** + * If ICD_ENFORCE_SIT_SLOW_POLL_LIMIT is set to 0, function will always return the configured Slow Polling interval + * (CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL). + * + * If ICD_ENFORCE_SIT_SLOW_POLL_LIMIT is set to 1, the returned value will depend on the devices operating mode. + * If ICDMode == SIT && the configured slow poll interval is superior to the maximum threshold (15s), the function will return + * the threshold (15s). If ICDMode == SIT but the configured slow poll interval is equal or inferior to the threshold, the + * function will the return the configured slow poll interval. If ICDMode == LIT, the function will return the configured slow + * poll interval. + * + * @return System::Clock::Milliseconds32 + */ + System::Clock::Milliseconds32 GetSlowPollingInterval(); + + ICDMode GetICDMode() { return mICDMode; } + +private: + // Singleton Object + ICDConfigurationData() = default; + static ICDConfigurationData instance; + + // ICD related information is managed by the ICDManager but stored in the ICDConfigurationData to enable consummers to access it + // without creating a circular dependency. To avoid allowing consummers changing the state of the ICD mode without going through + // the ICDManager, the ICDManager is a friend that can access the private setters. If a consummer needs to be notified when a + // value is changed, they can leverage the Observer events the ICDManager generates. See src/app/icd/ICDStateObserver.h + friend class chip::app::ICDManager; + + void SetICDMode(ICDMode mode) { mICDMode = mode; }; + void SetICDCounter(uint32_t count) { mICDCounter = count; } + void SetSlowPollingInterval(System::Clock::Milliseconds32 slowPollInterval) { mSlowPollingInterval = slowPollInterval; }; + void SetFastPollingInterval(System::Clock::Milliseconds32 fastPollInterval) { mFastPollingInterval = fastPollInterval; }; + + static_assert((CHIP_CONFIG_ICD_IDLE_MODE_DURATION_SEC) <= 64800, + "Spec requires the IdleModeDuration to be equal or inferior to 64800s."); + static_assert((CHIP_CONFIG_ICD_IDLE_MODE_DURATION_SEC) >= 1, + "Spec requires the IdleModeDuration to be equal or greater to 1s."); + uint32_t mIdleInterval_s = CHIP_CONFIG_ICD_IDLE_MODE_DURATION_SEC; + + static_assert((CHIP_CONFIG_ICD_ACTIVE_MODE_DURATION_MS) <= (CHIP_CONFIG_ICD_IDLE_MODE_DURATION_SEC * kMillisecondsPerSecond), + "Spec requires the IdleModeDuration be equal or greater to the ActiveModeDuration."); + uint32_t mActiveInterval_ms = CHIP_CONFIG_ICD_ACTIVE_MODE_DURATION_MS; + + uint16_t mActiveThreshold_ms = CHIP_CONFIG_ICD_ACTIVE_MODE_THRESHOLD_MS; + + // TODO : Implement ICD counter + // https://github.com/project-chip/connectedhomeip/issues/29184 + uint32_t mICDCounter = 0; + + static_assert((CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC) >= 1, + "Spec requires the minimum of supported clients per fabric be equal or greater to 1."); + uint16_t mFabricClientsSupported = CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC; + + // SIT ICDs should have a SlowPollingThreshold shorter than or equal to 15s (spec 9.16.1.5) + static constexpr System::Clock::Milliseconds32 kSITPollingThreshold = System::Clock::Milliseconds32(15000); + System::Clock::Milliseconds32 mSlowPollingInterval = CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL; + System::Clock::Milliseconds32 mFastPollingInterval = CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL; + + ICDMode mICDMode = ICDMode::SIT; +}; + +} // namespace chip diff --git a/src/app/icd/ICDManagementServer.cpp b/src/app/icd/ICDManagementServer.cpp deleted file mode 100644 index 3ededbcffe7cb4..00000000000000 --- a/src/app/icd/ICDManagementServer.cpp +++ /dev/null @@ -1,117 +0,0 @@ -#include "ICDManagementServer.h" -#include - -using namespace chip; -using namespace chip::Protocols; - -namespace chip { - -ICDManagementServer ICDManagementServer::mInstance; - -Status ICDManagementServer::RegisterClient(PersistentStorageDelegate & storage, FabricIndex fabric_index, chip::NodeId node_id, - uint64_t monitored_subject, chip::ByteSpan key, - Optional verification_key, bool is_admin) -{ - bool isFirstEntryForFabric = false; - ICDMonitoringTable table(storage, fabric_index, GetClientsSupportedPerFabric(), mSymmetricKeystore); - - // Get current entry, if exists - ICDMonitoringEntry entry(mSymmetricKeystore); - CHIP_ERROR err = table.Find(node_id, entry); - if (CHIP_NO_ERROR == err) - { - // Existing entry: Validate Key if, and only if, the ISD has NOT administrator permissions - if (!is_admin) - { - VerifyOrReturnError(verification_key.HasValue(), InteractionModel::Status::Failure); - VerifyOrReturnError(entry.IsKeyEquivalent(verification_key.Value()), InteractionModel::Status::Failure); - } - } - else if (CHIP_ERROR_NOT_FOUND == err) - { - // New entry - VerifyOrReturnError(entry.index < table.Limit(), InteractionModel::Status::ResourceExhausted); - - // Check if it's going to be the first entry for fabric - isFirstEntryForFabric = table.IsEmpty(); - } - else - { - // Error - return InteractionModel::Status::Failure; - } - - // Save - entry.checkInNodeID = node_id; - entry.monitoredSubject = monitored_subject; - if (entry.keyHandleValid) - { - entry.DeleteKey(); - } - - err = entry.SetKey(key); - VerifyOrReturnError(CHIP_ERROR_INVALID_ARGUMENT != err, InteractionModel::Status::ConstraintError); - VerifyOrReturnError(CHIP_NO_ERROR == err, InteractionModel::Status::Failure); - err = table.Set(entry.index, entry); - - // Delete key upon failure to prevent key storage leakage. - if (err != CHIP_NO_ERROR) - { - entry.DeleteKey(); - } - - VerifyOrReturnError(CHIP_ERROR_INVALID_ARGUMENT != err, InteractionModel::Status::ConstraintError); - VerifyOrReturnError(CHIP_NO_ERROR == err, InteractionModel::Status::Failure); - - if (isFirstEntryForFabric) - { - // Notify subscribers that the first entry for the fabric was successfully added - TriggerICDMTableUpdatedEvent(); - } - - return InteractionModel::Status::Success; -} - -Status ICDManagementServer::UnregisterClient(PersistentStorageDelegate & storage, FabricIndex fabric_index, chip::NodeId node_id, - Optional verificationKey, bool is_admin) -{ - ICDMonitoringTable table(storage, fabric_index, GetClientsSupportedPerFabric(), mSymmetricKeystore); - - // Get current entry, if exists - ICDMonitoringEntry entry(mSymmetricKeystore); - CHIP_ERROR err = table.Find(node_id, entry); - VerifyOrReturnError(CHIP_ERROR_NOT_FOUND != err, InteractionModel::Status::NotFound); - VerifyOrReturnError(CHIP_NO_ERROR == err, InteractionModel::Status::Failure); - - // Existing entry: Validate Key if, and only if, the ISD has NOT administrator permissions - if (!is_admin) - { - VerifyOrReturnError(verificationKey.HasValue(), InteractionModel::Status::Failure); - VerifyOrReturnError(entry.IsKeyEquivalent(verificationKey.Value()), InteractionModel::Status::Failure); - } - - err = table.Remove(entry.index); - VerifyOrReturnError(CHIP_NO_ERROR == err, InteractionModel::Status::Failure); - - if (table.IsEmpty()) - { - TriggerICDMTableUpdatedEvent(); - } - - return InteractionModel::Status::Success; -} - -Status ICDManagementServer::StayActiveRequest(FabricIndex fabric_index) -{ - // TODO: Implementent stay awake logic for end device - // https://github.com/project-chip/connectedhomeip/issues/24259 - app::ICDNotifier::GetInstance().BroadcastICDManagementEvent(app::ICDListener::ICDManagementEvents::kStayActiveRequestReceived); - return InteractionModel::Status::UnsupportedCommand; -} - -void ICDManagementServer::TriggerICDMTableUpdatedEvent() -{ - app::ICDNotifier::GetInstance().BroadcastICDManagementEvent(app::ICDListener::ICDManagementEvents::kTableUpdated); -} - -} // namespace chip diff --git a/src/app/icd/ICDManagementServer.h b/src/app/icd/ICDManagementServer.h deleted file mode 100644 index cf4a1c9cef920b..00000000000000 --- a/src/app/icd/ICDManagementServer.h +++ /dev/null @@ -1,93 +0,0 @@ -/** - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include -#include -#include -#include -#include -#include - -#include - -namespace chip { - -using chip::Protocols::InteractionModel::Status; - -class ICDManagementServer -{ -public: - uint32_t GetIdleModeDurationSec() { return mIdleInterval_s; } - - uint32_t GetActiveModeDurationMs() { return mActiveInterval_ms; } - - void SetSymmetricKeystore(Crypto::SymmetricKeystore * keyStore) { mSymmetricKeystore = keyStore; } - - uint16_t GetActiveModeThresholdMs() { return mActiveThreshold_ms; } - - uint32_t GetICDCounter() { return mICDCounter; } - - void SetICDCounter(uint32_t count) { mICDCounter = count; } - - uint16_t GetClientsSupportedPerFabric() { return mFabricClientsSupported; } - - Status RegisterClient(PersistentStorageDelegate & storage, FabricIndex fabric_index, chip::NodeId node_id, - uint64_t monitored_subject, chip::ByteSpan key, Optional verification_key, bool is_admin); - - Status UnregisterClient(PersistentStorageDelegate & storage, FabricIndex fabric_index, chip::NodeId node_id, - Optional verificationKey, bool is_admin); - - /** - * @brief Triggers table update events to notify subscribers that an entry was added or removed - * from the ICDMonitoringTable. - */ - void TriggerICDMTableUpdatedEvent(); - - Status StayActiveRequest(FabricIndex fabric_index); - - static ICDManagementServer & GetInstance() { return mInstance; } - -private: - ICDManagementServer() = default; - - static ICDManagementServer mInstance; - Crypto::SymmetricKeystore * mSymmetricKeystore = nullptr; - - static_assert((CHIP_CONFIG_ICD_IDLE_MODE_DURATION_SEC) <= 64800, - "Spec requires the IdleModeDuration to be equal or inferior to 64800s."); - static_assert((CHIP_CONFIG_ICD_IDLE_MODE_DURATION_SEC) >= 1, - "Spec requires the IdleModeDuration to be equal or greater to 1s."); - uint32_t mIdleInterval_s = CHIP_CONFIG_ICD_IDLE_MODE_DURATION_SEC; - - static_assert((CHIP_CONFIG_ICD_ACTIVE_MODE_DURATION_MS) <= (CHIP_CONFIG_ICD_IDLE_MODE_DURATION_SEC * kMillisecondsPerSecond), - "Spec requires the IdleModeDuration be equal or greater to the ActiveModeDuration."); - uint32_t mActiveInterval_ms = CHIP_CONFIG_ICD_ACTIVE_MODE_DURATION_MS; - - uint16_t mActiveThreshold_ms = CHIP_CONFIG_ICD_ACTIVE_MODE_THRESHOLD_MS; - - // TODO : Implement ICD counter - // https://github.com/project-chip/connectedhomeip/issues/29184 - uint32_t mICDCounter = 0; - - static_assert((CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC) >= 1, - "Spec requires the minimum of supported clients per fabric be equal or greater to 1."); - uint16_t mFabricClientsSupported = CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC; -}; - -} // namespace chip diff --git a/src/app/icd/ICDManager.cpp b/src/app/icd/ICDManager.cpp index fd744a25764402..eac574ca20ab2d 100644 --- a/src/app/icd/ICDManager.cpp +++ b/src/app/icd/ICDManager.cpp @@ -18,7 +18,9 @@ #include #include #include -#include +#include +#include +#include #include #include #include @@ -28,11 +30,6 @@ #include #include -#ifndef ICD_ENFORCE_SIT_SLOW_POLL_LIMIT -// Set to 1 to enforce SIT Slow Polling Max value to 15seconds (spec 9.16.1.5) -#define ICD_ENFORCE_SIT_SLOW_POLL_LIMIT 0 -#endif - namespace chip { namespace app { @@ -43,11 +40,13 @@ using namespace chip::app::Clusters::IcdManagement; static_assert(UINT8_MAX >= CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS, "ICDManager::mOpenExchangeContextCount cannot hold count for the max exchange count"); -void ICDManager::Init(PersistentStorageDelegate * storage, FabricTable * fabricTable, Crypto::SymmetricKeystore * symmetricKeystore) +void ICDManager::Init(PersistentStorageDelegate * storage, FabricTable * fabricTable, Crypto::SymmetricKeystore * symmetricKeystore, + Messaging::ExchangeManager * exchangeManager) { VerifyOrDie(storage != nullptr); VerifyOrDie(fabricTable != nullptr); VerifyOrDie(symmetricKeystore != nullptr); + VerifyOrDie(exchangeManager != nullptr); bool supportLIT = SupportsFeature(Feature::kLongIdleTimeSupport); VerifyOrDieWithMsg((supportLIT == false) || SupportsFeature(Feature::kCheckInProtocolSupport), AppServer, @@ -63,12 +62,11 @@ void ICDManager::Init(PersistentStorageDelegate * storage, FabricTable * fabricT mFabricTable = fabricTable; VerifyOrDie(ICDNotifier::GetInstance().Subscribe(this) == CHIP_NO_ERROR); mSymmetricKeystore = symmetricKeystore; - - ICDManagementServer::GetInstance().SetSymmetricKeystore(mSymmetricKeystore); + mExchangeManager = exchangeManager; // Removing the check for now since it is possible for the Fast polling // to be larger than the ActiveModeDuration for now - // uint32_t activeModeDuration = ICDManagementServer::GetInstance().GetActiveModeDurationMs(); + // uint32_t activeModeDuration = ICDConfigurationData::GetInstance().GetActiveModeDurationMs(); // VerifyOrDie(kFastPollingInterval.count() < activeModeDuration); UpdateICDMode(); @@ -82,11 +80,12 @@ void ICDManager::Shutdown() DeviceLayer::SystemLayer().CancelTimer(OnIdleModeDone, this); DeviceLayer::SystemLayer().CancelTimer(OnActiveModeDone, this); DeviceLayer::SystemLayer().CancelTimer(OnTransitionToIdle, this); - mICDMode = ICDMode::SIT; + ICDConfigurationData::GetInstance().SetICDMode(ICDConfigurationData::ICDMode::SIT); mOperationalState = OperationalState::ActiveMode; mStorage = nullptr; mFabricTable = nullptr; mStateObserverPool.ReleaseAll(); + mICDSenderPool.ReleaseAll(); } bool ICDManager::SupportsFeature(Feature feature) @@ -101,11 +100,64 @@ bool ICDManager::SupportsFeature(Feature feature) #endif // !CONFIG_BUILD_FOR_HOST_UNIT_TEST } +void ICDManager::SendCheckInMsgs() +{ +#if !CONFIG_BUILD_FOR_HOST_UNIT_TEST + VerifyOrDie(mStorage != nullptr); + VerifyOrDie(mFabricTable != nullptr); + for (const auto & fabricInfo : *mFabricTable) + { + uint16_t supported_clients = ICDConfigurationData::GetInstance().GetClientsSupportedPerFabric(); + + ICDMonitoringTable table(*mStorage, fabricInfo.GetFabricIndex(), supported_clients /*Table entry limit*/, + mSymmetricKeystore); + if (table.IsEmpty()) + { + continue; + } + + for (uint16_t i = 0; i < table.Limit(); i++) + { + ICDMonitoringEntry entry(mSymmetricKeystore); + CHIP_ERROR err = table.Get(i, entry); + if (err == CHIP_ERROR_NOT_FOUND) + { + break; + } + + if (err != CHIP_NO_ERROR) + { + // Try to fetch the next entry upon failure (should not happen). + ChipLogError(AppServer, "Failed to retrieved ICDMonitoring entry for Check-In msg, will try next entry."); + continue; + } + + bool active = + InteractionModelEngine::GetInstance()->SubjectHasActiveSubscription(entry.fabricIndex, entry.monitoredSubject); + if (active) + { + continue; + } + + // SenderPool will be released upon transition from active to idle state + // This will happen when all ICD Check-In messages are sent on the network + ICDCheckInSender * sender = mICDSenderPool.CreateObject(mExchangeManager); + VerifyOrReturn(sender != nullptr, ChipLogError(AppServer, "Failed to allocate ICDCheckinSender")); + + if (CHIP_NO_ERROR != sender->RequestResolve(entry, mFabricTable)) + { + ChipLogError(AppServer, "Failed to send ICD Check-In"); + } + } + } +#endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST +} + void ICDManager::UpdateICDMode() { assertChipStackLockedByCurrentThread(); - ICDMode tempMode = ICDMode::SIT; + ICDConfigurationData::ICDMode tempMode = ICDConfigurationData::ICDMode::SIT; // Device can only switch to the LIT operating mode if LIT support is present if (SupportsFeature(Feature::kLongIdleTimeSupport)) @@ -119,23 +171,24 @@ void ICDManager::UpdateICDMode() ICDMonitoringTable table(*mStorage, fabricInfo.GetFabricIndex(), 1 /*Table entry limit*/, mSymmetricKeystore); if (!table.IsEmpty()) { - tempMode = ICDMode::LIT; + tempMode = ICDConfigurationData::ICDMode::LIT; break; } } } - if (mICDMode != tempMode) + if (ICDConfigurationData::GetInstance().GetICDMode() != tempMode) { - mICDMode = tempMode; + ICDConfigurationData::GetInstance().SetICDMode(tempMode); postObserverEvent(ObserverEventType::ICDModeChange); } // When in SIT mode, the slow poll interval SHOULDN'T be greater than the SIT mode polling threshold, per spec. - if (mICDMode == ICDMode::SIT && GetSlowPollingInterval() > GetSITPollingThreshold()) + if (ICDConfigurationData::GetInstance().GetICDMode() == ICDConfigurationData::ICDMode::SIT && + ICDConfigurationData::GetInstance().GetSlowPollingInterval() > ICDConfigurationData::GetInstance().GetSITPollingThreshold()) { ChipLogDetail(AppServer, "The Slow Polling Interval of an ICD in SIT mode should be <= %" PRIu32 " seconds", - (GetSITPollingThreshold().count() / 1000)); + (ICDConfigurationData::GetInstance().GetSITPollingThreshold().count() / 1000)); } } @@ -150,22 +203,26 @@ void ICDManager::UpdateOperationState(OperationalState state) mOperationalState = OperationalState::IdleMode; // When the active mode interval is 0, we stay in idleMode until a notification brings the icd into active mode - if (ICDManagementServer::GetInstance().GetActiveModeDurationMs() > 0) + if (ICDConfigurationData::GetInstance().GetActiveModeDurationMs() > 0) { - uint32_t idleModeDuration = ICDManagementServer::GetInstance().GetIdleModeDurationSec(); + uint32_t idleModeDuration = ICDConfigurationData::GetInstance().GetIdleModeDurationSec(); DeviceLayer::SystemLayer().StartTimer(System::Clock::Seconds32(idleModeDuration), OnIdleModeDone, this); } - System::Clock::Milliseconds32 slowPollInterval = GetSlowPollingInterval(); + System::Clock::Milliseconds32 slowPollInterval = ICDConfigurationData::GetInstance().GetSlowPollingInterval(); #if ICD_ENFORCE_SIT_SLOW_POLL_LIMIT // When in SIT mode, the slow poll interval SHOULDN'T be greater than the SIT mode polling threshold, per spec. - if (mICDMode == ICDMode::SIT && GetSlowPollingInterval() > GetSITPollingThreshold()) + if (ICDConfigurationData::GetInstance().GetICDMode() == ICDConfigurationData::ICDMode::SIT && + GetSlowPollingInterval() > GetSITPollingThreshold()) { slowPollInterval = GetSITPollingThreshold(); } #endif + // Going back to Idle, all Check-In messages are sent + mICDSenderPool.ReleaseAll(); + CHIP_ERROR err = DeviceLayer::ConnectivityMgr().SetPollingInterval(slowPollInterval); if (err != CHIP_NO_ERROR) { @@ -181,13 +238,13 @@ void ICDManager::UpdateOperationState(OperationalState state) DeviceLayer::SystemLayer().CancelTimer(OnIdleModeDone, this); mOperationalState = OperationalState::ActiveMode; - uint32_t activeModeDuration = ICDManagementServer::GetInstance().GetActiveModeDurationMs(); + uint32_t activeModeDuration = ICDConfigurationData::GetInstance().GetActiveModeDurationMs(); if (activeModeDuration == 0 && !mKeepActiveFlags.HasAny()) { // A Network Activity triggered the active mode and activeModeDuration is 0. // Stay active for at least Active Mode Threshold. - activeModeDuration = ICDManagementServer::GetInstance().GetActiveModeThresholdMs(); + activeModeDuration = ICDConfigurationData::GetInstance().GetActiveModeThresholdMs(); } DeviceLayer::SystemLayer().StartTimer(System::Clock::Timeout(activeModeDuration), OnActiveModeDone, this); @@ -196,17 +253,23 @@ void ICDManager::UpdateOperationState(OperationalState state) (activeModeDuration >= ICD_ACTIVE_TIME_JITTER_MS) ? activeModeDuration - ICD_ACTIVE_TIME_JITTER_MS : 0; DeviceLayer::SystemLayer().StartTimer(System::Clock::Timeout(activeModeJitterInterval), OnTransitionToIdle, this); - CHIP_ERROR err = DeviceLayer::ConnectivityMgr().SetPollingInterval(GetFastPollingInterval()); + CHIP_ERROR err = + DeviceLayer::ConnectivityMgr().SetPollingInterval(ICDConfigurationData::GetInstance().GetFastPollingInterval()); if (err != CHIP_NO_ERROR) { ChipLogError(AppServer, "Failed to set Fast Polling Interval: err %" CHIP_ERROR_FORMAT, err.Format()); } + if (SupportsFeature(Feature::kCheckInProtocolSupport)) + { + SendCheckInMsgs(); + } + postObserverEvent(ObserverEventType::EnterActiveMode); } else { - uint16_t activeModeThreshold = ICDManagementServer::GetInstance().GetActiveModeThresholdMs(); + uint16_t activeModeThreshold = ICDConfigurationData::GetInstance().GetActiveModeThresholdMs(); DeviceLayer::SystemLayer().ExtendTimerTo(System::Clock::Timeout(activeModeThreshold), OnActiveModeDone, this); uint16_t activeModeJitterThreshold = (activeModeThreshold >= ICD_ACTIVE_TIME_JITTER_MS) ? activeModeThreshold - ICD_ACTIVE_TIME_JITTER_MS : 0; @@ -365,20 +428,6 @@ void ICDManager::OnICDManagementServerEvent(ICDManagementEvents event) } } -System::Clock::Milliseconds32 ICDManager::GetSlowPollingInterval() -{ -#if ICD_ENFORCE_SIT_SLOW_POLL_LIMIT - // When in SIT mode, the slow poll interval SHOULDN'T be greater than the SIT mode polling threshold, per spec. - // This is important for ICD device configured for LIT operation but currently operating as a SIT - // due to a lack of client registration - if (mICDMode == ICDMode::SIT && GetSlowPollingInterval() > GetSITPollingThreshold()) - { - return GetSITPollingThreshold(); - } -#endif - return kSlowPollingInterval; -} - ICDManager::ObserverPointer * ICDManager::RegisterObserver(ICDStateObserver * observer) { return mStateObserverPool.CreateObject(observer); diff --git a/src/app/icd/ICDManager.h b/src/app/icd/ICDManager.h index 573a20011f7ffc..7958adada0de63 100644 --- a/src/app/icd/ICDManager.h +++ b/src/app/icd/ICDManager.h @@ -17,6 +17,8 @@ #pragma once #include +#include +#include #include #include #include @@ -53,12 +55,6 @@ class ICDManager : public ICDListener ActiveMode, }; - enum class ICDMode : uint8_t - { - SIT, // Short Interval Time ICD - LIT, // Long Interval Time ICD - }; - // This enum class represents to all ICDStateObserver callbacks available from the // mStateObserverPool for the ICDManager. enum class ObserverEventType : uint8_t @@ -69,14 +65,15 @@ class ICDManager : public ICDListener }; ICDManager() {} - void Init(PersistentStorageDelegate * storage, FabricTable * fabricTable, Crypto::SymmetricKeystore * symmetricKeyStore); + void Init(PersistentStorageDelegate * storage, FabricTable * fabricTable, Crypto::SymmetricKeystore * symmetricKeyStore, + Messaging::ExchangeManager * exchangeManager); void Shutdown(); void UpdateICDMode(); void UpdateOperationState(OperationalState state); void SetKeepActiveModeRequirements(KeepActiveFlags flag, bool state); bool IsKeepActive() { return mKeepActiveFlags.HasAny(); } bool SupportsFeature(Clusters::IcdManagement::Feature feature); - + ICDConfigurationData::ICDMode GetICDMode() { return ICDConfigurationData::GetInstance().GetICDMode(); }; /** * @brief Adds the referenced observer in parameters to the mStateObserverPool * A maximum of CHIP_CONFIG_ICD_OBSERVERS_POOL_SIZE observers can be concurrently registered @@ -95,12 +92,8 @@ class ICDManager : public ICDListener * ICDStateObservers function and calls it for all observers in the mStateObserverPool */ void postObserverEvent(ObserverEventType event); - ICDMode GetICDMode() { return mICDMode; } OperationalState GetOperationalState() { return mOperationalState; } - - static System::Clock::Milliseconds32 GetSITPollingThreshold() { return kSITPollingThreshold; } - static System::Clock::Milliseconds32 GetFastPollingInterval() { return kFastPollingInterval; } - static System::Clock::Milliseconds32 GetSlowPollingInterval(); + void SendCheckInMsgs(); #ifdef CONFIG_BUILD_FOR_HOST_UNIT_TEST void SetTestFeatureMapValue(uint32_t featureMap) { mFeatureMap = featureMap; }; @@ -131,26 +124,17 @@ class ICDManager : public ICDListener uint8_t mCheckInRequestCount = 0; private: - // SIT ICDs should have a SlowPollingThreshold shorter than or equal to 15s (spec 9.16.1.5) - static constexpr System::Clock::Milliseconds32 kSITPollingThreshold = System::Clock::Milliseconds32(15000); - static constexpr System::Clock::Milliseconds32 kSlowPollingInterval = CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL; - static constexpr System::Clock::Milliseconds32 kFastPollingInterval = CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL; - - // Minimal constraint value of the the ICD attributes. - static constexpr uint32_t kMinIdleModeDuration = 500; - static constexpr uint32_t kMinActiveModeDuration = 300; - static constexpr uint16_t kMinActiveModeThreshold = 300; - KeepActiveFlags mKeepActiveFlags{ 0 }; // Initialize mOperationalState to ActiveMode so the init sequence at bootup triggers the IdleMode behaviour first. OperationalState mOperationalState = OperationalState::ActiveMode; - ICDMode mICDMode = ICDMode::SIT; PersistentStorageDelegate * mStorage = nullptr; FabricTable * mFabricTable = nullptr; + Messaging::ExchangeManager * mExchangeManager = nullptr; bool mTransitionToIdleCalled = false; Crypto::SymmetricKeystore * mSymmetricKeystore = nullptr; ObjectPool mStateObserverPool; + ObjectPool mICDSenderPool; #ifdef CONFIG_BUILD_FOR_HOST_UNIT_TEST // feature map that can be changed at runtime for testing purposes diff --git a/src/app/icd/ICDNotifier.h b/src/app/icd/ICDNotifier.h index 4344b72a1d3ac3..ef427f125ac32a 100644 --- a/src/app/icd/ICDNotifier.h +++ b/src/app/icd/ICDNotifier.h @@ -16,12 +16,10 @@ */ #pragma once -#include +#include #include #include -class ICDListener; - namespace chip { namespace app { diff --git a/src/app/server/BUILD.gn b/src/app/server/BUILD.gn index e08d8a07d34fd7..60f88cf08cae8f 100644 --- a/src/app/server/BUILD.gn +++ b/src/app/server/BUILD.gn @@ -14,6 +14,7 @@ import("//build_overrides/chip.gni") import("${chip_root}/src/app/common_flags.gni") +import("${chip_root}/src/app/icd/icd.gni") config("server_config") { defines = [] @@ -50,7 +51,7 @@ static_library("server") { public_deps = [ "${chip_root}/src/app", - "${chip_root}/src/app/icd:notifier", + "${chip_root}/src/app/icd:icd_config", "${chip_root}/src/app/icd:observer", "${chip_root}/src/lib/address_resolve", "${chip_root}/src/lib/dnssd", @@ -60,4 +61,8 @@ static_library("server") { "${chip_root}/src/setup_payload", "${chip_root}/src/transport", ] + + if (chip_enable_icd_server) { + public_deps += [ "${chip_root}/src/app/icd:notifier" ] + } } diff --git a/src/app/server/CommissioningWindowManager.cpp b/src/app/server/CommissioningWindowManager.cpp index c4257fe7e2ef02..a4f2505de888e4 100644 --- a/src/app/server/CommissioningWindowManager.cpp +++ b/src/app/server/CommissioningWindowManager.cpp @@ -15,9 +15,12 @@ * limitations under the License. */ -#include -#include +#include #include +#if CHIP_CONFIG_ENABLE_ICD_SERVER +#include // nogncheck +#endif +#include #include #include #include diff --git a/src/app/server/Dnssd.cpp b/src/app/server/Dnssd.cpp index cb627af4348dea..81c3754b891412 100644 --- a/src/app/server/Dnssd.cpp +++ b/src/app/server/Dnssd.cpp @@ -38,8 +38,6 @@ #include #include -#include - namespace chip { namespace app { namespace { @@ -149,11 +147,13 @@ CHIP_ERROR DnssdServer::SetEphemeralDiscriminator(Optional discriminat template void DnssdServer::AddICDKeyToAdvertisement(AdvertisingParams & advParams) { + VerifyOrDieWithMsg(mICDManager != nullptr, Discovery, + "Invalid pointer to the ICDManager which is required for the LIT operating mode"); + // Only advertise the ICD key if the device can operate as a LIT - if (Server::GetInstance().GetICDManager().SupportsFeature(Clusters::IcdManagement::Feature::kLongIdleTimeSupport)) + if (mICDManager->SupportsFeature(Clusters::IcdManagement::Feature::kLongIdleTimeSupport)) { - advParams.SetICDOperatingAsLIT( - Optional(Server::GetInstance().GetICDManager().GetICDMode() == ICDManager::ICDMode::LIT)); + advParams.SetICDOperatingAsLIT(Optional(mICDManager->GetICDMode() == ICDConfigurationData::ICDMode::LIT)); } } #endif diff --git a/src/app/server/Dnssd.h b/src/app/server/Dnssd.h index be1ec4fc09ccbb..6a9af18cda1dea 100644 --- a/src/app/server/Dnssd.h +++ b/src/app/server/Dnssd.h @@ -17,6 +17,10 @@ #pragma once +#include +#if CHIP_CONFIG_ENABLE_ICD_SERVER +#include // nogncheck +#endif #include #include #include @@ -89,6 +93,8 @@ class DLL_EXPORT DnssdServer : public ICDStateObserver #if CHIP_CONFIG_ENABLE_ICD_SERVER template void AddICDKeyToAdvertisement(AdvertisingParams & advParams); + + void SetICDManager(ICDManager * manager) { mICDManager = manager; }; #endif /// Start operational advertising CHIP_ERROR AdvertiseOperational(); @@ -149,6 +155,10 @@ class DLL_EXPORT DnssdServer : public ICDStateObserver FabricTable * mFabricTable = nullptr; CommissioningModeProvider * mCommissioningModeProvider = nullptr; +#if CHIP_CONFIG_ENABLE_ICD_SERVER + ICDManager * mICDManager = nullptr; +#endif // CHIP_CONFIG_ENABLE_ICD_SERVER + uint16_t mSecuredPort = CHIP_PORT; uint16_t mUnsecuredPort = CHIP_UDC_PORT; Inet::InterfaceId mInterfaceId = Inet::InterfaceId::Null(); diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index 65a45192728833..daaf110acf26ed 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -255,15 +255,6 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) // This initializes clusters, so should come after lower level initialization. InitDataModelHandler(); -// ICD Init needs to be after data model init -#if CHIP_CONFIG_ENABLE_ICD_SERVER - mICDManager.Init(mDeviceStorage, &GetFabricTable(), mSessionKeystore); - // Register the ICDStateObservers. All observers are released at mICDManager.Shutdown() - // They can be released individually with ReleaseObserver - mICDManager.RegisterObserver(mReportScheduler); - mICDManager.RegisterObserver(&app::DnssdServer::Instance()); -#endif // CHIP_CONFIG_ENABLE_ICD_SERVER - #if defined(CHIP_APP_USE_ECHO) err = InitEchoHandler(&mExchangeMgr); SuccessOrExit(err); @@ -280,6 +271,13 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) app::DnssdServer::Instance().SetUnsecuredPort(mUserDirectedCommissioningPort); app::DnssdServer::Instance().SetInterfaceId(mInterfaceId); +#if CHIP_CONFIG_ENABLE_ICD_SERVER + // We set the ICDManager reference betfore calling the ICDManager init due to the init ordering limitations. + // DnssdServer will use the default value initially and will update advertisement once ICDManager + // init is called. + app::DnssdServer::Instance().SetICDManager(&mICDManager); +#endif // CHIP_CONFIG_ENABLE_ICD_SERVER + if (GetFabricTable().FabricCount() != 0) { // The device is already commissioned, proactively disable BLE advertisement. @@ -328,6 +326,18 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) &mCASESessionManager, mSubscriptionResumptionStorage); SuccessOrExit(err); + // ICD Init needs to be after data model init and InteractionModel Init +#if CHIP_CONFIG_ENABLE_ICD_SERVER + + // Register the ICDStateObservers. + // Call register before init so that observers are notified of any state change during the init. + // All observers are released at mICDManager.Shutdown(). They can be released individually with ReleaseObserver + mICDManager.RegisterObserver(mReportScheduler); + mICDManager.RegisterObserver(&app::DnssdServer::Instance()); + + mICDManager.Init(mDeviceStorage, &GetFabricTable(), mSessionKeystore, &mExchangeMgr); +#endif // CHIP_CONFIG_ENABLE_ICD_SERVER + // This code is necessary to restart listening to existing groups after a reboot // Each manufacturer needs to validate that they can rejoin groups by placing this code at the appropriate location for them // @@ -495,9 +505,11 @@ void Server::Shutdown() PlatformMgr().RemoveEventHandler(OnPlatformEventWrapper, 0); mCASEServer.Shutdown(); mCASESessionManager.Shutdown(); +#if CHIP_CONFIG_ENABLE_ICD_SERVER + app::DnssdServer::Instance().SetICDManager(nullptr); +#endif // CHIP_CONFIG_ENABLE_ICD_SERVER app::DnssdServer::Instance().SetCommissioningModeProvider(nullptr); chip::Dnssd::ServiceAdvertiser::Instance().Shutdown(); - chip::Dnssd::Resolver::Instance().Shutdown(); chip::app::InteractionModelEngine::GetInstance()->Shutdown(); mCommissioningWindowManager.Shutdown(); diff --git a/src/app/server/Server.h b/src/app/server/Server.h index 018c6f2196eb49..0f6d29aaf0e2fb 100644 --- a/src/app/server/Server.h +++ b/src/app/server/Server.h @@ -18,6 +18,7 @@ #pragma once #include +#include #include #include diff --git a/src/app/tests/TestICDManager.cpp b/src/app/tests/TestICDManager.cpp index ed6ecb7dc625b4..e3ca6eccbea768 100644 --- a/src/app/tests/TestICDManager.cpp +++ b/src/app/tests/TestICDManager.cpp @@ -16,7 +16,7 @@ * limitations under the License. */ #include -#include +#include #include #include #include @@ -90,7 +90,7 @@ class TestContext : public Test::AppContext { return FAILURE; } - ctx->mICDManager.Init(&ctx->testStorage, &ctx->GetFabricTable(), &(ctx->mKeystore)); + ctx->mICDManager.Init(&ctx->testStorage, &ctx->GetFabricTable(), &(ctx->mKeystore), &(ctx->GetExchangeManager())); ctx->mICDManager.RegisterObserver(&mICDStateObserver); return SUCCESS; } @@ -143,22 +143,23 @@ class TestICDManager // After the init we should be in Idle mode NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::IdleMode); - AdvanceClockAndRunEventLoop(ctx, secondsToMilliseconds(ICDManagementServer::GetInstance().GetIdleModeDurationSec()) + 1); + AdvanceClockAndRunEventLoop(ctx, secondsToMilliseconds(ICDConfigurationData::GetInstance().GetIdleModeDurationSec()) + 1); // Idle mode interval expired, ICDManager transitioned to the ActiveMode. NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::ActiveMode); - AdvanceClockAndRunEventLoop(ctx, ICDManagementServer::GetInstance().GetActiveModeDurationMs() + 1); + AdvanceClockAndRunEventLoop(ctx, ICDConfigurationData::GetInstance().GetActiveModeDurationMs() + 1); // Active mode interval expired, ICDManager transitioned to the IdleMode. NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::IdleMode); - AdvanceClockAndRunEventLoop(ctx, secondsToMilliseconds(ICDManagementServer::GetInstance().GetIdleModeDurationSec()) + 1); + AdvanceClockAndRunEventLoop(ctx, secondsToMilliseconds(ICDConfigurationData::GetInstance().GetIdleModeDurationSec()) + 1); + // Idle mode interval expired, ICDManager transitioned to the ActiveMode. NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::ActiveMode); // Events updating the Operation to Active mode can extend the current active mode time by 1 Active mode threshold. // Kick an active Threshold just before the end of the Active interval and validate that the active mode is extended. - AdvanceClockAndRunEventLoop(ctx, ICDManagementServer::GetInstance().GetActiveModeDurationMs() - 1); + AdvanceClockAndRunEventLoop(ctx, ICDConfigurationData::GetInstance().GetActiveModeDurationMs() - 1); ICDNotifier::GetInstance().BroadcastNetworkActivityNotification(); - AdvanceClockAndRunEventLoop(ctx, ICDManagementServer::GetInstance().GetActiveModeThresholdMs() / 2); + AdvanceClockAndRunEventLoop(ctx, ICDConfigurationData::GetInstance().GetActiveModeThresholdMs() / 2); NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::ActiveMode); - AdvanceClockAndRunEventLoop(ctx, ICDManagementServer::GetInstance().GetActiveModeThresholdMs()); + AdvanceClockAndRunEventLoop(ctx, ICDConfigurationData::GetInstance().GetActiveModeThresholdMs()); NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::IdleMode); } @@ -172,7 +173,7 @@ class TestICDManager notifier.BroadcastActiveRequestNotification(ActiveFlag::kCommissioningWindowOpen); NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::ActiveMode); // Advance time so active mode interval expires. - AdvanceClockAndRunEventLoop(ctx, ICDManagementServer::GetInstance().GetActiveModeDurationMs() + 1); + AdvanceClockAndRunEventLoop(ctx, ICDConfigurationData::GetInstance().GetActiveModeDurationMs() + 1); // Requirement flag still set. We stay in active mode NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::ActiveMode); @@ -186,12 +187,12 @@ class TestICDManager // Advance time, but by less than the active mode interval and remove the requirement. // We should stay in active mode. - AdvanceClockAndRunEventLoop(ctx, ICDManagementServer::GetInstance().GetActiveModeDurationMs() / 2); + AdvanceClockAndRunEventLoop(ctx, ICDConfigurationData::GetInstance().GetActiveModeDurationMs() / 2); notifier.BroadcastActiveRequestWithdrawal(ActiveFlag::kFailSafeArmed); NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::ActiveMode); // Advance time again, The activemode interval is completed. - AdvanceClockAndRunEventLoop(ctx, ICDManagementServer::GetInstance().GetActiveModeDurationMs() + 1); + AdvanceClockAndRunEventLoop(ctx, ICDConfigurationData::GetInstance().GetActiveModeDurationMs() + 1); NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::IdleMode); // Set two requirements @@ -199,7 +200,7 @@ class TestICDManager notifier.BroadcastActiveRequestNotification(ActiveFlag::kExchangeContextOpen); NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::ActiveMode); // advance time so the active mode interval expires. - AdvanceClockAndRunEventLoop(ctx, ICDManagementServer::GetInstance().GetActiveModeDurationMs() + 1); + AdvanceClockAndRunEventLoop(ctx, ICDConfigurationData::GetInstance().GetActiveModeDurationMs() + 1); // A requirement flag is still set. We stay in active mode. NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::ActiveMode); @@ -226,13 +227,13 @@ class TestICDManager ctx->mICDManager.SetTestFeatureMapValue(0x07); // Check ICDManager starts in SIT mode if no entries are present - NL_TEST_ASSERT(aSuite, ctx->mICDManager.GetICDMode() == ICDManager::ICDMode::SIT); + NL_TEST_ASSERT(aSuite, ICDConfigurationData::GetInstance().GetICDMode() == ICDConfigurationData::ICDMode::SIT); // Trigger a "fake" register, ICDManager shoudl remain in SIT mode notifier.BroadcastICDManagementEvent(ICDMEvent::kTableUpdated); // Check ICDManager stayed in SIT mode - NL_TEST_ASSERT(aSuite, ctx->mICDManager.GetICDMode() == ICDManager::ICDMode::SIT); + NL_TEST_ASSERT(aSuite, ICDConfigurationData::GetInstance().GetICDMode() == ICDConfigurationData::ICDMode::SIT); // Create tables with different fabrics ICDMonitoringTable table1(ctx->testStorage, kTestFabricIndex1, kMaxTestClients, &(ctx->mKeystore)); @@ -249,7 +250,7 @@ class TestICDManager notifier.BroadcastICDManagementEvent(ICDMEvent::kTableUpdated); // Check ICDManager is now in the LIT operating mode - NL_TEST_ASSERT(aSuite, ctx->mICDManager.GetICDMode() == ICDManager::ICDMode::LIT); + NL_TEST_ASSERT(aSuite, ICDConfigurationData::GetInstance().GetICDMode() == ICDConfigurationData::ICDMode::LIT); // Add second entry to the first fabric ICDMonitoringEntry entry2(&(ctx->mKeystore)); @@ -262,7 +263,7 @@ class TestICDManager notifier.BroadcastICDManagementEvent(ICDMEvent::kTableUpdated); // Check ICDManager is now in the LIT operating mode - NL_TEST_ASSERT(aSuite, ctx->mICDManager.GetICDMode() == ICDManager::ICDMode::LIT); + NL_TEST_ASSERT(aSuite, ICDConfigurationData::GetInstance().GetICDMode() == ICDConfigurationData::ICDMode::LIT); // Add first entry to the first fabric ICDMonitoringEntry entry3(&(ctx->mKeystore)); @@ -275,7 +276,7 @@ class TestICDManager notifier.BroadcastICDManagementEvent(ICDMEvent::kTableUpdated); // Check ICDManager is now in the LIT operating mode - NL_TEST_ASSERT(aSuite, ctx->mICDManager.GetICDMode() == ICDManager::ICDMode::LIT); + NL_TEST_ASSERT(aSuite, ICDConfigurationData::GetInstance().GetICDMode() == ICDConfigurationData::ICDMode::LIT); // Add second entry to the first fabric ICDMonitoringEntry entry4(&(ctx->mKeystore)); @@ -291,7 +292,7 @@ class TestICDManager notifier.BroadcastICDManagementEvent(ICDMEvent::kTableUpdated); // Check ICDManager is still in the LIT operating mode - NL_TEST_ASSERT(aSuite, ctx->mICDManager.GetICDMode() == ICDManager::ICDMode::LIT); + NL_TEST_ASSERT(aSuite, ICDConfigurationData::GetInstance().GetICDMode() == ICDConfigurationData::ICDMode::LIT); // Remove single entry from remaining fabric NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == table1.Remove(1)); @@ -300,7 +301,7 @@ class TestICDManager notifier.BroadcastICDManagementEvent(ICDMEvent::kTableUpdated); // Check ICDManager is still in the LIT operating mode - NL_TEST_ASSERT(aSuite, ctx->mICDManager.GetICDMode() == ICDManager::ICDMode::LIT); + NL_TEST_ASSERT(aSuite, ICDConfigurationData::GetInstance().GetICDMode() == ICDConfigurationData::ICDMode::LIT); // Remove last entry from remaining fabric NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == table1.Remove(0)); @@ -311,7 +312,7 @@ class TestICDManager notifier.BroadcastICDManagementEvent(ICDMEvent::kTableUpdated); // Check ICDManager is still in the LIT operating mode - NL_TEST_ASSERT(aSuite, ctx->mICDManager.GetICDMode() == ICDManager::ICDMode::SIT); + NL_TEST_ASSERT(aSuite, ICDConfigurationData::GetInstance().GetICDMode() == ICDConfigurationData::ICDMode::SIT); } }; diff --git a/src/app/zap-templates/partials/idl/cluster_definition.zapt b/src/app/zap-templates/partials/idl/cluster_definition.zapt index 431b64c6b8b02c..be431ae7d7cc2c 100644 --- a/src/app/zap-templates/partials/idl/cluster_definition.zapt +++ b/src/app/zap-templates/partials/idl/cluster_definition.zapt @@ -1,6 +1,5 @@ /** {{description}} */ {{#if apiMaturity}}{{apiMaturity}} {{/if~}} -{{#if generateClientCluster}}client {{else}}server {{/if~}} cluster {{asUpperCamelCase name}} = {{!}} {{~#if manufacturerCode}} {{~asMEI manufacturerCode code~}} @@ -56,21 +55,12 @@ cluster {{asUpperCamelCase name}} = {{!}} } {{/zcl_events}} - {{#if generateClientCluster}} - {{#zcl_attributes_server}} - {{#if clusterRef}} + {{#zcl_attributes_server}} + {{#if clusterRef}} {{! ensure indent }}{{>idl_attribute_definition}} - {{/if}} - {{/zcl_attributes_server}} + {{/if}} + {{/zcl_attributes_server}} - {{~else}} - {{#enabled_attributes_for_cluster_and_side name 'server'}} - {{#unless isGlobalAttribute}} - {{! ensure indent }}{{>idl_attribute_definition}} - {{/unless}} - {{/enabled_attributes_for_cluster_and_side~}} - - {{~/if}} {{~!--Global attributes: spec 7.13 describes these as mandatory --}} {{~!TODO(26053): global attributes are marked as optional, hence the exclusion above and re-add here.}} @@ -80,42 +70,15 @@ cluster {{asUpperCamelCase name}} = {{!}} readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; -{{!--Open:Generating command request structs for all incoming commands into server side--~}} - {{#unless generateClientCluster}} - {{#all_incoming_commands_for_cluster name side}} - {{~>idl_command_request_struct}} - {{/all_incoming_commands_for_cluster}} - {{/unless}} - {{~!--Close:Generating command request structs for all incoming commands into server side--~}} - {{~!--Open:Generating command request structs for all outgoing commands from client side--~}} - {{#if generateClientCluster}} - {{#zcl_commands}} - {{#if (isStrEqual source "client")}} - {{~>idl_command_request_struct}} - {{else}} - {{~>idl_command_response_struct}} - {{/if}} - {{/zcl_commands}} - {{/if}} - {{~!--Close:Generating command request structs for all outgoing commands from client side--~}} - {{~!--Open:Generating command response structs for all incoming commands into client side--~}} - {{~!--Close:Generating command response structs for all incoming commands into client side--~}} - {{~!--Open:Generating command response structs for all outgoing commands from server side--~}} - {{#unless generateClientCluster}} - {{#all_outgoing_commands_for_cluster name side}} - {{~>idl_command_response_struct}} - {{/all_outgoing_commands_for_cluster}} - {{/unless}} - {{~!--Close:Generating command response structs for all outgoing commands from server side--~}} - {{#unless generateClientCluster}} - {{#all_incoming_commands_for_cluster name side}} - {{~>idl_command_request_response}}{{~new_line 1~}} - {{/all_incoming_commands_for_cluster}} - {{/unless}} - {{#if generateClientCluster}} - {{#zcl_commands_source_client}} - {{~>idl_command_request_response}}{{~new_line 1~}} - {{/zcl_commands_source_client}} - {{/if}} + {{#zcl_commands}} + {{#if (isStrEqual source "client")}} + {{~>idl_command_request_struct}} + {{else}} + {{~>idl_command_response_struct}} + {{/if}} + {{/zcl_commands}} + {{#zcl_commands_source_client}} + {{~>idl_command_request_response}}{{~new_line 1~}} + {{/zcl_commands_source_client}} } diff --git a/src/app/zap-templates/templates/app/MatterIDL_Client.zapt b/src/app/zap-templates/templates/app/MatterIDL_Client.zapt index 6902609e2f76bd..143e065c1b459d 100644 --- a/src/app/zap-templates/templates/app/MatterIDL_Client.zapt +++ b/src/app/zap-templates/templates/app/MatterIDL_Client.zapt @@ -2,5 +2,5 @@ // It is for view/code review purposes only. {{#zcl_clusters~}} -{{>idl_cluster_definition generateClientCluster=1}} +{{>idl_cluster_definition}} {{/zcl_clusters}} diff --git a/src/app/zap-templates/templates/app/MatterIDL_Server.zapt b/src/app/zap-templates/templates/app/MatterIDL_Server.zapt index 458193bee47977..9531fc268a189a 100644 --- a/src/app/zap-templates/templates/app/MatterIDL_Server.zapt +++ b/src/app/zap-templates/templates/app/MatterIDL_Server.zapt @@ -2,11 +2,7 @@ // It is for view/code review purposes only. {{#all_user_clusters~}} -{{#if (is_client side)~}} -{{>idl_cluster_definition generateClientCluster=1}} -{{else~}} -{{>idl_cluster_definition generateClientCluster=0}} -{{/if}} +{{>idl_cluster_definition}} {{/all_user_clusters}} {{#user_endpoints}} endpoint {{endpointId}} { diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index 7322e116444776..b73bea88aab9af 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -2098,6 +2098,18 @@ limitations under the License. + + MA-network-infrastructure-manager + CHIP + Matter Network Infrastructure Manager + 0x0103 + 0xFFF10010 + Simple + Endpoint + + + + MA-all-clusters-app CHIP @@ -2275,4 +2287,19 @@ limitations under the License. + + Cooktop + CHIP + Matter Cooktop + Simple + 0x0103 + 0x0078 + + + + + + + + diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index dd84ac5f02f55b..54eae3531eadd4 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -2,7 +2,7 @@ // It is for view/code review purposes only. /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -client cluster Identify = 3 { +cluster Identify = 3 { revision 4; enum EffectIdentifierEnum : enum8 { @@ -52,7 +52,7 @@ client cluster Identify = 3 { } /** Attributes and commands for group configuration and manipulation. */ -client cluster Groups = 4 { +cluster Groups = 4 { revision 4; bitmap Feature : bitmap32 { @@ -129,7 +129,7 @@ client cluster Groups = 4 { } /** Attributes and commands for scene configuration and manipulation. */ -provisional client cluster Scenes = 5 { +provisional cluster Scenes = 5 { revision 5; bitmap CopyModeBitmap : bitmap8 { @@ -322,7 +322,7 @@ provisional client cluster Scenes = 5 { } /** Attributes and commands for switching devices between 'On' and 'Off' states. */ -client cluster OnOff = 6 { +cluster OnOff = 6 { revision 6; enum DelayedAllOffEffectVariantEnum : enum8 { @@ -394,7 +394,7 @@ client cluster OnOff = 6 { } /** Attributes and commands for configuring On/Off switching devices. */ -client cluster OnOffSwitchConfiguration = 7 { +cluster OnOffSwitchConfiguration = 7 { revision 1; // NOTE: Default/not specifically set readonly attribute enum8 switchType = 0; @@ -408,7 +408,7 @@ client cluster OnOffSwitchConfiguration = 7 { } /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ -client cluster LevelControl = 8 { +cluster LevelControl = 8 { revision 5; enum MoveModeEnum : enum8 { @@ -533,7 +533,7 @@ client cluster LevelControl = 8 { } /** An interface for reading the value of a binary measurement and accessing various characteristics of that measurement. */ -client cluster BinaryInputBasic = 15 { +cluster BinaryInputBasic = 15 { revision 1; // NOTE: Default/not specifically set attribute optional char_string<16> activeText = 4; @@ -554,7 +554,7 @@ client cluster BinaryInputBasic = 15 { } /** Cluster to control pulse width modulation */ -provisional client cluster PulseWidthModulation = 28 { +provisional cluster PulseWidthModulation = 28 { revision 1; // NOTE: Default/not specifically set readonly attribute command_id generatedCommandList[] = 65528; @@ -566,7 +566,7 @@ provisional client cluster PulseWidthModulation = 28 { } /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -client cluster Descriptor = 29 { +cluster Descriptor = 29 { revision 2; bitmap Feature : bitmap32 { @@ -599,7 +599,7 @@ client cluster Descriptor = 29 { } /** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -client cluster Binding = 30 { +cluster Binding = 30 { revision 1; // NOTE: Default/not specifically set fabric_scoped struct TargetStruct { @@ -623,7 +623,7 @@ client cluster Binding = 30 { Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated cluster instances. */ -client cluster AccessControl = 31 { +cluster AccessControl = 31 { revision 1; // NOTE: Default/not specifically set enum AccessControlEntryAuthModeEnum : enum8 { @@ -695,7 +695,7 @@ client cluster AccessControl = 31 { } /** This cluster provides a standardized way for a Node (typically a Bridge, but could be any Node) to expose action information. */ -client cluster Actions = 37 { +cluster Actions = 37 { revision 1; // NOTE: Default/not specifically set enum ActionErrorEnum : enum8 { @@ -874,7 +874,7 @@ client cluster Actions = 37 { /** This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ -client cluster BasicInformation = 40 { +cluster BasicInformation = 40 { revision 3; enum ColorEnum : enum8 { @@ -969,7 +969,7 @@ client cluster BasicInformation = 40 { } /** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { +cluster OtaSoftwareUpdateProvider = 41 { revision 1; // NOTE: Default/not specifically set enum ApplyUpdateActionEnum : enum8 { @@ -1045,7 +1045,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { } /** Provides an interface for downloading and applying OTA software updates */ -client cluster OtaSoftwareUpdateRequestor = 42 { +cluster OtaSoftwareUpdateRequestor = 42 { revision 1; // NOTE: Default/not specifically set enum AnnouncementReasonEnum : enum8 { @@ -1126,7 +1126,7 @@ client cluster OtaSoftwareUpdateRequestor = 42 { may have differing common languages, units of measurements, and numerical formatting 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 */ -client cluster LocalizationConfiguration = 43 { +cluster LocalizationConfiguration = 43 { revision 1; // NOTE: Default/not specifically set attribute access(write: manage) char_string<35> activeLocale = 0; @@ -1143,7 +1143,7 @@ client cluster LocalizationConfiguration = 43 { may have differing preferences for how dates and times are conveyed. As such, Nodes that visually or audibly convey time information need a mechanism by which they can be configured to use a user’s preferred format. */ -client cluster TimeFormatLocalization = 44 { +cluster TimeFormatLocalization = 44 { revision 1; // NOTE: Default/not specifically set enum CalendarTypeEnum : enum8 { @@ -1185,7 +1185,7 @@ client cluster TimeFormatLocalization = 44 { may have differing preferences for the units in which values are conveyed in communication to a user. As such, Nodes that visually or audibly convey measurable values to the user need a mechanism by which they can be configured to use a user’s preferred unit. */ -client cluster UnitLocalization = 45 { +cluster UnitLocalization = 45 { revision 1; enum TempUnitEnum : enum8 { @@ -1208,7 +1208,7 @@ client cluster UnitLocalization = 45 { } /** This cluster is used to describe the configuration and capabilities of a Device's power system. */ -client cluster PowerSourceConfiguration = 46 { +cluster PowerSourceConfiguration = 46 { revision 1; readonly attribute endpoint_no sources[] = 0; @@ -1221,7 +1221,7 @@ client cluster PowerSourceConfiguration = 46 { } /** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ -client cluster PowerSource = 47 { +cluster PowerSource = 47 { revision 1; // NOTE: Default/not specifically set enum BatApprovedChemistryEnum : enum16 { @@ -1480,7 +1480,7 @@ client cluster PowerSource = 47 { } /** This cluster is used to manage global aspects of the Commissioning flow. */ -client cluster GeneralCommissioning = 48 { +cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set enum CommissioningErrorEnum : enum8 { @@ -1549,7 +1549,7 @@ client cluster GeneralCommissioning = 48 { } /** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -client cluster NetworkCommissioning = 49 { +cluster NetworkCommissioning = 49 { revision 1; // NOTE: Default/not specifically set enum NetworkCommissioningStatusEnum : enum8 { @@ -1729,7 +1729,7 @@ client cluster NetworkCommissioning = 49 { } /** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -client cluster DiagnosticLogs = 50 { +cluster DiagnosticLogs = 50 { revision 1; // NOTE: Default/not specifically set enum IntentEnum : enum8 { @@ -1776,7 +1776,7 @@ client cluster DiagnosticLogs = 50 { } /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -client cluster GeneralDiagnostics = 51 { +cluster GeneralDiagnostics = 51 { revision 1; // NOTE: Default/not specifically set enum BootReasonEnum : enum8 { @@ -1891,7 +1891,7 @@ client cluster GeneralDiagnostics = 51 { } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -client cluster SoftwareDiagnostics = 52 { +cluster SoftwareDiagnostics = 52 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -1928,7 +1928,7 @@ client cluster SoftwareDiagnostics = 52 { } /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ -client cluster ThreadNetworkDiagnostics = 53 { +cluster ThreadNetworkDiagnostics = 53 { revision 1; // NOTE: Default/not specifically set enum ConnectionStatusEnum : enum8 { @@ -2094,7 +2094,7 @@ client cluster ThreadNetworkDiagnostics = 53 { } /** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -client cluster WiFiNetworkDiagnostics = 54 { +cluster WiFiNetworkDiagnostics = 54 { revision 1; // NOTE: Default/not specifically set enum AssociationFailureCauseEnum : enum8 { @@ -2171,7 +2171,7 @@ client cluster WiFiNetworkDiagnostics = 54 { } /** The Ethernet Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -client cluster EthernetNetworkDiagnostics = 55 { +cluster EthernetNetworkDiagnostics = 55 { revision 1; // NOTE: Default/not specifically set enum PHYRateEnum : enum8 { @@ -2213,7 +2213,7 @@ client cluster EthernetNetworkDiagnostics = 55 { } /** Accurate time is required for a number of reasons, including scheduling, display and validating security materials. */ -client cluster TimeSynchronization = 56 { +cluster TimeSynchronization = 56 { revision 2; enum GranularityEnum : enum8 { @@ -2364,7 +2364,7 @@ client cluster TimeSynchronization = 56 { the Endpoint where it is placed (and its Parts) is bridged from a non-CHIP technology; and provide a centralized collection of attributes that the Node MAY collect to aid in conveying information regarding the Bridged Device to a user, such as the vendor name, the model name, or user-assigned name. */ -client cluster BridgedDeviceBasicInformation = 57 { +cluster BridgedDeviceBasicInformation = 57 { revision 3; enum ColorEnum : enum8 { @@ -2446,7 +2446,7 @@ client cluster BridgedDeviceBasicInformation = 57 { /** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -client cluster Switch = 59 { +cluster Switch = 59 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -2499,7 +2499,7 @@ client cluster Switch = 59 { } /** Commands to trigger a Node to allow a new Administrator to commission it. */ -client cluster AdministratorCommissioning = 60 { +cluster AdministratorCommissioning = 60 { revision 1; // NOTE: Default/not specifically set enum CommissioningWindowStatusEnum : enum8 { @@ -2549,7 +2549,7 @@ client cluster AdministratorCommissioning = 60 { } /** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -client cluster OperationalCredentials = 62 { +cluster OperationalCredentials = 62 { revision 1; // NOTE: Default/not specifically set enum CertificateChainTypeEnum : enum8 { @@ -2675,7 +2675,7 @@ client cluster OperationalCredentials = 62 { } /** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -client cluster GroupKeyManagement = 63 { +cluster GroupKeyManagement = 63 { revision 1; // NOTE: Default/not specifically set enum GroupKeySecurityPolicyEnum : enum8 { @@ -2754,7 +2754,7 @@ client cluster GroupKeyManagement = 63 { /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ -client cluster FixedLabel = 64 { +cluster FixedLabel = 64 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -2772,7 +2772,7 @@ client cluster FixedLabel = 64 { } /** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ -client cluster UserLabel = 65 { +cluster UserLabel = 65 { revision 1; // NOTE: Default/not specifically set struct LabelStruct { @@ -2790,7 +2790,7 @@ client cluster UserLabel = 65 { } /** Cluster to control Proxy Configuration */ -client cluster ProxyConfiguration = 66 { +cluster ProxyConfiguration = 66 { revision 1; // NOTE: Default/not specifically set readonly attribute command_id generatedCommandList[] = 65528; @@ -2802,7 +2802,7 @@ client cluster ProxyConfiguration = 66 { } /** Cluster to control Proxy Discovery */ -client cluster ProxyDiscovery = 67 { +cluster ProxyDiscovery = 67 { revision 1; // NOTE: Default/not specifically set readonly attribute command_id generatedCommandList[] = 65528; @@ -2814,7 +2814,7 @@ client cluster ProxyDiscovery = 67 { } /** Cluster to control Proxy Valid */ -client cluster ProxyValid = 68 { +cluster ProxyValid = 68 { revision 1; // NOTE: Default/not specifically set readonly attribute command_id generatedCommandList[] = 65528; @@ -2826,7 +2826,7 @@ client cluster ProxyValid = 68 { } /** This cluster provides an interface to a boolean state called StateValue. */ -client cluster BooleanState = 69 { +cluster BooleanState = 69 { revision 1; info event StateChange = 0 { @@ -2843,7 +2843,7 @@ client cluster BooleanState = 69 { } /** Allows servers to ensure that listed clients are notified when a server is available for communication. */ -client cluster IcdManagement = 70 { +cluster IcdManagement = 70 { revision 2; bitmap Feature : bitmap32 { @@ -2922,7 +2922,7 @@ client cluster IcdManagement = 70 { } /** This cluster supports creating a simple timer functionality. */ -provisional client cluster Timer = 71 { +provisional cluster Timer = 71 { revision 1; // NOTE: Default/not specifically set enum TimerStatusEnum : enum8 { @@ -2969,7 +2969,7 @@ provisional client cluster Timer = 71 { } /** This cluster supports remotely monitoring and, where supported, changing the operational state of an Oven. */ -provisional client cluster OvenCavityOperationalState = 72 { +provisional cluster OvenCavityOperationalState = 72 { revision 1; enum ErrorStateEnum : enum8 { @@ -3035,7 +3035,7 @@ provisional client cluster OvenCavityOperationalState = 72 { } /** Attributes and commands for selecting a mode from a list of supported options. */ -provisional client cluster OvenMode = 73 { +provisional cluster OvenMode = 73 { revision 1; enum ModeTag : enum16 { @@ -3092,7 +3092,7 @@ provisional client cluster OvenMode = 73 { /** This cluster supports remotely monitoring and controling the different typs of functionality available to a drying device, such as a laundry dryer. */ -client cluster LaundryDryerControls = 74 { +cluster LaundryDryerControls = 74 { revision 1; // NOTE: Default/not specifically set enum DrynessLevelEnum : enum8 { @@ -3113,7 +3113,7 @@ client cluster LaundryDryerControls = 74 { } /** Attributes and commands for selecting a mode from a list of supported options. */ -client cluster ModeSelect = 80 { +cluster ModeSelect = 80 { revision 2; bitmap Feature : bitmap32 { @@ -3153,7 +3153,7 @@ client cluster ModeSelect = 80 { } /** Attributes and commands for selecting a mode from a list of supported options. */ -client cluster LaundryWasherMode = 81 { +cluster LaundryWasherMode = 81 { revision 2; enum ModeTag : enum16 { @@ -3204,7 +3204,7 @@ client cluster LaundryWasherMode = 81 { } /** Attributes and commands for selecting a mode from a list of supported options. */ -client cluster RefrigeratorAndTemperatureControlledCabinetMode = 82 { +cluster RefrigeratorAndTemperatureControlledCabinetMode = 82 { revision 2; enum ModeTag : enum16 { @@ -3253,7 +3253,7 @@ client cluster RefrigeratorAndTemperatureControlledCabinetMode = 82 { } /** This cluster supports remotely monitoring and controling the different typs of functionality available to a washing device, such as a washing machine. */ -client cluster LaundryWasherControls = 83 { +cluster LaundryWasherControls = 83 { revision 1; // NOTE: Default/not specifically set enum NumberOfRinsesEnum : enum8 { @@ -3281,7 +3281,7 @@ client cluster LaundryWasherControls = 83 { } /** Attributes and commands for selecting a mode from a list of supported options. */ -client cluster RvcRunMode = 84 { +cluster RvcRunMode = 84 { revision 2; enum ModeTag : enum16 { @@ -3340,7 +3340,7 @@ client cluster RvcRunMode = 84 { } /** Attributes and commands for selecting a mode from a list of supported options. */ -client cluster RvcCleanMode = 85 { +cluster RvcCleanMode = 85 { revision 2; enum ModeTag : enum16 { @@ -3393,7 +3393,7 @@ client cluster RvcCleanMode = 85 { } /** Attributes and commands for configuring the temperature control, and reporting temperature. */ -client cluster TemperatureControl = 86 { +cluster TemperatureControl = 86 { revision 1; // NOTE: Default/not specifically set bitmap Feature : bitmap32 { @@ -3425,7 +3425,7 @@ client cluster TemperatureControl = 86 { } /** Attributes and commands for configuring the Refrigerator alarm. */ -client cluster RefrigeratorAlarm = 87 { +cluster RefrigeratorAlarm = 87 { revision 1; // NOTE: Default/not specifically set bitmap AlarmMap : bitmap32 { @@ -3451,7 +3451,7 @@ client cluster RefrigeratorAlarm = 87 { } /** Attributes and commands for selecting a mode from a list of supported options. */ -client cluster DishwasherMode = 89 { +cluster DishwasherMode = 89 { revision 2; enum ModeTag : enum16 { @@ -3501,7 +3501,7 @@ client cluster DishwasherMode = 89 { } /** Attributes for reporting air quality classification */ -client cluster AirQuality = 91 { +cluster AirQuality = 91 { revision 1; // NOTE: Default/not specifically set enum AirQualityEnum : enum8 { @@ -3531,7 +3531,7 @@ client cluster AirQuality = 91 { } /** This cluster provides an interface for observing and managing the state of smoke and CO alarms. */ -client cluster SmokeCoAlarm = 92 { +cluster SmokeCoAlarm = 92 { revision 1; enum AlarmStateEnum : enum8 { @@ -3643,7 +3643,7 @@ client cluster SmokeCoAlarm = 92 { } /** Attributes and commands for configuring the Dishwasher alarm. */ -client cluster DishwasherAlarm = 93 { +cluster DishwasherAlarm = 93 { revision 1; // NOTE: Default/not specifically set bitmap AlarmMap : bitmap32 { @@ -3692,7 +3692,7 @@ client cluster DishwasherAlarm = 93 { } /** Attributes and commands for selecting a mode from a list of supported options. */ -provisional client cluster MicrowaveOvenMode = 94 { +provisional cluster MicrowaveOvenMode = 94 { revision 1; enum ModeTag : enum16 { @@ -3726,7 +3726,7 @@ provisional client cluster MicrowaveOvenMode = 94 { } /** Attributes and commands for configuring the microwave oven control, and reporting cooking stats. */ -provisional client cluster MicrowaveOvenControl = 95 { +provisional cluster MicrowaveOvenControl = 95 { revision 1; // NOTE: Default/not specifically set readonly attribute elapsed_s cookTime = 1; @@ -3758,7 +3758,7 @@ provisional client cluster MicrowaveOvenControl = 95 { } /** This cluster supports remotely monitoring and, where supported, changing the operational state of any device where a state machine is a part of the operation. */ -client cluster OperationalState = 96 { +cluster OperationalState = 96 { revision 1; // NOTE: Default/not specifically set enum ErrorStateEnum : enum8 { @@ -3824,7 +3824,7 @@ client cluster OperationalState = 96 { } /** This cluster supports remotely monitoring and, where supported, changing the operational state of a Robotic Vacuum. */ -client cluster RvcOperationalState = 97 { +cluster RvcOperationalState = 97 { revision 1; // NOTE: Default/not specifically set enum ErrorStateEnum : enum8 { @@ -3893,7 +3893,7 @@ client cluster RvcOperationalState = 97 { } /** Attributes and commands for monitoring HEPA filters in a device */ -client cluster HepaFilterMonitoring = 113 { +cluster HepaFilterMonitoring = 113 { revision 1; // NOTE: Default/not specifically set enum ChangeIndicationEnum : enum8 { @@ -3944,7 +3944,7 @@ client cluster HepaFilterMonitoring = 113 { } /** Attributes and commands for monitoring activated carbon filters in a device */ -client cluster ActivatedCarbonFilterMonitoring = 114 { +cluster ActivatedCarbonFilterMonitoring = 114 { revision 1; // NOTE: Default/not specifically set enum ChangeIndicationEnum : enum8 { @@ -3995,7 +3995,7 @@ client cluster ActivatedCarbonFilterMonitoring = 114 { } /** This cluster is used to configure a boolean sensor. */ -provisional client cluster BooleanSensorConfiguration = 128 { +provisional cluster BooleanSensorConfiguration = 128 { revision 1; enum SensitivityEnum : enum8 { @@ -4044,7 +4044,7 @@ provisional client cluster BooleanSensorConfiguration = 128 { } /** This cluster is used to configure a valve. */ -provisional client cluster ValveConfigurationAndControl = 129 { +provisional cluster ValveConfigurationAndControl = 129 { revision 1; enum ValveStateEnum : enum8 { @@ -4106,7 +4106,7 @@ provisional client cluster ValveConfigurationAndControl = 129 { } /** This cluster provides an interface to the functionality of Smart Energy Demand Response and Load Control. */ -provisional client cluster DemandResponseLoadControl = 150 { +provisional cluster DemandResponseLoadControl = 150 { revision 4; enum CriticalityLevelEnum : enum8 { @@ -4302,7 +4302,7 @@ provisional client cluster DemandResponseLoadControl = 150 { } /** Electric Vehicle Supply Equipment (EVSE) is equipment used to charge an Electric Vehicle (EV) or Plug-In Hybrid Electric Vehicle. This cluster provides an interface to the functionality of Electric Vehicle Supply Equipment (EVSE) management. */ -provisional client cluster EnergyEvse = 153 { +provisional cluster EnergyEvse = 153 { revision 1; // NOTE: Default/not specifically set enum EnergyTransferStoppedReasonEnum : enum8 { @@ -4483,7 +4483,7 @@ provisional client cluster EnergyEvse = 153 { } /** An interface to a generic way to secure a door */ -client cluster DoorLock = 257 { +cluster DoorLock = 257 { revision 7; enum AlarmCodeEnum : enum8 { @@ -5105,7 +5105,7 @@ client cluster DoorLock = 257 { } /** Provides an interface for controlling and adjusting automatic window coverings. */ -client cluster WindowCovering = 258 { +cluster WindowCovering = 258 { revision 5; enum EndProductType : enum8 { @@ -5258,7 +5258,7 @@ client cluster WindowCovering = 258 { } /** This cluster provides control of a barrier (garage door). */ -client cluster BarrierControl = 259 { +cluster BarrierControl = 259 { revision 1; // NOTE: Default/not specifically set bitmap BarrierControlCapabilities : bitmap8 { @@ -5300,7 +5300,7 @@ client cluster BarrierControl = 259 { } /** An interface for configuring and controlling pumps. */ -client cluster PumpConfigurationAndControl = 512 { +cluster PumpConfigurationAndControl = 512 { revision 3; enum ControlModeEnum : enum8 { @@ -5424,7 +5424,7 @@ client cluster PumpConfigurationAndControl = 512 { } /** An interface for configuring and controlling the functionality of a thermostat. */ -client cluster Thermostat = 513 { +cluster Thermostat = 513 { revision 6; enum SetpointAdjustMode : enum8 { @@ -5583,7 +5583,7 @@ client cluster Thermostat = 513 { } /** An interface for controlling a fan in a heating/cooling system. */ -provisional client cluster FanControl = 514 { +provisional cluster FanControl = 514 { revision 4; enum AirflowDirectionEnum : enum8 { @@ -5665,7 +5665,7 @@ provisional client cluster FanControl = 514 { } /** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */ -client cluster ThermostatUserInterfaceConfiguration = 516 { +cluster ThermostatUserInterfaceConfiguration = 516 { revision 2; enum KeypadLockoutEnum : enum8 { @@ -5699,7 +5699,7 @@ client cluster ThermostatUserInterfaceConfiguration = 516 { } /** Attributes and commands for controlling the color properties of a color-capable light. */ -client cluster ColorControl = 768 { +cluster ColorControl = 768 { revision 6; enum ColorLoopAction : enum8 { @@ -6019,7 +6019,7 @@ client cluster ColorControl = 768 { } /** Attributes and commands for configuring a lighting ballast. */ -provisional client cluster BallastConfiguration = 769 { +provisional cluster BallastConfiguration = 769 { revision 4; bitmap BallastStatusBitmap : bitmap8 { @@ -6054,7 +6054,7 @@ provisional client cluster BallastConfiguration = 769 { } /** Attributes and commands for configuring the measurement of illuminance, and reporting illuminance measurements. */ -client cluster IlluminanceMeasurement = 1024 { +cluster IlluminanceMeasurement = 1024 { revision 3; enum LightSensorTypeEnum : enum8 { @@ -6076,7 +6076,7 @@ client cluster IlluminanceMeasurement = 1024 { } /** Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. */ -client cluster TemperatureMeasurement = 1026 { +cluster TemperatureMeasurement = 1026 { revision 1; // NOTE: Default/not specifically set readonly attribute nullable temperature measuredValue = 0; @@ -6092,7 +6092,7 @@ client cluster TemperatureMeasurement = 1026 { } /** Attributes and commands for configuring the measurement of pressure, and reporting pressure measurements. */ -client cluster PressureMeasurement = 1027 { +cluster PressureMeasurement = 1027 { revision 3; bitmap Feature : bitmap32 { @@ -6117,7 +6117,7 @@ client cluster PressureMeasurement = 1027 { } /** Attributes and commands for configuring the measurement of flow, and reporting flow measurements. */ -client cluster FlowMeasurement = 1028 { +cluster FlowMeasurement = 1028 { revision 1; // NOTE: Default/not specifically set readonly attribute nullable int16u measuredValue = 0; @@ -6133,7 +6133,7 @@ client cluster FlowMeasurement = 1028 { } /** Attributes and commands for configuring the measurement of relative humidity, and reporting relative humidity measurements. */ -client cluster RelativeHumidityMeasurement = 1029 { +cluster RelativeHumidityMeasurement = 1029 { revision 3; readonly attribute nullable int16u measuredValue = 0; @@ -6149,7 +6149,7 @@ client cluster RelativeHumidityMeasurement = 1029 { } /** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ -client cluster OccupancySensing = 1030 { +cluster OccupancySensing = 1030 { revision 3; enum OccupancySensorTypeEnum : enum8 { @@ -6190,7 +6190,7 @@ client cluster OccupancySensing = 1030 { } /** Attributes for reporting carbon monoxide concentration measurements */ -client cluster CarbonMonoxideConcentrationMeasurement = 1036 { +cluster CarbonMonoxideConcentrationMeasurement = 1036 { revision 3; enum LevelValueEnum : enum8 { @@ -6247,7 +6247,7 @@ client cluster CarbonMonoxideConcentrationMeasurement = 1036 { } /** Attributes for reporting carbon dioxide concentration measurements */ -client cluster CarbonDioxideConcentrationMeasurement = 1037 { +cluster CarbonDioxideConcentrationMeasurement = 1037 { revision 3; enum LevelValueEnum : enum8 { @@ -6304,7 +6304,7 @@ client cluster CarbonDioxideConcentrationMeasurement = 1037 { } /** Attributes for reporting nitrogen dioxide concentration measurements */ -client cluster NitrogenDioxideConcentrationMeasurement = 1043 { +cluster NitrogenDioxideConcentrationMeasurement = 1043 { revision 3; enum LevelValueEnum : enum8 { @@ -6361,7 +6361,7 @@ client cluster NitrogenDioxideConcentrationMeasurement = 1043 { } /** Attributes for reporting ozone concentration measurements */ -client cluster OzoneConcentrationMeasurement = 1045 { +cluster OzoneConcentrationMeasurement = 1045 { revision 3; enum LevelValueEnum : enum8 { @@ -6418,7 +6418,7 @@ client cluster OzoneConcentrationMeasurement = 1045 { } /** Attributes for reporting PM2.5 concentration measurements */ -client cluster Pm25ConcentrationMeasurement = 1066 { +cluster Pm25ConcentrationMeasurement = 1066 { revision 3; enum LevelValueEnum : enum8 { @@ -6475,7 +6475,7 @@ client cluster Pm25ConcentrationMeasurement = 1066 { } /** Attributes for reporting formaldehyde concentration measurements */ -client cluster FormaldehydeConcentrationMeasurement = 1067 { +cluster FormaldehydeConcentrationMeasurement = 1067 { revision 3; enum LevelValueEnum : enum8 { @@ -6532,7 +6532,7 @@ client cluster FormaldehydeConcentrationMeasurement = 1067 { } /** Attributes for reporting PM1 concentration measurements */ -client cluster Pm1ConcentrationMeasurement = 1068 { +cluster Pm1ConcentrationMeasurement = 1068 { revision 3; enum LevelValueEnum : enum8 { @@ -6589,7 +6589,7 @@ client cluster Pm1ConcentrationMeasurement = 1068 { } /** Attributes for reporting PM10 concentration measurements */ -client cluster Pm10ConcentrationMeasurement = 1069 { +cluster Pm10ConcentrationMeasurement = 1069 { revision 3; enum LevelValueEnum : enum8 { @@ -6646,7 +6646,7 @@ client cluster Pm10ConcentrationMeasurement = 1069 { } /** Attributes for reporting total volatile organic compounds concentration measurements */ -client cluster TotalVolatileOrganicCompoundsConcentrationMeasurement = 1070 { +cluster TotalVolatileOrganicCompoundsConcentrationMeasurement = 1070 { revision 3; enum LevelValueEnum : enum8 { @@ -6703,7 +6703,7 @@ client cluster TotalVolatileOrganicCompoundsConcentrationMeasurement = 1070 { } /** Attributes for reporting radon concentration measurements */ -client cluster RadonConcentrationMeasurement = 1071 { +cluster RadonConcentrationMeasurement = 1071 { revision 3; enum LevelValueEnum : enum8 { @@ -6760,7 +6760,7 @@ client cluster RadonConcentrationMeasurement = 1071 { } /** This cluster provides an interface for managing low power mode on a device that supports the Wake On LAN protocol. */ -client cluster WakeOnLan = 1283 { +cluster WakeOnLan = 1283 { revision 1; // NOTE: Default/not specifically set readonly attribute optional char_string<12> MACAddress = 0; @@ -6774,7 +6774,7 @@ client cluster WakeOnLan = 1283 { } /** This cluster provides an interface for controlling the current Channel on a device. */ -client cluster Channel = 1284 { +cluster Channel = 1284 { revision 1; // NOTE: Default/not specifically set enum LineupInfoTypeEnum : enum8 { @@ -6844,7 +6844,7 @@ client cluster Channel = 1284 { } /** This cluster provides an interface for UX navigation within a set of targets on a device or endpoint. */ -client cluster TargetNavigator = 1285 { +cluster TargetNavigator = 1285 { revision 1; // NOTE: Default/not specifically set enum StatusEnum : enum8 { @@ -6882,7 +6882,7 @@ client cluster TargetNavigator = 1285 { } /** This cluster provides an interface for controlling Media Playback (PLAY, PAUSE, etc) on a media device such as a TV or Speaker. */ -client cluster MediaPlayback = 1286 { +cluster MediaPlayback = 1286 { revision 1; // NOTE: Default/not specifically set enum PlaybackStateEnum : enum8 { @@ -6967,7 +6967,7 @@ client cluster MediaPlayback = 1286 { } /** This cluster provides an interface for controlling the Input Selector on a media device such as a TV. */ -client cluster MediaInput = 1287 { +cluster MediaInput = 1287 { revision 1; // NOTE: Default/not specifically set enum InputTypeEnum : enum8 { @@ -7025,7 +7025,7 @@ client cluster MediaInput = 1287 { } /** This cluster provides an interface for managing low power mode on a device. */ -client cluster LowPower = 1288 { +cluster LowPower = 1288 { revision 1; // NOTE: Default/not specifically set readonly attribute command_id generatedCommandList[] = 65528; @@ -7040,7 +7040,7 @@ client cluster LowPower = 1288 { } /** This cluster provides an interface for controlling a device like a TV using action commands such as UP, DOWN, and SELECT. */ -client cluster KeypadInput = 1289 { +cluster KeypadInput = 1289 { revision 1; // NOTE: Default/not specifically set enum CECKeyCodeEnum : enum8 { @@ -7164,7 +7164,7 @@ client cluster KeypadInput = 1289 { } /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ -client cluster ContentLauncher = 1290 { +cluster ContentLauncher = 1290 { revision 1; // NOTE: Default/not specifically set enum MetricTypeEnum : enum8 { @@ -7274,7 +7274,7 @@ client cluster ContentLauncher = 1290 { } /** This cluster provides an interface for controlling the Output on a media device such as a TV. */ -client cluster AudioOutput = 1291 { +cluster AudioOutput = 1291 { revision 1; // NOTE: Default/not specifically set enum OutputTypeEnum : enum8 { @@ -7321,7 +7321,7 @@ client cluster AudioOutput = 1291 { } /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ -client cluster ApplicationLauncher = 1292 { +cluster ApplicationLauncher = 1292 { revision 1; // NOTE: Default/not specifically set enum StatusEnum : enum8 { @@ -7380,7 +7380,7 @@ client cluster ApplicationLauncher = 1292 { } /** This cluster provides information about an application running on a TV or media player device which is represented as an endpoint. */ -client cluster ApplicationBasic = 1293 { +cluster ApplicationBasic = 1293 { revision 1; // NOTE: Default/not specifically set enum ApplicationStatusEnum : enum8 { @@ -7412,7 +7412,7 @@ client cluster ApplicationBasic = 1293 { } /** This cluster provides commands that facilitate user account login on a Content App or a node. For example, a Content App running on a Video Player device, which is represented as an endpoint (see [TV Architecture]), can use this cluster to help make the user account on the Content App match the user account on the Client. */ -client cluster AccountLogin = 1294 { +cluster AccountLogin = 1294 { revision 1; // NOTE: Default/not specifically set readonly attribute command_id generatedCommandList[] = 65528; @@ -7444,7 +7444,7 @@ client cluster AccountLogin = 1294 { } /** Attributes related to the electrical properties of a device. This cluster is used by power outlets and other devices that need to provide instantaneous data as opposed to metrology data which should be retrieved from the metering cluster.. */ -client cluster ElectricalMeasurement = 2820 { +cluster ElectricalMeasurement = 2820 { revision 3; readonly attribute optional bitmap32 measurementType = 0; @@ -7611,7 +7611,7 @@ client cluster ElectricalMeasurement = 2820 { } /** The Test Cluster is meant to validate the generated code */ -internal client cluster UnitTesting = 4294048773 { +internal cluster UnitTesting = 4294048773 { revision 1; // NOTE: Default/not specifically set enum SimpleEnum : enum8 { @@ -8059,7 +8059,7 @@ internal client cluster UnitTesting = 4294048773 { } /** The Fault Injection Cluster provide a means for a test harness to configure faults(for example triggering a fault in the system). */ -internal client cluster FaultInjection = 4294048774 { +internal cluster FaultInjection = 4294048774 { revision 1; // NOTE: Default/not specifically set enum FaultType : enum8 { @@ -8098,7 +8098,7 @@ internal client cluster FaultInjection = 4294048774 { } /** The Sample MEI cluster showcases a cluster manufacturer extensions */ -client cluster SampleMei = 4294048800 { +cluster SampleMei = 4294048800 { revision 1; // NOTE: Default/not specifically set attribute boolean flipFlop = 0; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm b/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm index 09ce06a311f23e..ee76e5fa82df42 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm @@ -64,6 +64,7 @@ { 0x00000074, DeviceTypeClass::Simple, "Matter Robotic Vacuum Cleaner" }, { 0x00000075, DeviceTypeClass::Simple, "Matter Dishwasher" }, { 0x00000076, DeviceTypeClass::Simple, "Matter Smoke CO Alarm" }, + { 0x00000078, DeviceTypeClass::Simple, "Matter Cooktop" }, { 0x0000007C, DeviceTypeClass::Simple, "Matter Laundry Dryer" }, { 0x00000100, DeviceTypeClass::Simple, "Matter On/Off Light" }, { 0x00000101, DeviceTypeClass::Simple, "Matter Dimmable Light" }, @@ -88,6 +89,7 @@ { 0x00000307, DeviceTypeClass::Simple, "Matter Humidity Sensor" }, { 0x00000840, DeviceTypeClass::Simple, "Matter Control Bridge" }, { 0x00000850, DeviceTypeClass::Simple, "Matter On/Off Sensor" }, + { 0xFFF10010, DeviceTypeClass::Simple, "Matter Network Infrastructure Manager" }, }; static_assert(ExtractVendorFromMEI(0xFFF10001) != 0, "Must have class defined for \"Matter Orphan Clusters\" if it's a standard device type"); diff --git a/src/include/platform/ConnectivityManager.h b/src/include/platform/ConnectivityManager.h index 20be5ac9ae6b62..e874773886e51b 100644 --- a/src/include/platform/ConnectivityManager.h +++ b/src/include/platform/ConnectivityManager.h @@ -25,6 +25,7 @@ #include #include +#include #include #include #include diff --git a/src/include/platform/internal/GenericConfigurationManagerImpl.ipp b/src/include/platform/internal/GenericConfigurationManagerImpl.ipp index 60493db5b678cf..ad463a8eba9eea 100644 --- a/src/include/platform/internal/GenericConfigurationManagerImpl.ipp +++ b/src/include/platform/internal/GenericConfigurationManagerImpl.ipp @@ -244,9 +244,11 @@ CHIP_ERROR GenericConfigurationManagerImpl::Init() mLifetimePersistedCounter.Init(CHIP_CONFIG_LIFETIIME_PERSISTED_COUNTER_KEY); #endif +#if CHIP_USE_TRANSITIONAL_DEVICE_INSTANCE_INFO_PROVIDER static GenericDeviceInstanceInfoProvider sGenericDeviceInstanceInfoProvider(*this); SetDeviceInstanceInfoProvider(&sGenericDeviceInstanceInfoProvider); +#endif #if CHIP_USE_TRANSITIONAL_COMMISSIONABLE_DATA_PROVIDER // Using a temporary singleton here because the overall GenericConfigurationManagerImpl is diff --git a/src/lib/dnssd/Advertiser_ImplMinimalMdns.cpp b/src/lib/dnssd/Advertiser_ImplMinimalMdns.cpp index b58e696940883d..92499460b0db5c 100644 --- a/src/lib/dnssd/Advertiser_ImplMinimalMdns.cpp +++ b/src/lib/dnssd/Advertiser_ImplMinimalMdns.cpp @@ -23,7 +23,7 @@ #include "MinimalMdnsServer.h" #include "ServiceNaming.h" -#include +#include #include #include #include diff --git a/src/lib/dnssd/BUILD.gn b/src/lib/dnssd/BUILD.gn index 68b90f1f8a2251..cb8fb449908bca 100644 --- a/src/lib/dnssd/BUILD.gn +++ b/src/lib/dnssd/BUILD.gn @@ -23,6 +23,7 @@ source_set("platform_header") { static_library("dnssd") { public_deps = [ ":platform_header", + "${chip_root}/src/app/icd:icd_config", "${chip_root}/src/crypto", "${chip_root}/src/lib/core", "${chip_root}/src/lib/support", diff --git a/src/lib/dnssd/Discovery_ImplPlatform.cpp b/src/lib/dnssd/Discovery_ImplPlatform.cpp index 64eebbbb59962a..1dafdf018cbd48 100644 --- a/src/lib/dnssd/Discovery_ImplPlatform.cpp +++ b/src/lib/dnssd/Discovery_ImplPlatform.cpp @@ -19,6 +19,7 @@ #include +#include #include #include #include diff --git a/src/lib/dnssd/minimal_mdns/tests/TestAdvertiser.cpp b/src/lib/dnssd/minimal_mdns/tests/TestAdvertiser.cpp index 6623f0ac63ec3c..c265d1802d3073 100644 --- a/src/lib/dnssd/minimal_mdns/tests/TestAdvertiser.cpp +++ b/src/lib/dnssd/minimal_mdns/tests/TestAdvertiser.cpp @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include +#include #include #include diff --git a/src/messaging/BUILD.gn b/src/messaging/BUILD.gn index 7289e7413b0039..4c8ba1b9cb243c 100644 --- a/src/messaging/BUILD.gn +++ b/src/messaging/BUILD.gn @@ -67,7 +67,7 @@ static_library("messaging") { public_deps = [ ":messaging_mrp_config", - "${chip_root}/src/app/icd:notifier", + "${chip_root}/src/app/icd:icd_config", "${chip_root}/src/crypto", "${chip_root}/src/inet", "${chip_root}/src/lib/core", @@ -77,4 +77,11 @@ static_library("messaging") { "${chip_root}/src/transport", "${chip_root}/src/transport/raw", ] + + if (chip_enable_icd_server) { + public_deps += [ + "${chip_root}/src/app/icd:configuration-data", + "${chip_root}/src/app/icd:notifier", + ] + } } diff --git a/src/messaging/ExchangeContext.cpp b/src/messaging/ExchangeContext.cpp index 31d579e660502c..35aad81f23b8f5 100644 --- a/src/messaging/ExchangeContext.cpp +++ b/src/messaging/ExchangeContext.cpp @@ -32,7 +32,10 @@ #include #include -#include +#include +#if CHIP_CONFIG_ENABLE_ICD_SERVER +#include // nogncheck +#endif #include #include #include diff --git a/src/messaging/ReliableMessageMgr.cpp b/src/messaging/ReliableMessageMgr.cpp index 4ddf1801da0ade..f5731be868d7dd 100644 --- a/src/messaging/ReliableMessageMgr.cpp +++ b/src/messaging/ReliableMessageMgr.cpp @@ -24,8 +24,6 @@ #include #include -#include - #include #include #include @@ -35,10 +33,12 @@ #include #include #include +#include #include #if CHIP_CONFIG_ENABLE_ICD_SERVER -#include // nogncheck +#include // nogncheck +#include // nogncheck #endif using namespace chip::System::Clock::Literals; @@ -259,7 +259,7 @@ System::Clock::Timestamp ReliableMessageMgr::GetBackoff(System::Clock::Timestamp // Implement: // "An ICD sender SHOULD increase t to also account for its own sleepy interval // required to receive the acknowledgment" - mrpBackoffTime += CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL; + mrpBackoffTime += ICDConfigurationData::GetInstance().GetFastPollingInterval(); #endif mrpBackoffTime += CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST; diff --git a/src/messaging/ReliableMessageProtocolConfig.cpp b/src/messaging/ReliableMessageProtocolConfig.cpp index c81325432cc51b..46d4b4b675b405 100644 --- a/src/messaging/ReliableMessageProtocolConfig.cpp +++ b/src/messaging/ReliableMessageProtocolConfig.cpp @@ -29,6 +29,10 @@ #include +#if CHIP_CONFIG_ENABLE_ICD_SERVER +#include // nogncheck +#endif + namespace chip { using namespace System::Clock::Literals; @@ -70,9 +74,9 @@ Optional GetLocalMRPConfig() // TODO ICD LIT shall not advertise the SII key // Increase local MRP retry intervals by ICD polling intervals. That is, intervals for // which the device can be at sleep and not be able to receive any messages). - config.mIdleRetransTimeout += CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL; - config.mActiveRetransTimeout += CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL; - config.mActiveThresholdTime = System::Clock::Milliseconds16(CHIP_CONFIG_ICD_ACTIVE_MODE_THRESHOLD_MS); + config.mIdleRetransTimeout += ICDConfigurationData::GetInstance().GetSlowPollingInterval(); + config.mActiveRetransTimeout += ICDConfigurationData::GetInstance().GetFastPollingInterval(); + config.mActiveThresholdTime = System::Clock::Milliseconds16(ICDConfigurationData::GetInstance().GetActiveModeThresholdMs()); #endif #if CONFIG_BUILD_FOR_HOST_UNIT_TEST diff --git a/src/messaging/tests/BUILD.gn b/src/messaging/tests/BUILD.gn index 38ece653fe2f53..9b9e9f439a500a 100644 --- a/src/messaging/tests/BUILD.gn +++ b/src/messaging/tests/BUILD.gn @@ -18,6 +18,7 @@ import("//build_overrides/nlio.gni") import("//build_overrides/nlunit_test.gni") import("${chip_root}/build/chip/chip_test_suite.gni") +import("${chip_root}/src/app/icd/icd.gni") static_library("helpers") { output_name = "libMessagingTestHelpers" @@ -79,4 +80,8 @@ chip_test_suite_using_nltest("tests") { "${nlio_root}:nlio", "${nlunit_test_root}:nlunit-test", ] + + if (chip_enable_icd_server) { + public_deps += [ "${chip_root}/src/app/icd:configuration-data" ] + } } diff --git a/src/messaging/tests/TestAbortExchangesForFabric.cpp b/src/messaging/tests/TestAbortExchangesForFabric.cpp index 5bf92fb69b30d7..5354ee4cbde781 100644 --- a/src/messaging/tests/TestAbortExchangesForFabric.cpp +++ b/src/messaging/tests/TestAbortExchangesForFabric.cpp @@ -32,6 +32,10 @@ #include #include +#if CHIP_CONFIG_ENABLE_ICD_SERVER +#include // nogncheck +#endif + namespace { using namespace chip; @@ -209,7 +213,7 @@ void CommonCheckAbortAllButOneExchange(nlTestSuite * inSuite, TestContext & ctx, #if CHIP_CONFIG_ENABLE_ICD_SERVER == 1 // If running as an ICD, increase waitTimeout to account for the polling interval - waitTimeout += CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL; + waitTimeout += ICDConfigurationData::GetInstance().GetSlowPollingInterval(); #endif // Account for the retry delay booster, so that we do not timeout our IO processing before the diff --git a/src/messaging/tests/TestReliableMessageProtocol.cpp b/src/messaging/tests/TestReliableMessageProtocol.cpp index 6ef5f796abc25d..8c8443fd81d59e 100644 --- a/src/messaging/tests/TestReliableMessageProtocol.cpp +++ b/src/messaging/tests/TestReliableMessageProtocol.cpp @@ -45,6 +45,10 @@ #include #include +#if CHIP_CONFIG_ENABLE_ICD_SERVER +#include // nogncheck +#endif + namespace { using namespace chip; @@ -1832,7 +1836,7 @@ void TestReliableMessageProtocol::CheckGetBackoff(nlTestSuite * inSuite, void * auto maxBackoff = test.backoffMax + retryBoosterTimeout; #if CHIP_CONFIG_ENABLE_ICD_SERVER == 1 // If running as an ICD, increase maxBackoff to account for the polling interval - maxBackoff += CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL; + maxBackoff += ICDConfigurationData::GetInstance().GetSlowPollingInterval(); #endif NL_TEST_ASSERT(inSuite, backoff <= maxBackoff); } diff --git a/src/platform/BUILD.gn b/src/platform/BUILD.gn index e00c3618bd59da..5884f22d38fe4b 100644 --- a/src/platform/BUILD.gn +++ b/src/platform/BUILD.gn @@ -53,6 +53,10 @@ if (chip_device_platform != "none" && chip_device_platform != "external") { chip_use_transitional_commissionable_data_provider = chip_device_platform != "linux" && chip_device_platform != "android" + # Enable default/generic test-mode DeviceInstanceInfoProvider in GenericConfigurationManagerImpl + # === FOR TRANSITION UNTIL ALL EXAMPLES PROVIDE THEIR OWN === + chip_use_transitional_device_instance_info_provider = true + # lock tracking: none/log/fatal or auto for a platform-dependent choice chip_stack_lock_tracking = "auto" @@ -117,6 +121,8 @@ if (chip_device_platform != "none" && chip_device_platform != "external") { "CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING=${chip_enable_additional_data_advertising}", "CHIP_DEVICE_CONFIG_RUN_AS_ROOT=${chip_device_config_run_as_root}", "CHIP_DISABLE_PLATFORM_KVS=${chip_disable_platform_kvs}", + "CHIP_USE_TRANSITIONAL_COMMISSIONABLE_DATA_PROVIDER=${chip_use_transitional_commissionable_data_provider}", + "CHIP_USE_TRANSITIONAL_DEVICE_INSTANCE_INFO_PROVIDER=${chip_use_transitional_device_instance_info_provider}", ] if (chip_device_platform == "linux" || chip_device_platform == "darwin" || @@ -152,12 +158,6 @@ if (chip_device_platform != "none" && chip_device_platform != "external") { defines += [ "CHIP_DEVICE_CONFIG_FIRMWARE_BUILD_TIME=\"${chip_device_config_firmware_build_time}\"" ] } - if (chip_use_transitional_commissionable_data_provider) { - defines += [ "CHIP_USE_TRANSITIONAL_COMMISSIONABLE_DATA_PROVIDER=1" ] - } else { - defines += [ "CHIP_USE_TRANSITIONAL_COMMISSIONABLE_DATA_PROVIDER=0" ] - } - if (chip_device_platform == "cc13x2_26x2") { device_layer_target_define = "CC13X2_26X2" defines += [ "CHIP_DEVICE_LAYER_TARGET=cc13xx_26xx/cc13x2_26x2" ] @@ -500,6 +500,7 @@ if (chip_device_platform != "none") { ":platform_base", "${chip_root}/src/app:app_config", "${chip_root}/src/app/common:cluster-objects", + "${chip_root}/src/app/icd:icd_config", "${chip_root}/src/credentials:build_time_header", "${chip_root}/src/crypto", "${chip_root}/src/lib/support", diff --git a/src/protocols/secure_channel/tests/BUILD.gn b/src/protocols/secure_channel/tests/BUILD.gn index 74d71428a5daa4..26d0ec6b84a855 100644 --- a/src/protocols/secure_channel/tests/BUILD.gn +++ b/src/protocols/secure_channel/tests/BUILD.gn @@ -2,8 +2,8 @@ import("//build_overrides/build.gni") import("//build_overrides/chip.gni") import("//build_overrides/nlio.gni") import("//build_overrides/nlunit_test.gni") - import("${chip_root}/build/chip/chip_test_suite.gni") +import("${chip_root}/src/app/icd/icd.gni") chip_test_suite_using_nltest("tests") { output_name = "libSecureChannelTests" @@ -22,6 +22,7 @@ chip_test_suite_using_nltest("tests") { ] public_deps = [ + "${chip_root}/src/app/icd:icd_config", "${chip_root}/src/credentials/tests:cert_test_vectors", "${chip_root}/src/crypto/tests:tests.lib", "${chip_root}/src/lib/core", @@ -36,4 +37,8 @@ chip_test_suite_using_nltest("tests") { ] cflags = [ "-Wconversion" ] + + if (chip_enable_icd_server) { + public_deps += [ "${chip_root}/src/app/icd:configuration-data" ] + } } diff --git a/src/protocols/secure_channel/tests/TestPASESession.cpp b/src/protocols/secure_channel/tests/TestPASESession.cpp index b22a899f7225d0..c7c350fc3c80df 100644 --- a/src/protocols/secure_channel/tests/TestPASESession.cpp +++ b/src/protocols/secure_channel/tests/TestPASESession.cpp @@ -35,6 +35,10 @@ #include #include +#if CHIP_CONFIG_ENABLE_ICD_SERVER +#include // nogncheck +#endif + // This test suite pushes multiple PASESession objects onto the stack for the // purposes of testing device-to-device communication. However, in the real // world, these won't live in a single device's memory. Hence, disable stack @@ -294,7 +298,7 @@ void SecurePairingHandshakeTestCommon(nlTestSuite * inSuite, void * inContext, S #if CHIP_CONFIG_ENABLE_ICD_SERVER == 1 // If running as an ICD, increase waitTimeout to account for the polling interval - waitTimeout += CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL; + waitTimeout += ICDConfigurationData::GetInstance().GetSlowPollingInterval(); #endif // Wait some time so the dropped message will be retransmitted when we drain the IO. diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index 3186e4a4164c4d..506baef354bf3a 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -16023,12 +16023,12 @@ CHIP_ERROR DataModelLogger::LogEvent(const chip::app::EventHeader & header, chip switch (header.mPath.mEventId) { case OvenCavityOperationalState::Events::OperationalError::Id: { - chip::app::Clusters::OvenCavityOperationalState::Events::OperationalError::DecodableType value; + OvenCavityOperationalState::Events::OperationalError::DecodableType value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("OperationalError", 1, value); } case OvenCavityOperationalState::Events::OperationCompletion::Id: { - chip::app::Clusters::OvenCavityOperationalState::Events::OperationCompletion::DecodableType value; + OvenCavityOperationalState::Events::OperationCompletion::DecodableType value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("OperationCompletion", 1, value); }