Disregard question, error still there but the rule is working …
Does anybody have an idea why switch (receivedCommand)
gives me an error like: 2017-04-25 13:19:32.825 [ERROR] [.script.engine.ScriptExecutionThread] - Rule 'Toggle Alarm with GUI': The argument 'command' must not be null or empty.
while switch receivedCommand
does not?
Number Alarm_ON_OFF_GUI_N "Alarm ein/aus" (gRestore)
rule "Toggle Alarm with GUI"
when
Item Alarm_ON_OFF_GUI_N received command
then
switch receivedCommand { //switch (receivedCommand)
case 0 : {
Alarm_Active_Off.sendCommand(if(Alarm_Active_Off.state==OFF)ON)
Alarm_Active_intern.sendCommand(OFF)
Alarm_Active_silent.sendCommand(OFF)
Alarm_Active_extern.sendCommand(OFF)
Alarm_LED_Red.sendCommand(ON)
Alarm_LED_Green.sendCommand(OFF)
Alarm_LED_Blue.sendCommand(OFF)
logInfo("FILE","Alarm off state set to "+Alarm_Active_Off.state+" through GUI switch")
}
case 1 : {
//and so on
I’ve got a similar problem since an update some weeks ago…
This is my rule, quite simple actually, added some test logs…
rule "Shutters up"
when
Item Bier changed
then
logInfo("SunriseShutter", "Test1")
Night.sendCommand(OFF)
logInfo("SunriseShutter", "Test2")
WP_TV.sendCommand(OFF)
logInfo("SunriseShutter", "Test3")
gRollladenEG?.members.forEach(r | r.sendCommand(0))
logInfo("SunriseShutter", "Test4")
sendMail("***@******.***", "Shutters up", "Shutters up")
end
Every time the rule is executed I receive the following error message:
11:20:18.383 [ERROR] [.script.engine.ScriptExecutionThread] - Rule 'Shutters up': The argument 'command' must not be null or empty.
“Test1” is logged, the item “Night” is turned off - check
“Test2” is logged, the item “WP_TV” is turned off - check
“Test3” is logged, all members of the “gRollladenEG” group are set to 0, the shutters are open - check
Now the above error is logged and the rule execution is stopped. “Test4” is NOT logged and the mail will NOT be sent out…
What could be the problem here? Everything is working well, but the execution is canceled after the shutters are going up…