KNX binding not working

knx2
Tags: #<Tag:0x00007fe05e8fe5a8>

(Carsten Pieper) #1
  • 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 8.25.0.76-linux-aarch32hf) (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|
| --- | --- |
|DHCP:|On|
|IP Address:|192.168.178.36|
|Subnet Mask:|255.255.255.0|
|Gateway:|192.168.178.1|
|DNS:|192.168.178.1|
|Http Port:|8080|
|MAC Address:|CC-1B-E0-80-1D-76|
|Hostname:|KNX-IPIF-801D76|
|Description:|MDT KNX TP IP|
|UDN:|uuid:025a2c2d-025a-2c49-4a51-cc1be0801d76|
|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.243
15.15.244 not in use
not in use
UDP: 192.168.178.60
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:

knx.cfg:

ipAddress=192.168.178.36
busaddr=1.1.242
portNumber=3671
localIp=192.168.178.60

knx.things:

Bridge knx:ip:bridge [ 
    ipAddress="192.168.178.36", 
    portNumber=3671, 
    localIp="192.168.178.60", 
    type="TUNNEL", 
    readingPause=50, 
    responseTimeout=10, 
    readRetriesLimit=3, 
    autoReconnectPeriod=1,
    localSourceAddr="0.0.0"
] {
    Thing device generic [
        address="1.1.2",
        fetch=true,
        pingInterval=300,
        readInterval=3600
    ] {
		Type switch        : Licht_EG_Arbeitszimmer		       "Licht Arbeitszimmer"       [ ga="1/0/1+<1/2/1" ]
       
    }
}

knx.items:

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"}

myHome.sitemap:

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,
Carsten


(Udo Hartmann) #2

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="192.168.178.36",                 // IP Address of knx/IP Gateway
    portNumber=3671                             // this is default
    // localIp="192.168.178.60",                // 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"[ 
    type="TUNNEL",
    ipAddress="192.168.178.36"
    // this should suffice for a connection
] {
    Thing device generic []
    {
        Type switch : Licht_EG_Arbeitszimmer "Licht Arbeitszimmer" [ ga="1/0/1+<1/2/1" ] 
    }
}

(Carsten Pieper) #3

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,
Carsten


(Carsten Pieper) #4

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,
Carsten


(Udo Hartmann) #5

You’re welcome :slight_smile: