Issue with "Followed within" command


#1

1) Give a description of the problem
I’m trying to leverage the use of the “followed within” command, in between two triggers, but it is not working as expected.

2) What is the expected behavior?
After the first condition is triggered, if the second condition triggered within 5 min, a push notification is sent

3) What is happening/not happening?
The second condition condition does not check as true although it is properly triggered (as indicated on the attached logs).
Interestingly, if the second condition is triggered again, the piston works as expected (also included in the logs).
Is that a bug, or I’m not using the “followed within” command properly??

**4) Post a Green Snapshot of the piston!

**5) Attach any logs

12/31/2018, 1:56:02 PM +617ms [second condition triggered again - successful outcome]
1ms ╔Received event [Back Door Sensor].contact = open with a delay of 1702ms
+98ms ║RunTime Analysis CS > 17ms > PS > 69ms > PE > 12ms > CE
+100ms ║Runtime (38530 bytes) successfully initialized in 69ms (v0.3.109.20181207) (98ms)
+101ms ║╔Execution stage started
+114ms ║║Comparison (enum) open changes_to (string) open = true (1ms)
+116ms ║║Cancelling condition #3’s schedules…
+117ms ║║Condition #3 evaluated true (7ms)
+118ms ║║Cancelling statement #1’s schedules…
+119ms ║║Condition group #1 made progress up the ladder, currently at step 2 of 2
+120ms ║║Cancelling statement #1’s schedules…
+121ms ║║Cancelling condition #1’s schedules…
+122ms ║║Condition group #1 evaluated true (state changed) (15ms)
+125ms ║║Cancelling statement #4’s schedules…
+143ms ║║Executed virtual command sendPushNotification (13ms)
+146ms ║╚Execution stage complete. (45ms)
+148ms ╚Event processed successfully (148ms)

12/31/2018, 1:55:56 PM +717ms [second condition reset]
+2ms ╔Received event [Back Door Sensor].contact = closed with a delay of 883ms
+95ms ║RunTime Analysis CS > 21ms > PS > 63ms > PE > 11ms > CE
+98ms ║Runtime (38529 bytes) successfully initialized in 63ms (v0.3.109.20181207) (95ms)
+99ms ║╔Execution stage started
+111ms ║║Comparison (enum) closed changes_to (string) open = false (1ms)
+113ms ║║Condition #3 evaluated false (6ms)
+116ms ║╚Execution stage complete. (17ms)
+117ms ║Setting up scheduled job for Mon, Dec 31 2018 @ 2:00:44 PM PST (in 287.797s)
+127ms ╚Event processed successfully (126ms)

12/31/2018, 1:55:49 PM +213ms [second condition trigger]
+1ms ╔Received event [Back Door Sensor].contact = open with a delay of 968ms
+88ms ║RunTime Analysis CS > 18ms > PS > 60ms > PE > 10ms > CE
+90ms ║Runtime (38304 bytes) successfully initialized in 60ms (v0.3.109.20181207) (88ms)
+92ms ║╔Execution stage started
+105ms ║║Comparison (enum) open changes_to (string) open = false (1ms)
+106ms ║║Condition #3 evaluated false (6ms)
+109ms ║╚Execution stage complete. (18ms)
+111ms ║Setting up scheduled job for Mon, Dec 31 2018 @ 2:00:44 PM PST (in 295.308s)
+122ms ╚Event processed successfully (122ms)

12/31/2018, 1:55:44 PM +495ms [first condition triggered]
+2ms ╔Received event [Back Door].lock = unlocked with a delay of 914ms
+115ms ║RunTime Analysis CS > 26ms > PS > 77ms > PE > 12ms > CE
+117ms ║Runtime (38286 bytes) successfully initialized in 77ms (v0.3.109.20181207) (115ms)
+118ms ║╔Execution stage started
+129ms ║║Comparison (enum) unlocked changes_to (string) unlocked = true (1ms)
+131ms ║║Cancelling condition #2’s schedules…
+132ms ║║Condition #2 evaluated true (7ms)
+133ms ║║Cancelling statement #1’s schedules…
+134ms ║║Condition group #1 made progress up the ladder, currently at step 1 of 2
+140ms ║╚Execution stage complete. (21ms)
+142ms ║Setting up scheduled job for Mon, Dec 31 2018 @ 2:00:44 PM PST (in 299.995s)
+151ms ╚Event processed successfully (151ms)
12/31/2018, 1:55:37 PM +667ms
+1ms ╔Received event [Back Door].lock = locked with a delay of 919ms
+107ms ║RunTime Analysis CS > 23ms > PS > 66ms > PE > 17ms > CE
+110ms ║Runtime (38015 bytes) successfully initialized in 66ms (v0.3.109.20181207) (107ms)
+111ms ║╔Execution stage started
+123ms ║║Comparison (enum) locked changes_to (string) unlocked = false (1ms)
+125ms ║║Condition #2 evaluated false (6ms)
+126ms ║║Cancelling statement #1’s schedules…
+128ms ║║Cancelling condition #1’s schedules…
+129ms ║║Condition group #1 evaluated false (state changed) (11ms)
+131ms ║╚Execution stage complete. (21ms)
+133ms ╚Event processed successfully (132ms)


#2

Any feedback?