|
|
Line 76: |
Line 76: |
| | | |
| {| class="wikitable" | | {| class="wikitable" |
− | !colspan="2"|ID | + | !ID |
| !Value | | !Value |
| !R/W | | !R/W |
Line 83: |
Line 83: |
| |- | | |- |
| | | |
− | |rowspan="2" colspan="2"|connection | + | |rowspan="2"|connection |
| |online | | |online |
| |R | | |R |
− | |connection established to the gateway and initial reading executed | + | |connection established with the board |
| |- | | |- |
| |offline | | |offline |
| |R | | |R |
− | |HSYCO can't connect to the gateway | + | |HSYCO can't connect to the board |
| | | |
| |- | | |- |
| | | |
− | |rowspan="2" colspan="2"|<datapoint_id> | + | |rowspan="3"|pinmode |
− | |rowspan="2"|[[#Datapoint types and values|<value>]] | + | |[[#arduino_pins|<pin>]],input |
− | |R | + | |rowspan="3"|W |
− | |this datapoint has value [[#Datapoint types and values|<value>]] | + | |rowspan="3"|execute the [http://arduino.cc/en/Reference/pinMode <code>pinMode()</code>] function, configuring the pin [[#arduino_pins|<pin>]] as INPUT, OUTPUT or INPUT_PULLUP |
| + | |- |
| + | |[[#arduino_pins|<pin>]],output |
| |- | | |- |
− | |W | + | |[[#arduino_pins|<pin>]],input_pullup |
− | |set this datapont to value [[#Datapoint types and values|<value>]]
| |
| | | |
| |- | | |- |
| | | |
− | |style="white-space:nowrap" colspan="2"|<datapoint_id>.from.<source> | + | |rowspan="2"|digitalwrite |
− | |[[#Datapoint types and values|<value>]]
| + | |[[#arduino_pins|<pin>]],high |
− | |R | + | |rowspan="2"|W |
− | |a command with value [[#Datapoint types and values|<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) | + | |rowspan="2"|execute the [http://arduino.cc/en/Reference/digitalWrite <code>digitalWrite()</code>] function, setting the pin [[#arduino_pins|<pin>]] to high (5V or 3.3V) or low (0V) |
| + | |- |
| + | |[[#arduino_pins|<pin>]],low |
| | | |
| |- | | |- |
| | | |
− | |rowspan="6" colspan="2"|light.<n> | + | |digitalread |
− | |rowspan="2"|0
| + | |[[#arduino_pins|<pin>]] |
− | |R
| |
− | |the light is off
| |
− | |-
| |
| |W | | |W |
− | |turn off the light | + | |execute the [http://arduino.cc/en/Reference/digitalRead <code>digitalRead()</code>] function, reading the value of pin [[#arduino_pins|<pin>]] |
− | |- | + | |
− | |rowspan="2"|1
| |
− | |R
| |
− | |the light is on
| |
| |- | | |- |
| + | |
| + | |analogwrite |
| + | |[[#arduino_pins|<pin>]],<value> |
| |W | | |W |
− | |turn on the light | + | |execute the [http://arduino.cc/en/Reference/analogWrite <code>analogWrite()</code>] function, setting the pin [[#arduino_pins|<pin>]] to a PWM output with duty cycle equal to <value>; the value must be between 0 (always off) and 255 (always on) |
| + | |
| |- | | |- |
− | |flip | + | |
| + | |analogread |
| + | |[[#arduino_pins|<pin>]] |
| |W | | |W |
− | |invert the state of the light | + | |execute the [http://arduino.cc/en/Reference/analogRead <code>analogRead()</code>] function, reading the value of pin [[#arduino_pins|<pin>]] |
− | |-
| |
− | |unknown
| |
− | |R
| |
− | |the state of the light is unknown | |
| | | |
| |- | | |- |
| | | |
− | |rowspan="6" colspan="2"|dimmer.<n> | + | |rowspan="4"|pin.<n> |
− | |rowspan="2"|off | + | |rowspan="2"|0 |
| |R | | |R |
− | |the dimmer is off | + | |pin <n> is low |
| |- | | |- |
| |W | | |W |
− | |turn off the dimmer | + | |execute the [http://arduino.cc/en/Reference/digitalWrite <code>digitalWrite()</code>] function, setting the digital pin <n> to low (0V) |
| + | equal to digitalwrite = <n>,low |
| |- | | |- |
− | |on
| + | |rowspan="2"|1 |
− | |W
| |
− | |turn on the dimmer
| |
− | |-
| |
− | |rowspan="2" style="white-space:nowrap"|1% - 100% | |
| |R | | |R |
− | |the dimming level is set to the reported level | + | |pin <n> is high |
| |- | | |- |
| |W | | |W |
− | |set the dimming level to the specified value | + | |execute the [http://arduino.cc/en/Reference/digitalWrite <code>digitalWrite()</code>] function, setting the digital pin <n> to high (5V or 3.3V) |
− | |-
| + | equal to digitalwrite = <n>,high |
− | |unknown
| |
− | |R
| |
− | |the state of the dimmer is unknown
| |
| | | |
| |- | | |- |
| | | |
− | |rowspan="12" style="white-space:nowrap"|autom.<n> | + | |rowspan="2"|pin.a<n> |
− | |rowspan="4"| if use position = false | + | |rowspan="2"|<value> |
− | |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 | | |R |
− | |the automation is stopped in the closed position | + | |analog pin <n> is set to duty cycle equal to <value> |
| |- | | |- |
− | |rowspan="3"| 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
| |
− | |-
| |
− | |rowspan="5"|
| |
− | |up
| |
| |W | | |W |
− | |move the automation upwards | + | |execute the [http://arduino.cc/en/Reference/analogWrite <code>analogWrite()</code>] function, setting the analog pin <n> to a PWM output with duty cycle equal to <value>; the value must be between 0 (always off) and 255 (always on) |
− | |-
| + | equal to analogwrite = a<n>,<value> |
− | |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
| |
| | | |
| |- | | |- |
| | | |
− | |rowspan="3" colspan="2"|thermo.<n>.setpoint.temp | + | |rowspan="2"|pin.dac<n> |
− | |<float_value> | + | |rowspan="2"|<value> |
− | |W | + | |R |
− | |set the setpoint to the specified value | + | |DAC pin <n> is set to <value> |
| |- | | |- |
− | |up
| |
| |W | | |W |
− | |increase the setpoint by 0.5 | + | |execute the [http://arduino.cc/en/Reference/analogWrite <code>analogWrite()</code>] function, setting the DAC pin <n> to <value> |
| + | equal to analogwrite = dac<n>,<value> |
| + | |
| |- | | |- |
− | |down
| |
− | |W
| |
− | |decrease the setpoint by 0.5
| |
| | | |
| + | |rowspan="2"|<custom_name> |
| + | |rowspan="2"|<value> |
| + | |R |
| + | |the ioSet(<custom_name>, <value>) method was called from the Arduino sketch |
| |- | | |- |
− |
| |
− | |colspan="2"|thermo.<n>.setpoint
| |
− | |mode
| |
| |W | | |W |
− | |switch to the next setpoint mode | + | |if a callback function is defined in the Arduino sketch, this function is called passing <custom_name> and <value> as parameters. The parameters cannot contain the 0x0a, 0xff, or '=' characters |
− | | |
− | |}
| |
− | | |
− | | |
− | === 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''':
| |
− | {| class="wikitable" width="200"
| |
− | |+ 8<span style="padding-right: 18px"></span>7<span style="padding-right: 18px"></span>6<span style="padding-right: 18px"></span>5<span style="padding-right: 18px"></span>4<span style="padding-right: 18px"></span>3<span style="padding-right: 18px"></span>2<span style="padding-right: 18px"></span>1
| |
− | |-
| |
− | | width="12.5%" align="center" |
| |
− | | width="12.5%" align="center" |
| |
− | | width="12.5%" align="center" |
| |
− | | width="12.5%" align="center" |
| |
− | | width="12.5%" align="center" |
| |
− | | width="12.5%" align="center" |
| |
− | | width="12.5%" align="center" |
| |
− | | width="12.5%" align="center" | b
| |
− | |}
| |
− | | |
− | b = {0, 1}
| |
− | | |
− | '''Datapoint values''':
| |
− | | |
− | {| class="wikitable"
| |
− | ! 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''':
| |
− | {| class="wikitable" width="200"
| |
− | |+ 8<span style="padding-right: 18px"></span>7<span style="padding-right: 18px"></span>6<span style="padding-right: 18px"></span>5<span style="padding-right: 18px"></span>4<span style="padding-right: 18px"></span>3<span style="padding-right: 18px"></span>2<span style="padding-right: 18px"></span>1
| |
− | |-
| |
− | | width="12.5%" align="center" |
| |
− | | width="12.5%" align="center" |
| |
− | | width="12.5%" align="center" |
| |
− | | width="12.5%" align="center" |
| |
− | | width="12.5%" align="center" |
| |
− | | width="12.5%" align="center" |
| |
− | | width="12.5%" align="center" | c
| |
− | | width="12.5%" align="center" | v
| |
− | |}
| |
− | | |
− | c = {0, 1}, v = {0, 1}
| |
− | | |
− | '''Datapoint values''':
| |
− | | |
− | {| class="wikitable"
| |
− | ! 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''':
| |
− | {| class="wikitable" width="200"
| |
− | |+ 8<span style="padding-right: 18px"></span>7<span style="padding-right: 18px"></span>6<span style="padding-right: 18px"></span>5<span style="padding-right: 18px"></span>4<span style="padding-right: 18px"></span>3<span style="padding-right: 18px"></span>2<span style="padding-right: 18px"></span>1
| |
− | |-
| |
− | | width="12.5%" align="center" |
| |
− | | width="12.5%" align="center" |
| |
− | | width="12.5%" align="center" |
| |
− | | width="12.5%" align="center" |
| |
− | | width="12.5%" align="center" | c
| |
− | | align="center" | step
| |
− | |}
| |
− | | |
− | c = {0, 1}, step = [000b ... 111b]
| |
− | | |
− | '''Datapoint values''':
| |
− | | |
− | {| class="wikitable"
| |
− | ! Value
| |
− | ! Converts to
| |
− | |-
| |
− | | -7 ≤ v < 0
| |
− | | c = 0, step = <nowiki>|</nowiki>v<nowiki>|</nowiki>
| |
− | |-
| |
− | | 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''': | |
− | {| class="wikitable" width="200"
| |
− | |+ 8<span style="padding-right: 18px"></span>7<span style="padding-right: 18px"></span>6<span style="padding-right: 18px"></span>5<span style="padding-right: 18px"></span>4<span style="padding-right: 18px"></span>3<span style="padding-right: 18px"></span>2<span style="padding-right: 18px"></span>1
| |
− | |-
| |
− | | align="center" | char
| |
− | |}
| |
− | | |
− | char = [0 ... 255] (ISO 8859-1 encoding of a character)
| |
− | | |
− | '''Datapoint values''':
| |
− | | |
− | {| class="wikitable"
| |
− | ! 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''':
| |
− | {| class="wikitable" width="200"
| |
− | |+ 8<span style="padding-right: 18px"></span>7<span style="padding-right: 18px"></span>6<span style="padding-right: 18px"></span>5<span style="padding-right: 18px"></span>4<span style="padding-right: 18px"></span>3<span style="padding-right: 18px"></span>2<span style="padding-right: 18px"></span>1
| |
− | |-
| |
− | | align="center" | val
| |
− | |}
| |
− | | |
− | val = [0 ... 255]
| |
− | | |
− | '''Datapoint values''':
| |
− | | |
− | {| class="wikitable"
| |
− | ! 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''':
| |
− | {| class="wikitable" width="200"
| |
− | |+ 8<span style="padding-right: 18px"></span>7<span style="padding-right: 18px"></span>6<span style="padding-right: 18px"></span>5<span style="padding-right: 18px"></span>4<span style="padding-right: 18px"></span>3<span style="padding-right: 18px"></span>2<span style="padding-right: 18px"></span>1
| |
− | |-
| |
− | | align="center" | val
| |
− | |}
| |
− | | |
− | val = [-128 ... 127] (two’s complement notation)
| |
− | | |
− | '''Datapoint values''':
| |
− | | |
− | {| class="wikitable"
| |
− | ! Value
| |
− | ! Converts to
| |
− | |-
| |
− | | -128 ≤ v ≤ 127
| |
− | | val = v
| |
− | |}
| |
− | | |
− | ==== Datapoint Type 7 (2 Bytes, Unsigned Value) ====
| |
− | | |
− | ----
| |
− | | |
− | '''KNX bit-level format''':
| |
− | | |
− | {| class="wikitable" width="400"
| |
− | |+ 16<span style="padding-right: 11px"></span>15<span style="padding-right: 11px"></span>14<span style="padding-right: 11px"></span>13<span style="padding-right: 11px"></span>12<span style="padding-right: 11px"></span>11<span style="padding-right: 11px"></span>10<span style="padding-right: 11px"></span>9<span style="padding-right: 18px"></span>8<span style="padding-right: 18px"></span>7<span style="padding-right: 18px"></span>6<span style="padding-right: 18px"></span>5<span style="padding-right: 18px"></span>4<span style="padding-right: 18px"></span>3<span style="padding-right: 18px"></span>2<span style="padding-right: 18px"></span>1
| |
− | |-
| |
− | | align="center" | val
| |
− | |}
| |
− | | |
− | val = [0 ... 65535]
| |
− | | |
− | '''Datapoint values''':
| |
− | | |
− | {| class="wikitable"
| |
− | ! Value
| |
− | ! Converts to
| |
− | |-
| |
− | | 0 ≤ v ≤ 65535
| |
− | | val = v
| |
− | |}
| |
− | | |
− | ==== Datapoint Type 8 (2 Bytes, Signed Value) ====
| |
− | | |
− | ----
| |
− | | |
− | '''KNX bit-level format''':
| |
− | | |
− | {| class="wikitable" width="400"
| |
− | |+ 16<span style="padding-right: 11px"></span>15<span style="padding-right: 11px"></span>14<span style="padding-right: 11px"></span>13<span style="padding-right: 11px"></span>12<span style="padding-right: 11px"></span>11<span style="padding-right: 11px"></span>10<span style="padding-right: 11px"></span>9<span style="padding-right: 18px"></span>8<span style="padding-right: 18px"></span>7<span style="padding-right: 18px"></span>6<span style="padding-right: 18px"></span>5<span style="padding-right: 18px"></span>4<span style="padding-right: 18px"></span>3<span style="padding-right: 18px"></span>2<span style="padding-right: 18px"></span>1
| |
− | |-
| |
− | | align="center" | val
| |
− | |}
| |
− | | |
− | val = [-32768 ... 32767] (two’s complement notation)
| |
− | | |
− | '''Datapoint values''':
| |
− | | |
− | {| class="wikitable"
| |
− | ! Value
| |
− | ! Converts to
| |
− | |-
| |
− | | -32768 ≤ v ≤ 32767
| |
− | | val = v
| |
− | |}
| |
− | | |
− | ==== Datapoint Type 9 (2 Bytes, Float Value) ====
| |
− | | |
− | ----
| |
− | | |
− | '''KNX bit-level format''':
| |
− | | |
− | {| class="wikitable" width="400"
| |
− | |+ 16<span style="padding-right: 11px"></span>15<span style="padding-right: 11px"></span>14<span style="padding-right: 11px"></span>13<span style="padding-right: 11px"></span>12<span style="padding-right: 11px"></span>11<span style="padding-right: 11px"></span>10<span style="padding-right: 11px"></span>9<span style="padding-right: 18px"></span>8<span style="padding-right: 18px"></span>7<span style="padding-right: 18px"></span>6<span style="padding-right: 18px"></span>5<span style="padding-right: 18px"></span>4<span style="padding-right: 18px"></span>3<span style="padding-right: 18px"></span>2<span style="padding-right: 18px"></span>1
| |
− | |-
| |
− | | width="6.25%" align="center" | m
| |
− | | width="25%" align="center" | e
| |
− | | align="center" | m
| |
− | |}
| |
− | | |
− | e = [0 ... 15], m = [-2048 ... 2047] (two’s complement notation)
| |
− | | |
− | float value = (0.01 * m) * 2^e = [-671088.64 ... 670760.96]
| |
− | | |
− | '''Datapoint values''':
| |
− | | |
− | {| class="wikitable"
| |
− | ! Value
| |
− | ! Converts to
| |
− | |-
| |
− | | -671088.64 ≤ v ≤ 670760.96
| |
− | | float value = v
| |
− | |}
| |
− | | |
− | ==== Datapoint Type 10 (3 Bytes, Time) ====
| |
− | | |
− | ----
| |
− | | |
− | '''KNX bit-level format''':
| |
− | | |
− | {| class="wikitable" width="600"
| |
− | |+ 24<span style="padding-right: 11px"></span>23<span style="padding-right: 11px"></span>22<span style="padding-right: 11px"></span>21<span style="padding-right: 11px"></span>20<span style="padding-right: 11px"></span>19<span style="padding-right: 11px"></span>18<span style="padding-right: 11px"></span>17<span style="padding-right: 11px"></span>16<span style="padding-right: 11px"></span>15<span style="padding-right: 11px"></span>14<span style="padding-right: 11px"></span>13<span style="padding-right: 11px"></span>12<span style="padding-right: 11px"></span>11<span style="padding-right: 11px"></span>10<span style="padding-right: 11px"></span>9<span style="padding-right: 18px"></span>8<span style="padding-right: 18px"></span>7<span style="padding-right: 18px"></span>6<span style="padding-right: 18px"></span>5<span style="padding-right: 18px"></span>4<span style="padding-right: 18px"></span>3<span style="padding-right: 18px"></span>2<span style="padding-right: 18px"></span>1
| |
− | |-
| |
− | | width="12.5%" align="center" | day
| |
− | | width="20.83%" align="center" | hour
| |
− | | width="4.17%" align="center" | 0
| |
− | | width="4.17%" align="center" | 0
| |
− | | width="25%" align="center" | min
| |
− | | width="4.17%" align="center" | 0
| |
− | | width="4.17%" align="center" | 0
| |
− | | width="25%" align="center" | sec
| |
− | |}
| |
− | | |
− | day = [0 ... 7] (0 = no day, 1 = Monday, ..., 7 = Sunday)
| |
− | | |
− | hour = [0 ... 23]
| |
− | | |
− | min = [0 ... 59]
| |
− | | |
− | sec = [0 ... 59]
| |
− | | |
− | '''Datapoint values''':
| |
− | | |
− | {| class="wikitable"
| |
− | ! Value
| |
− | ! Converts to
| |
− | |-
| |
− | | <day>.<hour>.<minutes>.<seconds>
| |
− | | day = <day>, hour = <hour>, min = <min>, sec = <sec>
| |
| |} | | |} |
| | | |
− | '''Example''': | + | <span id="arduino_pins"> |
− | | + | '''Pins syntax''' |
− | A vale of '2.12.46.23' corresponds to 'Tuesday 12:46:23'.
| |
| | | |
− | ==== Datapoint Type 11 (3 Bytes, Date) ====
| + | The naming convention HSYCO uses for the pins corresponds to the one used by Arduino. |
| | | |
− | ----
| + | Digital pins are numbered from 0 up, with no prefix. |
− | | |
− | '''KNX bit-level format''':
| |
− | | |
− | {| class="wikitable" width="600"
| |
− | |+ 24<span style="padding-right: 11px"></span>23<span style="padding-right: 11px"></span>22<span style="padding-right: 11px"></span>21<span style="padding-right: 11px"></span>20<span style="padding-right: 11px"></span>19<span style="padding-right: 11px"></span>18<span style="padding-right: 11px"></span>17<span style="padding-right: 11px"></span>16<span style="padding-right: 11px"></span>15<span style="padding-right: 11px"></span>14<span style="padding-right: 11px"></span>13<span style="padding-right: 11px"></span>12<span style="padding-right: 11px"></span>11<span style="padding-right: 11px"></span>10<span style="padding-right: 11px"></span>9<span style="padding-right: 18px"></span>8<span style="padding-right: 18px"></span>7<span style="padding-right: 18px"></span>6<span style="padding-right: 18px"></span>5<span style="padding-right: 18px"></span>4<span style="padding-right: 18px"></span>3<span style="padding-right: 18px"></span>2<span style="padding-right: 18px"></span>1
| |
− | |-
| |
− | | width="4.175%" align="center" | 0
| |
− | | width="4.175%" align="center" | 0
| |
− | | width="4.175%" align="center" | 0
| |
− | | width="20.9%" align="center" | day
| |
− | | width="4.175%" align="center" | 0
| |
− | | width="4.175%" align="center" | 0
| |
− | | width="4.175%" align="center" | 0
| |
− | | width="4.175%" align="center" | 0
| |
− | | width="16.8%" align="center" | month
| |
− | | width="4.175%" align="center" | 0
| |
− | | align="center" | year
| |
− | |}
| |
− | | |
− | day = [1 ... 31]
| |
− | | |
− | month = [1 ... 12]
| |
− | | |
− | year = [0 ... 99] (if ≥ 90 interpret as 20th century, otherwise interpret as 21st century)
| |
− | | |
− | '''Datapoint values''':
| |
− | | |
− | {| class="wikitable"
| |
− | ! 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''':
| |
− | | |
− | {| class="wikitable" width="800"
| |
− | |+ 32<span style="padding-right: 11px"></span>31<span style="padding-right: 11px"></span>30<span style="padding-right: 11px"></span>29<span style="padding-right: 11px"></span>28<span style="padding-right: 11px"></span>27<span style="padding-right: 11px"></span>26<span style="padding-right: 11px"></span>25<span style="padding-right: 11px"></span>24<span style="padding-right: 11px"></span>23<span style="padding-right: 11px"></span>22<span style="padding-right: 11px"></span>21<span style="padding-right: 11px"></span>20<span style="padding-right: 11px"></span>19<span style="padding-right: 11px"></span>18<span style="padding-right: 11px"></span>17<span style="padding-right: 11px"></span>16<span style="padding-right: 11px"></span>15<span style="padding-right: 11px"></span>14<span style="padding-right: 11px"></span>13<span style="padding-right: 11px"></span>12<span style="padding-right: 11px"></span>11<span style="padding-right: 11px"></span>10<span style="padding-right: 11px"></span>9<span style="padding-right: 18px"></span>8<span style="padding-right: 18px"></span>7<span style="padding-right: 18px"></span>6<span style="padding-right: 18px"></span>5<span style="padding-right: 18px"></span>4<span style="padding-right: 18px"></span>3<span style="padding-right: 18px"></span>2<span style="padding-right: 18px"></span>1
| |
− | |-
| |
− | | align="center" | val
| |
− | |}
| |
− | | |
− | val = [0 ... 4294967295]
| |
− | | |
− | '''Datapoint values''':
| |
− | | |
− | {| class="wikitable"
| |
− | ! Value
| |
− | ! Converts to
| |
− | |-
| |
− | | 0 ≤ v ≤ 4294967295
| |
− | | val = v
| |
− | |}
| |
− | | |
− | ==== Datapoint Type 13 (4 Bytes, Signed Value) ====
| |
− | | |
− | ----
| |
− | | |
− | '''KNX bit-level format''':
| |
− | | |
− | {| class="wikitable" width="800"
| |
− | |+ 32<span style="padding-right: 11px"></span>31<span style="padding-right: 11px"></span>30<span style="padding-right: 11px"></span>29<span style="padding-right: 11px"></span>28<span style="padding-right: 11px"></span>27<span style="padding-right: 11px"></span>26<span style="padding-right: 11px"></span>25<span style="padding-right: 11px"></span>24<span style="padding-right: 11px"></span>23<span style="padding-right: 11px"></span>22<span style="padding-right: 11px"></span>21<span style="padding-right: 11px"></span>20<span style="padding-right: 11px"></span>19<span style="padding-right: 11px"></span>18<span style="padding-right: 11px"></span>17<span style="padding-right: 11px"></span>16<span style="padding-right: 11px"></span>15<span style="padding-right: 11px"></span>14<span style="padding-right: 11px"></span>13<span style="padding-right: 11px"></span>12<span style="padding-right: 11px"></span>11<span style="padding-right: 11px"></span>10<span style="padding-right: 11px"></span>9<span style="padding-right: 18px"></span>8<span style="padding-right: 18px"></span>7<span style="padding-right: 18px"></span>6<span style="padding-right: 18px"></span>5<span style="padding-right: 18px"></span>4<span style="padding-right: 18px"></span>3<span style="padding-right: 18px"></span>2<span style="padding-right: 18px"></span>1
| |
− | |-
| |
− | | align="center" | val
| |
− | |}
| |
− | | |
− | val = [-2147483648 ... 2147483647] (two’s complement notation)
| |
− | | |
− | '''Datapoint values''':
| |
− | | |
− | {| class="wikitable"
| |
− | ! Value
| |
− | ! Converts to
| |
− | |-
| |
− | | -2147483648 ≤ v ≤ 2147483647
| |
− | | val = v
| |
− | |}
| |
− | | |
− | ==== Datapoint Type 14 (4 Bytes, Float Value) ====
| |
− | | |
− | ----
| |
− | | |
− | '''KNX bit-level format''':
| |
− | | |
− | {| class="wikitable" width="800"
| |
− | |+ 32<span style="padding-right: 11px"></span>31<span style="padding-right: 11px"></span>30<span style="padding-right: 11px"></span>29<span style="padding-right: 11px"></span>28<span style="padding-right: 11px"></span>27<span style="padding-right: 11px"></span>26<span style="padding-right: 11px"></span>25<span style="padding-right: 11px"></span>24<span style="padding-right: 11px"></span>23<span style="padding-right: 11px"></span>22<span style="padding-right: 11px"></span>21<span style="padding-right: 11px"></span>20<span style="padding-right: 11px"></span>19<span style="padding-right: 11px"></span>18<span style="padding-right: 11px"></span>17<span style="padding-right: 11px"></span>16<span style="padding-right: 11px"></span>15<span style="padding-right: 11px"></span>14<span style="padding-right: 11px"></span>13<span style="padding-right: 11px"></span>12<span style="padding-right: 11px"></span>11<span style="padding-right: 11px"></span>10<span style="padding-right: 11px"></span>9<span style="padding-right: 18px"></span>8<span style="padding-right: 18px"></span>7<span style="padding-right: 18px"></span>6<span style="padding-right: 18px"></span>5<span style="padding-right: 18px"></span>4<span style="padding-right: 18px"></span>3<span style="padding-right: 18px"></span>2<span style="padding-right: 18px"></span>1
| |
− | |-
| |
− | | width="3.2%" align="center" | s
| |
− | | width="25.5%" align="center" | e
| |
− | | align="center" | 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''':
| |
− | | |
− | {| class="wikitable"
| |
− | ! Value
| |
− | ! Converts to
| |
− | |-
| |
− | | v = 0 <nowiki>|</nowiki> 1.40129846432481707E-45 ≤ v ≤ 3.40282346638528860E+38
| |
− | | float value = v
| |
− | |}
| |
− | | |
− | ==== Datapoint Type 15 (4 Bytes, Access) ====
| |
− | | |
− | ----
| |
− | | |
− | '''KNX bit-level format''':
| |
− | | |
− | {| class="wikitable" width="800"
| |
− | |+ 32<span style="padding-right: 11px"></span>31<span style="padding-right: 11px"></span>30<span style="padding-right: 11px"></span>29<span style="padding-right: 11px"></span>28<span style="padding-right: 11px"></span>27<span style="padding-right: 11px"></span>26<span style="padding-right: 11px"></span>25<span style="padding-right: 11px"></span>24<span style="padding-right: 11px"></span>23<span style="padding-right: 11px"></span>22<span style="padding-right: 11px"></span>21<span style="padding-right: 11px"></span>20<span style="padding-right: 11px"></span>19<span style="padding-right: 11px"></span>18<span style="padding-right: 11px"></span>17<span style="padding-right: 11px"></span>16<span style="padding-right: 11px"></span>15<span style="padding-right: 11px"></span>14<span style="padding-right: 11px"></span>13<span style="padding-right: 11px"></span>12<span style="padding-right: 11px"></span>11<span style="padding-right: 11px"></span>10<span style="padding-right: 11px"></span>9<span style="padding-right: 18px"></span>8<span style="padding-right: 18px"></span>7<span style="padding-right: 18px"></span>6<span style="padding-right: 18px"></span>5<span style="padding-right: 18px"></span>4<span style="padding-right: 18px"></span>3<span style="padding-right: 18px"></span>2<span style="padding-right: 18px"></span>1
| |
− | |-
| |
− | | width="12.5%" align="center" | d6
| |
− | | width="12.5%" align="center" | d5
| |
− | | width="12.5%" align="center" | d4
| |
− | | width="12.5%" align="center" | d3
| |
− | | width="12.5%" align="center" | d2
| |
− | | width="12.5%" align="center" | d1
| |
− | | width="3.125%" align="center" | e
| |
− | | width="3.125%" align="center" | p
| |
− | | width="3.125%" align="center" | d
| |
− | | width="3.125%" align="center" | c
| |
− | | width="12.5%" align="center" | 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''':
| |
− | | |
− | {| class="wikitable"
| |
− | ! Value
| |
− | ! Converts to
| |
− | |-
| |
− | | <nowiki><d6>.<d5>.<d4>.<d3>.<d2>.<d1>.<e>.<p>.<d>.<c>.<index></nowiki>
| |
− | | <nowiki>d6 = <d6>, d5 = <d5>, d4 = <d4>, d3 = <d3>, d2 = <d2>, d1 = <d1>, e = <e>, p = <p>, d = <d>, c = <c>, index = <index></nowiki>
| |
− | |}
| |
− | | |
− | '''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''':
| |
− | | |
− | {| class="wikitable" width="500"
| |
− | |+ 112 111 110 109 108 107 106 105<span style="padding-right: 50px"></span>...<span style="padding-right: 50px"></span>8<span style="padding-right: 18px"></span>7<span style="padding-right: 18px"></span>6<span style="padding-right: 18px"></span>5<span style="padding-right: 18px"></span>4<span style="padding-right: 18px"></span>3<span style="padding-right: 18px"></span>2<span style="padding-right: 18px"></span>1
| |
− | |-
| |
− | | width="40%" align="center" | char1
| |
− | | width="20%" align="center" style="background-color:#ffffff" | ...
| |
− | | width="40%" align="center" | 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''':
| |
− | | |
− | {| class="wikitable"
| |
− | ! 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''':
| |
− | | |
− | {| class="wikitable" width="200"
| |
− | |+ 8<span style="padding-right: 18px"></span>7<span style="padding-right: 18px"></span>6<span style="padding-right: 18px"></span>5<span style="padding-right: 18px"></span>4<span style="padding-right: 18px"></span>3<span style="padding-right: 18px"></span>2<span style="padding-right: 18px"></span>1
| |
− | |-
| |
− | | width="12.5%" align="center" | 0
| |
− | | width="12.5%" align="center" | 0
| |
− | | align="center" | sn
| |
− | |}
| |
− | | |
− | sn = [0 ... 63]
| |
− | | |
− | '''Datapoint values''':
| |
− | | |
− | {| class="wikitable"
| |
− | ! Value
| |
− | ! Converts to
| |
− | |-
| |
− | | 0 ≤ v ≤ 63
| |
− | | sn = v
| |
− | |}
| |
− | | |
− | ==== Datapoint Type 18 (1 Byte, Scene Control) ====
| |
− | | |
− | ----
| |
− | | |
− | '''KNX bit-level format''':
| |
− | | |
− | {| class="wikitable" width="200"
| |
− | |+ 8<span style="padding-right: 18px"></span>7<span style="padding-right: 18px"></span>6<span style="padding-right: 18px"></span>5<span style="padding-right: 18px"></span>4<span style="padding-right: 18px"></span>3<span style="padding-right: 18px"></span>2<span style="padding-right: 18px"></span>1
| |
− | |-
| |
− | | width="12.5%" align="center" | c
| |
− | | width="12.5%" align="center" | 0
| |
− | | align="center" | 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>.
| |
− | | |
− | {| class="wikitable"
| |
− | ! Value
| |
− | ! Converts to
| |
− | |-
| |
− | | record
| |
− | | c = 1
| |
− | |-
| |
− | | 1
| |
− | | c = 0
| |
− | |}
| |
| | | |
− | '''Example''':
| + | Analog pins start with the "a" prefix, like "a0", "a1" etc. (all lowercase). |
| | | |
− | The activation of scenario 12 on a datapoint would correspond to: <datapoint_id>.12 = 1 | + | The DAC analog out pins in Arduino DUE are "dac0" and "dac1" (all lowercase). |
| + | </span> |
| | | |
| == UI Objects == | | == UI Objects == |