Indeed.
I replace my (external) blocks with the example of Rich Koshak. And noticed subsequently he added the blocks into the rule. So copied the blocks to the inline section as well. Adapted the first line of text to make clear which scripts logs. After pressing the hardware switch relatedItemStateChangedEvent had both scripts triggered by the rule.
As can be seen the inline script has an triggering item name, while the external one has an empty value.
Why the difference? For both scripts the event.newState and event.oldStateare present…
Is this a feature, bug, or feature request?
And/or did my software mind got stuck in its
.
Now knowing the difference revisited/googled some pages:
In Textual Rules | openHAB there is also no mentioning of ‘inline’.
triggeringItem and triggeringItemName don't get propagated to script run by GUI defined rule does mention inline DSL and external Blockly, but the missing triggering item name is not clearly linked to being inline or not.
triggeringItem and triggeringItemName don't get propagated to script run by GUI defined rule - #13 by rlkoshak also does not link to being inline or not.
JavaScript Scripting - Automation | openHAB gives an example added as inline script, but does not mention the difference to calling an external script.
@rlkoshak Thanks for the support and supplying the table, its contents was already clear to me except is did not match fully what I noticed during debugging, and I like longer log lines
.
21:06:26.578 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SunScreenUpSwitch' changed from OFF to ON (source: org.openhab.core.thing$zwavejs:node:aabcb81d8a:SunScreenUp:binary-switch-value)
21:06:26.580 [WARN ] [tion.jsscripting.rule.SunScreenScript] - external script rule UID =SunScreenScript
21:06:26.581 [WARN ] [tion.jsscripting.rule.SunScreenScript] - event available =true
21:06:26.582 [WARN ] [tion.jsscripting.rule.SunScreenScript] - event type =ExecutionEvent
21:06:26.583 [WARN ] [tion.jsscripting.rule.SunScreenScript] - triggering item name =undefined
21:06:26.584 [WARN ] [tion.jsscripting.rule.SunScreenScript] - received command =undefined
21:06:26.585 [WARN ] [tion.jsscripting.rule.SunScreenScript] - new state =ON
21:06:26.587 [WARN ] [tion.jsscripting.rule.SunScreenScript] - previous state =OFF
21:06:26.589 [WARN ] [tion.jsscripting.rule.SunScreenUpRule] - inline script rule UID =SunScreenUpRule
21:06:26.591 [WARN ] [tion.jsscripting.rule.SunScreenUpRule] - event available =true
21:06:26.592 [WARN ] [tion.jsscripting.rule.SunScreenUpRule] - event type =ItemStateChangedEvent
21:06:26.593 [WARN ] [tion.jsscripting.rule.SunScreenUpRule] - triggering item name =SunScreenUpSwitch
21:06:26.594 [WARN ] [tion.jsscripting.rule.SunScreenUpRule] - received command =undefined
21:06:26.596 [WARN ] [tion.jsscripting.rule.SunScreenUpRule] - new state =ON
21:06:26.597 [WARN ] [tion.jsscripting.rule.SunScreenUpRule] - previous state =OFF
