Skip to main content

KNX

The KNX I/O Server provides for the control of a KNX installation compliant with the KNX Standard version 2.0.

The communication between HSYCO and the KNX network must employ a KNXnet/IP gateway supporting the Tunneling service.

The KNX framework must be programmed to work properly using the ETS tool.

Each defined KNX group is seen as a datapoint whose value is formatted with respect to its DPT type. Supported DPT types range from DPT 1 to DPT 18. Moreover, it is possible to have virtual datapoints that link a set of datapoints used for the control of devices such as lights, dimmers, automations and thermostats which require several KNX groups for commands and feedback.

HSYCO Configuration

Add a KNX I/O Server in the I/O Servers section of the Settings and set its parameters:

Communication

  • IP Address: IP address of the KNX/IP gateway
  • IP Port: TCP/IP port to use, leave blank to use default port 3671.

High Availability

  • Shutdown when inactive: defaults to false.

Options

IDDefaultValuesDescription
startupeventsfalsetruegenerate IO events also during the driver’s start-up phase
falsestart generating events only after HSYCO is aligned with the current status of the system
discoverytruetrueautomatically create the list of all detected datapoints with type DPT 1 and the defined virtual datapoints in the systemtopo.txt file. Should be enabled to allow the automatic update of (button) objects' states
falseauto-detect for devices is disabled
fromeventsfalsetruegenerate events for commands sent on the KNX BUS reporting the source address and the value of the command
falsedisable command events
readaftercommandfalsetrueforce the driver to read the value of a datapoint after a command is sent to it
falsethe driver will assume that commands detected on the BUS are always successful, thus no re-reading is performed to set the value of a datapoint
localport<port_number>the port number used locally by HSYCO to communicate with the KNXnet/IP gateway. This option might be necessary when employing network address translation (NAT)
initreadinterval0<milliseconds>Time interval, in milliseconds, between datapoint values reading requests during the initialization phase

Datapoints Declaration

It is required to provide the I/O Server with the KNX framework configuration. To this end, the KNX Utility provides a graphical interface to import ETS4 or ETS5 project files and to configure the datapoints.

It is also possible to manually define the datapoints in the knxtopo.txt file.

Datapoints

IDValueR/WDescription
connectiononlineRconnection established to the gateway and initial reading executed
offlineRHSYCO can't connect to the gateway
<datapoint_id><value>Rthis datapoint has value <value>
Wset this datapont to value <value>
<datapoint_id>readWforce to read the value of the dp
<datapoint_id>.from.<source><value>Ra command with value <valueb> from the device with individual address <source> has been sent to the addressed datapoint. The source address has the format “x.y.z” (e.g. 1.2.87)
light.<n>0Rthe light is off
Wturn off the light off
1Rthe light is on
Wturn on the light on
flipWinvert the state of the light
unknownRthe state of the light is unknown
dimmer.<n>offRthe dimmer is off
Wturn off the dimmer
onWturn on the dimmer
1% ... 100%Rthe dimming level is set to the reported level
0% ... 100%Wset the dimming level to the specified value
unknownRthe state of the dimmer is unknown
rgb.<n>offWturn off the light
onWturn on the light
<r><g><b>Rthe light color is set to the reported RGB value (e.g. "25500" corresponds to red)
Wset the light color to the specified RGB value
unknownRthe state of the light is unknown
autom.<n>if use position = false
upRthe automation is moving upwards
downRthe automation is moving downwards
offupRthe automation is stopped in an open position
offdownRthe automation is stopped in the closed position
if use position = true
0% ... 100%Rthe automation is stopped at the reported position
0%+ ... 100%+Rthe automation is at the reported position and is closing
0%- ... 100%-Rthe automation is at the reported position and is opening
Wmove the automation to the specified position
stopWstop the automation
unknownRthe state of the light is unknown
thermo.<n> .setpoint.temp<float_value>Wset the setpoint to the specified value
upWincrease the setpoint by 0.5
downWdecrease the setpoint by 0.5
thermo.<n> .setpointmodeWswitch to the next setpoint mode
thermo.<n> .setpoint.modecomfRthe setpoint mode of the thermostat is set to "comfort"
nightRthe setpoint mode of the thermostat is set to "night"
stbRthe setpoint mode of the thermostat is set to "stand-by"
unknownRthe setpoint mode of the thermostat is unknown
gatewaynextWkill and restart the I/O Server and switch to the next gateway as listed in the IP settings
<n>Rthe I/O Server is using the gateway with index <n> with respect to the list of addresses in the IP settings, starting from 0
Wkill and restart the I/O Server and switch to the gateway with index <n>

Datapoint types and values


The KNX I/O Server supports all datapoint types (DPTs) listed in the following paragraphs.

The value of a datapoint is formatted with respect to its DPT main number. The actual behavior of the datapoint is anyhow dependent on its complete type (i.e. main number and sub number). Examples for the most common cases will be provided, but for a complete reference of all available datapoint types and allowed values we strongly advice to refer to chapter 3/7/2 of the KNX Standard v2.0.

The following paragraphs will show the KNX data format for each DPT as described in the protocol as well as the allowed datapoint values and the corresponding conversion.

Datapoint Type 1 (1 bit, Boolean)


KNX bit-level format:

87654321
b

b = 1

Datapoint values:

ValueConverts to
0b = 0
1b = 1

Example:

For a datapoint with DPT 1.001 (e.g. a switch) a value of '0' corresponds to the 'off' state, while for a datapoint with DPT 1.007 (e.g. a step indicator for a dimmer) it would correspond to the state 'decrease'.

Datapoint Type 2 (2 bits, Control)


KNX bit-level format:

87654321
cv

c = 1, v = 1

Datapoint values:

ValueConverts to
disabledc = 0, v = 0
0c = 1, v = 0
1c = 1, v = 1

Datapoint Type 3 (4 bits, Dimming, Blinds)


KNX bit-level format:

87654321
cstep[2]step[1]step[0]

c = 1, step = [000b ... 111b]

Datapoint values:

ValueConverts to
-7 ≤ v < 0c = 0, step = |v|
0 ≤ v ≤ 7c = 1, step = v

Example:

For a datapoint with DPT 3.007 (control dimming) a value of '3' corresponds to a 3-steps light increase. The same value for a DPT 3.008 (control blinds) datapoint corresponds to a 3-steps downwards movement. In both cases a value of '0' indicates the 'break' state.

Datapoint Type 4 (8 bit, Character set)


KNX bit-level format:

87654321
char[7]char[6]char[5]char[4]char[3]char[2]char[1]char[0]

char = [0 ... 255] (ISO 8859-1 encoding of a character)

Datapoint values:

ValueConverts to
0 ≤ v ≤ 255char = v

A DPT 4.001 datapoint will only support the values corresponding to ASCII characters (a subset of the ISO 8859-1 standard values), thus only values ranging from 0 to 127 are allowed.

Datapoint Type 5 (8 bits, Unsigned Value)


KNX bit-level format:

87654321
val[7]val[6]val[5]val[4]val[3]val[2]val[1]val[0]

val = [0 ... 255]

Datapoint values:

ValueConverts to
0 ≤ v ≤ 255val = v

Example:

For a datapoint with DPT 5.001 (scaling) a value of '255' corresponds to '100%'. For a datapoint with DPT 5.003 (angle) the same value corresponds to '360°'.

Datapoint Type 6 (8 bits, Signed Value)


KNX bit-level format:

87654321
val[7]val[6]val[5]val[4]val[3]val[2]val[1]val[0]

val = [-128 ... 127] (two’s complement notation)

Datapoint values:

ValueConverts to
-128 ≤ v ≤ 127val = v

Datapoint Type 7 (2 Bytes, Unsigned Value)


KNX bit-level format:

16151413121110987654321
val[15]val[14]val[13]val[12]val[11]val[10]val[9]val[8]val[7]val[6]val[5]val[4]val[3]val[2]val[1]val[0]

val = [0 ... 65535]

Datapoint values:

ValueConverts to
0 ≤ v ≤ 65535val = v

Datapoint Type 8 (2 Bytes, Signed Value)


KNX bit-level format:

16151413121110987654321
val[15]val[14]val[13]val[12]val[11]val[10]val[9]val[8]val[7]val[6]val[5]val[4]val[3]val[2]val[1]val[0]

val = [-32768 ... 32767] (two’s complement notation)

Datapoint values:

ValueConverts to
-32768 ≤ v ≤ 32767val = v

Datapoint Type 9 (2 Bytes, Float Value)


KNX bit-level format:

16151413121110987654321
me[3]e[2]e[1]e[0]m[10]m[9]m[8]m[7]m[6]m[5]m[4]m[3]m[2]m[1]m[0]

e = [0 ... 15], m = [-2048 ... 2047] (two’s complement notation)

float value = (0.01 * m) * 2^e = [-671088.64 ... 670760.96]

Datapoint values:

ValueConverts to
-671088.64 ≤ v ≤ 670760.96float value = v

Datapoint Type 10 (3 Bytes, Time)


KNX bit-level format:

242322212019181716151413121110987654321
day[2]day[1]day[0]hour[4]hour[3]hour[2]hour[1]hour[0]00min[5]min[4]min[3]min[2]min[1]min[0]00sec[5]sec[4]sec[3]sec[2]sec[1]sec[0]

day = [0 ... 7] (0 = no day, 1 = Monday, ..., 7 = Sunday)

hour = [0 ... 23]

min = [0 ... 59]

sec = [0 ... 59]

Datapoint values:

ValueConverts to
<day>.<hour>.<minutes>.<seconds>day = <day>, hour = <hour>, min = <min>, sec = <sec>

Example:

A value of '2.12.46.23' corresponds to 'Tuesday 12:46:23'.

Datapoint Type 11 (3 Bytes, Date)


KNX bit-level format:

242322212019181716151413121110987654321
000day[4]day[3]day[2]day[1]day[0]0000month[3]month[2]month[1]month[0]0year[6]year[5]year[4]year[3]year[2]year[1]year[0]

day = [1 ... 31]

month = [1 ... 12]

year = [0 ... 99] (if ≥ 90 interpret as 20th century, otherwise interpret as 21st century)

Datapoint values:

ValueConverts to
<year>/<month>/<day>(1990 ≤ <year> ≤ 2089)year = last two digits of <year>, month = <month>, day = <day>

Example:

A value of '2011/2/8' corresponds to 'February 8th 2011'.

Datapoint Type 12 (4 Bytes, Unsigned Value)


KNX bit-level format:

3231302928272625242322212019181716151413121110987654321
val[31]val[30]val[29]val[28]val[27]val[26]val[25]val[24]val[23]val[22]val[21]val[20]val[19]val[18]val[17]val[16]val[15]val[14]val[13]val[12]val[11]val[10]val[9]val[8]val[7]val[6]val[5]val[4]val[3]val[2]val[1]val[0]

val = [0 ... 4294967295]

Datapoint values:

ValueConverts to
0 ≤ v ≤ 4294967295val = v

Datapoint Type 13 (4 Bytes, Signed Value)


KNX bit-level format:

3231302928272625242322212019181716151413121110987654321
val[31]val[30]val[29]val[28]val[27]val[26]val[25]val[24]val[23]val[22]val[21]val[20]val[19]val[18]val[17]val[16]val[15]val[14]val[13]val[12]val[11]val[10]val[9]val[8]val[7]val[6]val[5]val[4]val[3]val[2]val[1]val[0]

val = [-2147483648 ... 2147483647] (two’s complement notation)

Datapoint values:

ValueConverts to
-2147483648 ≤ v ≤ 2147483647val = v

Datapoint Type 14 (4 Bytes, Float Value)


KNX bit-level format:

3231302928272625242322212019181716151413121110987654321
se[7]e[6]e[5]e[4]e[3]e[2]e[1]e[0]f[22]f[21]f[20]f[19]f[18]f[17]f[16]f[15]f[14]f[13]f[12]f[11]f[10]f[9]f[8]f[7]f[6]f[5]f[4]f[3]f[2]f[1]f[0]

s = 1, e = [0 .. 255], f = [0 ... 8388607]

float value = 0, [1.40129846432481707E-45, 3.40282346638528860E+38] (IEEE 754 floating point format)

Datapoint values:

ValueConverts to
v = 0 | 1.40129846432481707E-45 ≤ v ≤ 3.40282346638528860E+38float value = v

Datapoint Type 15 (4 Bytes, Access)


KNX bit-level format:

3231302928272625242322212019181716151413121110987654321
d6[3]d6[2]d6[1]d6[0]d5[3]d5[2]d5[1]d5[0]d4[3]d4[2]d4[1]d4[0]d3[3]d3[2]d3[1]d3[2]d2[3]d2[2]d2[1]d2[0]d1[3]d1[2]d1[1]d1[0]epdcindex[3]index[2]index[1]index[0]

d1, d2, d3, d4, d5, d6 = [0 ... 9]

index = [0 ... 15]

e = 1 (0 = no error, 1 = reading of access information was not successful)

p = 1 (0 = not accepted, 1 = accepted)

d = 1 (0 = left to right, 1 = right to left)

c = 1 (0 = no encryption, 1 = access information encrypted)

Datapoint values:

ValueConverts to
<d6>.<d5>.<d4>.<d3>.<d2>.<d1>.<e>.<p>.<d>.<c>.<index>d6 = <d6>, d5 = <d5>, d4 = <d4>, d3 = <d3>, d2 = <d2>, d1 = <d1>, e = <e>, p = <p>, d = <d>, c = <c>, index = <index>

Example:

A valid value would be: '1.2.3.4.5.7.0.1.0.0.13'

Datapoint Type 16 (14 Bytes, String)


112 111 110 109 108 107 106

105...8 7 6 5 4 3 2 1
char1...char 14

These Datapoint Types are used to transmit strings of textual characters. The length is fixed to 14 octets. The contents are filled starting from the most significant octet. Each octet shall be encoded as specified for the chosen character set. If the string to be transmitted is smaller than 14 octets, unused trailing octets in the character string shall be set to NULL (00H).

Example: KNX is OK is encoded as follows: 4B 4E 58 20 60 73 20 4F 4B 00 00 00 00 00

Datapoint values:

ValueConverts to
<string>(max 14 bytes)ISO 8859-1 encoded bytes padded with trailing NULL bytes

Example:

A valid value would be: 'Hello world'

Datapoint Type 17 (1 Byte, Scene Number)


KNX bit-level format:

87654321
00sn[5]sn[4]sn[3]sn[2]sn[1]sn[0]

Datapoint values:

ValueConverts to
0 ≤ v ≤ 63sn = v

Datapoint Type 18 (1 Byte, Scene Control)


KNX bit-level format:

87654321
c0sn[5]sn[4]sn[3]sn[2]sn[1]sn[0]

c = 1 (0 = activate the scene, 1 = learn the scene)

sn = [0 ... 63]

Datapoint values:

For this case the datapoint syntax is slightly different. The scene number (sn) must be suffixed to the datapoint ID as follows: <datapoint_id>.<scene_number>.

ValueConverts to
recordc = 1
1c = 0

Example:

The activation of scenario 12 on a datapoint would correspond to: <datapoint_id>.12 = 1

Datapoint Type 29 (8 Bytes, Electrical Energy)


KNX bit-level format:

3231302928272625242322212019181716151413121110987654321
val[31]val[30]val[29]val[28]val[27]val[26]val[25]val[24]val[23]val[22]val[21]val[20]val[19]val[18]val[17]val[16]val[15]val[14]val[13]val[12]val[11]val[10]val[9]val[8]val[7]val[6]val[5]val[4]val[3]val[2]val[1]val[0]

val = [-9223372036854775 ... 9223372036854775807] (two’s complement notation)

Datapoint values:

ValueConverts to
-9223372036854775 ≤ v ≤ 9223372036854775807val = v

Datapoint Type 232 (3 Bytes, RGB)


KNX bit-level format:

242322212019181716151413121110987654321
R[7]R[6]R[5]R[4]R[3]R[2]R[1]R[0]G[7]G[6]G[5]G[4]G[3]G[2]G[1]G[0]B[7]B[6]B[5]B[4]B[3]GB[2]B[1]B[0]

R, G, B = [0 ... 255]

Datapoint values:

ValueConverts to
<r><g><b&gtR = <r>, G = <g>, B = <b&gt

Example:

A value of 0*0*255 corresponds to the color blue.

Knxtopo.txt

The knxtopo.txt is a configuration file for the KNX I/O Server. The KNX Utility provides a graphical interface to modify the content of this file.

The file knxtopo.txt contains the declaration of the used datapoints of all the defined KNX I/O Servers and their functional attributes.

For each KNX datapoint we have a corresponding line with the following syntax:

<io_server_id>.<group_address> : dpt = {1 ... 18}; id = <id>; [priority = {low|normal| urgent};] [read={true|false};] [description = <description_text>]

For instance:

knx.0/0/1 : dpt = 1; id = dpt1; priority = low; read=true; description = Datapoint X

For virtual datapoints use the following syntax.

For a light:

<io_server_id>.light.<id> : [fb = <feedback_datapoint_address>;] [cmd = <command_datapoint_address>;] [on = {1|0};] [description = <description_text>]

For a dimmer:

<io_server_id>.dimmer.<id> : [fb.level = <level_feedback_datapoint_address>;] [fb.onoff = <on_off_feedback_datapoint_address>;] [cmd.level = <level_command_datapoint_address>;] [cmd.onoff = <on_off_command_datapoint_address>;] [cmd.step = <step_command_datapoint_address>;] [on = {1|0};] [stepval = {1|2|3|4|5|6|7};] [trip = {auto|<trip_time>};] [description = <description_text>]

For a RGB:

<io_server_id>.rgb.<id> : [fb.rgb = <rgb_feedback_datapoint_address>;] [fb.onoff = <on_off_feedback_datapoint_address>;] [cmd.rgb = <rgb_command_datapoint_address>;] [cmd.onoff = <on_off_command_datapoint_address>;] [on = {1|0};] [description = <description_text>]

For an automation:

<io_server_id>.autom.<id> : [fb.position = <position_feedback_datapoint_address>;] [fb.updown = <up_down_feedback_datapoint_address>;] [fb.stopup = <stop_up_feedback_datapoint_address>;] [fb.stopdown = <stop_down_feedback_datapoint_address>;] [fb.moving = <moving_feedback_datapoint_address>;] [cmd.updown = <up_down_command_datapoint_address>;] [cmd.position = <position_command_datapoint_address>;] [cmd.stop = <stop_command_datapoint_address>;] [up = {0|1};] [closed = {255|0};] [position = {true|false};] [trip = <trip_time>;] [description = <description_text>]

For a thermostat:

<io_server_id>.thermo.<id> : [fb.setpoint = <setpoint_feedback_datapoint_address>;] [fb.status = <status_feedback_datapoint_address>;] [fb.temp = <temperature_feedback_datapoint_address>;] [fb.cooling.status = <cooling_status_feedback_datapoint_address>;] [fb.heating.status = <heating_status_feedback_datapoint_address>;] [fb.mode = <mode_feedback_datapoint_address>;] [cmd.setpoint = <setpoint_command_datapoint_address>;] [cmd.setpoint.mode = <setpoint_mode_command_datapoint_address>;] [unit = {C|F|K};] [description = <description_text>]

For instance:

knx.light.1 : fb = 0/1/1; cmd = 0/1/2; on = 1; description = Light 1
knx.dimmer.1 : fb.level = 0/1/3; fb.onoff = 0/1/4; cmd.level = 0/1/5; cmd.onoff = 0/1/6
knx.autom.1 : fb.position = 0/1/17; fb.updown = 0/1/13; fb.stopup = 0/1/14; fb.stopdown = 0/1/22; fb.moving = 0/1/28; cmd.updown = 0/1/20; cmd.position = 0/1/21; cmd.stop = 0/1/19; up = 0; closed = 255; position = false; trip = 60; description = Autom 1
knx.thermo.1 : fb.setpoint = 0/1/31; fb.status = 0/1/0; fb.temp = 0/1/33; fb.cooling.status = 0/1/32; fb.heating.status = 0/1/39; fb.mode = 0/1/38; cmd.setpoint = 0/1/37; cmd.setpoint.mode = 0/1/36; unit = C; description = Thermo 1

When the knxtopo.txt configuration is complete and the KNX I/O Server is started, for each defined DPT 1 datapoint and virtual datapoint a corresponding entry is automatically added to the systemtopo.txt devices list so to be able to directly associate them to graphical objects in the Web user interface.

This is an example of an automatically generated systemtopo.txt file:

(devices)
knx.light.1 : LIGHT ; LIGHT ; Light 1
knx.dimmer.1 : LIGHT ; DIMMER ; Dimmer 1
knx.autom.1 : AUTOM ; VSHUT ; Autom 1
knx.dpt1 : LIGHT ; LIGHT ; Datapoint X

You can then add/modify graphical attributes such as the icon types or the thumbnails for any device listed in this file.

User Interface

All the DPT 1 datapoints and virtual datapoints that have been defined are automatically listed in the Project Editor. DPT 1 datapoints and lights and dimmers can be directly linked to a button object, automations to button or 3button objects and thermostats can be controlled using a tempmini object.

KNX UI Light KNX UI Dimmer KNX UI Autom KNX UI Thermo

Release Notes

3.7.0

  • added support for ETS5 export file
  • added support for DPT 29 datapoints
  • added "initreadinterval" I/O Server option
  • minor connection handling improvements

3.5.0

  • added support for DPT 232 datapoints
  • added support for RGB virtual datapoints

3.4.0

  • fixed value encoding error for DPT 16 datapoints
  • removed framedelay option
  • improved frames confirmation handling
  • improved configuration files loading

3.3.0

  • added support for light virtual datapoints

3.2.1

  • fixed bug on auto-discovery of AUTOM datapoints
  • fixed bug on loading of datapoints’ thumbnails

3.2.0

  • initial release

KNX is a registered trademark of KNX Association.