KNX IoT add-on architecture
This page describes what the KNX IoT add-on provides and how it integrates the KNX IoT Point API stack into the nRF Connect SDK. For the protocol concepts referenced here, see the Introduction.
Add-on components
The KNX IoT add-on brings the KNX IoT Point API to Nordic Semiconductor devices running the nRF Connect SDK. It consists of the following parts:
The third-party KNX IoT Point API stack (the upstream open-source stack), pulled in as a west module and built for the nRF Connect SDK. See the KNX IoT Point API Stack repository.
A small integration library under
subsys/knx/that adapts the stack to the nRF Connect SDK and drives its event loop, with shared board user interface support undersubsys/ui/.Samples that demonstrate basic KNX IoT functional blocks over Thread (see the KNX IoT samples).
This documentation.
The KNX IoT add-on is enabled with the CONFIG_KNX_IOT_ADD_ON Kconfig option, which brings in the stack together with the integration library and selects the required dependencies (for example, the PSA Crypto features used by KNX IoT security).
See Shared configurations in KNX IoT add-on for the configuration options.
Component overview
The following diagram shows how a KNX IoT add-on application is layered on top of the KNX IoT Point API stack, the OpenThread stack, and the nRF Connect SDK.
Integration library
The integration library under subsys/knx/ integrates the KNX IoT stack into user applications.
Its main source files are:
knx_app.c,knx_stack.c- Initialize and run the KNX IoT stack, including the event loop.knx_resources.c- Register the application’s KNX resources (functional blocks and datapoints).knx_init_read.c- Track the read-on-init requests sent at startup.knx_transport.c- Adapt the stack to the underlying IPv6/Thread transport.knx_presets.c- The hardcoded commissioning mechanism, built whenCONFIG_KNX_HARDCODED_COMMISSIONINGis enabled (see Commissioning in the KNX IoT add-on).knx_identity.c- The serial number and Individual Address derived from the hardware device ID, built whenCONFIG_KNX_HARDCODED_IDENTITY_HWINFOis enabled.
The shared board user interface support under subsys/ui/ is built when CONFIG_DK_LIBRARY is enabled.
Its source files are:
knx_board.c,knx_buttons.c,knx_leds.c- Shared board support (status LEDs, button handling).knx_ui_layout_dk.c,knx_ui_layout_single_button_rgb.c- Board user interface layouts, one of which is built depending on the selected layout.
The stack runs its event loop on a dedicated worker thread whose scheduling priority is set with the CONFIG_KNX_THREAD_PRIORITY Kconfig option.
Relationship to the upstream stack
The KNX IoT functionality comes from the upstream Point API stack.
The KNX IoT add-on provides the nRF Connect SDK integration, a device-agnostic application layer under subsys/knx/, and the board user interface under subsys/ui/.
For upstream documentation, the protocol specifications, and schemas, see the KNX IoT documentation and KNX IoT downloads and schemas.
For the current feature coverage and limitations, see Software maturity and Known issues.