Platform information:
Hardware: PC
OS: Windows 10
Java Runtime Environment: Zulu 11
openHAB version: 3.0.0.0 M1
I just started playing around with OH3 on an old Windows laptop.
I try to run a few DSL rules on OH3 that worked fine under OH2.
Now I encountered a problem when I try to use implicite variables like “triggeringItem” or “receivedEvent” under OH3.
It seems like this implicite variables are not initialized under OH3 as they are with OH2.
A rule like
rule "Test"
when
Item Test1 received command or
Item Test2 received command
then
logInfo("triggeringImtem", triggeringItem.name)
//logInfo("receivedCommand", receivedCommand)
end
ends with an error telling that triggeringItem or receivedCommand is null.
20:56:13.896 [ERROR] [.internal.handler.ScriptActionHandler] - Script execution failed: An error occurred during the script execution: Could not invoke method: org.openhab.core.model.script.actions.Log.logInfo(java.lang.String,java.lang.String,java.lang.Object[]) on instance: null in Test
Any ideas what I’m doing wrong?
Do implicite variables work for someone on OH3?
Or ist this an OH3 bug?