Im only doing a simple comparison of number items and number item + val (within the rule)
rules
//determine if heating or HWS have any demand
//Heating_Setpoint
//HWS_Setpoint
//OAT_Setpoint
//Temperature_LivingRoom
//Temperature_HWS
//Temperature_OAT
//Temperature_FlowPipe
//Temperature_Upstairs
val Number Heating_Deadband = -1
val Number HWS_Deadband = -15
val Number OAT_Deadband = -1
rule "OAT Hi check"
when
System started or
//every minute check the demands
Time cron "0 * * ? * *"
then
//check OAT temp
if (Temperature_OAT.state > OAT_Setpoint.state){
if (OAT_Hi.state != ON){
OAT_Hi.sendCommand(ON)
logInfo("demand_check","OAT HoldOff "+OAT_Hi.state)
}
} else if (Temperature_OAT.state < (OAT_Setpoint.state+OAT_Deadband)){
if (OAT_Hi.state != OFF){
OAT_Hi.sendCommand(OFF)
logInfo("demand_check","OAT HoldOff "+OAT_Hi.state)
}
}
end
rule "Heating demand check"
when
System started or
//every minute check the demands
Time cron "0 * * ? * *"
then
//check inside temp
if (Temperature_LivingRoom.state < (Heating_Setpoint.state+Heating_Deadband)){
if (Heating_Demand.state != ON){
Heating_Demand.sendCommand(ON)
logInfo("demand_check","Heating demand "+Heating_Demand.state)
}
} else if (Temperature_LivingRoom.state > Heating_Setpoint.state){
if (Heating_Demand.state != OFF){
Heating_Demand.sendCommand(OFF)
logInfo("demand_check","Heating demand "+Heating_Demand.state)
}
}
end
rule "HWS demand check"
when
System started or
//every minute check the demands
Time cron "0 * * ? * *"
then
//check inside temp
if (Temperature_HWS.state < (HWS_Setpoint.state+HWS_Deadband)){
if (HWS_Demand.state != ON){
HWS_Demand.sendCommand(ON)
logInfo("demand_check","HWS demand "+HWS_Demand.state)
}
} else if (Temperature_WS.state > HWS_Setpoint.state){
if (HWS_Demand.state != OFF){
HWS_Demand.sendCommand(OFF)
logInfo("demand_check","HWS demand "+HWS_Demand.state)
}
}
end
error
2018-02-18 21:04:00.105 [ERROR] [ntime.internal.engine.ExecuteRuleJob] - Error during the execution of rule 'Heating demand check': An error occurred during the script execution: Could not invoke method: org.eclipse.xtext.xbase.lib.ObjectExtensions.operator_plus(java.lang.Object,java.lang.String) on instance: null
2018-02-18 21:05:00.044 [ERROR] [ntime.internal.engine.ExecuteRuleJob] - Error during the execution of rule 'HWS demand check': An error occurred during the script execution: Could not invoke method: org.eclipse.xtext.xbase.lib.ObjectExtensions.operator_plus(java.lang.Object,java.lang.String) on instance: null
2018-02-18 21:05:00.133 [ERROR] [ntime.internal.engine.ExecuteRuleJob] - Error during the execution of rule 'Heating demand check': An error occurred during the script execution: Could not invoke method: org.eclipse.xtext.xbase.lib.ObjectExtensions.operator_plus(java.lang.Object,java.lang.String) on instance: null
I made a change to the OAT hi check rule, it was
} else if (Temperature_OAT.state < (OAT_Setpoint.state-1)){
i changed to
} else if (Temperature_OAT.state < (OAT_Setpoint.state+OAT_Deadband)){
and now get this error
2018-02-18 21:31:00.099 [ERROR] [ntime.internal.engine.ExecuteRuleJob] - Error during the execution of rule 'OAT Hi check': An error occurred during the script execution: Could not invoke method: org.eclipse.smarthome.model.script.lib.NumberExtensions.operator_greaterThan(org.eclipse.smarthome.core.types.Type,java.lang.Number) on instance: null
which is different from the other errors. This only occurred after I restarted the raspberry pi.
Not sure what the errors are telling me.
Thanks