Arrival Piston to set Smart Home Monitor to Disable and Stay


#1

1) Give a description of the problem
Piston will set Smart Home Monitor status to disabled, but does not set it to “stay” after wait()

2) What is the expected behavior?
Upon arrival the Smart Home Monitor status should be set to disabled, wait 2 minutes, then set it to stay

3) What is happening/not happening?
Upon arrival the Smart Home Monitor status is set to disabled, but never is set back to stay.

**4) Post a Green Snapshot of the piston

5) Attach any logs (From ST IDE and by turning logging level to Full)
2/6/2019, 6:14:36 PM +10ms
+1ms ╔Received event [Casey].presence = present with a delay of 55ms
+96ms ║RunTime Analysis CS > 11ms > PS > 63ms > PE > 22ms > CE
+99ms ║Runtime (39296 bytes) successfully initialized in 63ms (v0.3.109.20181207) (96ms)
+100ms ║╔Execution stage started
+108ms ║║Comparison (enum) present changes_to (string) present = true (1ms)
+110ms ║║Cancelling condition #3’s schedules…
+111ms ║║Condition #3 evaluated true (6ms)
+112ms ║║Cancelling condition #2’s schedules…
+113ms ║║Condition group #2 evaluated true (state changed) (9ms)
+119ms ║║Comparison (string) off is_not (string) off = false (2ms)
+121ms ║║Condition #14 evaluated false (6ms)
+122ms ║║Condition group #1 evaluated false (state did not change) (17ms)
+124ms ║╚Execution stage complete. (25ms)
+125ms ╚Event processed successfully (125ms)
2/6/2019, 1:53:43 PM +491ms
+1ms ╔Received event [Leaving].switch = on with a delay of 1028ms
+84ms ║RunTime Analysis CS > 11ms > PS > 49ms > PE > 24ms > CE
+86ms ║Runtime (39293 bytes) successfully initialized in 49ms (v0.3.109.20181207) (84ms)
+87ms ║╔Execution stage started
+98ms ║║Condition #3 evaluated false (6ms)
+107ms ║║Condition #4 evaluated false (8ms)
+111ms ║║Comparison (enum) on changes_to (string) off = false (1ms)
+113ms ║║Condition #13 evaluated false (4ms)
+114ms ║║Condition group #2 evaluated false (state did not change) (21ms)
+115ms ║║Condition group #1 evaluated false (state did not change) (24ms)
+117ms ║╚Execution stage complete. (30ms)
+118ms ╚Event processed successfully (118ms)
2/6/2019, 1:52:48 PM +392ms
+2ms ╔Received event [Front Door].lock = locked with a delay of 289ms
+129ms ║RunTime Analysis CS > 20ms > PS > 81ms > PE > 27ms > CE
+131ms ║Runtime (39298 bytes) successfully initialized in 81ms (v0.3.109.20181207) (129ms)
+132ms ║╔Execution stage started
+145ms ║║Condition #3 evaluated false (7ms)
+150ms ║║Comparison (enum) locked changes_to (string) unlocked = false (0ms)
+151ms ║║Cancelling condition #4’s schedules…
+152ms ║║Condition #4 evaluated false (6ms)
+159ms ║║Condition #13 evaluated false (6ms)
+161ms ║║Cancelling condition #2’s schedules…
+162ms ║║Condition group #2 evaluated false (state changed) (24ms)
+163ms ║║Condition group #1 evaluated false (state did not change) (26ms)
+165ms ║╚Execution stage complete. (33ms)
+166ms ╚Event processed successfully (166ms)
2/6/2019, 1:52:41 PM +549ms
+2ms ╔Received event [Front Door].lock = unlocked with a delay of 311ms
+162ms ║RunTime Analysis CS > 36ms > PS > 98ms > PE > 28ms > CE
+165ms ║Runtime (39302 bytes) successfully initialized in 98ms (v0.3.109.20181207) (160ms)
+166ms ║╔Execution stage started
+180ms ║║Condition #3 evaluated false (8ms)
+185ms ║║Comparison (enum) unlocked changes_to (string) unlocked = true (1ms)
+187ms ║║Cancelling condition #4’s schedules…
+188ms ║║Condition #4 evaluated true (7ms)
+190ms ║║Cancelling condition #2’s schedules…
+191ms ║║Condition group #2 evaluated true (state changed) (18ms)
+199ms ║║Comparison (string) off is_not (string) off = false (1ms)
+200ms ║║Cancelling condition #14’s schedules…
+201ms ║║Condition #14 evaluated false (9ms)
+203ms ║║Condition group #1 evaluated false (state did not change) (31ms)
+205ms ║╚Execution stage complete. (39ms)
+206ms ╚Event processed successfully (206ms)
2/6/2019, 7:53:00 AM +167ms
+2ms ╔Received event [Casey].presence = not present with a delay of 90ms
+142ms ║RunTime Analysis CS > 31ms > PS > 83ms > PE > 28ms > CE
+145ms ║Runtime (39298 bytes) successfully initialized in 83ms (v0.3.109.20181207) (142ms)
+146ms ║╔Execution stage started
+155ms ║║Comparison (enum) not present changes_to (string) present = false (1ms)
+157ms ║║Condition #3 evaluated false (6ms)
+167ms ║║Condition #4 evaluated false (9ms)
+175ms ║║Condition #13 evaluated false (6ms)
+176ms ║║Condition group #2 evaluated false (state did not change) (25ms)
+177ms ║║Condition group #1 evaluated false (state did not change) (27ms)
+179ms ║╚Execution stage complete. (33ms)
+180ms ╚Event processed successfully (180ms)
2/6/2019, 7:45:50 AM +547ms
+1ms ╔Received event [Leaving].switch = on with a delay of 929ms
+86ms ║RunTime Analysis CS > 13ms > PS > 50ms > PE > 23ms > CE
+89ms ║Runtime (39289 bytes) successfully initialized in 50ms (v0.3.109.20181207) (86ms)
+90ms ║╔Execution stage started
+103ms ║║Condition #3 evaluated false (7ms)
+110ms ║║Condition #4 evaluated false (5ms)
+114ms ║║Comparison (enum) on changes_to (string) off = false (1ms)
+116ms ║║Condition #13 evaluated false (4ms)
+117ms ║║Condition group #2 evaluated false (state did not change) (21ms)
+118ms ║║Condition group #1 evaluated false (state did not change) (24ms)
+120ms ║╚Execution stage complete. (31ms)
+121ms ╚Event processed successfully (121ms)
2/6/2019, 7:45:48 AM +74ms
+1ms ╔Received event [Leaving].switch = on with a delay of 927ms
+89ms ║RunTime Analysis CS > 12ms > PS > 53ms > PE > 23ms > CE
+91ms ║Runtime (39284 bytes) successfully initialized in 53ms (v0.3.109.20181207) (89ms)
+92ms ║╔Execution stage started
+103ms ║║Condition #3 evaluated false (5ms)
+112ms ║║Condition #4 evaluated false (8ms)
+117ms ║║Comparison (enum) on changes_to (string) off = false (0ms)
+118ms ║║Cancelling condition #13’s schedules…
+119ms ║║Condition #13 evaluated false (6ms)
+121ms ║║Cancelling condition #2’s schedules…
+122ms ║║Condition group #2 evaluated false (state changed) (24ms)
+123ms ║║Cancelling condition #1’s schedules…
+124ms ║║Condition group #1 evaluated false (state changed) (28ms)
+126ms ║╚Execution stage complete. (34ms)
+127ms ╚Event processed successfully (127ms)
2/5/2019, 11:26:17 PM +61ms
+0ms ╔Received event [Home].time = 1549434378534 with a delay of -1474ms
+135ms ║RunTime Analysis CS > 19ms > PS > 90ms > PE > 26ms > CE
+137ms ║Runtime (39293 bytes) successfully initialized in 90ms (v0.3.109.20181207) (136ms)
+138ms ║╔Execution stage started
+169ms ║║Executed virtual command setAlarmSystemStatus (19ms)
+181ms ║║Comparison (enum) off is (string) on = false (1ms)
+182ms ║║Condition #16 evaluated false (10ms)
+183ms ║║Condition group #15 evaluated false (state did not change) (12ms)
+186ms ║╚Execution stage complete. (47ms)
+187ms ╚Event processed successfully (188ms)
2/5/2019, 11:24:18 PM +385ms
+0ms ╔Received event [Leaving].switch = off with a delay of 279ms
+81ms ║RunTime Analysis CS > 11ms > PS > 51ms > PE > 19ms > CE
+83ms ║Runtime (39290 bytes) successfully initialized in 51ms (v0.3.109.20181207) (82ms)
+84ms ║╔Execution stage started
+95ms ║║Condition #3 evaluated false (6ms)
+102ms ║║Condition #4 evaluated false (6ms)
+107ms ║║Comparison (enum) off changes_to (string) off = true (0ms)
+108ms ║║Cancelling condition #13’s schedules…
+109ms ║║Condition #13 evaluated true (6ms)
+111ms ║║Cancelling condition #2’s schedules…
+112ms ║║Condition group #2 evaluated true (state changed) (22ms)
+121ms ║║Comparison (string) stay is_not (string) off = true (2ms)
+123ms ║║Condition #14 evaluated true (10ms)
+124ms ║║Cancelling condition #1’s schedules…
+125ms ║║Condition group #1 evaluated true (state changed) (36ms)
+127ms ║║Cancelling statement #6’s schedules…
+143ms ║║Executed virtual command setAlarmSystemStatus (14ms)
+147ms ║║Executed virtual command wait (0ms)
+148ms ║║Requesting a wake up for Tue, Feb 5 2019 @ 11:26:18 PM MST (in 120.0s)
+153ms ║╚Execution stage complete. (69ms)
+154ms ║Setting up scheduled job for Tue, Feb 5 2019 @ 11:26:18 PM MST (in 119.996s)
+162ms ╚Event processed successfully (163ms)
2/5/2019, 11:18:34 PM +957ms
+2ms ╔Received event [Leaving].switch = on with a delay of 589ms
+154ms ║RunTime Analysis CS > 27ms > PS > 94ms > PE > 34ms > CE
+157ms ║Runtime (39291 bytes) successfully initialized in 94ms (v0.3.109.20181207) (154ms)
+158ms ║╔Execution stage started
+172ms ║║Condition #3 evaluated false (8ms)
+182ms ║║Condition #4 evaluated false (8ms)
+186ms ║║Comparison (enum) on changes_to (string) off = false (1ms)
+188ms ║║Condition #13 evaluated false (5ms)
+189ms ║║Condition group #2 evaluated false (state did not change) (26ms)
+190ms ║║Condition group #1 evaluated false (state did not change) (27ms)
+192ms ║╚Execution stage complete. (34ms)
+194ms ╚Event processed successfully (193ms)
2/5/2019, 11:16:41 PM +791ms
+1ms ╔Starting piston… (v0.3.109.20181207)
+166ms ║╔Subscribing to devices…
+189ms ║║Subscribing to Casey.presence…
+200ms ║║Subscribing to Front Door.lock…
+212ms ║║Subscribing to Leaving.switch…
+256ms ║╚Finished subscribing (101ms)
+314ms ║Comparison (string) stay is_not (string) off = true (2ms)
+317ms ║Cancelling condition #14’s schedules…
+332ms ║Comparison (enum) off is (string) on = false (2ms)
+343ms ╚Piston successfully started (342ms)
2/5/2019, 10:55:59 PM +459ms
+2ms ╔Received event [Front Door].lock = locked with a delay of 538ms
+148ms ║RunTime Analysis CS > 24ms > PS > 100ms > PE > 23ms > CE
+150ms ║Runtime (39296 bytes) successfully initialized in 100ms (v0.3.109.20181207) (147ms)
+152ms ║╔Execution stage started
+165ms ║║Condition #3 evaluated false (8ms)
+169ms ║║Comparison (enum) locked changes_to (string) unlocked = false (0ms)
+171ms ║║Cancelling condition #4’s schedules…
+172ms ║║Condition #4 evaluated false (6ms)
+181ms ║║Condition #13 evaluated false (8ms)
+183ms ║║Cancelling condition #2’s schedules…
+184ms ║║Condition group #2 evaluated false (state changed) (26ms)
+185ms ║║Condition group #1 evaluated false (state did not change) (29ms)
+187ms ║╚Execution stage complete. (36ms)
+188ms ╚Event processed successfully (188ms)
2/5/2019, 10:55:55 PM +166ms
+2ms ╔Received event [Front Door].lock = unlocked with a delay of 540ms
+163ms ║RunTime Analysis CS > 24ms > PS > 106ms > PE > 34ms > CE
+166ms ║Runtime (39297 bytes) successfully initialized in 106ms (v0.3.109.20181207) (163ms)
+167ms ║╔Execution stage started
+183ms ║║Condition #3 evaluated false (8ms)
+188ms ║║Comparison (enum) unlocked changes_to (string) unlocked = true (1ms)
+189ms ║║Cancelling condition #4’s schedules…
+190ms ║║Condition #4 evaluated true (6ms)
+192ms ║║Cancelling condition #2’s schedules…
+193ms ║║Condition group #2 evaluated true (state changed) (19ms)
+201ms ║║Comparison (string) off is_not (string) off = false (2ms)
+203ms ║║Cancelling condition #14’s schedules…
+204ms ║║Condition #14 evaluated false (10ms)
+205ms ║║Condition group #1 evaluated false (state did not change) (32ms)
+208ms ║╚Execution stage complete. (41ms)
+209ms ╚Event processed successfully (210ms)
2/5/2019, 10:54:31 PM +553ms
+1ms ╔Starting piston… (v0.3.109.20181207)
+258ms ║╔Subscribing to devices…
+281ms ║║Subscribing to Casey.presence…
+301ms ║║Subscribing to Front Door.lock…
+322ms ║║Subscribing to Leaving.switch…
+408ms ║╚Finished subscribing (175ms)
+466ms ║Cancelling condition #13’s schedules…
+470ms ║Cancelling condition #2’s schedules…
+481ms ║Comparison (string) stay is_not (string) off = true (3ms)
+483ms ║Cancelling condition #1’s schedules…
+499ms ║Comparison (enum) off is (string) on = false (2ms)
+538ms ╚Piston successfully started (537ms)
2/5/2019, 10:45:57 PM +51ms
+0ms ╔Received event [Home].time = 1549431958875 with a delay of -1825ms
+126ms ║RunTime Analysis CS > 21ms > PS > 84ms > PE > 22ms > CE
+129ms ║Runtime (39291 bytes) successfully initialized in 84ms (v0.3.109.20181207) (127ms)
+130ms ║╔Execution stage started
+162ms ║║Executed virtual command setAlarmSystemStatus (21ms)
+172ms ║║Comparison (enum) off is (string) on = false (2ms)
+173ms ║║Cancelling condition #16’s schedules…
+175ms ║║Condition #16 evaluated false (9ms)
+176ms ║║Cancelling condition #15’s schedules…
+177ms ║║Condition group #15 evaluated false (state changed) (12ms)
+179ms ║╚Execution stage complete. (50ms)
+181ms ╚Event processed successfully (180ms)
2/5/2019, 10:43:58 PM +721ms
+1ms ╔Received event [Leaving].switch = off with a delay of 669ms
+86ms ║RunTime Analysis CS > 12ms > PS > 48ms > PE > 25ms > CE
+88ms ║Runtime (39288 bytes) successfully initialized in 48ms (v0.3.109.20181207) (86ms)
+89ms ║╔Execution stage started
+101ms ║║Condition #3 evaluated false (5ms)
+108ms ║║Condition #4 evaluated false (7ms)
+112ms ║║Comparison (enum) off changes_to (string) off = true (1ms)
+114ms ║║Cancelling condition #13’s schedules…
+115ms ║║Condition #13 evaluated true (6ms)
+116ms ║║Cancelling condition #2’s schedules…
+117ms ║║Condition group #2 evaluated true (state changed) (23ms)
+126ms ║║Comparison (string) stay is_not (string) off = true (2ms)
+127ms ║║Condition #14 evaluated true (9ms)
+129ms ║║Cancelling condition #1’s schedules…
+129ms ║║Condition group #1 evaluated true (state changed) (35ms)
+132ms ║║Cancelling statement #6’s schedules…
+147ms ║║Executed virtual command setAlarmSystemStatus (13ms)
+151ms ║║Executed virtual command wait (1ms)
+153ms ║║Requesting a wake up for Tue, Feb 5 2019 @ 10:45:58 PM MST (in 120.0s)
+158ms ║╚Execution stage complete. (68ms)
+159ms ║Setting up scheduled job for Tue, Feb 5 2019 @ 10:45:58 PM MST (in 119.995s)
+172ms ╚Event processed successfully (172ms)
2/5/2019, 10:40:51 PM +24ms
+1ms ╔Starting piston… (v0.3.109.20181207)
+262ms ║╔Subscribing to devices…
+290ms ║║Subscribing to Casey.presence…
+311ms ║║Subscribing to Front Door.lock…
+332ms ║║Subscribing to Leaving.switch…
+424ms ║╚Finished subscribing (187ms)
+495ms ║Comparison (string) stay is_not (string) off = true (3ms)
+499ms ║Cancelling condition #14’s schedules…
+516ms ║Comparison (enum) on is (string) on = true (2ms)
+518ms ║Cancelling condition #16’s schedules…
+520ms ║Cancelling condition #15’s schedules…
+531ms ╚Piston successfully started (531ms)
2/5/2019, 10:36:18 PM +801ms
+1ms ╔Starting piston… (v0.3.109.20181207)
+218ms ║╔Subscribing to devices…
+228ms ║║Subscribing to Casey.presence…
+250ms ║║Subscribing to Front Door.lock…
+339ms ║║Subscribing to Leaving…
+340ms ║╚Finished subscribing (142ms)
+397ms ╚Piston successfully started (396ms)
2/5/2019, 10:24:27 PM +127ms
+1ms ╔Received event [Home].test = 1549430667126 with a delay of 0ms
+89ms ║RunTime Analysis CS > 15ms > PS > 59ms > PE > 15ms > CE
+94ms ║Runtime (37933 bytes) successfully initialized in 59ms (v0.3.109.20181207) (89ms)
+97ms ║╔Execution stage started
+112ms ║║Condition #3 evaluated false (8ms)
+121ms ║║Condition #4 evaluated false (7ms)
+123ms ║║Condition group #2 evaluated false (state did not change) (18ms)
+124ms ║║Condition group #1 evaluated false (state did not change) (21ms)
+128ms ║╚Execution stage complete. (31ms)
+130ms ╚Event processed successfully (129ms)
2/5/2019, 10:22:11 PM +52ms
+0ms ╔Received event [Home].time = 1549430532578 with a delay of -1526ms
+126ms ║RunTime Analysis CS > 19ms > PS > 88ms > PE > 18ms > CE
+128ms ║Runtime (37938 bytes) successfully initialized in 88ms (v0.3.109.20181207) (127ms)
+129ms ║╔Execution stage started
+130ms ║╚Execution stage complete. (1ms)
+132ms ╚Event processed successfully (132ms)
2/5/2019, 10:20:14 PM +248ms
+3ms ╔Received event [Front Door].lock = locked with a delay of 1024ms
+149ms ║RunTime Analysis CS > 28ms > PS > 102ms > PE > 18ms > CE
+151ms ║Runtime (37934 bytes) successfully initialized in 102ms (v0.3.109.20181207) (148ms)
+152ms ║╔Execution stage started
+167ms ║║Condition #3 evaluated false (8ms)
+172ms ║║Comparison (enum) locked changes_to (string) unlocked = false (0ms)
+174ms ║║Cancelling condition #4’s schedules…
+175ms ║║Condition #4 evaluated false (7ms)
+176ms ║║Cancelling condition #2’s schedules…
+177ms ║║Condition group #2 evaluated false (state changed) (19ms)
+179ms ║║Cancelling condition #1’s schedules…
+180ms ║║Condition group #1 evaluated false (state changed) (22ms)
+183ms ║╚Execution stage complete. (31ms)
+185ms ╚Event processed successfully (185ms)
2/5/2019, 10:20:12 PM +379ms
+2ms ╔Received event [Front Door].lock = unlocked with a delay of 1033ms
+141ms ║RunTime Analysis CS > 28ms > PS > 88ms > PE > 25ms > CE
+143ms ║Runtime (37935 bytes) successfully initialized in 88ms (v0.3.109.20181207) (140ms)
+144ms ║╔Execution stage started
+158ms ║║Condition #3 evaluated false (8ms)
+163ms ║║Comparison (enum) unlocked changes_to (string) unlocked = true (0ms)
+164ms ║║Cancelling condition #4’s schedules…
+166ms ║║Condition #4 evaluated true (6ms)
+167ms ║║Cancelling condition #2’s schedules…
+168ms ║║Condition group #2 evaluated true (state changed) (18ms)
+169ms ║║Cancelling condition #1’s schedules…
+170ms ║║Condition group #1 evaluated true (state changed) (21ms)
+172ms ║║Cancelling statement #6’s schedules…
+193ms ║║Executed virtual command setAlarmSystemStatus (18ms)
+197ms ║║Executed virtual command wait (1ms)
+198ms ║║Requesting a wake up for Tue, Feb 5 2019 @ 10:22:12 PM MST (in 120.0s)
+203ms ║╚Execution stage complete. (59ms)
+205ms ║Setting up scheduled job for Tue, Feb 5 2019 @ 10:22:12 PM MST (in 119.995s)
+215ms ╚Event processed successfully (215ms)
2/5/2019, 10:15:53 PM +231ms
+1ms ╔Starting piston… (v0.3.109.20181207)
+212ms ║╔Subscribing to devices…
+226ms ║║Subscribing to Casey.presence…
+247ms ║║Subscribing to Front Door.lock…
+337ms ║║Subscribing to Leaving…
+339ms ║╚Finished subscribing (152ms)
+388ms ║Cancelling condition #2’s schedules…
+391ms ║Cancelling condition #1’s schedules…
+404ms ╚Piston successfully started (404ms)
2/5/2019, 10:01:00 PM +74ms
+1ms ╔Received event [Home].time = 1549429261980 with a delay of -1906ms
+266ms ║RunTime Analysis CS > 60ms > PS > 149ms > PE > 56ms > CE
+269ms ║Runtime (38177 bytes) successfully initialized in 149ms (v0.3.109.20181207) (267ms)
+270ms ║╔Execution stage started
+304ms ║║Executed virtual command setAlarmSystemStatus (17ms)
+306ms ║╚Execution stage complete. (36ms)
+308ms ╚Event processed successfully (307ms)
2/5/2019, 9:59:01 PM +787ms
+2ms ╔Received event [Leaving].switch = off with a delay of 1104ms
+126ms ║RunTime Analysis CS > 20ms > PS > 91ms > PE > 15ms > CE
+129ms ║Runtime (38173 bytes) successfully initialized in 91ms (v0.3.109.20181207) (125ms)
+130ms ║╔Execution stage started
+143ms ║║Condition #3 evaluated false (7ms)
+152ms ║║Condition #4 evaluated false (9ms)
+156ms ║║Comparison (enum) off changes_to (string) off = true (1ms)
+158ms ║║Cancelling condition #5’s schedules…
+159ms ║║Condition #5 evaluated true (6ms)
+160ms ║║Cancelling condition #2’s schedules…
+161ms ║║Condition group #2 evaluated true (state changed) (26ms)
+162ms ║║Cancelling condition #1’s schedules…
+163ms ║║Condition group #1 evaluated true (state changed) (29ms)
+165ms ║║Cancelling statement #6’s schedules…
+187ms ║║Executed virtual command setAlarmSystemStatus (19ms)
+191ms ║║Executed virtual command wait (0ms)
+192ms ║║Requesting a wake up for Tue, Feb 5 2019 @ 10:01:01 PM MST (in 120.0s)
+197ms ║╚Execution stage complete. (68ms)
+198ms ║Setting up scheduled job for Tue, Feb 5 2019 @ 10:01:01 PM MST (in 119.995s)
+211ms ╚Event processed successfully (210ms)
2/5/2019, 9:56:08 PM +65ms
+0ms ╔Received event [Home].time = 1549428969814 with a delay of -1750ms
+124ms ║RunTime Analysis CS > 19ms > PS > 91ms > PE > 14ms > CE
+126ms ║Runtime (38179 bytes) successfully initialized in 91ms (v0.3.109.20181207) (125ms)
+127ms ║╔Execution stage started
+128ms ║╚Execution stage complete. (1ms)
+129ms ╚Event processed successfully (129ms)
2/5/2019, 9:54:12 PM +102ms
+1ms ╔Received event [Front Door].lock = locked with a delay of 673ms
+82ms ║RunTime Analysis CS > 15ms > PS > 58ms > PE > 10ms > CE
+85ms ║Runtime (38171 bytes) successfully initialized in 58ms (v0.3.109.20181207) (82ms)
+86ms ║╔Execution stage started
+99ms ║║Condition #3 evaluated false (8ms)
+104ms ║║Comparison (enum) locked changes_to (string) unlocked = false (0ms)
+106ms ║║Cancelling condition #4’s schedules…
+107ms ║║Condition #4 evaluated false (6ms)
+114ms ║║Condition #5 evaluated false (6ms)
+115ms ║║Cancelling condition #2’s schedules…
+116ms ║║Condition group #2 evaluated false (state changed) (25ms)
+117ms ║║Cancelling condition #1’s schedules…
+118ms ║║Condition group #1 evaluated false (state changed) (28ms)
+121ms ║╚Execution stage complete. (36ms)
+122ms ╚Event processed successfully (122ms)
2/5/2019, 9:54:09 PM +617ms
+2ms ╔Received event [Front Door].lock = unlocked with a delay of 696ms
+139ms ║RunTime Analysis CS > 27ms > PS > 92ms > PE > 21ms > CE
+142ms ║Runtime (38152 bytes) successfully initialized in 92ms (v0.3.109.20181207) (139ms)
+143ms ║╔Execution stage started
+157ms ║║Condition #3 evaluated false (8ms)
+161ms ║║Comparison (enum) unlocked changes_to (string) unlocked = true (1ms)
+163ms ║║Cancelling condition #4’s schedules…
+164ms ║║Condition #4 evaluated true (6ms)
+165ms ║║Cancelling condition #2’s schedules…
+166ms ║║Condition group #2 evaluated true (state changed) (18ms)
+168ms ║║Cancelling condition #1’s schedules…
+169ms ║║Condition group #1 evaluated true (state changed) (20ms)
+171ms ║║Cancelling statement #6’s schedules…
+190ms ║║Executed virtual command setAlarmSystemStatus (16ms)
+194ms ║║Executed virtual command wait (1ms)
+196ms ║║Requesting a wake up for Tue, Feb 5 2019 @ 9:56:09 PM MST (in 120.0s)
+201ms ║╚Execution stage complete. (58ms)
+203ms ║Setting up scheduled job for Tue, Feb 5 2019 @ 9:56:09 PM MST (in 119.995s)
+210ms ╚Event processed successfully (210ms)


#2

Is the “wait” causing your piston to reset and therefore never gets to the “Set Smart Home Monitor to Stay” command? I am still trying to understand “wait” commands.


#3

Good question. They way i understand waits is that it simply pauses the processing for the specified time. however, that is an assumption and could be totally wrong.


#4

Lines 19, 21 & 23 are triggers, which means they are only true for a few seconds, and then they are no longer true. This means, by default, the piston will run until the wait, but nothing after the wait will ever run.

The way around this is to force the last two blocks to run in it’s entirety, no matter what changes happen to the trigger. You can do this by selecting the last two “with” blocks, and changing the “Task Cancellation Policy” to “Never” up in the top right.

temp


#5

I suspected that would be the solution. Still trying to get my head around “Task Cancellation Policy” as well. Thanks WCmore.


#6

Side topic:

Do you know if the piston will re-evaluate it’s conditions during the scheduled re-run/completion, or will it cancel the scheduled completion if a new trigger happens that doesn’t match the conditions? I’m never sure if these long waits fail because of the fact that a change is instant an no longer true later, or if a second trigger cancels the first.


#7

So if I’m understanding you correctly the conditions of the if block are re-evaluated after the wait?

If so, that is not intuitive at all, but would explain the problem.


#8

I’ve been doing some testing, and I don’t think this is the case. The tests and logs show that re-entry is right after the wait statement…as intuition would suggest. If the piston is triggered again, the wait timer is canceled unless the task cancellation policy is set to never. I’ll try some longer tests to make sure this doesn’t change. I know wait behavior seems different on longer waits.


#9

I simplified the piston and set the TCP to never. First test was a success…

2/7/2019, 9:22:13 AM +446ms
+1ms ╔Received event [Leaving].switch = on with a delay of 747ms
+86ms ║RunTime Analysis CS > 15ms > PS > 60ms > PE > 11ms > CE
+88ms ║Runtime (38436 bytes) successfully initialized in 60ms (v0.3.109.20181207) (86ms)
+89ms ║╔Execution stage started
+103ms ║║Condition #3 evaluated false (8ms)
+112ms ║║Condition #4 evaluated false (8ms)
+117ms ║║Comparison (enum) on changes_to (string) off = false (0ms)
+118ms ║║Cancelling condition #13’s schedules…
+120ms ║║Condition #13 evaluated false (6ms)
+121ms ║║Cancelling condition #2’s schedules…
+122ms ║║Condition group #2 evaluated false (state changed) (27ms)
+123ms ║║Cancelling condition #1’s schedules…
+124ms ║║Condition group #1 evaluated false (state changed) (30ms)
+126ms ║╚Execution stage complete. (37ms)
+128ms ╚Event processed successfully (127ms)
2/7/2019, 9:17:49 AM +45ms
+1ms ╔Received event [Home].time = 1549556270552 with a delay of -1507ms
+132ms ║RunTime Analysis CS > 19ms > PS > 96ms > PE > 16ms > CE
+134ms ║Runtime (38445 bytes) successfully initialized in 96ms (v0.3.109.20181207) (133ms)
+135ms ║╔Execution stage started
+162ms ║║Executed virtual command setAlarmSystemStatus (16ms)
+165ms ║╚Execution stage complete. (29ms)
+166ms ╚Event processed successfully (166ms)
2/7/2019, 9:15:50 AM +403ms
+1ms ╔Received event [Leaving].switch = off with a delay of 222ms
+90ms ║RunTime Analysis CS > 23ms > PS > 50ms > PE > 17ms > CE
+93ms ║Runtime (38442 bytes) successfully initialized in 50ms (v0.3.109.20181207) (90ms)
+94ms ║╔Execution stage started
+105ms ║║Condition #3 evaluated false (6ms)
+114ms ║║Condition #4 evaluated false (8ms)
+118ms ║║Comparison (enum) off changes_to (string) off = true (1ms)
+120ms ║║Cancelling condition #13’s schedules…
+121ms ║║Condition #13 evaluated true (5ms)
+122ms ║║Cancelling condition #2’s schedules…
+123ms ║║Condition group #2 evaluated true (state changed) (24ms)
+124ms ║║Cancelling condition #1’s schedules…
+125ms ║║Condition group #1 evaluated true (state changed) (27ms)
+127ms ║║Cancelling statement #6’s schedules…
+144ms ║║Executed virtual command setAlarmSystemStatus (13ms)
+147ms ║║Executed virtual command wait (1ms)
+149ms ║║Requesting a wake up for Thu, Feb 7 2019 @ 9:17:50 AM MST (in 120.0s)
+153ms ║╚Execution stage complete. (60ms)
+154ms ║Setting up scheduled job for Thu, Feb 7 2019 @ 9:17:50 AM MST (in 119.995s)
+171ms ╚Event processed successfully (171ms)


#10

Yes, but the command it executes after the wait is the next line.
(With TCP set to never, it simply resumes the next line without checking the conditions)


#11

So do you ONLY set the last command “Set Smart Home Monitor status to stay” to TCP never?
Or do you set it at the beginning as @DistinctMediocrity has here?


#12

I would only do it on the block(s) with the wait, and the blocks below (if there are any)


#13

:+1:


#14

I tried to do this and click everywhere I could think of and the only time I got the option was when I clicked on the then, but it selected the entire piston.


#15

I usually click to the right of the WITH command… On a blank spot.
(you should see only one block hightlighted in the left margin)