How to use DMX Actions in OH3 Rules

,

Could someone point me into the right direction how initialize dmxActions from dmx binding in OH3 rules.

Documentation says:

val dmxActions = getActions("dmx","dmx:sacn-bridge:mydmxbridge")
dmxActions.sendFade("1:41/3","10000:255,255,255:-1", false)

Worked fine for me in OH2.5 but in OH3 it only leads to errors:

val dmxActions = getActions(“dmx”,“knx:device:knx2dmxbridge”);

2022-06-08 23:21:53.756 [ERROR] [b.automation.script.javascript.stack] - Failed to execute script:

org.graalvm.polyglot.PolyglotException: SyntaxError: :2:4 Expected ; but found dmxActions

val dmxActions = getActions(“dmx”,“dmx:sacn-bridge:sacnbridge”)

Prefered rule language would be java or blockly.
I also tried to just copy the OH2.5 DSL Rule. Did not work.

seems to be ECMA2021 ( GraalVM ) syntax and semicolon is expected at the end of the line before the line starting with “val dmxActions”.
Examples in the doc refer to DSL rule. Make sure to use the right script engine in the UI.

val dmxActions is the first line :grimacing:

I see my wording was not good.
The interpreter seem to expect a semicolon at the end of the line.
It states semicolon expected but found dmxActions. this dmxActions is part of the second lne as far as I understand.
Nevertheless from the content of your post it is hard to say because it looks like the error message content

is different from the content of your examples.

Best would be to post the complete code that you use and the error message that is being created.
This should prevent misunderstanding and wrong interpretation.

Found the solution within another topic.

Here is the code for actions in ECMA

actions.get("dmx","dmx:sacn-bridge:sacnbridge").sendFade("39/2","1000:150,100:-1", false);