Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Smoke CO Cluster to All Clusters App #27124

Merged
merged 14 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/examples-nrfconnect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ concurrency:

env:
CHIP_NO_LOG_TIMESTAMPS: true

jobs:
nrfconnect:
name: nRF Connect SDK
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
/tmp/bloat_reports/
- name: Build example nRF Connect SDK All Clusters App on nRF52840 DK
run: |
scripts/examples/nrfconnect_example.sh all-clusters-app nrf52840dk_nrf52840 -DCONF_FILE=prj_dfu.conf
scripts/examples/nrfconnect_example.sh all-clusters-app nrf52840dk_nrf52840
bzbarsky-apple marked this conversation as resolved.
Show resolved Hide resolved
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
nrfconnect nrf52840dk_nrf52840 all-clusters-app \
examples/all-clusters-app/nrfconnect/build/zephyr/zephyr.elf \
Expand Down
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;
}

/** Attributes and commands for monitoring HEPA filters in a device */
server cluster HepaFilterMonitoring = 113 {
enum ChangeIndicationEnum : ENUM8 {
Expand Down Expand Up @@ -6341,6 +6445,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 HepaFilterMonitoring {
ram attribute condition;
ram attribute degradationDirection;
Expand Down
Loading
Loading