Skip to content

docs: samples: light switch: initial sample docs#7

Open
Adam-Maciuga wants to merge 3 commits into
nrfconnect:mainfrom
Adam-Maciuga:docs
Open

docs: samples: light switch: initial sample docs#7
Adam-Maciuga wants to merge 3 commits into
nrfconnect:mainfrom
Adam-Maciuga:docs

Conversation

@Adam-Maciuga

Copy link
Copy Markdown
Contributor

Added initial docs to both samples.
More details will be added while adding new features
Stack docs will be added in another PR

Comment thread samples/light_switch_actuator/README.rst Outdated
Comment thread samples/light_switch_actuator/README.rst Outdated
Comment thread samples/light_switch_actuator/README.rst Outdated
Comment thread samples/light_switch_actuator/README.rst Outdated
Comment thread samples/light_switch_actuator/README.rst Outdated
@kkasperczyk-no kkasperczyk-no requested a review from b-gent June 18, 2026 11:53

@ArekBalysNordic ArekBalysNordic left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation will be able to build after resolving the following problems and rebased with commit with the code, because one Kconfig is missing.

@ArekBalysNordic

Copy link
Copy Markdown
Collaborator

@Adam-Maciuga I've provided the fixes above. However, I did it only to check Doc build. Feel free to do it as you want and remove the last commit. The only one commit that should be left here is the one with documentation build workflows.

@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown

Documentation Preview

The documentation has been built successfully. You can view the preview here: preview

Generated at: 2026-06-23 12:45:00 UTC with commit d3f939d.

Expand to view changed pages
File Preview
samples/light_switch_actuator/README.rst View
samples/light_switch_sensor/README.rst View

Note: The preview will be available after GitHub Pages deployment completes (usually 1-2 minutes). Ensure that generated at timestamp is up to date. If the Pull Request is stale for more than 30 days, the preview may be deleted. In this case, please update the Pull Request, or re-run the Build Documentation workflow to generate a new preview.


The sample currently works only with hardcoded commissioning enabled (the :kconfig:option:`CONFIG_KNX_HARDCODED_COMMISSIONING` Kconfig option).
On boot, the sample applies a fixed KNX commissioning profile, which includes the individual address, the group object and publisher tables, and a shared group OSCORE key.
OSCORE (Object Security for Constrained RESTful Environments) protects KNX IoT messages by encrypting and authenticating them at the application layer.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's change a bit shortcut introduction:

"...the group object and publisher tables, and a shared group OSCORE (Object Security for Constrained RESTful Environments) key. The OSCORE protects ..."

The sample currently works only with hardcoded commissioning enabled (the :kconfig:option:`CONFIG_KNX_HARDCODED_COMMISSIONING` Kconfig option).
On boot, the sample applies a fixed KNX commissioning profile, which includes the individual address, the group object and publisher tables, and a shared group OSCORE key.
OSCORE (Object Security for Constrained RESTful Environments) protects KNX IoT messages by encrypting and authenticating them at the application layer.
In this sample, the shared group OSCORE key lets the actuator and sensor exchange protected messages without the `ETS tool <https://www.knx.org/knx-en/for-professionals/software/ets6/>` or a Thread commissioner.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link does not render properly. You have to add it to docs/links.txt and use ref symbol here.

Indicates the network and KNX service status.
The LED turns on when the Thread network is up and the KNX service has been published.

LED 2:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing description for button 2 that is used to change the light state.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is the sensor that changes the light state:
light_switch_sensor/README.rst

Button 2:
   Toggles the switch on/off (``soo``) datapoint of the first channel and transmits it to the bound group.

LED 1:
Indicates the network and KNX service status.
The LED turns on when the Thread network is up and the KNX service has been published.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing description for LED 2 that represents the light state.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is the actuator that represents the light state:
light_switch_actuator/README.rst

LED 2:
   Indicates the switched load (light) state of the first channel.
   The LED follows the received ``soo`` value: it turns on when the switch state is on, and off when it is off.

The LED turns on when the Thread network is up and the KNX service has been published.

LED 2:
Indicates the switched load (light) state of the first channel.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this LED be described for the sensor? I think there is no point to represent light state on the actuator

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You got it the other way around, the actuator is the device that does things (turns on lights or other machinery) so its state is represented as this led, while the sensor, senses the environment (for example button state)

Adam-Maciuga and others added 3 commits June 23, 2026 14:43
Documentation fot the light swich samples
Both the sensor and actuator docs are created

Signed-off-by: Adam Maciuga <adam.maciuga@nordicsemi.no>
Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
Excluded documentation changes from triggering building samples.
Assigned CODEOWNERS to txt and rst files.

Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
Configuration
*************

|config|

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the 'configure_application' link does not resolve properly but it is outside the scope of this pr


The sample supports the following development kits:

.. table-from-sample-yaml::

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also outside of the scope of this pr - 'Hardware platform' should not display as 'Developing with...' but a concrete DK name.

@b-gent b-gent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs are good, there are small issues in other doc build files but the readmes look very nice.

I will open a comprehensive doc review PR later where I will modify some of the current doc build files but this sample documentation is good to be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants