I am transferring functions from my OH1 to OH2 and am having an issue with my first rule. I have two items that are MQTT based that show the status of two different switches connected to my garage. Those items are working and update correctly through OH2. However, i have a rule setup that determines the state of another item garageState based upon the status of the two other garage switches.
Here is the rule file in it’s entirety:
rule "Determine Status of Garage Door"
when
Item garageStateOpen changed or
Item garageStateClosed changed
then
if (garageStateOpen.state == ON){
postUpdate(garageState,"Open")
}
else if (garageStateClosed.state == ON){
postUpdate(garageState,"Closed")
}
else {
postUpdate (garageState,"Ajar")
}
end
And here is the log i get:
2016-04-17 08:43:05.214 [ERROR] [.script.engine.ScriptExecutionThread] - Error during the execution of rule 'Determine Status of Garage Door': The argument 'state' must not be null or empty.
I attempted to set the garageState item to an OFF state, which worked, but did not change the results.
Thanks,
Travis