This sample demonstrates the usage of the :ref:`Matter <ug_matter>` application layer to build a window covering device.
The sample supports the following development kits:
.. table-from-sample-yaml::
The sample uses buttons for gradually changing the position and movement mode of the window cover, and LEDs to show the state of these changes. The following movement modes are available:
- Lift - In this movement mode, the window cover moves up and down.
- Tilt - In this movement mode, the window cover slats are tilted forward or backward without the cover moving vertically.
See User interface for information about how to switch the movement modes.
The window covering sample implements the following features:
- :ref:`SSED device type <matter_window_covering_sample_ssed>` - The window cover can operate as a Thread Synchronized Sleepy End Device (SSED).
You can enable the Thread Synchronized Sleepy End Device (SSED) support by adding an extra argument to the build command. For details, see the :ref:`Thread SSED support <matter_window_covering_sample_ssed_support>` section.
The sample supports the following build configurations:
.. toggle::
You have the following two ways to enable the Thread SSED support:
.. tabs::
.. group-tab:: |nRFVSC|
Add ``-DEXTRA_CONF_FILE=ssed.conf`` to :guilabel:`Extra CMake arguments` in your build configuration.
.. group-tab:: Command line
Run the following command with *board_target* replaced with the board target name:
.. parsed-literal::
:class: highlight
west build -b *board_target* -p -- -DEXTRA_CONF_FILE=ssed.conf
- First LED:
- Second LED:
Indicates the lift position of the window cover, which is represented by the brightness of the LED. The brightness level ranges from
0to255, where the brightness level set to0(switched off LED) indicates a fully opened window cover (lifted) and the brightness level set to255indicates a fully closed window cover (lowered).Additionally, the LED starts blinking evenly (500 ms on/500 ms off) when the Identify command of the Identify cluster is received on the endpoint
1. The command's argument can be used to specify the duration of the effect.- Third LED:
- Indicates the tilt position of the window cover, which is represented by the brightness of the LED.
The brightness level ranges from
0to255, where the brightness level set to0(switched off LED) indicates a fully opened window cover (tilted to a horizontal position) and the brightness level set to255indicates a fully closed window cover (tilted to a vertical position). - First Button:
- Second Button:
- When pressed once and released, it moves the window cover towards the open position by one step. Depending on the movement mode of the cover (see Overview), the button decreases the brightness of either LED 2 for the lift mode or LED 3 for the tilt mode.
- Third Button:
- When pressed once and released, it moves the cover towards the closed position by one step. Depending on the movement mode of the cover (see Overview), the button increases the brightness of either LED 2 for the lift mode or LED 3 for the tilt mode.
- Second and Third Buttons:
- When pressed at the same time, they toggle the cover movement mode between lift and tilt. After each device reset, the mode is set to lift by default.
Note
Completely opening and closing the cover requires 20 button presses (steps). Each step takes approximately 200 ms to simulate the real window cover movement.
The cover position and the LED brightness values are stored in non-volatile memory and are restored after every device reset. After the firmware update or factory reset both LEDs are switched off by default, which corresponds to the cover being fully open, both lift-wise and tilt-wise.
|matter_ble_advertising_auto|
Complete the following steps to test the Window covering device using CHIP Tool:
.. rst-class:: numbered-step
Observe that |Second LED| and |Third LED| are turned off, which means that the window cover is fully open
.. rst-class:: numbered-step
chip-tool windowcovering go-to-lift-percentage 100 1 1
|Second LED| lights up and its brightness increases until it reaches full brightness.
.. rst-class:: numbered-step
chip-tool windowcovering go-to-tilt-percentage 100 1 1
|Third LED| light up and its brightness increases until it reaches full brightness.
Complete the following steps to test the Window covering device using the DK buttons:
.. rst-class:: numbered-step
Observe that |Second LED| and |Third LED| are turned off, which means that the window cover is fully open.
.. rst-class:: numbered-step
Press the |Third Button| 20 times to fully close the cover in the lift movement mode. |Second LED| lights up and its brightness increases with each button press until it reaches full brightness.
.. rst-class:: numbered-step
Press the |Second Button| 20 times to fully lift the cover up by running the following command: The brightness of |Second LED| decreases with each button press until the LED turns off.
.. rst-class:: numbered-step
Press the |Second Button| and the |Third Button| together to switch into the tilt movement mode
.. rst-class:: numbered-step
Press the |Third Button| 20 times to fully tilt the cover's slats into the closed position. |Third LED| light up and its brightness increases with each button press until it reaches full brightness.
.. rst-class:: numbered-step
Press the |Second Button| 20 times to fully tilt the cover into the open position. The brightness of |Third LED| decreases with each button press until the LED turns off.