Use thing channel as a label

Tags: #<Tag:0x00007f617ef90c18>

Hi all,

is there a way to use a thing channel as a label and another channel as a thing state?

Cheers,
K.

Can you provide more details on what you are asking? What binding and maybe a sample output?

That is your item.

Can you give an example of what you are tring to do?

If multi channel linking is what your looking for then see:

Labels are also defined in sitemaps.

We are all assuming a 2.x version of OH.

How to ask a good question / Help Us Help You - Tutorials & Examples - openHAB Community

Hi,
Thanks for the quick response to both of you. I’ve read the topic about multi-channel but examples are not very informative (at least for me).

Binding is 2.x.

A binding that I have created(ParadoxAlarmBinding) retrieves information from a security system. In this system you have defined “zones” and “partitions”. Each entity provides several channels, for example:

  • label (this is the label defined inside the system)
  • state - opened/closed (this is dynamic state of the entity zone)
  • other specific channels like battery low, tamper, etc…
    I want to create an item which uses the channel label as it’s description from the thing channel label and state retrieved from the state channel.

Is that possible with multi channel binding?

Let’s assume I have a thing called zoneThing1, a label channel paradox:bridge:zoneThing1:label and channel paradox:bridge:zoneThing1:state.
What would be the example item definitioin which does the magic? :slight_smile:

Thanks,
Konstantin

If you can get your target text into an Item in the usual way, you can do this with rules.
A rule would listen for the target text Item state changing, then use it set the label of your other Item
otherItem.label = "some text"
Don’t forget you may need to add formatting too e.g "text [%s]"

Do not expect any of the UIs to be very responsive to label changes - it’s not a properly supported dynamic action.
But for something like reading and setting a description at startup, it should work reasonably well.

1 Like

I just added the Development tag for you. Perhaps some of the developers have ideas too.