Skip to content

Commit eaa215e

Browse files
kkasperczyk-nomaciejbaczmanski
authored andcommitted
samples: matter: Added DSLS support to the smoke co alarm
Integrated and enabled ICD DSLS feature with the smoke CO alarm sample. Additionally, added documentation of test event triggers dedicated for switching the power source. Signed-off-by: Kamil Kasperczyk <[email protected]>
1 parent c4e70ba commit eaa215e

File tree

10 files changed

+605
-470
lines changed

10 files changed

+605
-470
lines changed

doc/nrf/protocols/matter/end_product/test_event_triggers.rst

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,54 +107,66 @@ The following table lists the available triggers and their activation codes:
107107
The maximum fabric index value depends on the current device's settings.
108108
* - Smoke CO alarm - Smoke critical alarm
109109
- Only for :ref:`Matter Smoke CO Alarm <matter_smoke_co_alarm_sample>`
110-
- Trigger a smoke alarm with critical severity level
110+
- Trigger a smoke alarm with critical severity level.
111111
- ``0x005c00000000009c``
112112
- No additional value supported.
113113
* - Smoke CO alarm - Smoke alarm clean
114114
- Only for :ref:`Matter Smoke CO Alarm <matter_smoke_co_alarm_sample>`
115-
- Trigger an action that ceases smoke alarm
115+
- Trigger an action that ceases smoke alarm.
116116
- ``0x005c0000000000a0``
117117
- No additional value supported.
118118
* - Smoke CO alarm - CO critical alarm
119119
- Only for :ref:`Matter Smoke CO Alarm <matter_smoke_co_alarm_sample>`
120-
- Trigger a CO alarm with critical severity level
120+
- Trigger a CO alarm with critical severity level.
121121
- ``0x005c00000000009d``
122122
- No additional value supported.
123123
* - Smoke CO alarm - CO alarm clean
124124
- Only for :ref:`Matter Smoke CO Alarm <matter_smoke_co_alarm_sample>`
125-
- Trigger an action that ceases CO alarm
125+
- Trigger an action that ceases CO alarm.
126126
- ``0x005c0000000000a1``
127127
- No additional value supported.
128128
* - Smoke CO alarm - battery low level alarm
129129
- Only for :ref:`Matter Smoke CO Alarm <matter_smoke_co_alarm_sample>`
130-
- Trigger a battery low level alarm
130+
- Trigger a battery low level alarm.
131131
- ``0x005c00000000009e``
132132
- No additional value supported.
133133
* - Smoke CO alarm - battery low level alarm clean
134134
- Only for :ref:`Matter Smoke CO Alarm <matter_smoke_co_alarm_sample>`
135-
- Trigger an action that ceases battery low level alarm
135+
- Trigger an action that ceases battery low level alarm.
136136
- ``0x005c0000000000a5``
137137
- No additional value supported.
138138
* - Smoke CO alarm - hardware fault alarm
139139
- Only for :ref:`Matter Smoke CO Alarm <matter_smoke_co_alarm_sample>`
140-
- Trigger a hardware fault alarm
140+
- Trigger a hardware fault alarm.
141141
- ``0x005c000000000093``
142142
- No additional value supported.
143143
* - Smoke CO alarm - hardware fault alarm clean
144144
- Only for :ref:`Matter Smoke CO Alarm <matter_smoke_co_alarm_sample>`
145-
- Trigger an action that ceases hardware fault alarm
145+
- Trigger an action that ceases hardware fault alarm.
146146
- ``0x005c0000000000a3``
147147
- No additional value supported.
148148
* - Smoke CO alarm - end of service alarm
149149
- Only for :ref:`Matter Smoke CO Alarm <matter_smoke_co_alarm_sample>`
150-
- Trigger an end of service alarm
150+
- Trigger an end of service alarm.
151151
- ``0x005c00000000009a``
152152
- No additional value supported.
153153
* - Smoke CO alarm - end of service alarm clean
154154
- Only for :ref:`Matter Smoke CO Alarm <matter_smoke_co_alarm_sample>`
155-
- Trigger an action that ceases end of service alarm
155+
- Trigger an action that ceases end of service alarm.
156156
- ``0x005c0000000000aa``
157157
- No additional value supported.
158+
* - Power source on
159+
- Only for :ref:`Matter Smoke CO Alarm <matter_smoke_co_alarm_sample>`
160+
- Trigger an action that changes power source state to active.
161+
- ``0xFFFFFFFF80000000`` - ``0xFFFFFFFF80000001``
162+
- The range of ``0x0`` - ``0x1`` is the endpoint ID that has power source cluster instance enabled.
163+
An endpoint with ID ``0x0`` uses a wired power source and endpoint with ID ``0x1`` uses a battery power source.
164+
* - Power source off
165+
- Only for :ref:`Matter Smoke CO Alarm <matter_smoke_co_alarm_sample>`
166+
- Trigger an action that changes power source state to unavailable.
167+
- ``0xFFFFFFFF80010000`` - ``0xFFFFFFFF80010001``
168+
- The range of ``0x0`` - ``0x1`` is the endpoint ID that has power source cluster instance enabled.
169+
An endpoint with ID ``0x0`` uses a wired power source and endpoint with ID ``0x1`` uses a battery power source.
158170
* - Door lock jammed
159171
- :kconfig:option:`CONFIG_CHIP_DEVICE_PRODUCT_ID` = ``32774``
160172
- Simulate the jammed lock state.

doc/nrf/protocols/matter/getting_started/low_power_configuration.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ To configure the LIT, CIP, UAT or DSLS, use the following Kconfig options:
119119
The DSLS support allows the application to dynamically switch between SIT and LIT modes, as long as the requirements for these modes are met.
120120
This option is by default disabled for the LIT device.
121121

122+
You can enable optional reporting on entering the active mode.
123+
When enabled, the device sends a data report to the subscribed devices.
124+
This could be useful especially in the combination with the User Active Mode Trigger (UAT) feature, to inform the subscribed Matter controller that the user triggered an ICD to enter the active mode.
125+
To enable this functionality, set the :kconfig:option:`CONFIG_CHIP_ICD_REPORT_ON_ACTIVE_MODE` Kconfig option to ``y``.
126+
122127
Enable low power mode for the selected networking technology
123128
************************************************************
124129

doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,10 @@ Matter samples
393393

394394
* Updated the internal configuration for the :ref:`zephyr:nrf54l15dk_nrf54l15` target to use the DFU image compression and provide more memory space for the application.
395395

396+
* :ref:`matter_smoke_co_alarm_sample` sample:
397+
398+
* Added support for ICD dynamic SIT LIT switching (DSLS).
399+
396400
Networking samples
397401
------------------
398402

samples/matter/light_switch/snippets/lit_icd/lit_icd.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66

77
# Enable LIT ICD configuration
88
CONFIG_CHIP_ICD_LIT_SUPPORT=y
9+
CONFIG_CHIP_ICD_SIT_SLOW_POLL_LIMIT=5000
910
CONFIG_NCS_SAMPLE_MATTER_ZAP_FILES_PATH="snippets/lit_icd"

samples/matter/smoke_co_alarm/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ config CHIP_ENABLE_ICD_SUPPORT
1919
config CHIP_ICD_LIT_SUPPORT
2020
default y
2121

22+
config CHIP_ICD_SIT_SLOW_POLL_LIMIT
23+
default 5000
24+
2225
# Increase the supported event triggers due to the multiple alarm triggers
2326
config NCS_SAMPLE_MATTER_TEST_EVENT_TRIGGERS_MAX
2427
default 12

samples/matter/smoke_co_alarm/README.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,15 @@ The implementation demonstrated in this sample supports issuing the following al
4646
* End of service alert - Issued if the device service was ended either by the expiration date or other physical conditions, and it needs to be replaced.
4747
* Battery level alert - Issued if the device battery level is too low.
4848

49+
The sample implements two instances of a Power Source cluster:
50+
51+
* Wired power source on the endpoint 0
52+
* Battery power source on the endpoint 1
53+
54+
The usage of power sources is implemented with a preference to select wired power source and switch to battery power source, only if the wired one is not available.
55+
The power source changes are emulated using :ref:`test event triggers <ug_matter_test_event_triggers>`.
56+
Every power source can be independently enabled or disabled using a dedicated test event trigger.
57+
4958
You can test the device remotely over a Thread network, which requires more devices.
5059

5160
The remote control testing requires a Matter controller that you can configure either on a PC or a mobile device.
@@ -60,6 +69,13 @@ The smoke CO alarm works as a Matter Intermittently Connected Device (ICD) with
6069
The device starts operation in the Short Idle Time (SIT) mode and remains in it until it is commissioned to the Matter fabric and registers the first ICD client.
6170
It then switches the operation mode to LIT to reduce the power consumption.
6271

72+
The sample supports ICD Dynamic SIT LIT switching (DSLS) feature to switch between SIT and LIT modes, depending on the used power source.
73+
The device uses the SIT mode, when the wired power source is active.
74+
Otherwise, it switches to the LIT mode, to indicate that it is possible to save the energy, when using a battery power source.
75+
Dynamic switching is possible only if the ICD device meets all criteria for operating in the LIT mode (it has at least one client registered).
76+
DSLS support is enabled by default.
77+
To disable it, set the :kconfig:option:`CONFIG_CHIP_ICD_DSLS_SUPPORT` Kconfig option to ``n``.
78+
6379
In the LIT mode, the device responsiveness is much lower than in the SIT mode.
6480
However, you can request the device to become responsive to, for example, change its configuration.
6581
To do that, you need to use the User Active Mode Trigger (UAT) feature by pressing the appropriate button.

samples/matter/smoke_co_alarm/src/default_zap/smoke_co_alarm.zap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5208,7 +5208,7 @@
52085208
"storageOption": "RAM",
52095209
"singleton": 0,
52105210
"bounded": 0,
5211-
"defaultValue": "3",
5211+
"defaultValue": "7",
52125212
"reportable": 1,
52135213
"minInterval": 1,
52145214
"maxInterval": 65534,
@@ -5224,7 +5224,7 @@
52245224
"storageOption": "RAM",
52255225
"singleton": 0,
52265226
"bounded": 0,
5227-
"defaultValue": "1",
5227+
"defaultValue": "3",
52285228
"reportable": 1,
52295229
"minInterval": 1,
52305230
"maxInterval": 65534,
@@ -5253,4 +5253,4 @@
52535253
"parentEndpointIdentifier": null
52545254
}
52555255
]
5256-
}
5256+
}

0 commit comments

Comments
 (0)