Migration to KNX2 with multiple bridge

I wondering how to define my KNX installation with the openhab KNX2 binding.
2 Bridges are part of my KNX installation and I don’t know the best way to define them with the KNX2 binding.
Do I have to define both in the binding configuration file and have each device things associated to its bridge
Do I have to define only one brige, all device things and let’s the KNX gateway in charge of the communication?
Thank you for your advise

Both are KNXnet/IP (tunnel or router) or one is IP and the other USB based?

I would go with 1 KNXnet/IP (router preferably) Bridge to start with and associate all Things with this one.

In case of physical failure of the first Bridge, you just change the settings on the existing OH2 defined bridge and redirect communications to the second one.

Thank you for your advise @Dim
Yes, both are KNXnet/IP device, so two ip address.
I’ll follow your advise to test this config but Can we have two bridge in the same config file?

Yes, of course (I am 99% sure… not 100%)

Within a /etc/openhab2/things/KNX.things file you can set up as many Bridges as you want.

Look at my example (using 1 Bridge here: KNX1 to KNX2 Migration Steps )

You can copy the first Bridge and define a second one. All other stuff (Things and Channels) go under the Bridge.

Note: Since I haven’t implemented such a redundant scenario… I really do not know how the KNXv2 binding openHAB2 will decide which Bridge to use to send the telegram… :slight_smile:

Are both KNXnet/IP Routers? (or Interfaces allowing tunneling)

If both are Routers, then this is simple… you can define only one KNXv2 Bridge in openHAB2 since OH2 will use multicast to send the telegrams. With type="ROUTER" you don’t define the remote IP address of the KNXnet/IP gateway… just the multicast address.

@Dim thank you !!
Yes, I’ve seen your input on the migration steps … very good input and help :wink:
A question about that whay is the ‘@ KNX’ in your exemple? We can find that in the bridge and Thing definition?

1 Like

it’s just for organizing your stuff in the Control Section of PaperUI (it’s the Location parameter of a Bridge/Thing)

:ok_hand: :ok_hand:

1 Like

Hi @Dim,
I’m trying to set up the KNX installaton with only one router … as said but I’m facing the following error:

27:35.475 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'knx:ip:MERTEN_PM' changed from UNINITIALIZED to OFFLINE
18:27:35.478 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'knx:ip:MERTEN_PM' changed from OFFLINE to UNINITIALIZED (HANDLER_MISSING_ERROR)
18:27:35.493 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'knx:ip:MERTEN_GM' changed from ONLINE to OFFLINE
18:27:35.495 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'knx:device:MERTEN_GM:ABB_GM1' changed from OFFLINE to OFFLINE (BRIDGE_OFFLINE)
18:27:35.496 [WARN ] [ommon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
tuwien.auto.calimero.KNXIllegalArgumentException: non-valid routing multicast /
    at tuwien.auto.calimero.knxnetip.KNXnetIPRouting.<init>(KNXnetIPRouting.java:162) ~[?:?]
    at tuwien.auto.calimero.knxnetip.KNXnetIPRouting.<init>(KNXnetIPRouting.java:145) ~[?:?]
    at org.openhab.binding.knx.internal.client.IPClient.getConnection(IPClient.java:119) ~[?:?]
    at org.openhab.binding.knx.internal.client.IPClient.createKNXNetworkLinkIP(IPClient.java:90) ~[?:?]
    at org.openhab.binding.knx.internal.client.IPClient.establishConnection(IPClient.java:77) ~[?:?]
    at org.openhab.binding.knx.internal.client.AbstractKNXClient.connect(AbstractKNXClient.java:178) ~[?:?]
    at org.openhab.binding.knx.internal.client.AbstractKNXClient.lambda$0(AbstractKNXClient.java:145) ~[?:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:?]
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) ~[?:?]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) ~[?:?]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) ~[?:?]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
    at java.lang.Thread.run(Thread.java:748) [?:?]
18:27:35.497 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'knx:ip:MERTEN_GM' changed from ONLINE to UNKNOWN
18:27:35.515 [INFO ] [smarthome.event.ThingUpdatedEvent    ] - Thing 'knx:ip:MERTEN_GM' has been updated.
18:27:35.517 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'knx:device:MERTEN_GM:ABB_PM1' changed from UNINITIALIZED to INITIALIZING
18:27:35.518 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'knx:device:MERTEN_GM:ABB_PM1' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE)

My config file is:

Bridge	knx:ip:MERTEN_GM "MERTEN KNX/IP Router GM" @ "KNX" [
                    Thing device ABB_GM1 "Switch Actuator GM-1" @ "KNX" [ address="1.1.7", fetch=false, pingInterval=600, readInterval=0 ]
                            Type    switch  :       Channel_GM11      "Channel GM1.1"   [ ga="0/0/1+<0/1/1" ]
                            Type    switch  :       Channel_GM12      "Channel GM1.2"   [ ga="0/0/2+<0/1/2" ]
                            Type    switch  :       Channel_GM13      "Channel GM1.3"   [ ga="0/0/3+<0/1/3" ]
                            Type    switch  :       Channel_GM14      "Channel GM1.4"   [ ga="0/0/4+<0/1/4" ]
    			   Thing device ABB_PM1 "Switch Actuator PM-1" @ "KNX" [ address="1.2.4", fetch=false, pingInterval=600, readInterval=0 ]
                            Type    switch  :       Channel_PM11      "Channel PM1.1"   [ ga="0/2/14+<0/3/14" ]
                            Type    switch  :       Channel_PM12      "Channel PM1.2"   [ ga="0/2/15+<0/3/15" ]
                            Type    switch  :       Channel_PM13      "Channel PM1.3"   [ ga="0/2/13+<0/3/13" ]
                            Type    switch  :       Channel_PM14      "Channel PM1.4"   [ ga="0/2/11+<0/3/11" ]

ip 190 is my openhab server
ip 198 is one the router. (the second is ip 199)

Any idea of this muticast error?

you are using type=ROUTER but have set the ipAddress to which is wrong.

If you use a ROUTER, then the ipAddress should be set to

If you use TUNNEL, then you can use for the ipAddress.

Routing is preferred of course and your device supports it.

@Udo_Hartmann @george.erhan : Expert opinion is needed here :slight_smile:
How would you guys setup the KNXv2 Binding on your OH2 system if you had 2 KNXnet/IP Routers available, accessing 2 different KNX Lines ?

thank you @Dim :slight_smile:
I’ve succesfully started the openhab migration with only one router accessing the 2 KNX lines :wink:
waiting for the expert answer

1 Like

aha… so you have 2 separate KNX Lines (that’s normal) and the 2 Routers make the routing of the telegrams between the 2 lines.
Can you briefly describe your KNX topology?

2 connected houses linked with a IP connection (backbone line)

1 Like

something like this? (oversimplified):


If this is the case, then OH2 will communicate with KNX Router 1 via multicast and should be able to access Line 2 via the KNX Routing in place.

So you will only need to define 1 Bridge.

Is there an IP Router between the 2 KNX Routers? Does this IP Router allow multicast routing?

excatly :slight_smile:
and yes, the IP router allows the multicast so I’ll define only 1 bridge . Thank you

1 Like

knx Routers are using multicast to communicate to each other, using as multicast IP (per default).

Multicast is: every message from or to is received from each system which has subscribed to this IP. In case of knx, each system will send and receive its messages, as there is no “master”.

You will only need one knx bridge if using multicast.

1 Like