First step is, to activate the knx2 binding by installing it.
Second step is to configure a bridge - either Paper UI or *.things
file:
Bridge knx:ip:bridge1 "Weinzierl 730 IP" [
ipAddress="192.168.178.234",
portNumber=3671,
type="TUNNEL",
readingPause=50,
responseTimeout=10,
readRetriesLimit=3,
autoReconnectPeriod=60,
localSourceAddr="0.0.0"
]
This part is very much like other OH2 bindings. Its possible to use a serial interface, this would be knx:serial:bridge
…
After the bridge part, you need to configure the channels. Also, this can be done via Paper UI or *.things
file:
...
localSourceAddr="0.0.0"
]
{
Thing device thebenBin1_1_1 "theben Binary 1.1.1" @ "KNX" [
address="1.1.1",
fetch=true,
pingInterval=600,
readInterval=0
] {
Type switch : ch1 "Channel 1" [ga="1/1/1"]
Type switch : ch2 "Channel 2" [ga="1/1/2"]
}
}
As a result, you will get things and channels. You do not need to define one thing per device, but this way it’s possible to monitor the device(s).
In VSCode, (when configured correctly), you will get a list "OPENHAB THINGS"
on the lower left side.
- Open the
*.items
file and move the cursor to the line, where the item(s) shall be incorporated.
- Search the Thing in the list and right-click the Thing (or the channel) you whish to incorporate in the
*.items
file. Select "Create Items from Channels"
.
You will get items in the form
Switch Ch1 "Channel 1" {channel="knx:device:bridge1:thebenBin1_1_1:ch1"}
when selecting single channels, or
Switch thebenBinary111_Ch1 "Channel 1" {channel="knx:device:bridge:thebenBin1_1_1:ch1"}
Switch thebenBinary111_Ch2 "Channel 2" {channel="knx:device:bridge:thebenBin1_1_1:ch2"}
when selecting things. So, it’s up to you to influence the automatically created item names by defining things and channels.