Skip to content

Cookie preferences

We use cookies for our own analytics and to see how our campaigns perform. We never sell your data. Necessary cookies keep the site working and cannot be switched off. See our Cookie Policy for details.

Security, load balancing and remembering your cookie choice.

Show us which pages people read and how they find the site, so we can improve it (Google Analytics).

Show us which of our ad campaigns bring visitors to the site (Google Ads).

© 2026 The ThingsBoard Authors
Try for free

ThingsBoard Cloud

Choose your data region

Your data stays in the region you choose, for residency and compliance. No credit card required.

Rather run it yourself? Install on your own servers

KNX

The KNX Connector connects KNX-based devices to ThingsBoard, letting the gateway read telemetry and attributes from KNX group addresses and send RPC commands to KNX automation systems.

To enable this connector, add it to the connectors list in tb_gateway.json — see the General Configuration reference.

The connector reads its settings from a JSON file. Below is a full example:

{
"logLevel": "INFO",
"client": {
"type": "AUTOMATIC",
"addressFormat": "LONG",
"localIp": "127.0.0.1",
"localPort": 3671,
"autoReconnect": true,
"autoReconnectWait": 3,
"gatewaysScanner": {
"enabled": true,
"scanPeriod": 3,
"stopOnFound": false
}
},
"devices": [
{
"deviceInfo": {
"deviceNameDataType": "string",
"deviceNameExpressionSource": "expression",

Configures the KNX client responsible for communication with the KNX router.

Parameter Default Description
type AUTOMATIC Connection type: AUTOMATIC, ROUTING, TUNNELING, TUNNELING_TCP, or TUNNELING_TCP_SECURE
addressFormat LONG Group address format: SHORT, LONG, or FREE
localIp Local IP address or network interface name
localPort Local port number
autoReconnect true Reconnect automatically if the tunneling connection is lost
autoReconnectWait 3 Seconds to wait before a reconnect attempt
gatewayIP IP address or hostname of the KNX/IP tunneling device
gatewayPort 3671 Port of the KNX/IP tunneling device
individualAddress Individual KNX address of the local endpoint
rateLimit 0 Max outgoing telegrams per second; 0 disables the rate limiter
multicastGroup 224.0.23.12 Multicast group for KNXnet/IP routing
multicastPort 3671 Multicast port for KNXnet/IP routing
stateUpdater false Default state-updating mechanism used by devices

Address format values:

  • SHORT — two-part address, e.g. 1/34 (no middle group)
  • LONG — three-part address, e.g. 1/2/34 (with middle group)
  • FREE — integer or hex representation

Connection type values:

  • AUTOMATIC — scans the network using GatewayScanner to find KNX/IP devices automatically
  • ROUTING — KNX/IP multicast routing
  • TUNNELING — UDP connection to a specific KNX/IP tunneling device
  • TUNNELING_TCP — TCP connection to a KNX/IP tunneling v2 device
  • TUNNELING_TCP_SECURE — secure TCP connection to a KNX/IP tunneling v2 device

Example:

"client": {
"type": "AUTOMATIC",
"addressFormat": "LONG",
"localIp": "127.0.0.1",
"localPort": 3671,
"autoReconnect": true,
"autoReconnectWait": 3
}

KNX security provides three complementary protection mechanisms:

  • KNX IP Secure — encrypts communication between KNX IP devices (routers and interfaces) over IP networks
  • KNX Data Secure — encrypts communication at the telegram level, protecting any medium (TP, RF, or IP)
  • KNX Secure Tunneling — authenticates and encrypts tunneling sessions between a client and a KNX Secure IP interface

Configure the desired mechanism by adding a security subsection inside client:

Protects data transmitted over Ethernet/IP-based networks to prevent unauthorized access and tampering.

Parameter Description
backbone_key Backbone key for KNX Secure Routing (hex)
latency_ms Latency tolerance in milliseconds for KNX Secure Routing
"security": {
"backbone_key": "secret",
"latency_ms": 100
}

Scans the local network for KNX routers — useful when the router IP address is not known in advance. Detected IP addresses are printed to the gateway log.

Parameter Default Description
enabled true Enable or disable the scanner
scanPeriod 3 Scan interval in seconds
stopOnFound false Stop scanning after the first KNX router is found
"gatewaysScanner": {
"enabled": true,
"scanPeriod": 3,
"stopOnFound": false
}

Example log output when a gateway is discovered:

Found KNX gateway:
- Calimero test network 1.1.0
192.168.1.160:3671
Tunneling: TCP
Routing: Yes

Configures polling and data mapping for each KNX device. Each entry in the array defines:

Field Description
deviceInfo Device name and profile to create in ThingsBoard
pollPeriod Poll interval in milliseconds
attributes Group addresses mapped to device attributes
timeseries Group addresses mapped to time-series telemetry
"devices": [
{
"deviceInfo": { ... },
"pollPeriod": 5000,
"attributes": [ ... ],
"timeseries": [ ... ]
}
]

Sets the device name and profile that will be created in ThingsBoard.

Parameter Default Description
deviceNameDataType string Value type for the device name
deviceNameExpressionSource expression Source type: expression or constant
deviceNameExpression Device ${1/0/5} Expression used to build the device name
deviceProfileDataType none Value type for the device profile
deviceProfileExpressionSource constant Source type: expression or constant
deviceProfileNameExpression default Expression used to select the device profile
"deviceInfo": {
"deviceNameDataType": "string",
"deviceNameExpressionSource": "expression",
"deviceNameExpression": "Device ${1/0/5}",
"deviceProfileDataType": "none",
"deviceProfileExpressionSource": "constant",
"deviceProfileNameExpression": "default"
}

Subsections “attributes” and “timeseries”

Section titled “Subsections “attributes” and “timeseries””

Map KNX group addresses to ThingsBoard attributes and time-series telemetry. Both sections use the same field structure:

Parameter Description
type KNX data type (e.g. temperature, humidity, percent_U8)
key ThingsBoard attribute or telemetry key name
groupAddress KNX group address to read from
"attributes": [
{
"type": "temperature",
"key": "temperature",
"groupAddress": "1/0/6"
}
],
"timeseries": [
{
"type": "humidity",
"key": "humidity",
"groupAddress": "1/0/7"
}
]

Optional. Writes ThingsBoard shared attribute updates to KNX group addresses, pushing remote configuration changes to connected KNX devices.

Parameter Default Description
deviceNameFilter .* Regex filter to match device names
dataType string KNX data type of the value to write
groupAddress KNX group address to write to
key Shared attribute name to subscribe to
"attributeUpdates": [
{
"deviceNameFilter": ".*",
"dataType": "percent_U8",
"groupAddress": "1/0/9",
"key": "brightness"
}
]

Optional. Maps ThingsBoard RPC method calls to KNX read or write operations.

Parameter Default Description
requestType read Operation type: read or write
deviceNameFilter .* Regex filter to match device names
method RPC method name to bind
dataType string KNX data type
groupAddress KNX group address to read from or write to
"serverSideRpc": [
{
"requestType": "read",
"deviceNameFilter": ".*",
"method": "get_name",
"dataType": "string",
"groupAddress": "1/0/5"
}
]

Every attribute and telemetry entry also has a built-in set RPC method available automatically — no manual serverSideRpc entry required. See the Reserved RPC methods guide for details.