running OPENHAB2 on Ubuntu
a snippet of a rule I’m having an issue with
var tempdiff = (HOTWATER.state - HotwaterTempBefore)
I’m getting :error : ScriptExecutionException: Unknown variable or command ‘-’;
How both variables have values but I can’t understand why I’m getting an error subtracting two numbers ??
2018-05-10 11:17:16.308 [ERROR] [org.quartz.core.ErrorLogger ] - Job (DEFAULT.2018-05-10T11:17:16.287+10:00: Proxy for org.eclipse.xtext.xbase.lib.Proce
dures$Procedure0: [ | {
<null>.myTimer = <XNullLiteralImplCustom>
<XFeatureCallImplCustom>.sendCommand(<XFeatureCallImplCustom>)
var boost_time
var tempdiff
var msg
<null>.msg = <XBinaryOperationImplCustom>
<null>.msg = <XBinaryOperationImplCustom>
logInfo(<XStringLiteralImpl>,<XFeatureCallImplCustom>)
org.eclipse.xtext.xbase.impl.XIfExpressionImpl@4869df18
logInfo(<XStringLiteralImpl>,<XFeatureCallImplCustom>)
sendMail(<XFeatureCallImplCustom>,<XStringLiteralImpl>,<XFeatureCallImplCustom>)
} ] threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception.
at org.quartz.core.JobRunShell.run(JobRunShell.java:213) [115:org.eclipse.smarthome.core.scheduler:0.10.0.b1]
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [115:org.eclipse.smarthome.core.scheduler:0.10.0.b1]
Caused by: java.lang.reflect.UndeclaredThrowableException
at com.sun.proxy.$Proxy154.apply(Unknown Source) ~[?:?]
at org.eclipse.smarthome.model.script.internal.actions.TimerExecutionJob.execute(TimerExecutionJob.java:49) ~[?:?]
at org.quartz.core.JobRunShell.run(JobRunShell.java:202) ~[?:?]
... 1 more
Caused by: org.eclipse.smarthome.model.script.engine.ScriptExecutionException: Unknown variable or command '-'; line 62, column 21, length 35
at org.eclipse.smarthome.model.script.interpreter.ScriptInterpreter.invokeFeature(ScriptInterpreter.java:137) ~[?:?]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter._doEvaluate(XbaseInterpreter.java:901) ~[?:?]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.doEvaluate(XbaseInterpreter.java:225) ~[?:?]
at org.eclipse.smarthome.model.script.interpreter.ScriptInterpreter.doEvaluate(ScriptInterpreter.java:215) ~[?:?]