Looks like I ran into another issue.
So this is what I have right now and what I thought was working perfectly per my previous reply. However, it somehow only works when Presence Sensor 1 arrives and not when Presence Sensor 3 arrives.
I’ve enabled full logging (see below), but can’t figure out why the IF condition was false. Didn’t find any logging around whether the “followed within” worked or not. Any pointers? Thanks!
Below’s the full logging of when Presence Sensor 3 arrived home between sunset and sunrise, and then opened the garage door (Contact Sensor 2) within a min, which should have satisfied the IF condition which uses “followed within 10 min”:
1/30/2018, 6:55:36 PM +363ms
+2ms ╔Received event [Contact Sensor 2].contact = closed with a delay of 384ms
+187ms ║RunTime Analysis CS > 20ms > PS > 98ms > PE > 69ms > CE
+190ms ║Runtime (42259 bytes) successfully initialized in 98ms (v0.2.102.20180116) (188ms)
+191ms ║╔Execution stage started
+233ms ║║Comparison (time) 68136558 is_between (time) 1517362260000 … (time) 1517325300000 = true (7ms)
+234ms ║║Time restriction check passed
+235ms ║║Condition #35 evaluated true (41ms)
+236ms ║║Condition group #null evaluated true (state did not change) (42ms)
+249ms ║║Condition #37 evaluated false (10ms)
+250ms ║║Condition group #36 evaluated false (state did not change) (11ms)
+251ms ║║Cancelling statement #17’s schedules…
+252ms ║║Condition group #17 evaluated false (state did not change) (14ms)
+254ms ║║Cancelling statement #26’s schedules…
+259ms ║║Log: IF statement was false.
+259ms ║║Executed virtual command log (1ms)
+262ms ║╚Execution stage complete. (70ms)
+263ms ╚Event processed successfully (262ms)
1/30/2018, 6:48:59 PM +966ms
+2ms ╔Received event [Contact Sensor 2].contact = open with a delay of 414ms
+416ms ║RunTime Analysis CS > 21ms > PS > 320ms > PE > 74ms > CE
+418ms ║Runtime (42259 bytes) successfully initialized in 320ms (v0.2.102.20180116) (416ms)
+419ms ║╔Execution stage started
+468ms ║║Comparison (time) 67740391 is_between (time) 1517362260000 … (time) 1517325300000 = true (9ms)
+469ms ║║Time restriction check passed
+471ms ║║Condition #35 evaluated true (47ms)
+472ms ║║Condition group #null evaluated true (state did not change) (47ms)
+486ms ║║Condition #37 evaluated false (11ms)
+487ms ║║Condition group #36 evaluated false (state did not change) (13ms)
+488ms ║║Cancelling statement #17’s schedules…
+489ms ║║Condition group #17 evaluated false (state did not change) (16ms)
+491ms ║║Cancelling statement #26’s schedules…
+497ms ║║Log: IF statement was false.
+497ms ║║Executed virtual command log (1ms)
+500ms ║╚Execution stage complete. (80ms)
+501ms ╚Event processed successfully (501ms)
1/30/2018, 6:48:14 PM +272ms
+1ms ╔Received event [Presence Sensor 3].presence = present with a delay of 109ms
+147ms ║RunTime Analysis CS > 14ms > PS > 70ms > PE > 63ms > CE
+149ms ║Runtime (42266 bytes) successfully initialized in 70ms (v0.2.102.20180116) (147ms)
+150ms ║╔Execution stage started
+187ms ║║Comparison (time) 67694426 is_between (time) 1517362260000 … (time) 1517325300000 = true (6ms)
+188ms ║║Time restriction check passed
+189ms ║║Cancelling condition #35’s schedules…
+190ms ║║Condition #35 evaluated true (36ms)
+191ms ║║Cancelling condition #null’s schedules…
+191ms ║║Condition group #null evaluated true (state changed) (37ms)
+201ms ║║Comparison (enum) present changes_to (string) present = false (1ms)
+202ms ║║Condition #37 evaluated false (8ms)
+203ms ║║Condition group #36 evaluated false (state did not change) (9ms)
+204ms ║║Cancelling statement #17’s schedules…
+205ms ║║Cancelling condition #17’s schedules…
+205ms ║║Condition group #17 evaluated false (state changed) (12ms)
+207ms ║║Cancelling statement #26’s schedules…
+213ms ║║Log: IF statement was false.
+213ms ║║Executed virtual command log (1ms)
+216ms ║╚Execution stage complete. (66ms)
+217ms ╚Event processed successfully (217ms)