Skip to Content
On this page

KNX

Read and write KNX group objects over UDP tunneling, secure TCP tunneling, or multicast routing. Each variable specifies a DPT that defines its unit, scaling, wire format, and valid range for both reads and writes.

Compatible devices and models

Device series / model examplesConnection requirements
KNX sensors, actuators and gateways accessed through KNXnet/IPMatch IP tunnelling or routing mode, group addresses and DPT. Secure communication requires matching keys, interfaces and the security modes used by this plugin.

Compare ETS group addresses and DPTs

  1. Open the actual ETS project, associate device communication objects with group addresses and check each DPT. A readable object must have the required read behavior; association alone does not guarantee GroupValueRead responses.
  2. Check whether the ETS interface uses tunneling or routing and record its endpoint and security mode. Tunnel credentials, device authentication, backbone keys and group Keyring serve different purposes.
  3. For temperature group 1/2/4, DPT 9.001, create a Double at 1/2/4;dpt=9.001. Compare its engineering temperature with ETS Group Monitor. KNX two-byte floating point is not IEEE Float or UInt16.
  4. Switch DPT 1.001 uses Boolean. Percentage DPT 5.001 uses Double, engineering range 0–100, without extra scaling by 255. Create one variable per object, length 1.

Commission secure access

Data Secure uses an ETS-exported Keyring and a matching gateway source individual address. Group addresses alone do not supply sender assignments or keys. Select plain tunneling, IP Secure tunneling or Secure Routing according to the project; channel TLS is not KNX IP Secure.

Confirm reports, read requests and responses in ETS Group Monitor, then enable gateway reading. Keep one consistent DPT per group address within a device. Correct a mismatched mapping rather than choosing an unrelated gateway type.

Open the plugin

Enter “Development Configuration → Collection Configuration”, create a device and select “KNX” in “Device Plugin”.

Supported channels and data types

Channel typePre-configuration check
UDPConfirm the local binding address, port and firewall rules, and check the source of the packet.
TCP clientIP Secure tunneling only. Enter the router’s TCP endpoint, enable IP Secure, and leave channel TLS disabled.

Optional data types: Boolean, Byte, Int16, UInt16, Int32, UInt32, Float, Double, String

This list describes types allowed by the plugin editor. Address width, arrays, string length and read/write restrictions still follow this page; it does not mean that every address supports every type.

Plugin properties

Create a UDP session or TCP client channel for the selected connection mode. Configure common retry and write-priority fields through Collection Configuration. The DPT determines data width, byte order, and string encoding.

Connection mode

SettingDescription
Connection modeTunneling is the default; Routing uses multicast
Multicast interface addressLocal IPv4 interface for routing; 0.0.0.0 lets the system choose
Source individual addressSource for routing, Data Secure, ordinary P2P, and secure tool access, for example 1.1.250; area and line are 0–15, device is 1–255; must be unique on the bus

For tunneling, set the remote endpoint to the KNXnet/IP router; the local port may be ephemeral. Routing requires a dedicated UDP channel. The usual remote endpoint is 224.0.23.12:3671; bind locally to 0.0.0.0:3671 and select the interface connected to the KNX network. If using a custom multicast port, bind that same port locally. Allow the multicast group through switches and firewalls.

Routing reports connected when the local channel has joined the group; Secure Routing also requires group-clock synchronization. A successful group read is required to confirm device reachability, as routing has no acknowledgment for each telegram. Ordinary KNXnet/IP, UDP/TCP tunneling IP Secure, Secure Routing, and group Data Secure are supported. ETS downloads remain unsupported; channel TLS/DTLS does not provide these protocols.

IP Secure tunneling

SettingDescription
Enable IP SecureDisabled by default; authenticate the router and tunnel user and encrypt the entire connection on a dedicated UDP or TCP tunnel
Tunnel user IDDefaults to 2; allowed range 2–127, as assigned by ETS
User password referenceenv:VARIABLE_NAME, for example env:KNX_TUNNEL_PASSWORD, for the selected tunnel user
Device authentication password referenceenv:VARIABLE_NAME, for example env:KNX_DEVICE_AUTH_PASSWORD, for the router’s device authentication password; required

Set both password environment variables before starting the gateway service. Device configuration saves only the references. Passwords contain 1–128 printable ASCII characters. Incorrect identities, plaintext frames, altered frames, and old-session frames are rejected. Leave channel TLS/DTLS disabled. Tunnel passwords apply to Tunneling; Routing uses the backbone key below.

Normal traffic refreshes the secure session’s idle deadline. A secure keepalive is sent after approximately 30 seconds without outgoing traffic. A failed connection-state check, peer closure, or channel stop revokes authentication; the next connection exchanges fresh temporary keys. Data Secure can also be enabled. In that case, the router must allocate the individual address of the Keyring interface described below.

TCP tunneling uses the same connection for authentication and business traffic. A successful write means the frame reached the local transport queue; read the value back to confirm the device’s state. A successful read requires a real response for the requested group address. Failed authentication, cancellation, or an invalid stream header closes the current TCP connection. Subsequent connections authenticate again.

Secure Routing

Select Routing and enable IP Secure on a dedicated UDP multicast channel. Configure the multicast address, port, and interface as for ordinary Routing. All members must use the same backbone key and latency tolerance assigned to the ETS project. Tunnel user IDs and passwords do not apply.

SettingDescription
Backbone key referenceenv:VARIABLE_NAME, for example env:KNX_BACKBONE_KEY; the environment value contains 32 hexadecimal characters representing the 16-byte backbone key
Multicast latency toleranceDefaults to 1000 ms; allowed range 1–8000 ms, matching the project configuration

Startup authenticates and synchronizes the group clock, waiting up to approximately 3.3 seconds with the default tolerance. With no responding member, the gateway may become a local timekeeper. Connected status does not confirm a remote key or device reachability. Normal traffic and authenticated notifications maintain the clock; idle members send periodic notifications automatically. Stopping leaves the multicast group, and restarting synchronizes again.

Plaintext, incorrect keys, altered frames, non-routing services, and frames outside the latency window are rejected. Each running instance retains at most 4096 received identities within that window; a full window rejects new frames until old entries expire. This duplicate filter does not persist receive watermarks across process restarts. Enable Data Secure as well when group objects require persistent replay protection. Configure the IP Secure backbone key separately from the Data Secure Keyring group keys.

Data Secure

SettingDescription
Enable Data SecureDisabled by default; encrypt and authenticate groups assigned to this interface by the Keyring
Keyring fileDefaults to keyring.knxkeys; a relative .knxkeys file under protocol-files/knx/device-ID/ in the backend data root, up to 1 MiB
Keyring password referenceenv:VARIABLE_NAME, for example env:KNX_KEYRING_PASSWORD; provide the password in the gateway process environment, without entering its value in the configuration

Export a Keyring from ETS, give the gateway service account access to it, and set the password environment variable before starting the service. The source individual address must match a Keyring interface with secure group assignments. Assign each interface to only one running device. Security requires a dedicated channel and works over UDP tunneling, secure TCP tunneling, or Routing. The tunnel router must allocate that same individual address or the connection fails.

The current mode sends and receives encrypted, authenticated group services (S-A_Data, A+C). A secure group accepts only its assigned senders and rejects plaintext downgrades, altered telegrams, and old sequence numbers. Groups without an assigned secure key use ordinary communication. Individual P2P and tool access use the separate AuthConf configurations below.

The gateway reserves sending sequences on disk before transmission and commits authenticated receiving sequences before publishing group values. It manages state-xxxx.bin and its lock file in the device directory. The service account needs read/write access. Do not share this directory between active instances or delete or roll back sequence files to resolve a communication fault. Restoring an old backup may accept old telegrams or reuse sending sequences; follow the site’s KNX secure commissioning procedure. Receiving commits write to disk, so select collection intervals appropriate for the storage device.

Ordinary secure P2P access

Use explicitly deployed ordinary P2P keys for individual-address AuthConf sequence synchronization and property reads or writes. Enable P2P alone or alongside group Data Secure or tool access. P2P alone does not require a Keyring file. Use a dedicated channel and a source individual address that is unique on the bus; a tunnel router must allocate the same address.

SettingDescription
Enable secure P2P accessDisabled by default; accept only explicitly configured remote identities with their ordinary P2P keys
P2P access devicesAdd up to 256 entries with the structured field editor. Each entry has a Device individual address and P2P key reference
Device individual addressFor example 4.0.9; duplicates and the local address are rejected. A remote device number may be 0, but 0.0.0 is invalid
P2P key referenceenv:VARIABLE_NAME, for example env:KNX_P2P_4009_KEY. The gateway process environment value contains 32 hexadecimal characters representing a 16-byte P2P key

Provision the P2P key for the gateway’s source address according to the target device’s secure commissioning procedure, then set the key environment variable before starting the gateway service. Configuration stores only the reference. The key is distinct from a group key, ToolKey, or tunnel password. P2P keys are not derived from an ETS Keyring, and the gateway does not assign the target device’s access rights.

Under Plugin properties → KNX security, select Edit fields beside P2P access devices. Add each device’s address and key reference, confirm the fillback, and save the device dialog. Cancelling preserves the previous list. Each entry needs its own remote identity and matching key reference; a group address is not an individual device identity. See Complex plugin properties.

KNX P2P device fields and environment key reference, Chinese interface

In Protocol Debug → Device properties, select P2P, then use Synchronize secure sequence, Read device property, or Write device property. The corresponding complete method entries remain available under Special methods. Parameter limits and Base64 raw bytes follow the tool-property rules below. The first access to a target on each connection synchronizes sequences; synchronization works in both directions and waits up to 6 seconds. Property replies use the read/write timeout. A write requires the same bytes in an authenticated device reply; a tunnel ACK is insufficient. Method authorization, device availability, and redundancy role are rechecked after queueing and before actual transmission.

P2P and group Data Secure share ordinary sending sequences and receive watermarks per source in the same state-xxxx.bin. Stopping or reconnecting cancels pending requests. Restarting skips the entire reserved sending range, and old replies cannot be delivered again. Tool access retains its separate tool-state-xxxx.bin. The directory permission, exclusive-use, and backup rules above apply to both. P2P secure access uses connectionless individual AuthConf services.

Secure tool access

Use each device’s independent tool key for individual-address sequence synchronization and property reads or writes. Enable this separately or alongside group Data Secure. Use the Keyring file and password reference above. The source individual address must match its interface, including the address allocated by a tunnel. An interface without secure group assignments can be used when only tool access is enabled.

SettingDescription
Enable secure tool accessDisabled by default; import tool keys only for explicitly authorized devices
Tool access devicesRemote individual addresses separated by semicolons, for example 4.0.9;5.0.0, up to 256 devices. Every address needs a tool key in the signed Keyring; duplicates and the local address are rejected

Use the following operations through Protocol Debug → Device properties. Select Tool, enter the authorized remote individual address, object index, property ID, start index and element count. Reads run directly; writes and sequence synchronization require confirmation of the target and parameters. Select P2P for the corresponding operations using the separately configured P2P identity. Both modes require special-method execution permission and enabled device method calls. Calls are rejected if permission is revoked, the device is disabled, or it becomes standby while waiting. The remote address must appear in the selected identity’s authorized device list; tool keys are never derived from group keys. Write canonical Base64 containing 1–237 raw bytes.

OperationParameters and result
Synchronize KNX tool sequencesEnter the remote individual address. Success requires an authenticated response matching this request’s challenge
Read a KNX tool propertyEnter the remote address, object index, property ID, start index, and element count. Returns raw property bytes encoded as Base64
Write a KNX tool propertySupply the same addressing fields and up to 237 raw bytes as Base64. Success requires an authenticated device response with matching bytes; a transport acknowledgment is insufficient

Object indices and property IDs range from 0 to 255, start indices from 0 to 4095, and element counts from 1 to 15. Start index and element count both default to 1. Interpret property types, element widths, and write permissions using the device manual; group-address DPT conversion does not apply. The first access to each target on a connection synchronizes sequences, waiting up to 6 seconds. Property responses use the read/write timeout. Disconnecting cancels pending operations, and reconnecting requires synchronization again.

Tool sending sequences and receive watermarks are stored separately in tool-state-xxxx.bin in the device directory, with their own lock. Apply the directory permissions and backup rules above. Only authenticated, encrypted tool services are accepted. The current scope is connectionless individual property access and synchronization in both directions; broadcast programming and ETS project downloads are unavailable.

Running parameters

SettingDescription
Read/write timeoutDefaults to 3000 milliseconds; must be positive. Routing queueing and Busy waits share the transmission deadline
Send delayNonnegative milliseconds; routing transmissions are spaced at least 20 milliseconds apart
Tunnel heartbeat intervalDefaults to 60000 milliseconds; must be positive. Applies to tunneling only

Tunneling establishes a session at startup and checks its connection state when communication resumes after the heartbeat interval. After a failed check, the next read performs a new handshake. Routing obeys Busy waits with random backoff. Stopping cancels waiting transmissions and leaves the group; restarting joins again. Variables sharing a group address and collection interval share one read. A device cannot assign different DPTs to the same group address.

Address rules

Use main/middle/sub;dpt=main.subtype, for example 1/2/3;dpt=9.001. Main is 0–31, middle 0–7, and sub 0–255. Each variable represents one group object with length 1; variable arrays are unsupported.

DPTVariable type and meaning
1.001, 1.002, 1.003Boolean; switch, boolean, enable
5.001, 5.003Double; percentage 0–100, angle 0–360
5.010Byte; unsigned byte
6.001, 6.010Int16; signed byte range -128–127
7.001, 7.002, 7.005–7.007, 7.011–7.013, 7.600UInt16; dimensionless, ms, s, min, h, mm, mA, lx, K respectively
8.001, 8.002Int16; signed value, milliseconds
9.001–9.011Double; KNX two-byte float, constrained by subtype
12.001UInt32; unsigned counter
13.001, 13.010Int32; signed counter, Wh
14.019, 14.027, 14.056, 14.068Float; A, V, W, °C
16.000, 16.001String; up to 14 bytes of ASCII or Latin-1 text
17.001Byte; scene number 1–64
20.102Byte; HVAC mode value 0–4

DPTs outside this table are rejected. Strings cannot contain embedded zero characters or characters unavailable in their encoding. Do not add len or generic encoding options. Percentages, angles, and two-byte floats use wire precision; writing 50% may read back approximately 50.196%.

A successful UDP tunnel write means that the endpoint acknowledged receipt. TCP tunnel writes report submission to the local transport queue; routing writes report that the local datagram was sent. With variable writeback checking enabled, the plugin reads the actual group value and compares it with the quantized expected value. Without checking, a write request is not published as device feedback.

Device debug

Enter “Development Configuration → Collection Configuration”, select the current device then open “Protocol Debug” at the top of the workspace.

Functions

FunctionPurpose
Read and writeRead a confirmed point and write only to an approved test point.
MessagesView sent and received frames, protocol fields, and error details.
Method invocationEnable ordinary P2P or secure tool access, select the corresponding operations, and synchronize sequences or access raw properties according to the device manual.

Verify the configuration

Read 1/2/3;dpt=1.001 as Boolean, then read a configured temperature object such as 1/2/4;dpt=9.001 as Double. Compare engineering values with ETS Group Monitor. Use an approved group address for test writes and enable writeback checking.

Troubleshooting

  • Connected but no value: check the device’s read flag, group address, and DPT. For routing, also check the multicast interface, local port, and multicast forwarding.
  • A value arrives but decoding fails: verify the variable type, compact or extended wire format, and DPT range. Changing to another generic integer type does not resolve a contract mismatch.
  • Routing transmission times out: check Busy notifications and transmission frequency. Increase collection intervals to respect multicast and KNX bus capacity.
  • A secure group has no new value: check the Keyring password, interface individual address, and sender assignment for that group. Check sequence files and write permissions in the device directory; do not switch the group to plaintext to bypass the failure.
  • A tool operation fails: check the device allowlist, its tool key, the interface source address, property permissions, and method invocation authorization. A synchronization timeout does not confirm property execution; check the device state before another operation.
  • A P2P operation fails: verify that the target authorizes its P2P key for the current source address, check the environment key reference and property permissions. Group keys and ToolKeys cannot replace P2P keys; deleting state files cannot resolve old counters safely.