Difference in usage between text files vs UI

When using the textual (file) based configuration, I can assign two items to a knx-channel; e.g.:
Switch Swt_Eetkmr “Swt-Eetkmr” {channel=“knx:device:bridge:generic:Lamp_Eetkmr”}
Dimmer Dim_Eetkmr “Dim-Eetkmr” {channel=“knx:device:bridge:generic:Lamp_Eetkmr”}

When configuring with the new User Interface (UI) this does not seem possible. I could link only one item to a KNX channel. Is this intended?

If so, it is not a problem for me. I just made two channels, one as dimmer and one as switch with the same KNX address for the switch-function.

I don’t use KNX but thought I would see if I could add 2 channels to the KNX gateway.
Yes I can…I think?
Is this what you mean below?

It is possible to force linkages via text file that the UI will not offer in the first place. For example,linking a DateTime Item to a switch channel, which is just not sensible.

Linking multiple Items to a channel is fine, but pay attention to types.

@Greg What you did was creating two channels an one item to each channel. That is exactly the solution that I described. What I tried, but failed, to do was linking two items to one and the same channel.

@rossko57 Linking a switch to a dimmer channel is allowed because the switch action is a subset of the dimmer actions.

I was just wondering if the fact that I can only link one item to one channel is intended. The presentation suggest something else to me, (see picture). On the channel bar there is a “1”, and the “+” suggest that linking an extra item is possible. But if I link another item the already linked item disappears. (I even tried to change the code directly but a second item inside the channel does not show up).

Can you add another item if you click the create new item option?

I just added another item and the number changed to 2.
It was a mqtt item.
It’s late here and I did it on my phone.
I will try it tomorrow on the pc and see what happens.

A dimmer type channel returns states like 55%, accepts commands like 75% and INCREASE. These are not compatible with Switch type Items.

A Dimmer type Item will accept Swich commands like ON/OFF and its state can be accessed “as OnOffType” in rules or UI.

Link a dimmer channel to a Dimmer Item. Treat the Dimmer Item like a Switch if you wish.

Linking multiple Items to one channel is perfectly acceptable - but it is not common, so don’t expect the UI to offer easy ways for the unwary to do it accidentally.

Why would you do that though? You can send ON/OFF commands to a Dimmer Item. You can use a Dimmer Item with a Switch element on your sitemap. There is no need to have two Items in this case. You only need the one Dimmer Item.

Unless you are using the timestamp or hysteresis profile…

You can treat a Dimmer as a Switch but you can’t link a Channel that defines itself as a Dimmer to a Switch.

You can link more than one Item to a single Channel. As Greg suggests, click that “Add Link to Item…” and choose a different Item or create a new Item. The blue circle with the number indicates how many Items are linked to a given Channel.

I did not add a switch to a dimmer channel accidentally. I use this configuration since 2018. The suggestion came from the community e.g. How do you combine both On/Off and Dimming..

There’ll be lots of suggestions from 2018 that either don’t work, are not needed, or are simply daft things to do in OH3.

Thanks for the extensive explanation.
I just tried to add two Switch items to a Switch channel, using two times “Add Link to Item…” and “Creating a new Item” for that channel. It did not work in my KNX binding. There is only one item (the last one).
I understand it should actually work.

You can make such a link even using the UI and without any profile:

There are only a vanishingly small number of use cases where it is sensible for all the reasons already pointed out.

Were you trying to do this by creating a new item each time you added the link? If so, then you have to take into account that the UI does not create a unique name for the item automatically, it just creates a suggested name base on the thing name and channel. If you accepted that suggested name for the first item and then don’t change it for the second item then you have just recreated the same item as the previous linked item and it will overwrite that item instead of creating a second one.

@JustinG I had two differend item names.

But strangely, when I first create an item and link this existing item to the channel it works and I have 2 links for the channel. (I tried both vs 3.0.2 and the latest 3.1.0; they act the same way).
Now I know that it should work, I do some more research (but not today anymore).
Thanks for all the input.

I am glad I found this topic because I have an RFXCom thing and there was no add a channel option to add extra channels.
I wanted to add a last updated channel and now I can do it.
I might even go back and change all my other “extra” channels to doing it this way.

There’s only one channel there, but it is linked to two Items.
channels and Item-to-channel links are distinct different objects in openHAB.

When you use a profile (like timestamp) it operates on the link, not the channel.

@JustinG I have to admit, I did not do the naming correct. I did not change the item name, just the label. Now it works fine. Thank you.

@Greg What you did was exactly the solution I described: making two channels and link one item to each channel. This solution works with my KNX installation.

What I could not do was link two items to one channel. In the text-file I used the same channel for both items.

@rossko57 Linking a switch item to a dimmer channel is allowed. The switch is just a subset of the capabilities of the dimmer.

I was just curious if the fact that you can link 1 item to 1 channel is meant to be. Or will the option of linking more than one item to a channel become available in the future. The presentation suggests that it should be possible, because it shows a “1” if an item is linked and a “+” for linking (a second item). Now, if I try to click the “+” and link a new item, the already lined item disappears.

(I even tried to change the “code” directly, but a second item does not show)

up in the item list.)

If you look at my second screen shot there is one channel and two items.
Note the blue number 2.
Isn’t that what you are trying to do?

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.