Device and data model
KNX IoT reuses the KNX application model: the same functional blocks, datapoints, and datapoint types used on every other KNX medium. The Point API expresses this model as a set of RESTful resources. For more information, see the KNX IoT device profile.
Functional blocks
A functional block is a standardized description of a single device function, defining which datapoints it has and how they behave. Functional blocks are what make KNX devices from different manufacturers interwork: a device that implements a given functional block behaves in a predictable, interoperable way. Each functional block type has a number defined by KNX.
The KNX-IoT samples implement two basic lighting functional blocks:
Light Switching Actuator Basic (LSAB), number
417- The actuator side, which drives a load in response to switch commands.Light Switching Sensor Basic (LSSB), number
421- The sensor side, which produces switch commands.
A device exposes its functional blocks as resources and groups them under a device profile.
Datapoints
A datapoint is a single readable and/or writable value of a functional block, such as a switch state, a brightness level, or a status flag. Datapoints are the actual application data that devices read, write, and exchange.
For example in the KNX-IoT samples, each switching channel exposes two datapoints:
Switch on/off (soo) - The on/off control value. On the sensor it is an output the device produces; on the actuator it is an input the device receives.
Info on/off (ioo) - The status value reported back, so the rest of the system can see the actual state.
Datapoint direction is expressed with interface qualifiers, for example:
if.o- output (the device produces and announces the value).if.i- input (the device receives and consumes the value).
Datapoint types (DPTs)
Every datapoint has a datapoint type (DPT) that defines its exact data format, range, and unit, for example a 1-bit boolean for on/off, or a scaled percentage for a dimming level. DPTs are the contract that guarantees a value written by one device is interpreted identically by another. The catalog of standardized datapoint types and functional blocks is part of the KNX specifications and the KNX Information Model; see KNX IoT downloads and schemas.
Group object bindings
Group objects bind a datapoint to one or more KNX group addresses, so that writing the datapoint sends to the group and receiving from the group updates the datapoint. How group objects are configured and used at runtime is covered in Group communication and discovery and Commissioning.
Resource model
The Point API maps everything above onto CoAP resources identified by URIs. A client interacts with a device by issuing CoAP methods on these resources, or by subscribing with CoAP Observe. The most relevant resource groups are listed below; for the complete list and their mandatory or optional status, see the KNX IoT device profile.
Resource |
Purpose |
|---|---|
|
CoAP resource discovery; returns links to the resources a device hosts, filterable by serial number, resource type, or group address. |
|
Device-level operations used during commissioning, such as reset, restart, setting the Individual Address, and the SPAKE2+ handshake. |
|
Functional block resources hosted by the device. |
|
Point (datapoint) resources, used for read, write, and subscribe access to values and their metadata. |
|
Group Object Table, which maps datapoints to group addresses. |
|
Recipient Table, which lists the destinations for outgoing group messages. |
|
Publisher Table, which lists the expected sources of incoming group messages. |
|
Group communication endpoint, to which S-Mode group notifications are posted and where subscribers observe. |
|
Access-token list (credentials and permission scopes) used for access control. |
|
Certificate trust list used for the optional (D)TLS-based access control. |
The function point tables (/fp/g, /fp/r, /fp/p) and the /k endpoint are central to group communication and are described in Group communication and discovery.
The access-token resources are described in Security.