But it won’t work, my item will not receive any event.
But when i change it to the profile “system:trigger-event-string”, it will receive an update, but just the number …
When i look to into the OH config page, only “Trigger Event String” can be chosen which would explain why it will not work with any other, but the comment on the doc page state something else imo.
mapping is working on my side for v3.4 without problems at least for non-triggering channels.
Maybe mapping is not working for triggering channels? What version are you on? I know it has been introduced not too long ago to be able to link items to triggering channels.
For testing purposes try to add this item and mapping via GUI
edit:
Forgot to ask: does your item get updated when maping is deactivated?
This is not possible via GUI. The only profile i could choose is the mentioned “Trigger Event String”, which works and does indeed make sense to a trigger channel.
But how is it then possible to map the technical values directly to a human readable string?
Like is said, i dont wan’t to deal with “when thing:channel:event triggered 1003” or something like this
Nope, only with the “Trigger Event String” profile
After reading the docs, it is clear that mapping does not work with triggering channels.
If your item works which is linked to a triggering channel, how about using state description?
Sure, that is converted after the item received the raw state but might give you what you need.
I am not familiar (anymore) with file based item definition…
I don’t think that pattern=“%d%%” is correct, maybe %d or even better %s.
Moreover, are you sure that trigger-event-string supports “options” for mapping?
Like i mentioned, i wanna map this at the lowest level as possible, since i don’t think it’s a good idea to deal in higher levels like rules with it.
Yes, rules itself might be an option to translate but for me it misleads the complete idea of mapping services since i think its exactly made for the case transforming from one value to another
Also its very annoying to always think about “what was 1002 about? was it short press? long press?”
Therefore, mapping it in rules is not really an option
I just adapted it from this post
But it also does not work with a string placeholder
This options is not for the profile, but for your mentioned state description approach. The profile is required to receive any change to the item … otherwise i’ll get nothing to the item.
Yes, the only thing i have added (to receive an update to this item in general) was
profile="system:trigger-event-string"
and of course, i changed
pattern="%d%%"
to
pattern="%s"
But no change … i’ll try it on UI but doubt it will work … i think, trigger event items do not work well with all the translation stuff even if they imo would make really sense there
Its strange. because if i add a test item to the UI, i cant choose the trigger channel at all there. Strange … but i saw there is another channel called only “button” instead of “buttonevent” which is not a trigger channel but can be used for my purpose because it changes to the the certain state … and tada … has working mapping
Anyway it would be good to clarify this “issue” anyway because i can think of situations where there is not such a “last pushed button” item