Knx binding 2.3 configure KNX IP Gateway

Hi,
I installed the lastest OpenHab Version and the KNX Binding (2.3).
Now I´d like to configure the Gateway.
I have created the same configuration as in the official manual:


I can se the created Light Button in the webinterface, but if I click them, it doesn´t work.
Then I traced my Network with Wireshark, there I can see, that my Open Hab Server doesn´t send an message to my Gatepway.
I also tried to add the gateway in the webinterface, but there is the error mesage: “Unkown”.

Here is my configuration in the knx.things file:

Bridge knx:ip:bridge [
ipAddress=“10.0.1.21”,
portNumber=3671,
localIp=“10.0.2.200”,
type=“Router”,
readingPause=50,
responseTimeout=10,
readRetriesLimit=3,
autoReconnectPeriod=1,
localSourceAddr=“1.1.10”
] {
Thing device generic [
address=“1.1.10”,
fetch=true,
pingInterval=300,
readInterval=3600
] {
Type switch : AktorA"Lampe"

}

}

Please, can you help me?

With Router type, the remote IP Address (parameter ipAddress should be: 224.0.23.12 (the KNX/IPnet multicast)

by the way: I hope that there is no network router between your OH2 host and the KNX Router :slight_smile: (I see a Class A private IP network being used)

Also, I see that you used the same PA for OH2 and for a Thing. That’s wrong.
Set localSourceAddr="0.0.0" or to a free one in your KNX BUS

Ps: How to use code fences

Please always use code fences when posting code, configuration or logs, as it’s far better readable. It’s also very likely that discourse (the forum software) will change some letters as “double quotes” or ‘single quotes’

“” vs. "" 
‘’ vs. ''

Which type of Gateway are you using?

Either use TUNNEL as mode:

Bridge knx:ip:bridge [
    ipAddress="10.0.1.21",
    localIp="10.0.2.200",
    type="TUNNEL"
    ] {
        ...
    }

or the ROUTER mode:

Bridge knx:ip:bridge [
    localIp="10.0.2.200",
    type="ROUTER"
    ] {
        ...
    }

It’s very likely that the IP address for ROUTER mode is NOT 10.0.1.21 as ROUTER mode is using Multicast (224.0.23.12 is reserved for knx/IP Router mode)

Please start with as little as possible parameters.

Please be aware that openHAB is completely case sensitive, so there is a big difference in writing Router and ROUTER

Please also be aware that a generic thing wouldn’t have a physical address, as it’s not meant as a specific device. You can’t ping a virtual (i.e. non existing) device! You can’t fetch a virtual device!
So either use a specific name for the device:

    ...
    Thing device myDevice1_1_10 "My Device 1.1.10" [
        address="1.1.10",
        fetch=true,
        pingInterval=300
        ] {
            ...
        }
    ...

or use no parameters at all:

    ...
    Thing device generic "generic knx device" []
        {
            ...
        }
    ...

Please, don’t use readInterval!=0 if not absolutely needed (it’s unlikely that you will need this parameter)

Maybe you did not copy the channel correctly, every channel has to have at least one GA:

            ...
            Type switch : AktorA "Lampe" { ga="..." }
            ...

Hi, I tested your proposals. But now It also doesn´t work now. Please can you help me. Here are my configurations.

KNX.things:

Bridge knx:ip:bridge [
localIP=“10.0.2.200”,
type=“ROUTER”
] {
Thing device myDevice1_1_10 “My Device 1.1.10” [
address=“1.1.10”,
fetch=true,
pingInterval=300,
]{
Type switch : AktorA “Lampe” [ ga=“1/1/2”]

}
}

default.items:

Switch AktorA “Lampe” { channel=“knx:device:bridge:generic:AktorA” }

default.sitemap:

sitemap knx label=“KNX-Sitemap”
{
Switch item=AktorA
}

not generic but myDevice1_1_10

also, localIp , not localIP (not sure if this matters… just to be on the safe side

also (for the second time:) How to use code fences

Thank you for your help, but It also deosn´t work now. I traced again, but there is no message between the OpenHab (10.0.2.200) and KNX IP Gateway(10.0.1.21 or 224.0.23.12).
But if ping the gatway it works and it turns up in wireshark.
Please can you help me again.

You are welcome to create a solution for me.
Local IP=10.0.2.200
Type=Router
I´d like to turn on a lamp on my aktor. -> The adress is 1/1/2

Please, don’t change diction of any keyword. openHAB is CaSe senSiTive in the whole word!!!

Which knx/IP gateway do you use? Please be aware that only knx/IP routers do provide ROUTER mode.

localIp is the IP of the openHAB server itself. ipAddress is the IP of the knx/IP gateway. This parameter is optional, if using ROUTER mode, as it’s most common to use the reserved IP 224.0.23.12 for knx/IP routing. Every knx/IP router uses this IP as default. As this is a multicast address, this IP won’t be routed through your LAN (just in case you are using more than one zone).

If using TUNNEL mode, you have to provide the unicast IP of the gateway.

Please keep attention to the fact, that you have a comma at the end of pingInterval=300.

As you changed the name of the Thing, you also have to change the linked channel:

Switch AktorA "Lampe" { channel="knx:device:bridge:myDevice1_1_10:AktorA2" }

Please also keep in mind, that maybe openHAB needs a restart (this is not normal behavior, but sometimes openhAB gets mixed up…)

Hallo, ich habe meine Fehler jetzt behoben, leider funktioniert es immer noch nicht. Ich habe bereits das Betriebssystem und Open Hab neu installiert. Ich habe das MDT SCN-IP100.02 als Router im Einsatz. Auf der Weboberfläche steht auch, dass die die Routing Multicast Address die 224.0.23.12 ist. Kannst du mir nochmal helfen? gerne auch über skype. Danke.

1 Like

public posts in English please
You can use PM to direct a personal message to a member :stuck_out_tongue:

Hello, I fixed my bugs now, unfortunately it still does not work. I have already reinstalled the operating system and Open Hab. I have the MDT SCN-IP100.02 as a router in use. The web interface also states that the Routing Multicast Address is 224.0.23.12. Can you help me again? Thank you

quick question (just to make sure):
Is there a network router between the host running openHAB (subnet 10.0.2.x) and the KNX/IP Router (subnet 10.0.1.x) ?

If yes: could this network device be blocking multicasting from one subnet to the other?

There is no Router between the subnets.
I still have to test changed the ip of Open Hab to the 10.0.1.23.
But It also doesn´t work.

try to use TUNNEL mode to see if things improve:

/etc/openhab2/things/KNX.things

Bridge	knx:ip:bridge "My KNX/IP Router" [
	type="TUNNEL",
	ipAddress="10.0.1.21",
	portNumber=3671,
	localIp="10.0.1.23",
	readingPause=50,
	responseTimeout=10,
	readRetriesLimit=3,
	autoReconnectPeriod=1,
	localSourceAddr="0.0.0" ]
	{
		Thing device myDevice1_1_10 "My Device 1.1.10" [ address="1.1.10", fetch=true, pingInterval=600, readInterval=0 ]
		{
			Type	switch	:	AktorA		"Lampe"		[ ga="1/1/2" ]
		}
	}

/etc/openhab2/items/KNX.items :

Switch Light_Switch "Lampe" { channel="knx:device:bridge:myDevice1_1_10:AktorA" }

No sorry, It also doens´t working now.

anything useful in the log files?

openhab.log:

2018-11-06 11:33:29.516 [INFO ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at ‘items/AktorA’ for the unknown item ‘AktorA’.

events.log:

2018-11-06 11:28:11.048 [.ItemChannelLinkAddedEvent] - Link ‘Light_Switch-knx:device:bridge:myDevice1_1_10:AktorA’ has been added.
2018-11-06 11:28:13.042 [hingStatusInfoChangedEvent] - ‘knx:ip:bridge’ changed from UNINITIALIZED to INITIALIZING
2018-11-06 11:28:13.104 [hingStatusInfoChangedEvent] - ‘knx:ip:bridge’ changed from INITIALIZING to UNKNOWN
2018-11-06 11:28:13.104 [hingStatusInfoChangedEvent] - ‘knx:device:bridge:myDevice1_1_10’ changed from UNINITIALIZED to INITIALIZING
2018-11-06 11:28:13.104 [hingStatusInfoChangedEvent] - ‘knx:device:bridge:myDevice1_1_10’ changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE)
2018-11-06 11:28:13.151 [hingStatusInfoChangedEvent] - ‘knx:ip:bridge’ changed from UNKNOWN to ONLINE
2018-11-06 11:28:13.166 [hingStatusInfoChangedEvent] - ‘knx:device:bridge:myDevice1_1_10’ changed from OFFLINE (BRIDGE_OFFLINE) to UNKNOWN
2018-11-06 11:28:29.619 [hingStatusInfoChangedEvent] - ‘knx:device:bridge:myDevice1_1_10’ changed from UNKNOWN to OFFLINE

If we used the old version(Router), the Paper Ui says to me, that the “MyKnxRouter” and “myDevice1_1_10” were online, but now only “MyKnxRouter” is online and “MyDevice1.1.0” is offline.

when using ROUTER mode, the Bridge will (almost always) go online even if there is no comms
it’s not a reliable indicator that it works

Thank you, every thing works now.:slight_smile:

1 Like