I have been struggling with rules stop working for some time now and have no clue how to solve it. I have this simple rule:
rule "Hallway lights ON"
when
Item Presence_Hallway received update
then
if (Presence_Hallway.state==ON){
sendCommand (Light_GF_Hallway_Ceiling, 50)
sendCommand (Light_GF_Hallway_Beam,ON)
}
else {
if (sun_is_up.state==ON){
sendCommand (Light_GF_Hallway_Ceiling, 0)
sendCommand (Light_GF_Hallway_Beam,OFF)
} else {
sendCommand (Light_GF_Hallway_Ceiling, 10)
sendCommand (Light_GF_Hallway_Beam,OFF)
}
}
end
The rule works ok for some (random)hours and then stops and I can’t see any error in the log file. I do not help to reload the .rule file, I must restart OH2 to make the rule work again.
In the first picture, row 4, you can see the item (Presence_Hallway) that is supposed to trigger the rule. The Item is a zwave “FGMS001 Motion Sensor”. This is what happens when the rule works.
In the second picture, row 3, you can see what happens after some time when the same Item change state.
How can I debug this error? I am running OH2 build #719 on Windows 10. I did not have this problem when running OH1 (1.8.3) with same hardware och rule file. I have other rules in the .rule file that also stop working but also rules that never have any problems.