Difference between revisions of "KNX"
Line 74: | Line 74: | ||
|} | |} | ||
− | |||
− | |||
== Configuration == | == Configuration == | ||
Line 824: | Line 822: | ||
The activation of scenario 12 on a datapoint would correspond to: <datapoint_id>.12 = 1 | The activation of scenario 12 on a datapoint would correspond to: <datapoint_id>.12 = 1 | ||
+ | |||
+ | == Web Objects == |
Revision as of 15:00, 18 December 2013
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.
Contents
- 1 Options
- 2 Configuration
- 3 Datapoints
- 3.1 Datapoint types and values
- 3.1.1 Datapoint Type 1 (1 bit, Boolean)
- 3.1.2 Datapoint Type 2 (2 bits, Control)
- 3.1.3 Datapoint Type 3 (4 bits, Dimming, Blinds)
- 3.1.4 Datapoint Type 4 (8 bit, Character set)
- 3.1.5 Datapoint Type 5 (8 bits, Unsigned Value)
- 3.1.6 Datapoint Type 6 (8 bits, Signed Value)
- 3.1.7 Datapoint Type 7 (2 Bytes, Unsigned Value)
- 3.1.8 Datapoint Type 8 (2 Bytes, Signed Value)
- 3.1.9 Datapoint Type 9 (2 Bytes, Float Value)
- 3.1.10 Datapoint Type 10 (3 Bytes, Time)
- 3.1.11 Datapoint Type 11 (3 Bytes, Date)
- 3.1.12 Datapoint Type 12 (4 Bytes, Unsigned Value)
- 3.1.13 Datapoint Type 13 (4 Bytes, Signed Value)
- 3.1.14 Datapoint Type 14 (4 Bytes, Float Value)
- 3.1.15 Datapoint Type 15 (4 Bytes, Access)
- 3.1.16 Datapoint Type 16 (14 Bytes, String)
- 3.1.17 Datapoint Type 17 (1 Byte, Scene Number)
- 3.1.18 Datapoint Type 18 (1 Byte, Scene Control)
- 3.1 Datapoint types and values
- 4 Web Objects
Options
ID | Default | Values | Description |
---|---|---|---|
gui | true | true | enable automatic support of Web GUI objects to show the system status and intercept control buttons |
false | disable support for the Web GUI | ||
startupevents | false | true | generate IO events also during the driver’s start-up phase |
false | start generating events only after HSYCO is aligned with the current status of the system | ||
discovery | true | true | automatically creates the list of all detected datapoints with type DPT 1 and the defined virtual datapoints in the systemtopo.txt file |
false | auto-detect for devices is disabled | ||
fromevents | false | true | generates events for commands sent on the KNX BUS reporting the source address and the value of the command |
false | disable command events | ||
readaftercommand | false | true | forces the driver to read the value of a datapoint after a command is sent to it |
false | the 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> | specifies the port used locally by HSYCO to communicate with the KNXnet/IP gateway. This option might be necessary when employing network address translation (NAT) |
Configuration
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 project files and to configure the datapoints.
It is also possible to manually define the datapoints in the knxtopo.txt file.
Datapoints
ID | Value | R/W | Description | |
---|---|---|---|---|
connection | online | R | connection established to the gateway and initial reading executed | |
offline | R | HSYCO can't connect to the gateway | ||
<datapoint_id> | <value> | R | this datapoint has value <value> | |
W | set this datapont to value <value> | |||
<datapoint_id>.from.<source> | <value> | R | a command with value <value> 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> | 0 | R | the light is off | |
W | turn off the light | |||
1 | R | the light is on | ||
W | turn on the light | |||
flip | W | invert the state of the light | ||
unknown | R | the state of the light is unknown | ||
dimmer.<N> | off | R | the dimmer is off | |
W | turn off the dimmer | |||
on | W | turn on the dimmer | ||
1% - 100% | R | the dimming level is set to the reported level | ||
W | set the dimming level to the specified value | |||
unknown | R | the state of the dimmer is unknown | ||
autom.<N> | if use position = false | up | R | the automation is moving upwards |
down | R | the automation is moving downwards | ||
offup | R | the automation is stopped in a open position | ||
offdown | R | the automation is stopped in the closed position | ||
if use position = true | 0% - 100% | R | the automation is stopped at the reported position | |
0%+ - 100%+ | R | the automation is at the reported position and is closing | ||
0%- - 100%- | R | the automation is at the reported position and is opening | ||
up | W | move the automation upwards | ||
down | W | move the automation downwards | ||
0% - 100% | W | move the automation to the specified position | ||
stop | W | stop the automation | ||
unknown | R | the state of the automation is unknown | ||
thermo.<N>.setpoint.temp | <float_value> | W | set the setpoint to the specified value | |
up | W | increase the setpoint by 0.5 | ||
down | W | decrease the setpoint by 0.5 | ||
thermo.<N>.setpoint | mode | W | switch to the next setpoint mode |
Datapoint types and values
The KNX I/O Server supports all datapoint types (DPTs) with main number ranging from 1 to 18.
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:
b |
b = {0, 1}
Datapoint values:
Value | Converts to |
---|---|
0 | b = 0 |
1 | b = 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:
c | v |
c = {0, 1}, v = {0, 1}
Datapoint values:
Value | Converts to |
---|---|
disabled | c = 0, v = 0 |
0 | c = 1, v = 0 |
1 | c = 1, v = 1 |
Datapoint Type 3 (4 bits, Dimming, Blinds)
KNX bit-level format:
c | step |
c = {0, 1}, step = [000b ... 111b]
Datapoint values:
Value | Converts to |
---|---|
-7 ≤ v < 0 | c = 0, step = |v| |
0 ≤ v ≤ 7 | c = 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:
char |
char = [0 ... 255] (ISO 8859-1 encoding of a character)
Datapoint values:
Value | Converts to |
---|---|
0 ≤ v ≤ 255 | char = 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:
val |
val = [0 ... 255]
Datapoint values:
Value | Converts to |
---|---|
0 ≤ v ≤ 255 | val = 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:
val |
val = [-128 ... 127] (two’s complement notation)
Datapoint values:
Value | Converts to |
---|---|
-128 ≤ v ≤ 127 | val = v |
Datapoint Type 7 (2 Bytes, Unsigned Value)
KNX bit-level format:
val |
val = [0 ... 65535]
Datapoint values:
Value | Converts to |
---|---|
0 ≤ v ≤ 65535 | val = v |
Datapoint Type 8 (2 Bytes, Signed Value)
KNX bit-level format:
val |
val = [-32768 ... 32767] (two’s complement notation)
Datapoint values:
Value | Converts to |
---|---|
-32768 ≤ v ≤ 32767 | val = v |
Datapoint Type 9 (2 Bytes, Float Value)
KNX bit-level format:
m | e | m |
e = [0 ... 15], m = [-2048 ... 2047] (two’s complement notation)
float value = (0.01 * m) * 2^e = [-671088.64 ... 670760.96]
Datapoint values:
Value | Converts to |
---|---|
-671088.64 ≤ v ≤ 670760.96 | float value = v |
Datapoint Type 10 (3 Bytes, Time)
KNX bit-level format:
day | hour | 0 | 0 | min | 0 | 0 | sec |
day = [0 ... 7] (0 = no day, 1 = Monday, ..., 7 = Sunday)
hour = [0 ... 23]
min = [0 ... 59]
sec = [0 ... 59]
Datapoint values:
Value | Converts to |
---|---|
<day>.<hour>.<minutes>.<seconds> | day = <day>, hour = <hour>, min = <min>, sec = <sec> |
Example:
A vale of '2.12.46.23' corresponds to 'Tuesday 12:46:23'.
Datapoint Type 11 (3 Bytes, Date)
KNX bit-level format:
0 | 0 | 0 | day | 0 | 0 | 0 | 0 | month | 0 | year |
day = [1 ... 31]
month = [1 ... 12]
year = [0 ... 99] (if ≥ 90 interpret as 20th century, otherwise interpret as 21st century)
Datapoint values:
Value | Converts to |
---|---|
<year>/<month>/<day>
(1990 ≤ <year> ≤ 2089) |
year = last two digits of <year>, month = <month>, day = <day> |
Example:
A vale of '2011/2/8' corresponds to 'February 8th 2011'.
Datapoint Type 12 (4 Bytes, Unsigned Value)
KNX bit-level format:
val |
val = [0 ... 4294967295]
Datapoint values:
Value | Converts to |
---|---|
0 ≤ v ≤ 4294967295 | val = v |
Datapoint Type 13 (4 Bytes, Signed Value)
KNX bit-level format:
val |
val = [-2147483648 ... 2147483647] (two’s complement notation)
Datapoint values:
Value | Converts to |
---|---|
-2147483648 ≤ v ≤ 2147483647 | val = v |
Datapoint Type 14 (4 Bytes, Float Value)
KNX bit-level format:
s | e | f |
s = {0, 1}, e = [0 .. 255], f = [0 ... 8388607]
float value = 0, [1.40129846432481707E-45, 3.40282346638528860E+38] (IEEE 754 floating point format)
Datapoint values:
Value | Converts to |
---|---|
v = 0 | 1.40129846432481707E-45 ≤ v ≤ 3.40282346638528860E+38 | float value = v |
Datapoint Type 15 (4 Bytes, Access)
KNX bit-level format:
d6 | d5 | d4 | d3 | d2 | d1 | e | p | d | c | index |
d1, d2, d3, d4, d5, d6 = [0 ... 9]
index = [0 ... 15]
e = {0, 1} (0 = no error, 1 = reading of access information was not successful)
p = {0, 1} (0 = not accepted, 1 = accepted)
d = {0, 1} (0 = left to right, 1 = right to left)
c = {0, 1} (0 = no encryption, 1 = access information encrypted)
Datapoint values:
Value | Converts 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)
KNX bit-level format:
char1 | ... | char14 |
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:
Value | Converts to |
---|---|
<string>
(max 14 characters) |
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:
0 | 0 | sn |
sn = [0 ... 63]
Datapoint values:
Value | Converts to |
---|---|
0 ≤ v ≤ 63 | sn = v |
Datapoint Type 18 (1 Byte, Scene Control)
KNX bit-level format:
c | 0 | sn |
c = {0, 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>.
Value | Converts to |
---|---|
record | c = 1 |
1 | c = 0 |
Example:
The activation of scenario 12 on a datapoint would correspond to: <datapoint_id>.12 = 1