Unable to link MQTT/Homie non-settable non-retained string property to OH item

I’m running Openhab 3.2 M5

I have a homie string property which neither settable nor retained. It is the output of a remote receiver.
The Thing channel is listed as Trigger type

I’m trying to Link Channel to Item by creating a new item, but I’m getting an error:

There is no profile available for the selected item

The Link Channel to Item page says to Install transformation add-ons to get additional profiles

I tried that – I’ve added both the RegEx and Javascript transformation add-ons, but it didn’t help, the only Profile listed is “Timestamp on Trigger” and it is grayed out.

How do I add a string item to this channel? Why is it listed as “trigger” instead of string?

I frequently have string items that show status information that I would like to be able to display in my OH user interfaces, so I’m sure I will come across this again. :slight_smile:

By default, these type channels are not linkable to Items - they make events, not states.
Because they are transient events, the usual way to use them is to trigger a rule from the event, and no Item is involved.

You quite likely might not need to be on this path at all - “This is not the feature you are looking for” perhaps?

Having said that -
There is a set of rarely-used “raw” system profiles, that modify trigger channel output and allows linking to an Item. You don’t need to import them

A few bindings will also bundle in their custom profiles.

I wouldn’t be surprised if the GUI does not offer trigger profiles correctly. You should be offered at least the timestamping profile for any trigger type.

I do indeed want to trigger a rule from the event, for example:

if 433mhz_receiver==code_12345:

I guess that is not possible with events?

Previously, in order to be able to display custom strings from a homie item in openHAB BasicUI, I have had to make the item retained. In fact, my Homie library has a “Fake Retained” flag, which flags the Homie parameter as retained, even though it isn’t actually retained. This way openHAB 2.x treated it as a string so that I could link an item to it. I didn’t have time to dive into the issue at the time and just needed it to work.

Does that mean I should still use that same workaround?

Well, go on and do that then.

Wow. Thanks.

I don’t know if there is something unique to how Homie works in this regard but typically an Event Channel can be used to trigger a rule and if there is any data that comes with the event, that data will be in event.event (if using a non-Rules DSL language) or receivedEvent using Rules DSL.

In non-Rules DSL languages, there is also event.channel which will have the Channel ID of the event Channel that triggered the rule.

1 Like

Thank you, Rich! That is a good, clear and completely non-passive-agressive answer. :slight_smile: