Skip to content

Commit

Permalink
Add Smoke CO Cluster to All Clusters App (#27124)
Browse files Browse the repository at this point in the history
* Smoke/CO: Add Cluster to All Clusters App

Implement SelfTestRequest in all-clusters-app

* Smoke/CO: Update zap

Update endOfServiceAlert
Add Smoke CO Alarm events

* Modify the flash settings of nrf52840dk_nrf52840

* Modify the flash settings of nrf52840dk_nrf52840

* Modify the flash settings of nrf52840dk_nrf52840

* Revert "Modify the flash settings of nrf52840dk_nrf52840"

This reverts commit 3ab364b.

* Revert "Modify the flash settings of nrf52840dk_nrf52840"

This reverts commit 4fc1ff9.

* Revert "Modify the flash settings of nrf52840dk_nrf52840"

This reverts commit 136efe7.

* Disable nrf testing DFU in CI for all-clusters-app

* Revert "Disable nrf testing DFU in CI for all-clusters-app"

This reverts commit 4a7525b.

* Add smco-stub to Open IoT SDK

---------

Co-authored-by: Hare <renilr0@outlook.com>
  • Loading branch information
2 people authored and pull[bot] committed Jan 12, 2024
1 parent 0436857 commit 1641796
Show file tree
Hide file tree
Showing 29 changed files with 631 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ jobs:
src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/scene.xml \
src/app/zap-templates/zcl/data-model/chip/smoke-co-alarm-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/software-diagnostics-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/switch-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/target-navigator-cluster.xml \
Expand Down
133 changes: 133 additions & 0 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2542,6 +2542,110 @@ server cluster AirQuality = 91 {
readonly attribute int16u clusterRevision = 65533;
}

/** This cluster provides an interface for observing and managing the state of smoke and CO alarms. */
server cluster SmokeCoAlarm = 92 {
enum AlarmStateEnum : ENUM8 {
kNormal = 0;
kWarning = 1;
kCritical = 2;
}

enum ContaminationStateEnum : ENUM8 {
kNormal = 0;
kLow = 1;
kWarning = 2;
kCritical = 3;
}

enum EndOfServiceEnum : ENUM8 {
kNormal = 0;
kExpired = 1;
}

enum ExpressedStateEnum : ENUM8 {
kNormal = 0;
kSmokeAlarm = 1;
kCOAlarm = 2;
kBatteryAlert = 3;
kTesting = 4;
kHardwareFault = 5;
kEndOfService = 6;
kInterconnectSmoke = 7;
kInterconnectCO = 8;
}

enum MuteStateEnum : ENUM8 {
kNotMuted = 0;
kMuted = 1;
}

enum SensitivityEnum : ENUM8 {
kHigh = 0;
kStandard = 1;
kLow = 2;
}

bitmap Feature : BITMAP32 {
kSmokeAlarm = 0x1;
kCOAlarm = 0x2;
}

info event SmokeAlarm = 0 {
}

info event COAlarm = 1 {
}

info event LowBattery = 2 {
}

info event HardwareFault = 3 {
}

info event EndOfService = 4 {
}

info event SelfTestComplete = 5 {
}

info event AlarmMuted = 6 {
}

info event MuteEnded = 7 {
}

info event InterconnectSmokeAlarm = 8 {
}

info event InterconnectCOAlarm = 9 {
}

info event AllClear = 10 {
}

readonly attribute ExpressedStateEnum expressedState = 0;
readonly attribute AlarmStateEnum smokeState = 1;
readonly attribute AlarmStateEnum COState = 2;
readonly attribute AlarmStateEnum batteryAlert = 3;
readonly attribute 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 SensitivityEnum sensitivityLevel = 11;
readonly attribute epoch_s expiryDate = 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;

command SelfTestRequest(): DefaultSuccess = 0;
}

/** 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 {
enum ErrorStateEnum : ENUM8 {
Expand Down Expand Up @@ -6557,6 +6661,35 @@ endpoint 1 {
ram attribute clusterRevision default = 1;
}

server cluster SmokeCoAlarm {
emits event SmokeAlarm;
emits event COAlarm;
emits event LowBattery;
emits event HardwareFault;
emits event EndOfService;
emits event SelfTestComplete;
emits event AlarmMuted;
emits event MuteEnded;
emits event InterconnectSmokeAlarm;
emits event InterconnectCOAlarm;
emits event AllClear;
persist attribute expressedState default = 0;
persist attribute smokeState default = 0;
persist attribute COState default = 0;
persist attribute batteryAlert default = 0;
persist attribute deviceMuted default = 0;
ram attribute testInProgress default = 0;
persist attribute hardwareFaultAlert default = 0;
persist attribute endOfServiceAlert default = 0;
ram attribute interconnectSmokeAlarm default = 0;
ram attribute interconnectCOAlarm default = 0;
ram attribute contaminationState default = 0;
ram attribute sensitivityLevel default = 1;
ram attribute expiryDate default = 0;
ram attribute featureMap default = 3;
ram attribute clusterRevision default = 1;
}

server cluster OperationalState {
emits event OperationalError;
emits event OperationCompletion;
Expand Down
Loading

0 comments on commit 1641796

Please sign in to comment.