[SOLVED] KNX Item with multiple channels

  • Platform information: RasPi 3B+
    • openHAB version: 2.4
      Hi all,
      I was searching this topic but did not find any direct answer, so my problem is:
      I have a garagedoor opener connected to the KNX and I have a Door sensor connected also to KNX. I can open the garagedoor with one item and check the state with another. can these be put together that I have only one item ?

my KNX.thing look like this:
Type switch : GFGarageGaragentor “Garagentor” [ ga=“0/7/0”,autoupdate=“false” ]
Type contact: GFGarageGaragentorK “Garagentor Kontakt” [ ga=“1.019:<1/3/0” ]

now I would like to generate one Item with these two channels, a Switch which I can click, and a state read from the contact. I tried this:
Switch GFGarageGaragentor “Garagentor [%s]” {channel=“knx:device:bridge:generic:GFGarageGaragentor”, channel=“knx:device:bridge:generic:GFGarageGaragentorK”}

but, this cannot work, as the second channel is not a switch. I could define the contact also as a switch, but how to setup that one channel is the actuator and the second the state info.


Well, in fact, your configuration is not correct. There is no such parameter as autoupdate for a channel. Instead this parameter is part of the item definition.
A second point: is 1/3/0 the state of the actuator switched by 0/7/0 or is it an independent contact?
If it’s the former, just configure one channel:

Type switch : GFGarageGaragentor "Garagentor" [ ga="0/7/0+<1/3/0" ]
Switch sGFGarageGaragentor "Garagentor" { channel="knx:device:bridge:thing:GFGarageGaragentor", autoupdate="false" }

If it’s the latter, don’t mix up two independent functions. :wink:

thanks for the reply…
well… its a bit more complex :smiley: and maybe not a 100% correct solution.
the switch and the contact are two independent things. the switch (0/7/0) switches the actuator on and off, but only an ON will open the garagedoor. the OFF does nothing.
The contact (1/3/0) is connected to a Binary input and sends an ON for OPEN and OFF for CLOSED. it is not connected to any physical actuator to read the state

So you should not mix these two channels.

In fact, My garden gates are triggered through knx binary switches. The controller is switched with momentary switches.
The gate controller will only react to ON signals. So the binary actuator is programmed to auto-off the knx channel. As I get the real state of this knx channel, I don’t need to do any auto-off at openHAB. I only send ON commands. Another knx binary channel is used to show the real state of the gate.

I have the same setup as you have, one actuator that is triggered by a switch and turns itself off after 1 second. This is used to send the impulse to the garage door opener input triggering it to open/stop/close the door.
In additional there is a contact connected to a binary input that turns to ON when the door has reached its final position.

You should not put the status on of the door as the status of the actuator - those have nothing in common. When modeling things I do always ask about the “device” - you have two devices, the actuator and the binary input. So model them separately, the “Garagedoor” is not the correct abstraction level - you combine those later e.g. in the UI.

Created yourself the actuator channel, configure that in ETS as a timer with e.g. 1 sec. (“Treppenlicht”), link a group address and (if you require the information for whatever reason) link a second group address to its status.
Then create a thing in OH modeling the actuator.
Now create a thing for your binary input with the channel of the garage door contact.
Finally model your items - a Switch for the actuator channel and a Contact for the binary input and you are done.
On my MDT switches there is a status LED per sensor that can be freely configured.
So the sensor is connected to the actuator switch channel, the LED links to the binary input channel, causing it to blink in red if the garage door is open. Works without issues.

yes, I have the same setup as you. the difference is, for opening the garage, I have two switches used also with binary inputs (so no LED indication). therefore I also dont use the “treppenlicht” function but “steigende Flanke / Fallende Flanke”. turning off after pressing the switch is realized only in OH (turn off after 1s)
I want to do the same what you have on the MDT switch, in OH. you configured two different Group adresses on one switch. by pressing it, it opens the garage, and the LED shows the status of the contact.
isnt that possible in the UI ?

if I model it with two items, it works OK, but I would like to combine the switch and the status


Ah. I would recommend to do this in another way, by using visibility in the sitemap.

Switch mySwitch "Switch"
Contact myContact


Switch item=mySwitch label="Door closed" icon="door-closed" mappings=[ON="ON"] visibility=[myContact==CLOSED]
Switch item=mySwitch label="Door open"   icon="door-open"   mappings=[ON="ON"] visibility=[myContact==OPEN]

This way you will get only one Widget, but the icon is controlled by the second item.

1 Like

Yes, this seems to be a reliable solution that I can live with! and it works :slight_smile: