KNX binding not giving results

I’ve been trying to get Openhab to talk to my KNX system for a couple of evenings now, and for the life of me I can’t get it to work. I’m a newbie to Openhab, so that might explain things.

So far I’m only trying to control 1 light, simple on/off switch. I’m using a Loxone as KNX IP gateway (ip 192.168.1.101, knx address 1.1.1), trying to talk to an actuator (address 1.1.10), to switch on a light (command on 7/0/0 and status on 1/0/0).

I’ve installed the KNX binding through PaperUI, and try to get things working through config files (after reading the documentation and copying some examples there):
knx.things:

Bridge knx:ip:bridge [ 
    type="TUNNEL",
    ipAddress="192.168.1.101",
    autoReconnectPeriod=60 //optional, do not set <30 sec.
    portNumber=3671, 
    localIp="192.168.1.1",
    //readingPause=50, 
    //responseTimeout=10, 
    readRetriesLimit=3, 
    localSourceAddr="0.0.0"
] {
    Thing device knx_device { //"knx_device_name" @ "knx_device_group_in_paperui" [ 
        //readInterval=3600 //optional, only used if reading values are present
	//address="1.1.10",
        //fetch=true,
        //pingInterval=300,
        //readInterval=3600
    //] {
        //Items configurations
	Type switch        : demoSwitch        "Light"       [ ga="7/0/0+<1/0/0" ]
    }
}

knx.items

Switch        demoSwitch         "Light [%s]"               <light>          { channel="knx:device:bridge:knx_device:demoSwitch" }

knx.sitemap

sitemap knx label="KNX Demo Sitemap" {
  Frame label="Demo Elements" {
    Switch item=demoSwitch
  }                
}

It looks like there’s not even a connection from Openhab to KNX, as I don’t see any movement on the KNX bus when toggling the switch. Furthermore I don’t understand what that switch is doing, as I see the following in events.log (same for ON command):

2019-08-07 23:30:46.439 [ome.event.ItemCommandEvent] - Item 'demoSwitch' received command OFF
2019-08-07 23:30:46.449 [nt.ItemStatePredictedEvent] - demoSwitch predicted to become NULL

What’s that NULL doing there?

Any help would be greatly appreciated!

I can’t tell you exactly, but ‘predictions’ come from autoupdate feature. By default, it listens for commands to each Item and guesses the probable outcome. So, command OFF likely result is state OFF.
But bindings can veto the prediction. You’ve got a veto, which at least shows your Item is linked to an active channel, but that the binding thinks the command is a disaster for some reason.

Most probably it’s a config issue I can’t help with - have a look at your Thing states in PaperUI and tell people what you see.

I only have one WiFi thing (cell phone), nothing related to KNX in the PaperUI…

You should at least see the KNX binding installed. Perhaps the install didn’t work.

If the binding exists, next look in openhab.log for problems loading your xxx.things file

Sorry for the late reply, been caught up in other stuff…

It seems I misunderstood your “Thing states” then. Yes, the KNX binding is present under the “Bindings” (as is the Network binding). Those are the only things I can see, there are no other “Things”.

It seems as somewhere between my OpenHAB client and my KNX IP client something goes wrong, but I have no idea where to even start looking…

Okay, let’s be clear. PaperUI > Configuration > Things , and you see none KNX related?
It sounds like your knx.things file is not being read correctly. Look in your openhab.log file around boot time for entry with
Loading model 'knx.things'

Correct, my “Things” is empty, see https://imgur.com/a/JqiN3KX.

No sign of

Loading model 'knx.things'

in the log, I only found

Loading model 'knx.items'

and

Loading model 'knx.sitemap'

Not-related, but how do you quote a previous post here?

What happened to the WiFi thing you had before?

Then KNX is just not going to work, with no configuration. It’s not complaining about content if it doesn’t attempt to load the file.
Where did you put it? Should be in a folder /things rather like your xxx.items file is in folder /items.
What did you call it? Name it what you like but must have extension xxx.things

On a PC, you can highlight the text in a previous quote and it offers a “quote” button. Don’t know what you do on phone.

I deleted the WiFi thing, just to test things out.

With the explicit question I went back and noticed I named the file knx.thing and not knx.thing**s**. So stupid, and so easily overlooked…

And now it works!

1 Like

My question might be vaguely related to the topic I am putting this under. But since, I am still not able to get my KNX binding working, I am going to put here.

Having this below error, while I have connected the KNX IP gateway to a wireless repeater. My KNX IP gateway address is 192.168.0.200

2020-07-02 02:09:40.079 [ERROR] [Xnet/IP Tunneling 192.168.0.200:3671] - communication failure on connect

java.net.BindException: Cannot assign requested address (Bind failed)

at java.net.PlainDatagramSocketImpl.bind0(Native Method) ~[?:?]

at java.net.AbstractPlainDatagramSocketImpl.bind(AbstractPlainDatagramSocketImpl.java:93) ~[?:?]

at java.net.DatagramSocket.bind(DatagramSocket.java:392) ~[?:?]

at java.net.DatagramSocket.(DatagramSocket.java:242) ~[?:?]

at tuwien.auto.calimero.knxnetip.ClientConnection.connect(ClientConnection.java:163) ~[?:?]

at tuwien.auto.calimero.knxnetip.KNXnetIPTunnel.(KNXnetIPTunnel.java:159) ~[?:?]

at org.openhab.binding.knx.internal.client.IPClient.getConnection(IPClient.java:107) ~[?:?]

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) [?:?]