my items
Switch LivingRoom_AirCon "Air Conditioner"
String ALARM3_DEVICE "Device"
Switch ALARM3_COMMAND "Command"
my rule:
rule "LR AC"
when
Item LivingRoom_AirCon changed
then
if (LivingRoom_AirCon.state == ON)
{
RM2.sendCommand("LR_AC_ON")
}
end
rule "ALARM test"
when
Time cron "0 * * * * ?"
then
sendCommand(ALARM3_DEVICE.state.toString , ALARM3_COMMAND.state)
end
ALARM3_DEVICE has a selection of [LivingRoom_AirCon=“LivingRoom AC”]
ALARM3_COMMAND has a selection of [ON=“ON”, OFF=“OFF”]
im getting below error in the log:
2018-03-26 12:15:00.006 [ERROR] [ntime.internal.engine.ExecuteRuleJob] - Error during the execution of rule 'ALARM testss': An error occurred during the script execution: Could not invoke method: org.eclipse.smarthome.model.script.actions.BusEvent.sendCommand(java.lang.String,java.lang.String) on instance: null
what code be wrong in this line:
sendCommand(ALARM3_DEVICE.state.toString , ALARM3_COMMAND.state)
hi, i tried to use only “ALARM3_DEVICE.state” also,im getting error:
2018-03-26 13:02:00.005 [ERROR] [ntime.internal.engine.ExecuteRuleJob] - Error during the execution of rule 'ALARM testss': An error occurred during the script execution: Could not invoke method: org.eclipse.smarthome.model.script.actions.BusEvent.sendCommand(org.eclipse.smarthome.core.items.Item,java.lang.Number) on instance: null
2018-03-26 13:25:07.470 [INFO ] [.eclipse.smarthome.model.script.TEST] - LivingRoom_AirCon
2018-03-26 13:25:07.471 [INFO ] [.eclipse.smarthome.model.script.TEST] - ON
2018-03-26 13:25:07.472 [ERROR] [ntime.internal.engine.ExecuteRuleJob] - Error during the execution of rule 'ALARM testss': An error occurred during the script execution: Could not invoke method: org.eclipse.smarthome.model.script.actions.BusEvent.sendCommand(java.lang.String,java.lang.String) on instance: null