Skip to content

Conversation

dilyanpalauzov
Copy link
Contributor

… because the loaded script is in Xbase, in Xbase everything is an expression, there are no statements. Or may be it is not Xbase, but Xtend - https://eclipse.dev/Xtext/xtend/documentation/203_xtend_expressions.html ?

In any case, here a test: in openhab/scripts/a.script I put

logError('A', "STARTED")
7

and in rules/z.rules

rule "change"
when Item r3 changed
then
  logError("B", "when Item r3 changed")
  logError("D", "M " + callScript("a"))
end

Then I get in openhab.log:

2025-10-15 19:30:56.904 [ERROR] [org.openhab.core.model.script.A   ] - when Item r3 changed
2025-10-15 19:30:56.932 [ERROR] [org.openhab.core.model.script.B   ] - STARTED
2025-10-15 19:30:56.935 [ERROR] [org.openhab.core.model.script.D   ] - M 7

so the value 7 (last line/exrpession of the script) was received by the rule.

Copy link

netlify bot commented Oct 15, 2025

Thanks for your pull request to the openHAB documentation! The result can be previewed at the URL below (this comment and the preview will be updated if you add more commits).

Built without sensitive environment variables

Name Link
🔨 Latest commit d2e3d88
🔍 Latest deploy log https://app.netlify.com/projects/openhab-docs-preview/deploys/68efcd4bcc76f80008deb1ec
😎 Deploy Preview https://deploy-preview-2586--openhab-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@stefan-hoehn
Copy link
Contributor

Github is not the place to ask questions. Please discuss these in the forum.

@dilyanpalauzov
Copy link
Contributor Author

This question is irrelevant to the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants