I’ve got that error running the rule: "Unknown variable or command ‘>’ "
There is an wallPlug wich sent watt number (decimals) to OH2.
My steps:
- I have installed the Persistance MySql (on RaspbberyPi 2),
- I made MySql the default persistance (follow the instruction from here: https://www.openhab.org/docs/configuration/persistence.html#persistence-configuration), then mysql.persist file looks like that:
Strategies {
everyHour : "0 0 * * * ?"
everyDay : "0 0 0 * * ?"
default = everyChange
}
Items {
bathroom_power: strategy = everyChange
}
- I run this rule:
rule "FULL"
when Item bathroom_power received update
then
logInfo("Alert: ", "START RUNNING")
if
((bathroom_power.previousState() > 10) && (bathroom_power.previousState() < 50))
{
logInfo("Alert: ", "Condition = OK")
}
else logInfo("Alert: ", "Condition = NOT" )
end
The error:
2018-07-08 20:42:52.605 [INFO ] [lipse.smarthome.model.script.Alert: ] - START RUNNING
2018-07-08 20:42:52.621 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'FULL': Unknown variable or command '>'; line 7, column 7, length 35
Any ideas how to fix that code, pls?