Skip to content

Commit 0216949

Browse files
kkasperczyk-nonordicjm
authored andcommitted
samples: matter: Added temperature sensor sample
Added implementation of the Matter temperature sample. Additionally updated related Matter documentation and release notes. Signed-off-by: Kamil Kasperczyk <[email protected]>
1 parent eb7bf10 commit 0216949

File tree

59 files changed

+11356
-11
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+11356
-11
lines changed
572 Bytes
Loading

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,8 @@ Keys samples
351351
Matter samples
352352
--------------
353353

354+
* Added the :ref:`matter_temperature_sensor_sample` sample that demonstrates how to implement and test a Matter temperature sensor device.
355+
354356
* :ref:`matter_lock_sample` sample:
355357

356358
* Added a callback for the auto-relock feature.

doc/nrf/samples/matter.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ The following table lists variants and extensions available out of the box for e
2020
- Window covering
2121
- Thermostat
2222
- Smoke CO alarm
23+
- Temperature sensor
2324
* - FEM support
2425
- ✔
2526
- ✔
@@ -28,6 +29,7 @@ The following table lists variants and extensions available out of the box for e
2829
- ✔
2930
-
3031
-
32+
-
3133
* - DFU support
3234
- ✔
3335
- ✔
@@ -36,6 +38,7 @@ The following table lists variants and extensions available out of the box for e
3638
- ✔
3739
- ✔
3840
- ✔
41+
- ✔
3942
* - Thread support
4043
- ✔
4144
- ✔
@@ -44,6 +47,7 @@ The following table lists variants and extensions available out of the box for e
4447
- ✔
4548
- ✔
4649
- ✔
50+
- ✔
4751
* - :ref:`Thread role <thread_ot_device_types>`
4852
- Router
4953
- SED
@@ -52,6 +56,7 @@ The following table lists variants and extensions available out of the box for e
5256
- SSED
5357
- MED
5458
- SED
59+
- SED
5560
* - :ref:`ICD mode <ug_matter_device_low_power_icd>`
5661
- Not supported
5762
- SIT
@@ -60,6 +65,7 @@ The following table lists variants and extensions available out of the box for e
6065
- SIT
6166
- Not supported
6267
- LIT
68+
- LIT
6369
* - Wi-Fi® support
6470
- ✔
6571
- ✔
@@ -68,6 +74,7 @@ The following table lists variants and extensions available out of the box for e
6874
-
6975
- ✔
7076
-
77+
-
7178
* - Thread and Wi-Fi switching
7279
-
7380
-
@@ -76,6 +83,7 @@ The following table lists variants and extensions available out of the box for e
7683
-
7784
-
7885
-
86+
-
7987
* - Low power configuration by default
8088
-
8189
- ✔
@@ -84,6 +92,7 @@ The following table lists variants and extensions available out of the box for e
8492
- ✔
8593
-
8694
- ✔
95+
- ✔
8796

8897
See the sample documentation pages for instructions about how to enable these variants and extensions.
8998

samples/matter/common/src/zap_samples.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,7 @@
5454
zap_file: samples/matter/manufacturer_specific/src/default_zap/manufacturer_specific.zap
5555
full: true
5656
zcl_file: samples/matter/manufacturer_specific/src/default_zap/zcl.json
57+
58+
# temperature sensor
59+
- name: temperature_sensor
60+
zap_file: samples/matter/temperature_sensor/src/default_zap/temperature_sensor.zap

samples/matter/light_switch/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ config CHIP_ENABLE_ICD_SUPPORT
2929

3030
# Reduce Thread TX output power to 0 dBm for SED device
3131
config OPENTHREAD_DEFAULT_TX_POWER
32-
int
3332
default 0
3433

3534
endif # OPENTHREAD

samples/matter/lock/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ config CHIP_ENABLE_ICD_SUPPORT
126126

127127
# Reduce Thread TX output power to 0 dBm for SED device
128128
config OPENTHREAD_DEFAULT_TX_POWER
129-
int
130129
default 0
131130

132131
endif # OPENTHREAD

samples/matter/smoke_co_alarm/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ config NCS_SAMPLE_MATTER_TEST_EVENT_TRIGGERS_MAX
3131

3232
# Reduce Thread TX output power to 0 dBm for SED device
3333
config OPENTHREAD_DEFAULT_TX_POWER
34-
int
3534
default 0
3635

3736
source "${ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR}/config/nrfconnect/chip-module/Kconfig.features"

samples/matter/smoke_co_alarm/README.rst

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,20 @@ You can enable both methods after :ref:`building and running the sample <matter_
6565
ICD LIT device type
6666
===================
6767

68-
The smoke CO alarm works as a Matter Intermittently Connected Device (ICD) with a :ref:`Long Idle Time (LIT)<ug_matter_device_low_power_icd_sit_lit>`.
68+
.. matter_smoke_co_alarm_sample_lit_start
69+
70+
The device works as a Matter Intermittently Connected Device (ICD) with a :ref:`Long Idle Time (LIT)<ug_matter_device_low_power_icd_sit_lit>`.
6971
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.
7072
It then switches the operation mode to LIT to reduce the power consumption.
7173

74+
In the LIT mode, the device responsiveness is much lower than in the SIT mode.
75+
However, you can request the device to become responsive to, for example, change its configuration.
76+
To do that, you need to use the User Active Mode Trigger (UAT) feature by pressing the appropriate button.
77+
78+
See `User interface`_ for information about how to switch the operation modes.
79+
80+
.. matter_smoke_co_alarm_sample_lit_end
81+
7282
The sample supports ICD Dynamic SIT LIT switching (DSLS) feature to switch between SIT and LIT modes, depending on the used power source.
7383
The device uses the SIT mode, when the wired power source is active.
7484
Otherwise, it switches to the LIT mode, to indicate that it is possible to save the energy, when using a battery power source.
@@ -77,12 +87,6 @@ DSLS support is disabled by default.
7787
To enable it, set the :kconfig:option:`CONFIG_CHIP_ICD_DSLS_SUPPORT` Kconfig option to ``y`` and enable the feature support in the ICD Management cluster's feature map, by setting it to ``0xf`` in the sample's :file:`.zap` file.
7888
Regenerate the source files after modifying the :file:`.zap` file.
7989

80-
In the LIT mode, the device responsiveness is much lower than in the SIT mode.
81-
However, you can request the device to become responsive to, for example, change its configuration.
82-
To do that, you need to use the User Active Mode Trigger (UAT) feature by pressing the appropriate button.
83-
84-
See `User interface`_ for information about how to switch the operation modes.
85-
8690
.. _matter_smoke_co_alarm_network_mode:
8791

8892
Remote testing in a network
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
cmake_minimum_required(VERSION 3.20.0)
8+
9+
find_package(Zephyr HINTS $ENV{ZEPHYR_BASE})
10+
11+
project(matter-temperature-sensor)
12+
13+
# Enable GNU STD support.
14+
include(${ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR}/config/nrfconnect/app/enable-gnu-std.cmake)
15+
16+
# NORDIC SDK APP START
17+
18+
# Include all source files that are located in the Matter common directory.
19+
include(${ZEPHYR_NRF_MODULE_DIR}/samples/matter/common/cmake/source_common.cmake)
20+
21+
# Include Data Model utils
22+
include(${ZEPHYR_NRF_MODULE_DIR}/samples/matter/common/cmake/data_model.cmake)
23+
24+
include(${ZEPHYR_NRF_MODULE_DIR}/samples/matter/common/cmake/zap_helpers.cmake)
25+
ncs_get_zap_parent_dir(ZAP_PARENT_DIR)
26+
27+
target_include_directories(app PRIVATE
28+
src
29+
${ZAP_PARENT_DIR}
30+
)
31+
32+
target_sources(app PRIVATE
33+
src/app_task.cpp
34+
src/main.cpp
35+
)
36+
37+
ncs_configure_data_model()
38+
# NORDIC SDK APP END
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
mainmenu "Matter nRF Connect Temperature Sensor Example Application"
7+
8+
choice OPENTHREAD_NORDIC_LIBRARY_CONFIGURATION
9+
default OPENTHREAD_NORDIC_LIBRARY_MTD
10+
endchoice
11+
12+
choice OPENTHREAD_DEVICE_TYPE
13+
default OPENTHREAD_MTD
14+
endchoice
15+
16+
config CHIP_ENABLE_ICD_SUPPORT
17+
default y
18+
19+
config CHIP_ICD_LIT_SUPPORT
20+
default y
21+
22+
config CHIP_ICD_SIT_SLOW_POLL_LIMIT
23+
default 5000
24+
25+
config CHIP_ICD_REPORT_ON_ACTIVE_MODE
26+
default y
27+
28+
# Reduce Thread TX output power to 0 dBm for SED device
29+
config OPENTHREAD_DEFAULT_TX_POWER
30+
default 0
31+
32+
source "$(ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR)/config/nrfconnect/chip-module/Kconfig.features"
33+
source "$(ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR)/config/nrfconnect/chip-module/Kconfig.defaults"
34+
source "$(ZEPHYR_NRF_MODULE_DIR)/samples/matter/common/src/Kconfig"
35+
source "Kconfig.zephyr"

0 commit comments

Comments
 (0)