Using transformation profile for Multi Binding / Channel Linkage

Hi There,

profiles brings us a powerful new way to transform data. How will profiles work on multi binding? So when connecting one item with two channels, will the transformed value be send to the receiving channel? I can’t find any documentation about that.

Bests
Pascal

1 Like

This is a good question. Based on how I read the docs I would expect the profile to apply the transform to any incoming (from the device to the Item) with the tranform regardless of which channel the data comes from.

I’m trying to come up with a use case where one would use multiple channels on the same Item where both channels update the Item and you wouldn’t be using one of the behavioral profiles like follow.

Do you have a concrete use case?

I’d recommend trying it out experimentally and report back with your findings, or even better add your findings to the docs. :wink:

Based on your question, I went on a quest for more documentation on profiles and, like you, found current documentation to be very sparse. The most useful information I found was https://www.eclipse.org/smarthome/documentation/development/bindings/profiles.html and in the ESH source tree extensions/transform/org.eclipse.smarthome.transform.*/README.md, for example:

extensions/transform/org.eclipse.smarthome.transform.jsonpath/README.md

If you have a local copy of the ESH git repository, you can turn up more source files to peruse for information about profiles with this (linux command line) search:

[scott@frisbee-ii smarthome (master)]$ find . -name '*Profile*.java'      

Maybe I’ve misinterpreted how channel linkage is working.
I thought, that when connecting an item with two channels, a command received by the first channel will be send to the second channel. Now I’ve tested this and obviously I’m wrong. So this thread is obsolet.

That is what the new follow Profile will do for you.

And could I combine multiple profiles? So one for transformation and the second to follow?

I don’t know the answer to that. If I had to guess I’d say the answer is no because there is no example like that in the docs. But that is far from a certain answer.

I’m in the process of thinking about how to make use of link profiles too :wink:

I guess, it could be quite helpful for managing voice control of items.
For voice control it’s useful to have the items labeled to “match” natural voice commands, probably even more than one term for the same item (e.g. “lamp”, “light”, “kitchen light” etc.). These “voice-optimized” labels are probably not the best for the sitmap/UI. So we would have another label again just for the UI…

The follow profile could be a simple way to get “alias”-items without the need to replicate channel definitions or even to connect the multiple items pointing to the same thing (channel) by a bunch of rules - correct?

For now, I’m using this concept:

Compared to this DP, the simple “follow” profile does not provide the option to make the forwarding dependend on a condition (e.g. “Is voice control enabled?”).

So thinking about the concept of profiles for that use case immediately arises the question, how to provide “custom profiles”?
Or could we have a “conditional follow-profile” making the follow function dependend on the state of a “gatekeeper” - item.

WDYT?

I don’t think so because profiles only work with Channels. You still need a proxy item(s) to “link” multiple items to the same channel.

I also don’t see a case where profiles will ever support Items on a way that slim work for this user case. Certainly not using the current syntax.