RM 5.0 controlled device failed to turn off, Log shows an error

[C7, v2.3.0.124]

Front entrance light did not turn off today. Thinking back it may have happened before.
From the error log can anyone suggest where the problem might be?
Thanks

Log Error:

RM v5.0 app

Device Driver:

I have seen that error on rules that get multiple triggers, but your rule shouldn't do anything once it triggers for lux the first time as it sets the enable to bypass the IF.

Maybe try a different approach because once the lux falls below 20 you will get a trigger every time the lux changes and it's below 20.

Maybe a predicate rule of from 11:00am to sunset and instead of using the enable Boolean use a private Boolean as a predicate. You can't use a local variable as a predicate but you can use a private Boolean. So once the IF statements completes the delays turn the private Boolean back true.

Or turn on logging and post the logs, someone might be able to see something else.

thank you for your insight.

Now this afternoon I looked at the code again and see another peculiarity. @bravenel I'm not sure how this can be...

I think the solution is to delete the rule and rewrite it but its still curious that what appears to me as being a simple statement is logically in error.

John

I don't see anything wrong with that. It shows the lux statement is false(1839 is not < 21) and the enable Boolean statement is true( true = true) but the entire statement is False.

1 Like

I see. I hadn't considered the last (FALSE) as being for the whole statement but for the "Variable enable=true" portion.
Thanks for straightening me out.

Notice that each condition in the expression has its own (T) or (F), and then the entire expression has [TRUE] or [FALSE].

@JohnRob I think I see a situation where you could get multiple instances of the rule. For example:
@10:00 AM lux triggers rule, enable set to false, and 2-hour delay started
@11:00 AM time triggers rule and enable set to true
@11:05 AM lux triggers rule, enable set to false, and another 2-hour delay started.

Not sure how valid it is but it does appear possible.

Although it won't happen like you suggested as it would have to happen after 11:00AM as the first action condition requires the enable variable be set to true.

I may be missing something; it seems to me once the actions are 1st run for that day, the enable being false will block it from happening until the next day.

Been thinking about your observation and I would like to better understand when such an error might arise.

So from what you've seen I would think this error will occur when a Delay or wait is in process and another rule tries to access the device in the Delay or Wait process.
If this is the case I see where the issue. I have another rule that will turn on the same device when the Delay 2:00:00 is running.

Thanks

John

It probably wasn't clear in my first post but I agree that I don't see why the rule has an issue. Even though the rule will get triggered multiple times once the lux drops below 20, it should not do anything. The enable Boolean should be False, so nothing happens. It could just be something got corrupted when you created the rule.

As @pseudonym suggest maybe there is an outlier set of conditions that trigger and causes the rule to run and set up the delays again before the first set have completed.