Required Expression False... but it's NOT

Hi,

I have a simple Rule 5.1 that turns on Water Recirculation when motion is detected for either of two motion sensor. Here is a snapshot of the rule:
image

But after a few executions... the Required expression if TRUE but for some reason Hubitat thinks it is False. See this snapshot:

I have a log that shows a good execution:
app:272022-04-24 06:51:14.278 pm traceChecking for updates...
app:2972022-04-24 06:51:04.861 pm infoRequired Expression now true
app:2972022-04-24 06:51:04.852 pm infoEvent: Virtual - Hot Water Recirc Pause switch off
app:772022-04-24 06:51:04.640 pm infoevt: Virtual - Hot Water Recirc Pause on wait cancelled -> continue waiting
dev:822022-04-24 06:51:04.576 pm infoVirtual - Hot Water Recirc Pause was turned off
app:2972022-04-24 06:51:04.555 pm infoAction: Off: Virtual - Hot Water Recirc Pause
app:2972022-04-24 06:51:04.525 pm infoDelay Over: Delay 0:30:00
app:272022-04-24 06:50:14.221 pm traceChecking for updates...
...
dev:832022-04-24 06:32:03.268 pm infoMaster Bathroom Motion is inactive
dev:832022-04-24 06:31:33.033 pm infoMaster Bathroom Motion is active
app:272022-04-24 06:31:14.217 pm traceChecking for updates...
app:272022-04-24 06:25:14.234 pm traceChecking for updates...
app:272022-04-24 06:24:14.218 pm traceChecking for updates...
app:272022-04-24 06:23:14.248 pm traceChecking for updates...
app:272022-04-24 06:22:14.245 pm traceChecking for updates...
app:272022-04-24 06:21:14.255 pm traceChecking for updates...
dev:802022-04-24 06:21:04.728 pm infoWater Recirculation was turned off [digital]
app:2972022-04-24 06:21:04.488 pm infoAction: Delay 0:30:00
app:2972022-04-24 06:21:04.472 pm infoAction: Off: Water Recirculation
app:2972022-04-24 06:21:04.456 pm infoDelay Over: Delay 0:02:00
app:272022-04-24 06:20:14.218 pm traceChecking for updates...
app:272022-04-24 06:19:14.219 pm traceChecking for updates...
dev:802022-04-24 06:19:04.733 pm infoWater Recirculation was turned on [digital]
app:2972022-04-24 06:19:04.556 pm infoRequired Expression now false
app:2972022-04-24 06:19:04.551 pm infoEvent: Virtual - Hot Water Recirc Pause switch on
app:772022-04-24 06:19:04.460 pm infoevt: Virtual - Hot Water Recirc Pause on wait for 90 minutes …
app:2972022-04-24 06:19:04.403 pm infoAction: Delay 0:02:00
dev:822022-04-24 06:19:04.383 pm infoVirtual - Hot Water Recirc Pause was turned on
app:2972022-04-24 06:19:04.364 pm infoAction: On: Virtual - Hot Water Recirc Pause
app:2972022-04-24 06:19:04.339 pm infoAction: On: Water Recirculation
app:2972022-04-24 06:19:04.262 pm infoTriggered
app:2972022-04-24 06:19:04.247 pm infoEvent: Master Bathroom Motion motion active
dev:832022-04-24 06:19:04.151 pm infoMaster Bathroom Motion is active
app:272022-04-24 06:18:14.218 pm traceChecking for updates...

Here is the last one:
app:272022-04-24 08:43:14.256 pm traceChecking for updates...
dev:762022-04-24 08:42:48.724 pm infoKitchen Motion is inactive
app:2972022-04-24 08:42:44.471 pm infoRequired Expression now false
app:2972022-04-24 08:42:44.463 pm infoEvent: Virtual - Hot Water Recirc Pause switch off
app:772022-04-24 08:42:44.413 pm infoevt: Virtual - Hot Water Recirc Pause on wait cancelled -> continue waiting
dev:822022-04-24 08:42:44.321 pm infoVirtual - Hot Water Recirc Pause was turned off
app:2972022-04-24 08:42:44.274 pm infoAction: Off: Virtual - Hot Water Recirc Pause
app:2972022-04-24 08:42:44.244 pm infoDelay Over: Delay 0:30:00
dev:832022-04-24 08:42:22.708 pm infoMaster Bathroom Motion is inactive
dev:762022-04-24 08:42:17.892 pm infoKitchen Motion is active
app:272022-04-24 08:42:14.223 pm traceChecking for updates...
dev:832022-04-24 08:41:22.923 pm infoMaster Bathroom Motion is active
app:272022-04-24 08:41:14.229 pm traceChecking for updates...
app:272022-04-24 08:40:14.213 pm traceChecking for updates...
app:272022-04-24 08:39:14.231 pm traceChecking for updates...
app:272022-04-24 08:38:14.212 pm traceChecking for updates...
app:272022-04-24 08:37:14.232 pm traceChecking for updates...
app:272022-04-24 08:36:14.219 pm traceChecking for updates...
app:272022-04-24 08:35:14.212 pm traceChecking for updates...
app:272022-04-24 08:34:14.212 pm traceChecking for updates...
app:272022-04-24 08:33:14.252 pm traceChecking for updates...
app:272022-04-24 08:32:14.221 pm traceChecking for updates...
app:272022-04-24 08:31:14.223 pm traceChecking for updates...
app:272022-04-24 08:30:14.219 pm traceChecking for updates...
app:272022-04-24 08:29:14.218 pm traceChecking for updates...
app:272022-04-24 08:28:14.220 pm traceChecking for updates...
app:272022-04-24 08:27:16.088 pm traceChecking for updates...
app:272022-04-24 08:27:14.242 pm traceChecking for updates...
app:272022-04-24 08:26:14.220 pm traceChecking for updates...
app:272022-04-24 08:25:14.218 pm traceChecking for updates...
app:272022-04-24 08:24:14.218 pm traceChecking for updates...
app:272022-04-24 08:23:14.218 pm traceChecking for updates...
app:272022-04-24 08:22:14.219 pm traceChecking for updates...
app:272022-04-24 08:21:14.223 pm traceChecking for updates...
app:272022-04-24 08:20:14.220 pm traceChecking for updates...
app:272022-04-24 08:19:14.221 pm traceChecking for updates...
app:272022-04-24 08:18:14.215 pm traceChecking for updates...
app:272022-04-24 08:17:14.213 pm traceChecking for updates...
app:272022-04-24 08:16:14.219 pm traceChecking for updates...
dev:832022-04-24 08:15:33.941 pm infoMaster Bathroom Motion is inactive
app:272022-04-24 08:15:14.215 pm traceChecking for updates...
dev:762022-04-24 08:14:59.883 pm infoKitchen Motion temperature is 67.72°F
dev:832022-04-24 08:14:49.485 pm infoMaster Bathroom Motion is active
app:272022-04-24 08:14:14.236 pm traceChecking for updates...
dev:762022-04-24 08:13:51.354 pm infoKitchen Motion is inactive
app:272022-04-24 08:13:14.216 pm traceChecking for updates...
dev:802022-04-24 08:12:44.465 pm infoWater Recirculation was turned off [digital]
app:2972022-04-24 08:12:44.209 pm infoAction: Delay 0:30:00
app:2972022-04-24 08:12:44.194 pm infoAction: Off: Water Recirculation
app:2972022-04-24 08:12:44.184 pm infoDelay Over: Delay 0:02:00
app:272022-04-24 08:12:14.223 pm traceChecking for updates...
app:272022-04-24 08:11:14.224 pm traceChecking for updates...
dev:802022-04-24 08:10:44.413 pm infoWater Recirculation was turned on [digital]
app:2972022-04-24 08:10:44.263 pm infoRequired Expression now false
app:2972022-04-24 08:10:44.259 pm infoEvent: Virtual - Hot Water Recirc Pause switch on
app:772022-04-24 08:10:44.226 pm infoevt: Virtual - Hot Water Recirc Pause on wait for 90 minutes …
app:2972022-04-24 08:10:44.145 pm infoAction: Delay 0:02:00
dev:822022-04-24 08:10:44.132 pm infoVirtual - Hot Water Recirc Pause was turned on
app:2972022-04-24 08:10:44.110 pm infoAction: On: Virtual - Hot Water Recirc Pause
app:2972022-04-24 08:10:44.025 pm infoAction: On: Water Recirculation
app:2972022-04-24 08:10:43.974 pm infoTriggered
app:2972022-04-24 08:10:43.960 pm infoEvent: Kitchen Motion motion active
dev:762022-04-24 08:10:43.916 pm infoKitchen Motion is active
app:272022-04-24 08:10:14.214 pm traceChecking for updates...

The only way out is to open the app and click "Done".

To be clear, this app used to work GREAT until 2.3.1 I think... I have erased it once and re-created with the SAME issue.

I don't see anything in the screenshots that shows the required expression evaluating to true when it should be false or vice versa. Note that the rule page only updates the display of this value (and all) on page load or manual refresh, so unless you did one of those things, what you're seeing might not be the current value.

Otherwise, perhaps there is something in the logs, but they are hard to read as-is. A screenshot may be cleaner, and it may be helpful to point out specific spots that seem problematic.

08:10:43.960 pm infoEvent: Kitchen Motion motion active
08:10:44.226 pm infoevt: Virtual - Hot Water Recirc Pause on wait for 90 minutes...
08:13:51.354 pm infoKitchen Motion is inactive [guessing no action taken as it is still within the 90 wait time from when it was turned on]
08:14:49.485 pm infoMaster Bathroom Motion is active [potentially resets 90 minute wait time?]
08:15:33.941 pm infoMaster Bathroom Motion is inactive [guessing no action taken as it is still within the 90 wait time from when it was turned on]
08:41:22.923 pm infoMaster Bathroom Motion is active [potentially resets 90 minute wait time?]
08:42:22.708 pm infoMaster Bathroom Motion is inactive [guessing no action taken as it is still within the 90 wait time from when it was turned on]

Possible Idea:
If (Water Recirulation is off) then
On: Water Recirucation
On: Virtual - Hot Water Recirc Pause
Delay: 90 minutes
Off: Water Recirulation
Wait for Expression Water Recirulation off -> Timeout 35 minutes
Off: Virtual - Hot Water Recirc Pause
End-If

Just a thought of something. I use the Hub Expression as one can see the "time remaining". By making the repeating action stoppable one can create a different rule to cancel mid-time if need be.

Create Hub Variable Recirulation_Time_Remaining -> Number -> 0

Define Required Expression: Recirulation_Time_Remaining <= 0

Select Triggers:
Kitchen Motion is active OR
Master Bathroom Motion is active

Set Actions to Run:
Comment: Turns on the Water Recirulation the first time motion has been activated and the Water Recirucation is currently off.
If (Water Recirulation is off) AND (Kitchen Motion is active OR Mater Bathroom Motion is active) Then
Set Variable: Recirulation_Time_Remaining -> 90
On: Water Recirulation
End-If
Comment: " "
Comment: Extends the time if the motion is activated while the water reciruation is already on
If (Water Recirulation is on) AND (Kitchen Motion is active OR Mater Bathroom Motion is active) Then
Set Variable: Recirulation_Time_Remaining Add Number 15
End-If
Comment: " "
While expression (Recirulation_Time_Remaining >= 1) Repeat every 1 minute (cancallable)
Set Variable: Recirulation_Time_Remaining Add Number -1
End-Rep
Comment: " "
If (Water Recirulation is on AND Recirulation_Time_Remaining <= 0)
Stop Repeating Actions
Off: Water Recirulation
End-If
Comment: " "
Wait for Expression: Off: Water Recirulation -> Timeout 30 minutes
Comment: Verifies the Remaining Time variable is set back to 0.
Set Variable: Recirulation_Time_Remaining -> 0
Exit Rule

Push Button "Override" Rule

Trigger: Virtual Override Button Push

Action:
Set Variable: Recirulation_Time_Remaining -> 0
Exit Rule

Thanks for the input, but I only want to run this rule once every 30 minutes.

I forgot to mention that I have a simple rule monitoring for the virtual device "Hot Water Recirc Pause" to be stuck (i.e. >90 minutes).... this was an issue with Smartthings... I havent seen it here but I figured out it wouldn't hurt.... I still havent seen this rule come to action... which is ok

I didn't have an issue in the past (I don't need to track this rule that closely). But I track the Virtual "Hot Water Recirc Pause" device to know if it has ran in the last 30 minutes. I saw someone else with a similar issue but the topic got closed before I could post to it

I took the screenshot once it was "stuck". The expression in the rule says "Required Expression False" (In red) but the rule is evaluating at True... once this Rule machine get's stuck... it stays like this for ever... trust me I can attest to that... I will take a few screenshot of it once it gets stuck again.

The only way to prove your case is with screenshots of logs of the rule, with Events, Triggers and Actions all selected for logging. Don't use copy/paste. Screenshots of rule screens are nice, but don't tell the whole story since those are static pages. Logs are conclusive.

Ok... So the sequence already got stuck.,.,. here are two screenshot;
The first one is the good sequence with the final state "Required Expression now true"
The second shot is where it gets stuck... I kept the green circle from the previous shot since it happened right after ... this time is says "Required Expression now false"

It seems to get stuck if the tiggers are "True" before the rule finish its execution.