[SOLVED] KNX binding not working

  • Platform information:
    • Hardware: Raspberry Pi 3 Model B Rev 1.2
    • OS: Linux 4.14.79-v7+
    • Java Runtime Environment: OpenJDK Runtime Environment (Zulu Embedded (build 1.8.0_152-b76)
    • openHAB version: openHAB 2.4.0-1 (Release Build)
  • Issue of the topic: KNX connection not working

Hej community,
I’m new to openHAB and would like to connect my knx bus, which is an MDT IP Interface:

## Device Info

Device is currently running in normal mode.

|Status:|normal operation|
| --- | --- |
|IP Address:||
|Subnet Mask:||
|Http Port:|8080|
|MAC Address:|CC-1B-E0-80-1D-76|
|Description:|MDT KNX TP IP|
|Application SW version:|1.0.6|
|Bootloader SW version:|2.3|

## KNX IP-Interface
Status Programming Mode: Off
Change Programming Mode:

Individual Address 1. 1. 2
Tunneling Addresses 1. 1. 2
1. 1.242
15.15.244 not in use
not in use
not in use
Set Tunneling Addresses
Serial Number 0083-5B7F0281
## TP Device (E-Mail)
Status Programming Mode: Off
Change Programming Mode:

Individual Address 15.15.254
Serial Number 0083-5B7F0282

I installed openHAB 2.4 and the knx2-binding and configured the following files:




Bridge knx:ip:bridge [ 
] {
    Thing device generic [
    ] {
		Type switch        : Licht_EG_Arbeitszimmer		       "Licht Arbeitszimmer"       [ ga="1/0/1+<1/2/1" ]


Switch Licht_EG_Arbeitszimmer   "Licht Arbeitszimmer"   <Arbeitszimmer>  {knx="1/0/1+<1/2/1"}
Switch Licht_EG_Flur_Wandspots   "Licht Flur Wandspots"   (Flur)  {knx="1/0/9+<1/2/15"}


sitemap myHome label="myHome1" {
    Frame label="Außen" {
        Text item=Temperature label="Temperatur [%.1f °C]"
		Text item=Humidity label="Luftfeuchte [%d %%]"
	Frame label="Licht" {
        Switch item=Licht_EG_Arbeitszimmer icon="light"
		Switch item=Licht_EG_Flur_Wandspots icon="light"

Clicking in the sitemap does not take any effect. When I configure the switch with these group addresses in my BlueHome app it works fine. I think, there is some connection problem to the MDT IP Interface.
I’ve not yet understood if I have to take TUNNEL mode or ROUTER mode for this IP interface, but tried both without any success so far.
I really appreciate any help, thank you very much,

Please delete knx.cfg, this is knx1 binding only.
Please change your knx.things to this:

Bridge knx:ip:bridge "KNX-IPIF-801D76" @ "KNX"[ //name and label of bridge
    type="TUNNEL",                              // Type of connection
    ipAddress="",                 // IP Address of knx/IP Gateway
    portNumber=3671                             // this is default
    // localIp="",                // this should be the Raspberry IP 
    // readingPause=50,                         // this is default
    // responseTimeout=10,                      // this is default
    // readRetriesLimit=3,                      // this is default
    // autoReconnectPeriod=30,                  // this is default
    // localSourceAddr="0.0.0"                  // this is default
] {
    Thing device generic [
        // address="1.1.2",                     // don't use a fake address but leave it empty for generic!
        // fetch=true,                          // don't set to true for non real devices
        // pingInterval=300,                    // this is default
        // readInterval=3600                    // only set if really necessary!
    ] {
        Type switch : Licht_EG_Arbeitszimmer "Licht Arbeitszimmer" [ ga="1/0/1+<1/2/1" ] 

Or (without comments)

Bridge knx:ip:bridge "KNX-IPIF-801D76" @ "KNX"[ 
    // this should suffice for a connection
] {
    Thing device generic []
        Type switch : Licht_EG_Arbeitszimmer "Licht Arbeitszimmer" [ ga="1/0/1+<1/2/1" ] 
1 Like

Hej Udo,
thanks a lot, it feels like I went some important steps further. But nevertheless reached my aim switching the light.
I adopted all your hints and deleted the v1-binding-related knx.cfg.
When I look into the events.log, I see:

2019-02-11 23:15:50.534 [ome.event.ItemCommandEvent] - Item 'Licht_EG_Arbeitszimmer' received command ON
2019-02-11 23:15:50.551 [vent.ItemStateChangedEvent] - Licht_EG_Arbeitszimmer changed from NULL to ON
2019-02-11 23:22:13.934 [ome.event.ItemCommandEvent] - Item 'Licht_EG_Arbeitszimmer' received command OFF
2019-02-11 23:22:13.958 [vent.ItemStateChangedEvent] - Licht_EG_Arbeitszimmer changed from ON to OFF

But no lights do change. The openhab.log does not contain any hints.
Thanks again for your help,

Yeehaw, works!
I forgot or better said did not know that I have to link the items to the generic bridge. Now, everything works fine and I’m defining all the switches. I asume I will come back with some detail questions later on.
Thank you so much,

You’re welcome :slight_smile:

Hi Udo,
if i have a lot of KNX items from 1.13.0 Binding Version, do I need only define one nonexistent generic device ?
All previous items would be recognised from 2.4.0 snaphot binding ?

  1. :slight_smile: You can either use openHAB 2.4.0 stable or openHAB 2.5.0 M2 milestone or openHAB 2.5.0 snapshot
  2. If using knx2 (it’s possible to use knx1, but it’s legacy) you need to transfer knx.cfg parameters to the knx bridge. then you have to create at least one thing with a channel for each item. You have to link those channels to the items. so, the binding part of the items configuration will be completely different and the old binding part of the item configuration will be part of the channels configuration from now on (and again, there will be many differences to the old notation).

Thanks Udo