Skip to main content
Version: 2.6

KNX Data Access

This chapter outlines all possible native addresses. These addresses must be configured within the device configuration.

Format

A native KNX address has following format:

{DeviceAddress}@{MemoryType}.{DataType}:{address}

Device Address

The device address points to the KNX device holding the registers for reading or writing. The KNX device address is made of three bytes:

  • Byte 0: Area
  • Byte 1: Line
  • Byte 2: Address

The plugin supports the string notation: <Byte0>.<Byte1>.<Byte2>

Example to read 10 bytes out of memory register 0x4000 from device 1.1.1:

1.1.1@Memory.Uint8[10]:4000

Some reading or writing supports also the group address format, e.g. 1/2/9.

1/2/9@Group.Uint8:0

Data Types

Each memory is natively read as byte-array. However, the byte array can be converted to other primitive data types. Memory reading supports following data types:

Data TypeDescription
Bool1-bit value
Uint88-bit unsigned integer
Uint1616-bit unsigned integer
Uint3232-bit unsigned integer
Uint6464-bit unsigned integer
Int88-bit signed integer
Int1616-bit signed integer
Int3232-bit signed integer
Int6464-bit signed integer
Float3232-bit floating point number
Float6464-bit floating point number

For each data type can also be declared as an array, e.g. Uint32[100] declares an array of 100 32-bit values.

Reading System Variables

AddressDescriptionData Type
Global@System.Bool:AvailableAvailable flag. 0 = Connection offline, 1 = onlineSystem.Boolean
Global@System.Int32:SignalOfLifeSignal of Life; Alternates in 1 Hz if connection is onlineSystem.Int32

Reading Memory

The memory of a KNX device can be read. There exist following memory types:

Memory Types

Memory TypeDescription
MemoryDefault memory of device (readonly)
RouterMemoryRouter memory of device (readonly)
RoutingTableMemoryRouting table memory (readonly)
UserMemoryUser memory of the device (readonly)

Example reading user memory:

{
"Id": "A3C14B6D-9365-494E-BE12-72435C18EAAC",
"Name": "UserMemory1",
"DataClass": "Event",
"DataType": "System.Int32",
"Address": "1.1.1@UserMemory.Int32:8112",
"Access": {
"Read": true,
"Receive": true
}
}

Reading and Writing Properties

Properties of KNX devices can be individually read or written.

Memory TypeDescription
PropertyReads or writes a property value

Simple Property

The property address contains {ObjectIndex}:{PropertyId}

Example reading/writing a property 9 from object 12:

1.1.1@Property.Int32:12:9

Example:

{
"Id": "5726E1AF-DA14-43B3-A971-57FBA302C2F6",
"Name": "Property_X",
"DataClass": "Event",
"DataType": "System.Int32",
"Address": "1.1.1@Property.Int32:2:8",
"Access": {
"Read": true,
"Receive": true,
"Write" : true
}
}

Array Properties

To read array properties, additional offset information must be added to the address.

The property address contains {ObjectIndex}:{PropertyId}:{Offset}

Example reading a property 9 from object 12. The property is read as an array of 12 bytes and an offset of 5 bytes in the original array in the device register.

1.1.1@Property.Uint8[12]:12:9:5

Example reading two Uint32 values with offset 0

1.1.1@Property.Uint32[2]:12:9:0
info

NOTE: The element length depends directly on the data type byte size. For instance, Uint32 automatically uses element length of 4 bytes.

Example:

{
"Id": "115E2C45-63AE-4763-9EAB-8D5EF02DB97D",
"Name": "Property_A",
"DataClass": "Event",
"DataType": "System.Byte[]",
"Address": "1.1.1@Property.Uint8[4]:1:7:0",
"Access": {
"Read": true,
"Receive": true
}
}

Reading or Writing Group Values

The drivers supports to read and write values from groups.

Memory TypeDescription
GroupReads or writes a group values
NOTE

Use commands Knx.WriteGroupValue or Knx.ReadGroupValue for flexible writing or reading values.

Example:

{
"Id": "93DEE416-DF8C-4F89-8BCE-EB21EF4963A9",
"Name": "GroupValue",
"DataClass": "Event",
"DataType": "System.Byte",
"Address": "1/2/3@Group.Uint8:0",
"Access": {
"Read": true,
"Receive": true
}
}