Skip to content

Latest commit

 

History

History
208 lines (134 loc) · 6.29 KB

File metadata and controls

208 lines (134 loc) · 6.29 KB

Matter: Light bulb

This light bulb sample demonstrates the usage of the :ref:`Matter <ug_matter>` application layer to build a white dimmable light bulb device.

Note

This sample is self-contained and can be tested on its own. However, it is required when testing the :ref:`Matter light switch <matter_light_switch_sample>` sample.

The sample supports the following development kits:

.. table-from-sample-yaml::

The sample uses buttons to test changing the light bulb and device states, and LEDs to show the state of these changes. You can test it in the following ways:

  • Standalone, by using a single DK that runs the light bulb application.
  • Remotely over Thread or Wi-Fi, which requires more devices.

The remote control testing requires a Matter controller that you can configure either on a PC or a mobile device (for remote testing in a network).

The light bulb sample implements the following features:

  • OnOff - The light bulb can be turned on and off.
  • LevelControl - The light bulb can be dimmed to a specific level.

The sample supports the following build configurations:

First LED:
Second LED:

Shows the state of the light bulb. The following states are possible:

  • Solid On - The light bulb is on.
  • Off - The light bulb is off.

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.

First Button:
Second Button:
Changes the light bulb state to the opposite one.

|matter_ble_advertising_auto|

Complete the following steps to test the Light Bulb device using CHIP Tool:

.. rst-class:: numbered-step

Turn on the light bulb

Turn on the light bulb by running the following command:

chip-tool onoff on 1 1

Observe that the |Second LED| is on.

.. rst-class:: numbered-step

Turn off the light bulb

Turn off the light bulb by running the following command:

chip-tool onoff off 1 1

Observe that the |Second LED| is off.

After programming this sample and the :ref:`Matter light switch <matter_light_switch_sample>` sample to the development kits, complete the steps in the following steps to test communication between both devices.

.. rst-class:: numbered-step

Prepare the light switch device

To prepare the light switch device, follow the first three steps in the :ref:`Matter light switch <matter_light_switch_sample>` sample :ref:`prepare_light_switch_for_testing` section.

Note

In this guide, the light bulb device's node ID is 1 and the light switch device's node ID is 2.