KNX binding not giving results

Tags: #<Tag:0x00007faee81ab078>

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