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

samples: matter: Added DSLS support to the smoke co alarm #19151

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
32 changes: 22 additions & 10 deletions doc/nrf/protocols/matter/end_product/test_event_triggers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,54 +107,66 @@ The following table lists the available triggers and their activation codes:
The maximum fabric index value depends on the current device's settings.
* - Smoke CO alarm - Smoke critical alarm
- Only for :ref:`Matter Smoke CO Alarm <matter_smoke_co_alarm_sample>`
- Trigger a smoke alarm with critical severity level
- Trigger a smoke alarm with critical severity level.
- ``0x005c00000000009c``
- No additional value supported.
* - Smoke CO alarm - Smoke alarm clean
- Only for :ref:`Matter Smoke CO Alarm <matter_smoke_co_alarm_sample>`
- Trigger an action that ceases smoke alarm
- Trigger an action that ceases smoke alarm.
- ``0x005c0000000000a0``
- No additional value supported.
* - Smoke CO alarm - CO critical alarm
- Only for :ref:`Matter Smoke CO Alarm <matter_smoke_co_alarm_sample>`
- Trigger a CO alarm with critical severity level
- Trigger a CO alarm with critical severity level.
- ``0x005c00000000009d``
- No additional value supported.
* - Smoke CO alarm - CO alarm clean
- Only for :ref:`Matter Smoke CO Alarm <matter_smoke_co_alarm_sample>`
- Trigger an action that ceases CO alarm
- Trigger an action that ceases CO alarm.
- ``0x005c0000000000a1``
- No additional value supported.
* - Smoke CO alarm - battery low level alarm
- Only for :ref:`Matter Smoke CO Alarm <matter_smoke_co_alarm_sample>`
- Trigger a battery low level alarm
- Trigger a battery low level alarm.
- ``0x005c00000000009e``
- No additional value supported.
* - Smoke CO alarm - battery low level alarm clean
- Only for :ref:`Matter Smoke CO Alarm <matter_smoke_co_alarm_sample>`
- Trigger an action that ceases battery low level alarm
- Trigger an action that ceases battery low level alarm.
- ``0x005c0000000000a5``
- No additional value supported.
* - Smoke CO alarm - hardware fault alarm
- Only for :ref:`Matter Smoke CO Alarm <matter_smoke_co_alarm_sample>`
- Trigger a hardware fault alarm
- Trigger a hardware fault alarm.
- ``0x005c000000000093``
- No additional value supported.
* - Smoke CO alarm - hardware fault alarm clean
- Only for :ref:`Matter Smoke CO Alarm <matter_smoke_co_alarm_sample>`
- Trigger an action that ceases hardware fault alarm
- Trigger an action that ceases hardware fault alarm.
- ``0x005c0000000000a3``
- No additional value supported.
* - Smoke CO alarm - end of service alarm
- Only for :ref:`Matter Smoke CO Alarm <matter_smoke_co_alarm_sample>`
- Trigger an end of service alarm
- Trigger an end of service alarm.
- ``0x005c00000000009a``
- No additional value supported.
* - Smoke CO alarm - end of service alarm clean
- Only for :ref:`Matter Smoke CO Alarm <matter_smoke_co_alarm_sample>`
- Trigger an action that ceases end of service alarm
- Trigger an action that ceases end of service alarm.
- ``0x005c0000000000aa``
- No additional value supported.
* - Power source on
- Only for :ref:`Matter Smoke CO Alarm <matter_smoke_co_alarm_sample>`
- Trigger an action that changes power source state to active.
- ``0xFFFFFFFF80000000`` - ``0xFFFFFFFF80000001``
- The range of ``0x0`` - ``0x1`` is the endpoint ID that has power source cluster instance enabled.
kkasperczyk-no marked this conversation as resolved.
Show resolved Hide resolved
An endpoint with ID ``0x0`` uses a wired power source and endpoint with ID ``0x1`` uses a battery power source.
* - Power source off
- Only for :ref:`Matter Smoke CO Alarm <matter_smoke_co_alarm_sample>`
- Trigger an action that changes power source state to unavailable.
- ``0xFFFFFFFF80010000`` - ``0xFFFFFFFF80010001``
- The range of ``0x0`` - ``0x1`` is the endpoint ID that has power source cluster instance enabled.
An endpoint with ID ``0x0`` uses a wired power source and endpoint with ID ``0x1`` uses a battery power source.
* - Door lock jammed
- :kconfig:option:`CONFIG_CHIP_DEVICE_PRODUCT_ID` = ``32774``
- Simulate the jammed lock state.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ To configure the LIT, CIP, UAT or DSLS, use the following Kconfig options:
The DSLS support allows the application to dynamically switch between SIT and LIT modes, as long as the requirements for these modes are met.
This option is by default disabled for the LIT device.

You can enable optional reporting on entering the active mode.
When enabled, the device sends a data report to the subscribed devices.
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.
ArekBalysNordic marked this conversation as resolved.
Show resolved Hide resolved
To enable this functionality, set the :kconfig:option:`CONFIG_CHIP_ICD_REPORT_ON_ACTIVE_MODE` Kconfig option to ``y``.

Enable low power mode for the selected networking technology
************************************************************

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,10 @@ Matter samples

* 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.

* :ref:`matter_smoke_co_alarm_sample` sample:

* Added support for ICD dynamic SIT LIT switching (DSLS).

Networking samples
------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@

# Enable LIT ICD configuration
CONFIG_CHIP_ICD_LIT_SUPPORT=y
CONFIG_CHIP_ICD_SIT_SLOW_POLL_LIMIT=5000
CONFIG_NCS_SAMPLE_MATTER_ZAP_FILES_PATH="snippets/lit_icd"
3 changes: 3 additions & 0 deletions samples/matter/smoke_co_alarm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ config CHIP_ENABLE_ICD_SUPPORT
config CHIP_ICD_LIT_SUPPORT
default y

config CHIP_ICD_SIT_SLOW_POLL_LIMIT
default 5000

# Increase the supported event triggers due to the multiple alarm triggers
config NCS_SAMPLE_MATTER_TEST_EVENT_TRIGGERS_MAX
default 12
Expand Down
16 changes: 16 additions & 0 deletions samples/matter/smoke_co_alarm/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ The implementation demonstrated in this sample supports issuing the following al
* 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.
* Battery level alert - Issued if the device battery level is too low.

The sample implements two instances of a Power Source cluster:

* Wired power source on the endpoint 0
* Battery power source on the endpoint 1

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.
The power source changes are emulated using :ref:`test event triggers <ug_matter_test_event_triggers>`.
Every power source can be independently enabled or disabled using a dedicated test event trigger.

You can test the device remotely over a Thread network, which requires more devices.

The remote control testing requires a Matter controller that you can configure either on a PC or a mobile device.
Expand All @@ -60,6 +69,13 @@ The smoke CO alarm works as a Matter Intermittently Connected Device (ICD) with
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.
It then switches the operation mode to LIT to reduce the power consumption.

The sample supports ICD Dynamic SIT LIT switching (DSLS) feature to switch between SIT and LIT modes, depending on the used power source.
The device uses the SIT mode, when the wired power source is active.
Otherwise, it switches to the LIT mode, to indicate that it is possible to save the energy, when using a battery power source.
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).
DSLS support is enabled by default.
To disable it, set the :kconfig:option:`CONFIG_CHIP_ICD_DSLS_SUPPORT` Kconfig option to ``n``.

In the LIT mode, the device responsiveness is much lower than in the SIT mode.
However, you can request the device to become responsive to, for example, change its configuration.
To do that, you need to use the User Active Mode Trigger (UAT) feature by pressing the appropriate button.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5208,7 +5208,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "3",
"defaultValue": "7",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand All @@ -5224,7 +5224,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"defaultValue": "3",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -5253,4 +5253,4 @@
"parentEndpointIdentifier": null
}
]
}
}
Loading
Loading