Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Thanks @greg-fer.

Co-authored-by: Grzegorz Ferenc <41291385+greg-fer@users.noreply.github.com>
  • Loading branch information
markus-becker-tridonic-com and greg-fer committed Jun 23, 2022
1 parent 07b5884 commit cd1b9e1
Showing 1 changed file with 24 additions and 22 deletions.
46 changes: 24 additions & 22 deletions examples/light-switch-app/nrfconnect/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,38 +62,37 @@ and [Zephyr RTOS](https://zephyrproject.org/). Visit Matter's
[nRF Connect platform overview](../../../docs/guides/nrfconnect_platform_overview.md)
to read more about the platform structure and dependencies.

In matter there are 2 types of light switch device types:
In Matter, the following types of light switch devices are available:

- On/Off Light Switch, Dimmer Switch, Color Dimmer Switch, Control Bridge
- Generic Switch
- Group 1: On/Off Light Switch, Dimmer Switch, Color Dimmer Switch, Control Bridge
- Group 2: Generic Switch

The first type uses Client application clusters (e.g. Level Control) and
Bindings to send commands to the server clusters. This type of switch is on
endpoint 1 of this example.
The first type (here referred to as Group 1) uses client application clusters (for example, Level Control) and
bindings to send commands to the server clusters. This type of switch is on the endpoint 1 of this example.

With the second type controllers can use event subscriptions to be informed
about changes on the Switch server cluster. This type of switch is on endpoint 2
With the second type (Group 2), controllers can use event subscriptions to be informed
about changes on the switch server cluster. This type of switch is on the endpoint 2
of this example.

## On/Off Light Switch, Dimmer Switch, Color Dimmer Switch, Control Bridge
### Group 1 light switch devices overview

A light switch device is a simple embedded controller, which has the ability to
control lighting devices, such as light bulbs or LEDs. After commissioning into
a Matter network, the light switch device does not know what it can control. In
other words, it has no information about another device being connected to the
same network. You must provide this information to the light switch through the
process called binding, which links clusters and endpoints on both devices, so
that the devices can interact with each other. This functionality is on endpoint
1 and triggered by button 2.
that the devices can interact with each other. This functionality is on the endpoint
1 and triggered by **Button 2**.

## Generic Switch
### Generic Switch

The Generic Switch on endpoint 2 offers the Switch server cluster. It implements
the features Momentary Switch (`MS`) and Momentary Switch Release (`MSR`), thus
it will send event notifications `InitialPress` and `ShortRelease` if button 3
The Generic Switch on the endpoint 2 offers the switch server cluster. It implements
the Momentary Switch (``MS``) and Momentary Switch Release (``MSR``) features.
For this reason, it sends event notifications ``InitialPress`` and ``ShortRelease`` if **Button 3**
of the DK is pressed and released.

## Common settings
### Common example settings

The Matter device that runs the light switch application is controlled by the
Matter controller device over the Thread protocol. By default, the Matter device
Expand Down Expand Up @@ -300,8 +299,8 @@ platform image.

**Button 3** can be used for the following purposes:

- _Pressed once_ &mdash; Changes the value of the attribute CurrentPosition
and (if subscribed) will send the event notifications to the controller.
- _Pressed once_ &mdash; Changes the value of the attribute ``CurrentPosition``
and (if subscribed) sends the event notifications to the controller.

**Button 4** can be used to start the NFC tag emulation and enable Bluetooth LE
advertising for the predefined period of time (15 minutes by default).
Expand Down Expand Up @@ -740,17 +739,20 @@ use [light switch buttons](#buttons) or

### Testing the Generic Switch

Use the interactive mode of chip-tool:

To test the Generic Switch, complete the following steps:

1. Enter the interactive mode of the CHIP Tool:

chip-tool interactive start

Subscribe to the initial-press and short-release
2. Subscribe to the ``InitialPress`` and ``ShortRelease`` event notifications:

>>> switch subscribe-event initial-press 1 20 <node_id> 2 --is-urgent true
>>> switch subscribe-event initial-press 1 20 <node_id> 2 --is-urgent true

When pressing and releasing button 3, both events should be sent to the
controller.
3. Press **Button 3** to test the new configuration.
When pressing and releasing **Button 3**, both events should be sent to the controller.

### Testing Device Firmware Upgrade

Expand Down

0 comments on commit cd1b9e1

Please sign in to comment.