Lock Doors After Hour If Closed No Longer Working Correctly


#1

1) Give a description of the problem
I have a piston for my door that is supposed to lock it after an hour if the contact is in a closed state and they are no longer working correctly. It’s been working for probably over a year until about the last month or so.

2) What is the expected behaviour?
The locks should only engage if the contact is in a closed state and it has been one hour. If the contact is opened or the lock is locked then the piston tasks should be cancelled.

3) What is happening/not happening?
Instead the lock is engaging sometimes when the contact is open.

4) Post a Green Snapshot of the pistonimage

5) Attach logs after turning logging level to Full
9/12/2021, 4:42:46 PM +416ms
+1ms ╔Received event [Front Door].lock = unlocked with a delay of 123ms
+87ms ║RunTime Analysis CS > 29ms > PS > 7ms > PE > 52ms > CE
+90ms ║Runtime (40143 bytes) successfully initialized in 7ms (v0.3.111.20210130) (87ms)
+91ms ║╔Execution stage started
+98ms ║║Comparison (enum) unlocked is_not (string) locked = true (1ms)
+100ms ║║Cancelling condition #6’s schedules…
+101ms ║║Condition #6 evaluated true (6ms)
+112ms ║║Comparison (enum) open stays (string) closed = false (1ms)
+113ms ║║Cancelling any timed trigger schedules for condition 3
+114ms ║║Cancelling statement #3’s schedules…
+115ms ║║Cancelling condition #3’s schedules…
+116ms ║║Condition #3 evaluated false (15ms)
+117ms ║║Condition group #1 evaluated false (state did not change) (23ms)
+126ms ║║Condition #15 evaluated false (6ms)
+127ms ║║Condition group #14 evaluated false (state did not change) (8ms)
+132ms ║║Comparison (enum) unlocked changes_to (string) locked = false (1ms)
+133ms ║║Condition #10 evaluated false (4ms)
+134ms ║║Condition group #17 evaluated false (state did not change) (6ms)
+135ms ║║Condition group #9 evaluated false (state did not change) (16ms)
+138ms ║╚Execution stage complete. (47ms)
+139ms ╚Event processed successfully (139ms)
9/12/2021, 3:51:15 PM +776ms
+2ms ╔Received event [Front Door].lock = locked with a delay of 149ms
+10128ms ║RunTime Analysis CS > 27ms > PS > 10036ms > PE > 64ms > CE
+10129ms ║Piston waited at a semaphore for 10031ms
+10131ms ║Runtime (40223 bytes) successfully initialized in 10036ms (v0.3.111.20210130) (10128ms)
+10132ms ║╔Execution stage started
+10141ms ║║Comparison (enum) locked is_not (string) locked = false (1ms)
+10142ms ║║Condition #6 evaluated false (5ms)
+10143ms ║║Condition group #1 evaluated false (state did not change) (7ms)
+10154ms ║║Condition #15 evaluated false (8ms)
+10155ms ║║Condition group #14 evaluated false (state did not change) (9ms)
+10160ms ║║Comparison (enum) locked changes_to (string) locked = false (1ms)
+10162ms ║║Cancelling condition #10’s schedules…
+10163ms ║║Condition #10 evaluated false (5ms)
+10164ms ║║Condition group #17 evaluated false (state did not change) (7ms)
+10165ms ║║Condition group #9 evaluated false (state did not change) (20ms)
+10167ms ║╚Execution stage complete. (35ms)
+10168ms ╚Event processed successfully (10168ms)
9/12/2021, 3:51:15 PM +751ms
+1ms ╔Received event [Front Door].lock = locked with a delay of 124ms
+77ms ║RunTime Analysis CS > 23ms > PS > 5ms > PE > 49ms > CE
+79ms ║Runtime (40132 bytes) successfully initialized in 5ms (v0.3.111.20210130) (77ms)
+80ms ║╔Execution stage started
+88ms ║║Comparison (enum) locked is_not (string) locked = false (1ms)
+90ms ║║Cancelling condition #6’s schedules…
+91ms ║║Condition #6 evaluated false (7ms)
+92ms ║║Cancelling condition #1’s schedules…
+93ms ║║Condition group #1 evaluated false (state changed) (8ms)
+103ms ║║Cancelling condition #15’s schedules…
+104ms ║║Condition #15 evaluated false (9ms)
+105ms ║║Cancelling condition #14’s schedules…
+106ms ║║Condition group #14 evaluated false (state changed) (11ms)
+111ms ║║Comparison (enum) locked changes_to (string) locked = true (0ms)
+112ms ║║Condition #10 evaluated true (5ms)
+121ms ║║Comparison (enum) open is (string) closed = false (1ms)
+122ms ║║Cancelling condition #13’s schedules…
+123ms ║║Condition #13 evaluated false (10ms)
+124ms ║║Cancelling condition #17’s schedules…
+125ms ║║Condition group #17 evaluated false (state changed) (18ms)
+126ms ║║Cancelling condition #9’s schedules…
+127ms ║║Condition group #9 evaluated false (state changed) (33ms)
+129ms ║╚Execution stage complete. (49ms)
+130ms ╚Event processed successfully (130ms)
9/12/2021, 3:51:08 PM +417ms
+1ms ╔Received event [Home].time = 1631476268383 with a delay of 34ms
+109ms ║RunTime Analysis CS > 41ms > PS > 7ms > PE > 61ms > CE
+111ms ║Runtime (40138 bytes) successfully initialized in 7ms (v0.3.111.20210130) (109ms)
+112ms ║╔Execution stage started
+118ms ║║Cancelling condition #3’s schedules…
+119ms ║║Condition #3 evaluated true (1ms)
+121ms ║║Cancelling condition #1’s schedules…
+121ms ║║Condition group #1 evaluated true (state changed) (4ms)
+124ms ║║Cancelling statement #4’s schedules…
+262ms ║║Executed physical command [Front Door].lock() (132ms)
+263ms ║║Executed [Front Door].lock (134ms)
+322ms ║║Executed virtual command [Front Door].sendSMSNotification (55ms)
+331ms ║╚Execution stage complete. (218ms)
+332ms ╚Event processed successfully (332ms)
9/12/2021, 2:51:08 PM +498ms
+2ms ╔Received event [Front Door].contact = open with a delay of 117ms
+79ms ║RunTime Analysis CS > 22ms > PS > 6ms > PE > 50ms > CE
+81ms ║Runtime (40141 bytes) successfully initialized in 6ms (v0.3.111.20210130) (79ms)
+82ms ║╔Execution stage started
+94ms ║║Comparison (enum) unlocked is_not (string) locked = true (1ms)
+96ms ║║Cancelling condition #6’s schedules…
+96ms ║║Condition #6 evaluated true (10ms)
+101ms ║║Comparison (enum) open stays (string) closed = false (1ms)
+103ms ║║Cancelling any timed trigger schedules for condition 3
+104ms ║║Cancelling statement #3’s schedules…
+105ms ║║Condition #3 evaluated false (8ms)
+106ms ║║Condition group #1 evaluated false (state did not change) (19ms)
+112ms ║║Comparison (enum) open changes_to (string) open = true (0ms)
+113ms ║║Cancelling condition #15’s schedules…
+114ms ║║Condition #15 evaluated true (6ms)
+122ms ║║Comparison (enum) unlocked is_not (string) locked = true (2ms)
+123ms ║║Condition #16 evaluated true (8ms)
+124ms ║║Cancelling condition #14’s schedules…
+125ms ║║Condition group #14 evaluated true (state changed) (17ms)
+126ms ║║Condition group #9 evaluated true (state did not change) (19ms)
+128ms ║║Cancelling statement #11’s schedules…
+131ms ║║Executed virtual command cancelTasks (0ms)
+135ms ║╚Execution stage complete. (53ms)
+136ms ╚Event processed successfully (136ms)
9/12/2021, 2:51:08 PM +270ms
+2ms ╔Received event [Front Door].lock = unlocked with a delay of 138ms
+86ms ║RunTime Analysis CS > 29ms > PS > 6ms > PE > 51ms > CE
+89ms ║Runtime (40142 bytes) successfully initialized in 6ms (v0.3.111.20210130) (86ms)
+90ms ║╔Execution stage started
+98ms ║║Comparison (enum) unlocked is_not (string) locked = true (2ms)
+99ms ║║Cancelling condition #6’s schedules…
+100ms ║║Condition #6 evaluated true (6ms)
+111ms ║║Comparison (enum) closed stays (string) closed = true (2ms)
+113ms ║║Adding a timed trigger schedule for condition 3
+115ms ║║Condition #3 evaluated false (14ms)
+116ms ║║Condition group #1 evaluated false (state did not change) (22ms)
+130ms ║║Condition #15 evaluated false (11ms)
+132ms ║║Condition group #14 evaluated false (state did not change) (13ms)
+136ms ║║Comparison (enum) unlocked changes_to (string) locked = false (1ms)
+138ms ║║Cancelling condition #10’s schedules…
+139ms ║║Condition #10 evaluated false (6ms)
+140ms ║║Cancelling condition #17’s schedules…
+141ms ║║Condition group #17 evaluated false (state changed) (8ms)
+142ms ║║Cancelling condition #9’s schedules…
+143ms ║║Condition group #9 evaluated false (state changed) (25ms)
+146ms ║╚Execution stage complete. (56ms)
+147ms ║Setting up scheduled job for Sun, Sep 12 2021 @ 3:51:08 PM EDT (in 3599s)
+160ms ╚Event processed successfully (159ms)
9/12/2021, 12:26:02 PM +229ms
+1ms ╔Received event [Front Door].lock = locked with a delay of 98ms
+80ms ║RunTime Analysis CS > 24ms > PS > 6ms > PE > 51ms > CE
+82ms ║Runtime (40143 bytes) successfully initialized in 6ms (v0.3.111.20210130) (80ms)
+83ms ║╔Execution stage started
+91ms ║║Comparison (enum) locked is_not (string) locked = false (2ms)
+92ms ║║Cancelling condition #6’s schedules…
+93ms ║║Condition #6 evaluated false (6ms)
+94ms ║║Condition group #1 evaluated false (state did not change) (7ms)
+104ms ║║Condition #15 evaluated false (7ms)
+105ms ║║Condition group #14 evaluated false (state did not change) (8ms)
+110ms ║║Comparison (enum) locked changes_to (string) locked = true (0ms)
+111ms ║║Cancelling condition #10’s schedules…
+112ms ║║Condition #10 evaluated true (6ms)
+121ms ║║Comparison (enum) closed is (string) closed = true (2ms)
+123ms ║║Condition #13 evaluated true (9ms)
+124ms ║║Cancelling condition #17’s schedules…
+125ms ║║Condition group #17 evaluated true (state changed) (18ms)
+126ms ║║Cancelling condition #9’s schedules…
+127ms ║║Condition group #9 evaluated true (state changed) (30ms)
+129ms ║║Cancelling statement #11’s schedules…
+131ms ║║Executed virtual command cancelTasks (0ms)
+139ms ║╚Execution stage complete. (56ms)
+145ms ╚Event processed successfully (146ms)
9/12/2021, 12:26:00 PM +885ms
+1ms ╔Received event [Front Door].contact = closed with a delay of 129ms
+150ms ║RunTime Analysis CS > 17ms > PS > 6ms > PE > 127ms > CE
+152ms ║Runtime (40144 bytes) successfully initialized in 6ms (v0.3.111.20210130) (150ms)
+153ms ║╔Execution stage started
+166ms ║║Comparison (enum) unlocked is_not (string) locked = true (2ms)
+167ms ║║Condition #6 evaluated true (10ms)
+173ms ║║Comparison (enum) closed stays (string) closed = true (1ms)
+177ms ║║Adding a timed trigger schedule for condition 3
+179ms ║║Condition #3 evaluated false (11ms)
+180ms ║║Condition group #1 evaluated false (state did not change) (23ms)
+186ms ║║Comparison (enum) closed changes_to (string) open = false (1ms)
+188ms ║║Cancelling condition #15’s schedules…
+189ms ║║Condition #15 evaluated false (5ms)
+190ms ║║Cancelling condition #14’s schedules…
+191ms ║║Condition group #14 evaluated false (state changed) (7ms)
+199ms ║║Condition #10 evaluated false (7ms)
+200ms ║║Condition group #17 evaluated false (state did not change) (9ms)
+201ms ║║Cancelling condition #9’s schedules…
+202ms ║║Condition group #9 evaluated false (state changed) (20ms)
+205ms ║╚Execution stage complete. (51ms)
+206ms ║Setting up scheduled job for Sun, Sep 12 2021 @ 1:26:01 PM EDT (in 3599s)
+243ms ╚Event processed successfully (243ms)
9/12/2021, 11:45:09 AM +908ms
+1ms ╔Received event [Front Door].contact = open with a delay of 135ms
+83ms ║RunTime Analysis CS > 21ms > PS > 6ms > PE > 56ms > CE
+85ms ║Runtime (40145 bytes) successfully initialized in 6ms (v0.3.111.20210130) (83ms)
+86ms ║╔Execution stage started
+98ms ║║Comparison (enum) unlocked is_not (string) locked = true (1ms)
+100ms ║║Condition #6 evaluated true (9ms)
+105ms ║║Comparison (enum) open stays (string) closed = false (2ms)
+107ms ║║Cancelling any timed trigger schedules for condition 3
+108ms ║║Cancelling statement #3’s schedules…
+109ms ║║Condition #3 evaluated false (8ms)
+110ms ║║Condition group #1 evaluated false (state did not change) (19ms)
+116ms ║║Comparison (enum) open changes_to (string) open = true (1ms)
+117ms ║║Cancelling condition #15’s schedules…
+118ms ║║Condition #15 evaluated true (6ms)
+127ms ║║Comparison (enum) unlocked is_not (string) locked = true (1ms)
+128ms ║║Condition #16 evaluated true (9ms)
+129ms ║║Cancelling condition #14’s schedules…
+130ms ║║Condition group #14 evaluated true (state changed) (18ms)
+131ms ║║Cancelling condition #9’s schedules…
+132ms ║║Condition group #9 evaluated true (state changed) (21ms)
+134ms ║║Cancelling statement #11’s schedules…
+136ms ║║Executed virtual command cancelTasks (0ms)
+144ms ║╚Execution stage complete. (58ms)
+150ms ╚Event processed successfully (150ms)
9/12/2021, 11:27:40 AM +916ms
+2ms ╔Received event [Front Door].contact = closed with a delay of 146ms
+96ms ║RunTime Analysis CS > 35ms > PS > 6ms > PE > 55ms > CE
+99ms ║Runtime (40140 bytes) successfully initialized in 6ms (v0.3.111.20210130) (95ms)
+100ms ║╔Execution stage started
+114ms ║║Comparison (enum) unlocked is_not (string) locked = true (2ms)
+116ms ║║Condition #6 evaluated true (10ms)
+121ms ║║Comparison (enum) closed stays (string) closed = true (2ms)
+123ms ║║Adding a timed trigger schedule for condition 3
+125ms ║║Condition #3 evaluated false (9ms)
+126ms ║║Condition group #1 evaluated false (state did not change) (22ms)
+132ms ║║Comparison (enum) closed changes_to (string) open = false (1ms)
+134ms ║║Cancelling condition #15’s schedules…
+135ms ║║Condition #15 evaluated false (6ms)
+136ms ║║Cancelling condition #14’s schedules…
+137ms ║║Condition group #14 evaluated false (state changed) (8ms)
+146ms ║║Cancelling condition #10’s schedules…
+147ms ║║Condition #10 evaluated false (9ms)
+148ms ║║Cancelling condition #17’s schedules…
+149ms ║║Condition group #17 evaluated false (state changed) (11ms)
+150ms ║║Cancelling condition #9’s schedules…
+151ms ║║Condition group #9 evaluated false (state changed) (23ms)
+154ms ║╚Execution stage complete. (55ms)
+155ms ║Setting up scheduled job for Sun, Sep 12 2021 @ 12:27:41 PM EDT (in 3599s)
+162ms ╚Event processed successfully (162ms)
9/12/2021, 11:20:48 AM +86ms
+1ms ╔Received event [Front Door].contact = open with a delay of 93ms
+78ms ║RunTime Analysis CS > 20ms > PS > 5ms > PE > 52ms > CE
+80ms ║Runtime (40140 bytes) successfully initialized in 5ms (v0.3.111.20210130) (78ms)
+81ms ║╔Execution stage started
+94ms ║║Comparison (enum) unlocked is_not (string) locked = true (1ms)
+95ms ║║Cancelling condition #6’s schedules…
+96ms ║║Condition #6 evaluated true (11ms)
+101ms ║║Comparison (enum) open stays (string) closed = false (2ms)
+103ms ║║Cancelling any timed trigger schedules for condition 3
+103ms ║║Cancelling statement #3’s schedules…
+104ms ║║Condition #3 evaluated false (7ms)
+105ms ║║Condition group #1 evaluated false (state did not change) (20ms)
+111ms ║║Comparison (enum) open changes_to (string) open = true (0ms)
+113ms ║║Cancelling condition #15’s schedules…
+114ms ║║Condition #15 evaluated true (6ms)
+122ms ║║Comparison (enum) unlocked is_not (string) locked = true (1ms)
+124ms ║║Condition #16 evaluated true (9ms)
+125ms ║║Cancelling condition #14’s schedules…
+126ms ║║Condition group #14 evaluated true (state changed) (18ms)
+127ms ║║Condition group #9 evaluated true (state did not change) (20ms)
+129ms ║║Cancelling statement #11’s schedules…
+131ms ║║Executed virtual command cancelTasks (0ms)
+136ms ║╚Execution stage complete. (55ms)
+137ms ╚Event processed successfully (137ms)
9/12/2021, 11:20:47 AM +900ms
+1ms ╔Received event [Front Door].lock = unlocked with a delay of 111ms
+85ms ║RunTime Analysis CS > 22ms > PS > 6ms > PE > 57ms > CE
+88ms ║Runtime (40142 bytes) successfully initialized in 6ms (v0.3.111.20210130) (86ms)
+89ms ║╔Execution stage started
+97ms ║║Comparison (enum) unlocked is_not (string) locked = true (1ms)
+99ms ║║Cancelling condition #6’s schedules…
+100ms ║║Condition #6 evaluated true (7ms)
+115ms ║║Comparison (enum) open stays (string) closed = false (2ms)
+117ms ║║Cancelling any timed trigger schedules for condition 3
+118ms ║║Cancelling statement #3’s schedules…
+119ms ║║Condition #3 evaluated false (18ms)
+120ms ║║Condition group #1 evaluated false (state did not change) (27ms)
+130ms ║║Condition #15 evaluated false (6ms)
+131ms ║║Condition group #14 evaluated false (state did not change) (7ms)
+136ms ║║Comparison (enum) unlocked changes_to (string) locked = false (0ms)
+137ms ║║Cancelling condition #10’s schedules…
+138ms ║║Condition #10 evaluated false (6ms)
+139ms ║║Cancelling condition #17’s schedules…
+140ms ║║Condition group #17 evaluated false (state changed) (8ms)
+141ms ║║Cancelling condition #9’s schedules…
+142ms ║║Condition group #9 evaluated false (state changed) (20ms)
+144ms ║╚Execution stage complete. (56ms)
+146ms ╚Event processed successfully (145ms)
9/11/2021, 6:28:38 PM +60ms
+1ms ╔Received event [Front Door].lock = locked with a delay of 187ms
+79ms ║RunTime Analysis CS > 22ms > PS > 6ms > PE > 50ms > CE
+81ms ║Runtime (40144 bytes) successfully initialized in 6ms (v0.3.111.20210130) (79ms)
+82ms ║╔Execution stage started
+89ms ║║Comparison (enum) locked is_not (string) locked = false (1ms)
+91ms ║║Cancelling condition #6’s schedules…
+91ms ║║Condition #6 evaluated false (5ms)
+94ms ║║Condition group #1 evaluated false (state did not change) (7ms)
+108ms ║║Condition #15 evaluated false (11ms)
+110ms ║║Condition group #14 evaluated false (state did not change) (13ms)
+114ms ║║Comparison (enum) locked changes_to (string) locked = true (1ms)
+115ms ║║Cancelling condition #10’s schedules…
+116ms ║║Condition #10 evaluated true (5ms)
+125ms ║║Comparison (enum) closed is (string) closed = true (2ms)
+126ms ║║Condition #13 evaluated true (9ms)
+127ms ║║Cancelling condition #17’s schedules…
+128ms ║║Condition group #17 evaluated true (state changed) (17ms)
+129ms ║║Cancelling condition #9’s schedules…
+130ms ║║Condition group #9 evaluated true (state changed) (34ms)
+132ms ║║Cancelling statement #11’s schedules…
+135ms ║║Executed virtual command cancelTasks (0ms)
+146ms ║╚Execution stage complete. (64ms)
+154ms ╚Event processed successfully (153ms)
9/11/2021, 6:28:36 PM +230ms
+1ms ╔Received event [Front Door].contact = closed with a delay of 144ms
+104ms ║RunTime Analysis CS > 28ms > PS > 12ms > PE > 65ms > CE
+107ms ║Runtime (40145 bytes) successfully initialized in 12ms (v0.3.111.20210130) (104ms)
+107ms ║╔Execution stage started
+124ms ║║Comparison (enum) unlocked is_not (string) locked = true (2ms)
+125ms ║║Condition #6 evaluated true (13ms)
+131ms ║║Comparison (enum) closed stays (string) closed = true (2ms)
+133ms ║║Adding a timed trigger schedule for condition 3
+136ms ║║Condition #3 evaluated false (10ms)
+137ms ║║Condition group #1 evaluated false (state did not change) (25ms)
+143ms ║║Comparison (enum) closed changes_to (string) open = false (1ms)
+145ms ║║Cancelling condition #15’s schedules…
+146ms ║║Condition #15 evaluated false (6ms)
+147ms ║║Cancelling condition #14’s schedules…
+148ms ║║Condition group #14 evaluated false (state changed) (8ms)
+157ms ║║Condition #10 evaluated false (7ms)
+158ms ║║Condition group #17 evaluated false (state did not change) (9ms)
+159ms ║║Cancelling condition #9’s schedules…
+160ms ║║Condition group #9 evaluated false (state changed) (21ms)
+163ms ║╚Execution stage complete. (56ms)
+165ms ║Setting up scheduled job for Sat, Sep 11 2021 @ 7:28:36 PM EDT (in 3599s)
+173ms ╚Event processed successfully (173ms)
9/11/2021, 6:28:26 PM +314ms
+1ms ╔Received event [Front Door].contact = open with a delay of 80ms
+82ms ║RunTime Analysis CS > 20ms > PS > 5ms > PE > 57ms > CE
+85ms ║Runtime (40144 bytes) successfully initialized in 5ms (v0.3.111.20210130) (83ms)
+86ms ║╔Execution stage started
+98ms ║║Comparison (enum) unlocked is_not (string) locked = true (1ms)
+100ms ║║Condition #6 evaluated true (10ms)
+105ms ║║Comparison (enum) open stays (string) closed = false (1ms)
+107ms ║║Cancelling any timed trigger schedules for condition 3
+108ms ║║Cancelling statement #3’s schedules…
+109ms ║║Condition #3 evaluated false (8ms)
+110ms ║║Condition group #1 evaluated false (state did not change) (20ms)
+117ms ║║Comparison (enum) open changes_to (string) open = true (1ms)
+118ms ║║Cancelling condition #15’s schedules…
+119ms ║║Condition #15 evaluated true (6ms)
+128ms ║║Comparison (enum) unlocked is_not (string) locked = true (1ms)
+129ms ║║Condition #16 evaluated true (9ms)
+130ms ║║Cancelling condition #14’s schedules…
+131ms ║║Condition group #14 evaluated true (state changed) (18ms)
+132ms ║║Cancelling condition #9’s schedules…
+133ms ║║Condition group #9 evaluated true (state changed) (21ms)
+136ms ║║Cancelling statement #11’s schedules…
+138ms ║║Executed virtual command cancelTasks (0ms)
+147ms ║╚Execution stage complete. (62ms)
+154ms ╚Event processed successfully (154ms)
9/11/2021, 6:28:25 PM +848ms
+1ms ╔Received event [Front Door].lock = unlocked with a delay of 69ms
+81ms ║RunTime Analysis CS > 21ms > PS > 5ms > PE > 55ms > CE
+84ms ║Runtime (40141 bytes) successfully initialized in 5ms (v0.3.111.20210130) (83ms)
+85ms ║╔Execution stage started
+93ms ║║Comparison (enum) unlocked is_not (string) locked = true (1ms)
+95ms ║║Cancelling condition #6’s schedules…
+96ms ║║Condition #6 evaluated true (7ms)
+105ms ║║Comparison (enum) closed stays (string) closed = true (2ms)
+107ms ║║Adding a timed trigger schedule for condition 3
+109ms ║║Condition #3 evaluated false (12ms)
+110ms ║║Condition group #1 evaluated false (state did not change) (21ms)
+119ms ║║Condition #15 evaluated false (6ms)
+121ms ║║Condition group #14 evaluated false (state did not change) (7ms)
+125ms ║║Comparison (enum) unlocked changes_to (string) locked = false (0ms)
+127ms ║║Cancelling condition #10’s schedules…
+128ms ║║Condition #10 evaluated false (6ms)
+129ms ║║Cancelling condition #17’s schedules…
+130ms ║║Condition group #17 evaluated false (state changed) (8ms)
+131ms ║║Cancelling condition #9’s schedules…
+132ms ║║Condition group #9 evaluated false (state changed) (20ms)
+135ms ║╚Execution stage complete. (51ms)
+137ms ║Setting up scheduled job for Sat, Sep 11 2021 @ 7:28:25 PM EDT (in 3599s)
+144ms ╚Event processed successfully (143ms)
9/11/2021, 5:16:39 PM +328ms
+1ms ╔Received event [Front Door].lock = locked with a delay of 56ms
+76ms ║RunTime Analysis CS > 20ms > PS > 5ms > PE > 50ms > CE
+78ms ║Runtime (40143 bytes) successfully initialized in 5ms (v0.3.111.20210130) (76ms)
+79ms ║╔Execution stage started
+87ms ║║Comparison (enum) locked is_not (string) locked = false (2ms)
+88ms ║║Cancelling condition #6’s schedules…
+89ms ║║Condition #6 evaluated false (6ms)
+90ms ║║Condition group #1 evaluated false (state did not change) (7ms)
+100ms ║║Condition #15 evaluated false (7ms)
+101ms ║║Condition group #14 evaluated false (state did not change) (8ms)
+105ms ║║Comparison (enum) locked changes_to (string) locked = true (0ms)
+107ms ║║Cancelling condition #10’s schedules…
+108ms ║║Condition #10 evaluated true (6ms)
+116ms ║║Comparison (enum) closed is (string) closed = true (1ms)
+117ms ║║Condition #13 evaluated true (8ms)
+118ms ║║Cancelling condition #17’s schedules…
+119ms ║║Condition group #17 evaluated true (state changed) (17ms)
+120ms ║║Cancelling condition #9’s schedules…
+121ms ║║Condition group #9 evaluated true (state changed) (29ms)
+123ms ║║Cancelling statement #11’s schedules…
+125ms ║║Executed virtual command cancelTasks (0ms)
+134ms ║╚Execution stage complete. (55ms)
+141ms ╚Event processed successfully (140ms)
9/11/2021, 5:16:36 PM +991ms
+2ms ╔Received event [Front Door].contact = closed with a delay of 120ms
+77ms ║RunTime Analysis CS > 22ms > PS > 6ms > PE > 48ms > CE
+79ms ║Runtime (40142 bytes) successfully initialized in 6ms (v0.3.111.20210130) (77ms)
+80ms ║╔Execution stage started
+91ms ║║Comparison (enum) unlocked is_not (string) locked = true (1ms)
+92ms ║║Condition #6 evaluated true (8ms)
+97ms ║║Comparison (enum) closed stays (string) closed = true (1ms)
+99ms ║║Adding a timed trigger schedule for condition 3
+101ms ║║Condition #3 evaluated false (8ms)
+102ms ║║Condition group #1 evaluated false (state did not change) (19ms)
+108ms ║║Comparison (enum) closed changes_to (string) open = false (0ms)
+109ms ║║Cancelling condition #15’s schedules…
+110ms ║║Condition #15 evaluated false (5ms)
+111ms ║║Cancelling condition #14’s schedules…
+112ms ║║Condition group #14 evaluated false (state changed) (8ms)
+120ms ║║Condition #10 evaluated false (7ms)
+121ms ║║Condition group #17 evaluated false (state did not change) (8ms)
+122ms ║║Cancelling condition #9’s schedules…
+123ms ║║Condition group #9 evaluated false (state changed) (18ms)
+125ms ║╚Execution stage complete. (46ms)
+126ms ║Setting up scheduled job for Sat, Sep 11 2021 @ 6:16:37 PM EDT (in 3599s)
+147ms ╚Event processed successfully (147ms)
9/11/2021, 5:16:29 PM +360ms
+2ms ╔Received event [Front Door].contact = open with a delay of 128ms
+86ms ║RunTime Analysis CS > 18ms > PS > 11ms > PE > 57ms > CE
+89ms ║Runtime (40147 bytes) successfully initialized in 11ms (v0.3.111.20210130) (86ms)
+90ms ║╔Execution stage started
+103ms ║║Comparison (enum) unlocked is_not (string) locked = true (1ms)
+104ms ║║Condition #6 evaluated true (10ms)
+110ms ║║Comparison (enum) open stays (string) closed = false (2ms)
+112ms ║║Cancelling any timed trigger schedules for condition 3
+113ms ║║Cancelling statement #3’s schedules…
+114ms ║║Condition #3 evaluated false (8ms)
+115ms ║║Condition group #1 evaluated false (state did not change) (20ms)
+121ms ║║Comparison (enum) open changes_to (string) open = true (1ms)
+123ms ║║Cancelling condition #15’s schedules…
+124ms ║║Condition #15 evaluated true (5ms)
+133ms ║║Comparison (enum) unlocked is_not (string) locked = true (2ms)
+134ms ║║Condition #16 evaluated true (10ms)
+136ms ║║Cancelling condition #14’s schedules…
+137ms ║║Condition group #14 evaluated true (state changed) (19ms)
+138ms ║║Cancelling condition #9’s schedules…
+139ms ║║Condition group #9 evaluated true (state changed) (22ms)
+141ms ║║Cancelling statement #11’s schedules…
+144ms ║║Executed virtual command cancelTasks (0ms)
+152ms ║╚Execution stage complete. (63ms)
+159ms ╚Event processed successfully (159ms)
9/11/2021, 5:16:24 PM +544ms
+2ms ╔Received event [Front Door].contact = closed with a delay of 143ms
+88ms ║RunTime Analysis CS > 27ms > PS > 6ms > PE > 55ms > CE
+91ms ║Runtime (40142 bytes) successfully initialized in 6ms (v0.3.111.20210130) (88ms)
+92ms ║╔Execution stage started
+106ms ║║Comparison (enum) unlocked is_not (string) locked = true (2ms)
+107ms ║║Condition #6 evaluated true (11ms)
+113ms ║║Comparison (enum) closed stays (string) closed = true (1ms)
+115ms ║║Adding a timed trigger schedule for condition 3
+117ms ║║Condition #3 evaluated false (9ms)
+118ms ║║Condition group #1 evaluated false (state did not change) (22ms)
+124ms ║║Comparison (enum) closed changes_to (string) open = false (0ms)
+126ms ║║Cancelling condition #15’s schedules…
+127ms ║║Condition #15 evaluated false (6ms)
+128ms ║║Cancelling condition #14’s schedules…
+129ms ║║Condition group #14 evaluated false (state changed) (8ms)
+138ms ║║Condition #10 evaluated false (7ms)
+139ms ║║Condition group #17 evaluated false (state did not change) (8ms)
+140ms ║║Cancelling condition #9’s schedules…
+141ms ║║Condition group #9 evaluated false (state changed) (21ms)
+144ms ║╚Execution stage complete. (52ms)
+145ms ║Setting up scheduled job for Sat, Sep 11 2021 @ 6:16:24 PM EDT (in 3599s)
+153ms ╚Event processed successfully (153ms)
9/11/2021, 5:16:20 PM +696ms
+1ms ╔Received event [Front Door].contact = open with a delay of 85ms
+76ms ║RunTime Analysis CS > 19ms > PS > 5ms > PE > 52ms > CE
+79ms ║Runtime (40144 bytes) successfully initialized in 5ms (v0.3.111.20210130) (77ms)
+79ms ║╔Execution stage started
+92ms ║║Comparison (enum) unlocked is_not (string) locked = true (2ms)
+94ms ║║Condition #6 evaluated true (9ms)
+99ms ║║Comparison (enum) open stays (string) closed = false (2ms)
+101ms ║║Cancelling any timed trigger schedules for condition 3
+102ms ║║Cancelling statement #3’s schedules…
+103ms ║║Condition #3 evaluated false (9ms)
+104ms ║║Condition group #1 evaluated false (state did not change) (21ms)
+110ms ║║Comparison (enum) open changes_to (string) open = true (1ms)
+112ms ║║Cancelling condition #15’s schedules…
+113ms ║║Condition #15 evaluated true (6ms)
+121ms ║║Comparison (enum) unlocked is_not (string) locked = true (2ms)
+123ms ║║Condition #16 evaluated true (8ms)
+124ms ║║Cancelling condition #14’s schedules…
+125ms ║║Condition group #14 evaluated true (state changed) (19ms)
+126ms ║║Cancelling condition #9’s schedules…
+127ms ║║Condition group #9 evaluated true (state changed) (21ms)
+129ms ║║Cancelling statement #11’s schedules…
+132ms ║║Executed virtual command cancelTasks (0ms)
+140ms ║╚Execution stage complete. (61ms)
+147ms ╚Event processed successfully (147ms)

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

Generally I would always advise that changes to trigger conditions appear first in if groups and aren’t nested. For example, door contact changes to open only evaluates to true if the piston is currently evaluating a door contact event, the value is open, and last time the statement was evaluated for a door contact event the value was NOT open. So if the door closes and the piston doesn’t evaluate that trigger it is storing up trouble. That said I think you may be OK in this regard. It is the stays I am more concerned with.

When you evaluate contact stays closed for 1 hour it tests if the contact is closed. If it is and there isn’t already a timer running it sets one for an hour’s time and then returns false. If there is already a timer running it leaves it alone and again returns false. If the contact is open it ‘cancels’ any running timer and again returns false. After one hour the timer will fire the piston and if the timer isn’t recognised as having been cancelled, the piston will fast forward to the stays and return true. So the else block gets quite a lot of exercise, perhaps when you don’t want it to.

In your case you can also see that if the lock is locked while the timer is running the stays command doesn’t get evaluated (webCoRE defaults to lazy evaluation of group conditions and if the first condition in an and is false there is no need to evaluate any other ones) so the timer doesn’t get cancelled.

I’m not sure I can see your exact failure mode there but it might give a clue.