Starting with openHAB 2.3 Snapshot build #1230, the new KNX v2 binding has become generally available.
I will type up here my experiences from the migration steps that I performed to move from my existing KNX v1 configuration to the new KNX v2 stuff.
Multiple edits to follow
Step 0) Read https://www.openhab.org/addons/bindings/knx/
Step 1) Backup your existing configuration files !!!
- $OPENHAB_CONF/services/knx.cfg
- $OPENHAB_CONF/items/knx.items
Step 2) Uninstall KNX1 binding and install KNX2 binding.
Check your $OPENHAB_CONF/services/addons.cfg
also (if you use the bindings =
line)
Step 3) Create a new $OPENHAB_CONF/things/KNX.things
file and define your system.
Sample with one Bridge, one Actuator with 4 channels below:
Bridge knx:ip:GIRA2167 "GIRA KNX/IP Router" @ "KNX" [
type="ROUTER",
ipAddress="224.0.23.12",
portNumber=3671,
localIp="172.16.13.100",
readingPause=50,
responseTimeout=10,
readRetriesLimit=3,
autoReconnectPeriod=30,
localSourceAddr="1.2.200" ]
{
Thing device GW90741_4 "Switch Actuator 4" @ "KNX" [ address="1.1.4", fetch=false, pingInterval=600, readInterval=0 ]
{
Type switch : Channel_41 "Channel 4.1" [ ga="1/0/12+<1/2/12" ]
Type switch : Channel_42 "Channel 4.2" [ ga="1/0/13+<1/2/13" ]
Type switch : Channel_43 "Channel 4.3" [ ga="1/0/14+<1/2/14" ]
Type switch : Channel_44 "Channel 4.4" [ ga="1/0/15+<1/2/15" ]
}
}
Step 4) Create a new $OPENHAB_CONF/items/KNX.items
file and define your first item and link it to the correct Thing’s channel above
Switch P06_Small_LED "P06 Small LED" <switch> (gGF_P06_Office,gGF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_4:Channel_42" }
With regards to naming the new Things, Channels and Items, I used the following concept:
- For the Bridge and the Things: Use the Product IDs of the physical devices
- For the Thing Channel Names: Use the Channel IDs of the Actuators (Switch and Shutter)
- Use Logical names for the Items and link them to the Thing Channels
Mid_Panel.pdf (261.5 KB)
Full Config:
/etc/openhab2/things/KNX.things
Bridge knx:ip:GIRA2167 "GIRA KNX/IP Router" @ "KNX" [
type="ROUTER",
ipAddress="224.0.23.12",
portNumber=3671,
localIp="172.16.13.100",
readingPause=50,
responseTimeout=10,
readRetriesLimit=3,
autoReconnectPeriod=1,
localSourceAddr="1.2.200" ]
{
Thing device GW90741_1 "Switch Actuator 1" @ "KNX" [ address="1.1.1", fetch=false, pingInterval=600, readInterval=0 ]
{
Type switch : Ch_11 "Channel 1.1" [ ga="1/0/8+<1/2/8" ]
Type switch : Ch_12 "Channel 1.2" [ ga="1/0/9+<1/2/9" ]
Type switch : Ch_13 "Channel 1.3" [ ga="1/0/10+<1/2/12" ]
Type switch : Ch_14 "Channel 1.4" [ ga="1/0/11+<1/2/11" ]
}
Thing device GW90741_2 "Switch Actuator 2" @ "KNX" [ address="1.1.2", fetch=false, pingInterval=600, readInterval=0 ]
{
Type switch : Ch_21 "Channel 2.1" [ ga="1/0/6+<1/2/6" ]
Type switch : Ch_22 "Channel 2.2" [ ga="1/0/7+<1/2/7" ]
Type switch : Ch_23 "Channel 2.3" [ ga="1/0/1+<1/2/1" ]
Type switch : Ch_24 "Channel 2.4" [ ga="1/0/2+<1/2/2" ]
}
Thing device GW90741_3 "Switch Actuator 3" @ "KNX" [ address="1.1.3", fetch=false, pingInterval=600, readInterval=0 ]
{
Type switch : Ch_31 "Channel 3.1" [ ga="1/0/3+<1/2/3" ]
Type switch : Ch_32 "Channel 3.2" [ ga="1/0/4+<1/2/4" ]
Type switch : Ch_33 "Channel 3.3" [ ga="1/0/5+<1/2/5" ]
Type switch : Ch_34 "Channel 3.4" [ ga="1/0/14+<1/2/14" ]
}
Thing device GW90741_4 "Switch Actuator 4" @ "KNX" [ address="1.1.4", fetch=false, pingInterval=600, readInterval=0 ]
{
Type switch : Ch_41 "Channel 4.1" [ ga="1/0/12+<1/2/12" ]
Type switch : Ch_42 "Channel 4.2" [ ga="1/0/13+<1/2/13" ]
Type switch : Ch_43 "Channel 4.3" [ ga="1/0/14+<1/2/14" ]
Type switch : Ch_44 "Channel 4.4" [ ga="1/0/15+<1/2/15" ]
}
Thing device GW90741_5 "Switch Actuator 5" @ "KNX" [ address="1.1.5", fetch=false, pingInterval=600, readInterval=0 ]
{
Type switch : Ch_51 "Channel 5.1" [ ga="1/0/16+<1/2/16" ]
Type switch : Ch_52 "Channel 5.2" [ ga="1/0/17+<1/2/17" ]
Type switch : Ch_53 "Channel 5.3" [ ga="1/0/18+<1/2/18" ]
Type switch : Ch_54 "Channel 5.4" [ ga="1/0/19+<1/2/19" ]
}
Thing device GW90741_6 "Switch Actuator 6" @ "KNX" [ address="1.1.6", fetch=false, pingInterval=600, readInterval=0 ]
{
Type switch : Ch_61 "Channel 6.1" [ ga="1/1/0+<1/2/20" ]
Type switch : Ch_62 "Channel 6.2" [ ga="1/1/1+<1/2/21" ]
Type switch : Ch_63 "Channel 6.3" [ ga="1/1/2+<1/2/22" ]
Type switch : Ch_64 "Channel 6.4" [ ga="1/1/9+<1/2/29" ]
}
Thing device GW90741_7 "Switch Actuator 7" @ "KNX" [ address="1.1.7", fetch=false, pingInterval=600, readInterval=0 ]
{
Type switch : Ch_71 "Channel 7.1" [ ga="1/1/3+<1/2/23" ]
Type switch : Ch_72 "Channel 7.2" [ ga="1/1/4+<1/2/24" ]
Type switch : Ch_73 "Channel 7.3" [ ga="1/1/7+<1/2/27" ]
Type switch : Ch_74 "Channel 7.4" [ ga="1/1/8+<1/2/28" ]
}
Thing device GW90741_8 "Switch Actuator 8" @ "KNX" [ address="1.1.8", fetch=false, pingInterval=600, readInterval=0 ]
{
Type switch : Ch_81 "Channel 8.1" [ ga="1/1/10+<1/2/30" ]
Type switch : Ch_82 "Channel 8.2" [ ga="1/1/11+<1/2/31" ]
Type switch : Ch_83 "Channel 8.3" [ ga="1/1/12+<1/2/32" ]
Type switch : Ch_84 "Channel 8.4" [ ga="1/1/13+<1/2/33" ]
}
Thing device GW90741_9 "Switch Actuator 9" @ "KNX" [ address="1.1.9", fetch=false, pingInterval=600, readInterval=0 ]
{
Type switch : Ch_91 "Channel 9.1" [ ga="1/1/5+<1/2/25" ]
Type switch : Ch_92 "Channel 9.2" [ ga="1/1/6+<1/2/26" ]
Type switch : Ch_93 "Channel 9.3" [ ga="1/0/35+<1/2/35" ]
Type switch : Ch_94 "Channel 9.4" [ ga="1/0/36+<1/2/36" ]
}
Thing device GW90857_10 "Shutter Actuator 10" @ "KNX" [ address="1.1.10", fetch=false, pingInterval=600, readInterval=0 ]
{
Type rollershutter : Ch_101 "Channel 10.1" [ upDown="2/1/0", stopMove="2/1/1", position="2/3/10+<2/2/10" ]
Type rollershutter : Ch_102 "Channel 10.2" [ upDown="2/1/2", stopMove="2/1/3", position="2/3/12+<2/2/12" ]
Type rollershutter : Ch_103 "Channel 10.3" [ upDown="2/1/4", stopMove="2/1/5", position="2/3/14+<2/2/14" ]
Type rollershutter : Ch_104 "Channel 10.4" [ upDown="2/1/6", stopMove="2/1/7", position="2/3/16+<2/2/16" ]
}
Thing device GW90857_11 "Shutter Actuator 11" @ "KNX" [ address="1.1.11", fetch=false, pingInterval=600, readInterval=0 ]
{
Type rollershutter : Ch_111 "Channel 11.1" [ upDown="2/1/8", stopMove="2/1/9", position="2/3/18+<2/2/18" ]
Type rollershutter : Ch_112 "Channel 11.2" [ upDown="2/0/0", stopMove="2/0/1", position="2/3/0+<2/2/0" ]
Type rollershutter : Ch_113 "Channel 11.3" [ upDown="2/0/2", stopMove="2/0/3", position="2/3/2+<2/2/2" ]
Type rollershutter : Ch_114 "Channel 11.4" [ upDown="2/0/4", stopMove="2/0/5", position="2/3/4+<2/2/4" ]
}
Thing device GW90857_12 "Shutter Actuator 12" @ "KNX" [ address="1.1.12", fetch=false, pingInterval=600, readInterval=0 ]
{
Type rollershutter : Ch_121 "Channel 12.1" [ upDown="2/0/6", stopMove="2/0/7", position="2/3/6+<2/2/6" ]
Type rollershutter : Ch_122 "Channel 12.2" [ upDown="2/0/8", stopMove="2/0/9", position="2/3/8+<2/2/8" ]
}
Thing device PM30D01_C "3P Energy Meter Current" @ "KNX" [ address="1.1.32", fetch=false, pingInterval=600, readInterval=10 ]
{
Type number : Ch_CL1 "Channel CL1" [ ga="14.019:<3/1/1" ]
Type number : Ch_CL2 "Channel CL2" [ ga="14.019:<3/1/2" ]
Type number : Ch_CL3 "Channel CL3" [ ga="14.019:<3/1/3" ]
}
Thing device PM30D01_V "3P Energy Meter Voltage" @ "KNX" [ address="1.1.32", fetch=false, pingInterval=600, readInterval=300 ]
{
Type number : Ch_VL1N "Channel VL1N" [ ga="14.028:<3/2/1" ]
Type number : Ch_VL2N "Channel VL2N" [ ga="14.028:<3/2/2" ]
Type number : Ch_VL3N "Channel VL3N" [ ga="14.028:<3/2/3" ]
Type number : Ch_VL12 "Channel VL12" [ ga="14.028:<3/2/4" ]
Type number : Ch_VL23 "Channel VL23" [ ga="14.028:<3/2/5" ]
Type number : Ch_VL31 "Channel VL31" [ ga="14.028:<3/2/6" ]
}
Thing device PM30D01_P "3P Energy Meter Power" @ "KNX" [ address="1.1.32", fetch=false, pingInterval=600, readInterval=300 ]
{
Type number : Ch_ACPSum "Channel ACPSum" [ ga="14.056:<3/3/1" ]
Type number : Ch_ACPL1 "Channel ACPL1" [ ga="14.056:<3/3/2" ]
Type number : Ch_ACPL2 "Channel ACPL2" [ ga="14.056:<3/3/3" ]
Type number : Ch_ACPL3 "Channel ACPL3" [ ga="14.056:<3/3/4" ]
Type number : Ch_APPSum "Channel APPSum" [ ga="14.056:<3/3/5" ]
Type number : Ch_APPL1 "Channel APPL1" [ ga="14.056:<3/3/6" ]
Type number : Ch_APPL2 "Channel APPL2" [ ga="14.056:<3/3/7" ]
Type number : Ch_APPL3 "Channel APPL3" [ ga="14.056:<3/3/8" ]
Type number : Ch_RPSum "Channel RPSum" [ ga="14.056:<3/3/9" ]
Type number : Ch_RPL1 "Channel RPL1" [ ga="14.056:<3/3/10" ]
Type number : Ch_RPL2 "Channel RPL2" [ ga="14.056:<3/3/11" ]
Type number : Ch_RPL3 "Channel RPL3" [ ga="14.056:<3/3/12" ]
Type number : Ch_PFSum "Channel PFSum" [ ga="14.056:<3/3/13" ]
Type number : Ch_PFL1 "Channel PFL1" [ ga="14.056:<3/3/14" ]
Type number : Ch_PFL2 "Channel PFL2" [ ga="14.056:<3/3/15" ]
Type number : Ch_PFL3 "Channel PFL3" [ ga="14.056:<3/3/16" ]
}
Thing device PM30D01_E "3P Energy Meter Energy" @ "KNX" [ address="1.1.32", fetch=false, pingInterval=600, readInterval=300 ]
{
Type number : Ch_AEISum "Channel AEISum" [ ga="13.010:<3/4/1" ]
Type number : Ch_AEIL1 "Channel AEIL1" [ ga="13.010:<3/4/2" ]
Type number : Ch_AEIL2 "Channel AEIL2" [ ga="13.010:<3/4/3" ]
Type number : Ch_AEIL3 "Channel AEIL3" [ ga="13.010:<3/4/4" ]
Type number : Ch_AEESum "Channel AEESum" [ ga="13.010:<3/4/5" ]
Type number : Ch_AEEL1 "Channel AEEL1" [ ga="13.010:<3/4/6" ]
Type number : Ch_AEEL2 "Channel AEEL2" [ ga="13.010:<3/4/7" ]
Type number : Ch_AEEL3 "Channel AEEL3" [ ga="13.010:<3/4/8" ]
Type number : Ch_REISum "Channel REISum" [ ga="13.012:<3/4/9" ]
Type number : Ch_REIL1 "Channel REIL1" [ ga="13.012:<3/4/10" ]
Type number : Ch_REIL2 "Channel REIL2" [ ga="13.012:<3/4/11" ]
Type number : Ch_REEL3 "Channel REEL3" [ ga="13.012:<3/4/16" ]
}
Thing device PM30D01_F "3P Energy Meter Frequency" @ "KNX" [ address="1.1.32", fetch=false, pingInterval=600, readInterval=300 ]
{
Type number : Ch_FR "Channel FR" [ ga="14.033:<3/5/1" ]
}
}
/etc/openhab2/items/KNX.items
/* GW90741_1 */
Switch P11_Small_LED "P11 Small LED" <switch> (gGF_P11_Living,gGF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_1:Ch_11" }
Switch P11_Large_LED "P11 Large LED" <switch> (gGF_P11_Living,gGF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_1:Ch_12" }
Switch P11_Light "P11 Dining Light" <switch> (gGF_P11_Living,gGF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_1:Ch_13" }
Switch P11_Terrace_Light "P11 Terrace Light" <switch> (gGF_P11_Living,gGF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_1:Ch_14" }
/* GW90741_2 */
Switch P08_Terrace_Large_LED "P08 Terrace Large LED" <switch> (gGF_P08_Kitchen,gGF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_2:Ch_21" }
Switch P08_Terrace_Small_LED "P08 Terrace Small LED" <switch> (gGF_P08_Kitchen,gGF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_2:Ch_22" }
Switch P10_Light "P10 Light" <switch> (gGF_P10_CompRoom,gGF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_2:Ch_23" }
Switch P09_Light "P09 Light" <switch> (gGF_P09_TechRoom,gGF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_2:Ch_24" }
/* GW90741_3 */
Switch P08_LED "P08 LED" <switch> (gGF_P08_Kitchen,gGF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_3:Ch_31" }
Switch P08_Ventilator "P08 Ventilator" <switch> (gGF_P08_Kitchen,gGF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_3:Ch_32" }
Switch P08_Light "P08 Light" <switch> (gGF_P08_Kitchen,gGF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_3:Ch_33" }
Switch E09_Master_Terrace "E09 Master Terrace" <switch> (gFF_E09_Bedroom,gFF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_3:Ch_34" }
/* GW90741_4 */
Switch P06_Large_LED "P06 Large LED" <switch> (gGF_P06_Office,gGF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_4:Ch_41" }
Switch P06_Small_LED "P06 Small LED" <switch> (gGF_P06_Office,gGF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_4:Ch_42" }
Switch P07_Large_LED "P07 Large LED" <switch> (gGF_P07_Guest,gGF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_4:Ch_43" }
Switch P07_Small_LED "P07 Small LED" <switch> (gGF_P07_Guest,gGF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_4:Ch_44" }
/* GW90741_5 */
Switch P03_Wh_Light "P03 Wh. Light" <switch> (gGF_P03_Warehouse,gGF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_5:Ch_51" }
Switch P05_Light "P05 Light" <switch> (gGF_P05_Laundry,gGF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_5:Ch_52" }
Switch P04_LED "P04 LED" <switch> (gGF_P04_Bath,gGF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_5:Ch_53" }
Switch P04_Mirror "P04 Mirror" <switch> (gGF_P04_Bath,gGF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_5:Ch_54" }
/* GW90741_6 */
Switch E04a_Mirror "E04a Mirror" <switch> (gFF_E04a_MBath,gFF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_6:Ch_61" }
Switch E04a_LED "E04a LED" <switch> (gFF_E04a_MBath,gFF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_6:Ch_62" }
Switch E04b_Light "E04b Light" <switch> (gFF_E04b_Dressing,gFF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_6:Ch_63" }
Switch E07_Light "E07 Light" <switch> (gFF_E07_Dressing,gFF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_6:Ch_64" }
/* GW90741_7 */
Switch E05_LED "E05 LED" <switch> (gFF_E05_SBath,gFF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_7:Ch_71" }
Switch E05_Mirror "E05 Mirror" <switch> (gFF_E05_SBath,gFF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_7:Ch_72" }
Switch E06_Large_LED "E06 Large LED" <switch> (gFF_E06_S,gFF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_7:Ch_73" }
Switch E06_Small_LED "E06 Small LED" <switch> (gFF_E06_S,gFF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_7:Ch_74" }
/* GW90741_8 */
Switch E08_LED "E08 LED" <switch> (gFF_E08_Bath,gFF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_8:Ch_81" }
Switch E08_Mirror "E08 Mirror" <switch> (gFF_E08_Bath,gFF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_8:Ch_82" }
Switch E09_Small_LED "E09 Small LED" <switch> (gFF_E09_Bedroom,gFF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_8:Ch_83" }
Switch E09_Large_LED "E09 Large LED" <switch> (gFF_E09_Bedroom,gFF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_8:Ch_84" }
/* GW90741_9 */
Switch E03_Large_LED "E03 Large LED" <switch> (gFF_E03_M,gFF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_9:Ch_91" }
Switch E03_Small_LED "E03 Small LED" <switch> (gFF_E03_M,gFF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_9:Ch_92" }
Switch P01_Exterior_Light "P01 Exterior Light" <switch> (gGF_P01_Windfang,gGF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_9:Ch_93" }
/* Switch P01_Free "P01 Free" <switch> (gGF_P01_Windfang,gGF_Lights,gKNX) { channel="knx:device:GIRA2167:GW90741_9:Ch_94" } */
/* GW90857_10 */
Rollershutter E06_J6 "E06 S J6" <rollershutter> (gFF_E06_S,gShutters,gKNX) { channel="knx:device:GIRA2167:GW90857_10:Ch_101" }
Rollershutter E03_J7 "E03 M J7" <rollershutter> (gFF_E03_M,gShutters,gKNX) { channel="knx:device:GIRA2167:GW90857_10:Ch_102" }
Rollershutter E09_J8 "E09 Bedroom J8" <rollershutter> (gFF_E09_Bedroom,gShutters,gKNX) { channel="knx:device:GIRA2167:GW90857_10:Ch_103" }
Rollershutter E09_J9 "E09 Bedroom J9" <rollershutter> (gFF_E09_Bedroom,gShutters,gKNX) { channel="knx:device:GIRA2167:GW90857_10:Ch_104" }
/* GW90857_11 */
Rollershutter E09_J10 "E09 Bedroom J10" <rollershutter> (gFF_E09_Bedroom,gShutters,gKNX) { channel="knx:device:GIRA2167:GW90857_11:Ch_111" }
Rollershutter P11_J1 "P11 Living J1" <rollershutter> (gGF_P11_Living,gShutters,gKNX) { channel="knx:device:GIRA2167:GW90857_11:Ch_112" }
Rollershutter P11_J2 "P11 Living J2" <rollershutter> (gGF_P11_Living,gShutters,gKNX) { channel="knx:device:GIRA2167:GW90857_11:Ch_113" }
Rollershutter P11_J3 "P11 Living J3" <rollershutter> (gGF_P11_Living,gShutters,gKNX) { channel="knx:device:GIRA2167:GW90857_11:Ch_114" }
/* GW90857_12 */
Rollershutter P06_J4 "P06 Office J4" <rollershutter> (gGF_P06_Office,gShutters,gKNX) { channel="knx:device:GIRA2167:GW90857_12:Ch_121" }
Rollershutter P07_J5 "P07 Guest J5" <rollershutter> (gGF_P07_Guest,gShutters,gKNX) { channel="knx:device:GIRA2167:GW90857_12:Ch_122" }