[SOLVED] OH2.4 KNX Binding with Docker

Hi,

I’m running an openhab test instance on a docker container on a MacBook Pro.
I’ve a OH2.0 instance on dedicated hw, so have some experience with OH.

I’m having an issue with getting KNX running…
I’m using the latest OH2.4 docker image as a starting point, but I cannot run in host mode, due to some subtlety of Docker on a Mac, and therefore have to explicitly open any required ports.

The error I’m getting is:

2019-02-24 21:00:11.691 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'KNX.things'
2019-02-24 21:00:11.727 [DEBUG] [nx.internal.client.AbstractKNXClient] - Bridge knx:ip:bridge is disconnecting from the KNX bus
2019-02-24 21:00:11.743 [DEBUG] [nx.internal.client.AbstractKNXClient] - Bridge knx:ip:bridge is disconnecting from the KNX bus
2019-02-24 21:00:11.745 [DEBUG] [nx.internal.client.AbstractKNXClient] - Bridge knx:ip:bridge is connecting to the KNX bus
2019-02-24 21:00:11.750 [DEBUG] [binding.knx.internal.client.IPClient] - Establishing connection to KNX bus on 172.25.4.6:3671 in mode TUNNEL.
2019-02-24 21:00:21.756 [ERROR] [.KNXnet/IP Tunneling 172.25.4.6:3671] - establishing connection failed, timeout connecting to control endpoint /172.25.4.6:3671
2019-02-24 21:00:21.757 [DEBUG] [nx.internal.client.AbstractKNXClient] - Error connecting to the bus: timeout connecting to control endpoint /172.25.4.6:3671
tuwien.auto.calimero.KNXTimeoutException: timeout connecting to control endpoint /172.25.4.6:3671

Can anyone let me know if I require to open any ports to allow this to function correctly?

My KNX.things file is:

ridge knx:ip:bridge [ 
    type="TUNNEL", 
    ipAddress="172.25.4.6", // for TUNNEL only: Network address of the KNX/IP gateway	
    portNumber=3671, // for TUNNEL only: Port number of the KNX/IP gateway	
    localSourceAddr="2.1.2" 
] {

If I specify localIp then I get the same error…

Thanks,

Will

Argh. I hate it when I do this.
Adding the ‘useNAT=true’ parameter with correct capitalisation fixes the problem.

1 Like