Webcore not completing action


#1

First allow me to say thanks in advance. I’m new to this but trying to figure it out. I am moving from Stringify and only doing 1 flow/piston at a time. This was my first one so I’m concerned about getting this to work for all of them but then again maybe its user error and quickly fixed.

1) Give a description of the problem

I have one where I have 2 wemo switches controlling back yard lights (one on porch lightsand one on floodlights). This piston should only work from 10 minutes after sunset and until 10 minutes before sunrise (i.e., I don’t need this happening during the daytime). The back door has a contact switch and when its opened, that should trigger the piston with when the back door is opened. I want them to stay on for 10 minutes and turn off. When the door is opened, it is nearly 100% accurate in turning on both switches when the time conditions are met. That’s where the happiness ends. It is almost 0% in turning off the lights after 10 minutes. They just stay on ad infinitum.

Here is where it gets weird. When I open Smartthings app, the app is reporting a state of the switches which is not matching to actual. For example, the floodlights show as off but they are really on. I never had this issue in Stringify.

2) What is the expected behavior?
If the time is between 10 minutes after Sunset and 10 minutes before “next sunrise” and the back door is opened then turn on switch 1 and 2. Start a 10 minute timer and then turn off both switches.

3) What is happening/not happening?
The lights are turning on with almost 100% accuracy but are turning off with almost 0% accuracy. Sometimes 1 will turn off and sometimes both will turn off but frequently neither will actually turn off.

**4) Post a Green Snapshot of the piston![image|45x37

5) Attach any logs (From ST IDE and by turning logging level to Full)

‎4‎/‎15‎/‎2019‎ ‎6‎:‎07‎:‎16‎ ‎AM +80ms   
  +1ms  ╔Received event [Home].time = 1555326436909 with a delay of -829ms  
  +131ms  ║RunTime Analysis CS > 35ms > PS > 54ms > PE > 41ms > CE  
  +133ms  ║Runtime (37277 bytes) successfully initialized in 54ms (v0.3.10a.20190223) (131ms)  
  +135ms  ║╔Execution stage started  
  +155ms  ║║Skipped execution of physical command [Back Porch].off([]) because it would make no change to the device. (3ms)  
  +156ms  ║║Executed [Back Porch].off (6ms)  
  +161ms  ║║Skipped execution of physical command [Back Security Light].off([]) because it would make no change to the device. (3ms)  
  +162ms  ║║Executed [Back Security Light].off (5ms)  
  +165ms  ║╚Execution stage complete. (31ms)  
  +167ms  ╚Event processed successfully (166ms)  
 ‎4‎/‎15‎/‎2019‎ ‎5‎:‎57‎:‎27‎ ‎AM +36ms   
  +2ms  ╔Received event [Back Door].contact = closed with a delay of 146ms  
  +107ms  ║RunTime Analysis CS > 21ms > PS > 48ms > PE > 38ms > CE  
  +110ms  ║Runtime (37270 bytes) successfully initialized in 48ms (v0.3.10a.20190223) (107ms)  
  +111ms  ║╔Execution stage started  
  +121ms  ║║Comparison (enum) closed changes_away_from (string) closed = false (1ms)  
  +123ms  ║║Cancelling condition #2's schedules...  
  +124ms  ║║Condition #2 evaluated false (7ms)  
  +126ms  ║║Cancelling condition #1's schedules...  
  +127ms  ║║Condition group #1 evaluated false (state changed) (9ms)  
  +130ms  ║╚Execution stage complete. (20ms)  
  +132ms  ║Setting up scheduled job for Mon, Apr 15 2019 @ 6:07:16 AM CDT (in 589.742s)  
  +143ms  ╚Event processed successfully (143ms)  
 ‎4‎/‎15‎/‎2019‎ ‎5‎:‎57‎:‎16‎ ‎AM +604ms   
  +1ms  ╔Received event [Back Door].contact = open with a delay of 318ms  
  +106ms  ║RunTime Analysis CS > 31ms > PS > 39ms > PE > 36ms > CE  
  +108ms  ║Runtime (37275 bytes) successfully initialized in 39ms (v0.3.10a.20190223) (106ms)  
  +110ms  ║╔Execution stage started  
  +120ms  ║║Comparison (enum) open changes_away_from (string) closed = true (1ms)  
  +122ms  ║║Cancelling condition #2's schedules...  
  +123ms  ║║Condition #2 evaluated true (7ms)  
  +161ms  ║║Comparison (time) 21436728 is_between (datetime) 1555375800000 .. (datetime) 1555329420000 = true (9ms)  
  +162ms  ║║Time restriction check passed  
  +164ms  ║║Condition #3 evaluated true (40ms)  
  +166ms  ║║Cancelling condition #1's schedules...  
  +167ms  ║║Condition group #1 evaluated true (state changed) (52ms)  
  +170ms  ║║Cancelling statement #4's schedules...  
  +274ms  ║║Executed physical command [Back Porch].on() (100ms)  
  +275ms  ║║Executed [Back Porch].on (102ms)  
  +297ms  ║║Executed physical command [Back Security Light].on() (19ms)  
  +298ms  ║║Executed [Back Security Light].on (21ms)  
  +303ms  ║║Executed virtual command [Back Porch, Back Security Light].wait (0ms)  
  +304ms  ║║Requesting a wake up for Mon, Apr 15 2019 @ 6:07:16 AM CDT (in 600.0s)  
  +310ms  ║╚Execution stage complete. (201ms)  
  +312ms  ║Setting up scheduled job for Mon, Apr 15 2019 @ 6:07:16 AM CDT (in 599.994s)  
  +324ms  ╚Event processed successfully (324ms)  
 ‎4‎/‎15‎/‎2019‎ ‎5‎:‎56‎:‎09‎ ‎AM +933ms   
  +2ms  ╔Received event [Back Door].contact = closed with a delay of 149ms  
  +108ms  ║RunTime Analysis CS > 21ms > PS > 48ms > PE > 38ms > CE  
  +110ms  ║Runtime (37270 bytes) successfully initialized in 48ms (v0.3.10a.20190223) (107ms)  
  +112ms  ║╔Execution stage started  
  +122ms  ║║Comparison (enum) closed changes_away_from (string) closed = false (1ms)  
  +124ms  ║║Cancelling condition #2's schedules...  
  +125ms  ║║Condition #2 evaluated false (7ms)  
  +127ms  ║║Cancelling condition #1's schedules...  
  +128ms  ║║Condition group #1 evaluated false (state changed) (11ms)  
  +134ms  ║╚Execution stage complete. (23ms)  
  +136ms  ║Setting up scheduled job for Mon, Apr 15 2019 @ 6:05:44 AM CDT (in 574.436s)  
  +146ms  ╚Event processed successfully (146ms)  
 ‎4‎/‎15‎/‎2019‎ ‎5‎:‎55‎:‎43‎ ‎AM +993ms   
  +1ms  ╔Received event [Back Door].contact = open with a delay of 143ms  
  +88ms  ║RunTime Analysis CS > 15ms > PS > 36ms > PE > 36ms > CE  
  +90ms  ║Runtime (37274 bytes) successfully initialized in 36ms (v0.3.10a.20190223) (88ms)  
  +92ms  ║╔Execution stage started  
  +102ms  ║║Comparison (enum) open changes_away_from (string) closed = true (1ms)  
  +104ms  ║║Cancelling condition #2's schedules...  
  +105ms  ║║Condition #2 evaluated true (7ms)  
  +143ms  ║║Comparison (time) 21344099 is_between (datetime) 1555375800000 .. (datetime) 1555329420000 = true (9ms)  
  +144ms  ║║Time restriction check passed  
  +146ms  ║║Condition #3 evaluated true (40ms)  
  +148ms  ║║Cancelling condition #1's schedules...  
  +149ms  ║║Condition group #1 evaluated true (state changed) (51ms)  
  +151ms  ║║Cancelling statement #4's schedules...  
  +227ms  ║║Executed physical command [Back Porch].on() (71ms)  
  +228ms  ║║Executed [Back Porch].on (73ms)  
  +492ms  ║║Executed physical command [Back Security Light].on() (261ms)  
  +493ms  ║║Executed [Back Security Light].on (263ms)  
  +498ms  ║║Executed virtual command [Back Porch, Back Security Light].wait (1ms)  
  +506ms  ║║Requesting a wake up for Mon, Apr 15 2019 @ 6:05:44 AM CDT (in 600.0s)  
  +516ms  ║╚Execution stage complete. (424ms)  
  +518ms  ║Setting up scheduled job for Mon, Apr 15 2019 @ 6:05:44 AM CDT (in 599.994s)  
  +530ms  ╚Event processed successfully (530ms)  
 ‎4‎/‎15‎/‎2019‎ ‎5‎:‎46‎:‎44‎ ‎AM +305ms   
  +1ms  ╔Received event [Back Door].contact = closed with a delay of 958ms  
  +88ms  ║RunTime Analysis CS > 17ms > PS > 35ms > PE > 36ms > CE  
  +90ms  ║Runtime (37269 bytes) successfully initialized in 35ms (v0.3.10a.20190223) (88ms)  
  +92ms  ║╔Execution stage started  
  +102ms  ║║Comparison (enum) closed changes_away_from (string) closed = false (1ms)  
  +104ms  ║║Cancelling condition #2's schedules...  
  +105ms  ║║Condition #2 evaluated false (7ms)  
  +107ms  ║║Cancelling condition #1's schedules...  
  +108ms  ║║Condition group #1 evaluated false (state changed) (11ms)  
  +118ms  ║╚Execution stage complete. (27ms)  
  +120ms  ║Setting up scheduled job for Mon, Apr 15 2019 @ 5:56:41 AM CDT (in 597.004s)  
  +133ms  ╚Event processed successfully (133ms)  
 ‎4‎/‎15‎/‎2019‎ ‎5‎:‎46‎:‎41‎ ‎AM +119ms   
  +2ms  ╔Received event [Back Door].contact = open with a delay of 950ms  
  +113ms  ║RunTime Analysis CS > 21ms > PS > 51ms > PE > 40ms > CE  
  +115ms  ║Runtime (37275 bytes) successfully initialized in 51ms (v0.3.10a.20190223) (112ms)  
  +116ms  ║╔Execution stage started  
  +127ms  ║║Comparison (enum) open changes_away_from (string) closed = true (1ms)  
  +129ms  ║║Cancelling condition #2's schedules...  
  +130ms  ║║Condition #2 evaluated true (7ms)  
  +172ms  ║║Comparison (time) 20801251 is_between (datetime) 1555375800000 .. (datetime) 1555329420000 = true (8ms)  
  +173ms  ║║Time restriction check passed  
  +175ms  ║║Condition #3 evaluated true (44ms)  
  +177ms  ║║Cancelling condition #1's schedules...  
  +178ms  ║║Condition group #1 evaluated true (state changed) (56ms)  
  +181ms  ║║Cancelling statement #4's schedules...  
  +265ms  ║║Executed physical command [Back Porch].on() (79ms)  
  +266ms  ║║Executed [Back Porch].on (81ms)  
  +301ms  ║║Executed physical command [Back Security Light].on() (32ms)  
  +302ms  ║║Executed [Back Security Light].on (34ms)  
  +307ms  ║║Executed virtual command [Back Porch, Back Security Light].wait (1ms)  
  +309ms  ║║Requesting a wake up for Mon, Apr 15 2019 @ 5:56:41 AM CDT (in 600.0s)  
  +314ms  ║╚Execution stage complete. (198ms)  
  +316ms  ║Setting up scheduled job for Mon, Apr 15 2019 @ 5:56:41 AM CDT (in 599.994s)  
  +325ms  ╚Event processed successfully (325ms)  
 ‎4‎/‎14‎/‎2019‎ ‎9‎:‎50‎:‎03‎ ‎PM +84ms   
  +1ms  ╔Received event [Home].time = 1555296603540 with a delay of -456ms  
  +233ms  ║RunTime Analysis CS > 58ms > PS > 137ms > PE > 37ms > CE  
  +236ms  ║Runtime (37279 bytes) successfully initialized in 137ms (v0.3.10a.20190223) (233ms)  
  +238ms  ║╔Execution stage started  
  +307ms  ║║Executed physical command [Back Porch].off() (53ms)  
  +308ms  ║║Executed [Back Porch].off (55ms)  
  +315ms  ║║Skipped execution of physical command [Back Security Light].off([]) because it would make no change to the device. (3ms)  
  +316ms  ║║Executed [Back Security Light].off (6ms)  
  +319ms  ║╚Execution stage complete. (82ms)  
  +321ms  ╚Event processed successfully (320ms)  
 ‎4‎/‎14‎/‎2019‎ ‎9‎:‎40‎:‎05‎ ‎PM +241ms   
  +1ms  ╔Received event [Back Door].contact = closed with a delay of 373ms  
  +96ms  ║RunTime Analysis CS > 17ms > PS > 39ms > PE > 41ms > CE  
  +99ms  ║Runtime (37269 bytes) successfully initialized in 39ms (v0.3.10a.20190223) (97ms)  
  +100ms  ║╔Execution stage started  
  +111ms  ║║Comparison (enum) closed changes_away_from (string) closed = false (1ms)  
  +113ms  ║║Cancelling condition #2's schedules...  
  +114ms  ║║Condition #2 evaluated false (8ms)  
  +116ms  ║║Cancelling condition #1's schedules...  
  +117ms  ║║Condition group #1 evaluated false (state changed) (10ms)  
  +121ms  ║╚Execution stage complete. (21ms)  
  +123ms  ║Setting up scheduled job for Sun, Apr 14 2019 @ 9:50:03 PM CDT (in 598.177s)  
  +135ms  ╚Event processed successfully (136ms)  
 ‎4‎/‎14‎/‎2019‎ ‎9‎:‎40‎:‎03‎ ‎PM +243ms   
  +2ms  ╔Received event [Back Door].contact = open with a delay of 387ms  
  +108ms  ║RunTime Analysis CS > 21ms > PS > 48ms > PE > 38ms > CE  
  +110ms  ║Runtime (37275 bytes) successfully initialized in 48ms (v0.3.10a.20190223) (107ms)  
  +111ms  ║╔Execution stage started  
  +122ms  ║║Comparison (enum) open changes_away_from (string) closed = true (0ms)  
  +124ms  ║║Cancelling condition #2's schedules...  
  +125ms  ║║Condition #2 evaluated true (7ms)  
  +167ms  ║║Comparison (time) 78003369 is_between (datetime) 1555289400000 .. (datetime) 1555329480000 = true (9ms)  
  +168ms  ║║Time restriction check passed  
  +170ms  ║║Condition #3 evaluated true (44ms)  
  +172ms  ║║Cancelling condition #1's schedules...  
  +173ms  ║║Condition group #1 evaluated true (state changed) (55ms)  
  +176ms  ║║Cancelling statement #4's schedules...  
  +262ms  ║║Executed physical command [Back Porch].on() (81ms)  
  +263ms  ║║Executed [Back Porch].on (84ms)  
  +289ms  ║║Executed physical command [Back Security Light].on() (23ms)  
  +290ms  ║║Executed [Back Security Light].on (25ms)  
  +295ms  ║║Executed virtual command [Back Porch, Back Security Light].wait (0ms)  
  +296ms  ║║Requesting a wake up for Sun, Apr 14 2019 @ 9:50:03 PM CDT (in 600.0s)  
  +302ms  ║╚Execution stage complete. (191ms)  
  +304ms  ║Setting up scheduled job for Sun, Apr 14 2019 @ 9:50:03 PM CDT (in 599.994s)  
  +312ms  ╚Event processed successfully (312ms)  
 ‎4‎/‎14‎/‎2019‎ ‎9‎:‎39‎:‎56‎ ‎PM +49ms   
  +0ms  ╔Received event [Home].time = 1555295996980 with a delay of -932ms  
  +96ms  ║RunTime Analysis CS > 26ms > PS > 33ms > PE > 38ms > CE  
  +98ms  ║Runtime (37276 bytes) successfully initialized in 33ms (v0.3.10a.20190223) (97ms)  
  +100ms  ║╔Execution stage started  
  +119ms  ║║Skipped execution of physical command [Back Porch].off([]) because it would make no change to the device. (4ms)  
  +120ms  ║║Executed [Back Porch].off (6ms)  
  +125ms  ║║Skipped execution of physical command [Back Security Light].off([]) because it would make no change to the device. (3ms)  
  +126ms  ║║Executed [Back Security Light].off (5ms)  
  +129ms  ║╚Execution stage complete. (30ms)  
  +131ms  ╚Event processed successfully (131ms)  
 ‎4‎/‎14‎/‎2019‎ ‎9‎:‎29‎:‎59‎ ‎PM +495ms   
  +2ms  ╔Received event [Back Door].contact = closed with a delay of 270ms  
  +87ms  ║RunTime Analysis CS > 16ms > PS > 34ms > PE > 37ms > CE  
  +89ms  ║Runtime (37269 bytes) successfully initialized in 34ms (v0.3.10a.20190223) (87ms)  
  +91ms  ║╔Execution stage started  
  +101ms  ║║Comparison (enum) closed changes_away_from (string) closed = false (1ms)  
  +103ms  ║║Cancelling condition #2's schedules...  
  +104ms  ║║Condition #2 evaluated false (7ms)  
  +105ms  ║║Cancelling condition #1's schedules...  
  +106ms  ║║Condition group #1 evaluated false (state changed) (10ms)  
  +110ms  ║╚Execution stage complete. (19ms)  
  +112ms  ║Setting up scheduled job for Sun, Apr 14 2019 @ 9:39:56 PM CDT (in 597.374s)  
  +122ms  ╚Event processed successfully (122ms)  
 ‎4‎/‎14‎/‎2019‎ ‎9‎:‎29‎:‎56‎ ‎PM +742ms   
  +1ms  ╔Received event [Back Door].contact = open with a delay of 267ms  
  +102ms  ║RunTime Analysis CS > 29ms > PS > 36ms > PE > 37ms > CE  
  +104ms  ║Runtime (37275 bytes) successfully initialized in 36ms (v0.3.10a.20190223) (102ms)  
  +105ms  ║╔Execution stage started  
  +116ms  ║║Comparison (enum) open changes_away_from (string) closed = true (1ms)  
  +118ms  ║║Cancelling condition #2's schedules...  
  +119ms  ║║Condition #2 evaluated true (7ms)  
  +161ms  ║║Comparison (time) 77396863 is_between (datetime) 1555289400000 .. (datetime) 1555329480000 = true (9ms)  
  +162ms  ║║Time restriction check passed  
  +164ms  ║║Condition #3 evaluated true (44ms)  
  +166ms  ║║Cancelling condition #1's schedules...  
  +167ms  ║║Condition group #1 evaluated true (state changed) (56ms)  
  +170ms  ║║Cancelling statement #4's schedules...  
  +203ms  ║║Executed physical command [Back Porch].on() (28ms)  
  +204ms  ║║Executed [Back Porch].on (30ms)  
  +229ms  ║║Executed physical command [Back Security Light].on() (22ms)  
  +231ms  ║║Executed [Back Security Light].on (24ms)  
  +235ms  ║║Executed virtual command [Back Porch, Back Security Light].wait (1ms)  
  +237ms  ║║Requesting a wake up for Sun, Apr 14 2019 @ 9:39:56 PM CDT (in 600.0s)  
  +243ms  ║╚Execution stage complete. (137ms)  
  +245ms  ║Setting up scheduled job for Sun, Apr 14 2019 @ 9:39:56 PM CDT (in 599.994s)  
  +254ms  ╚Event processed successfully (254ms)  
 ‎4‎/‎14‎/‎2019‎ ‎8‎:‎54‎:‎38‎ ‎PM +157ms   
  +1ms  ╔Received event [Home].time = 1555293279609 with a delay of -1453ms  
  +109ms  ║RunTime Analysis CS > 22ms > PS > 44ms > PE > 43ms > CE  
  +111ms  ║Runtime (37278 bytes) successfully initialized in 44ms (v0.3.10a.20190223) (109ms)  
  +112ms  ║╔Execution stage started  
  +132ms  ║║Skipped execution of physical command [Back Porch].off([]) because it would make no change to the device. (2ms)  
  +133ms  ║║Executed [Back Porch].off (5ms)  
  +139ms  ║║Skipped execution of physical command [Back Security Light].off([]) because it would make no change to the device. (4ms)  
  +140ms  ║║Executed [Back Security Light].off (6ms)  
  +143ms  ║╚Execution stage complete. (31ms)  
  +145ms  ╚Event processed successfully (145ms)  
 ‎4‎/‎14‎/‎2019‎ ‎8‎:‎44‎:‎51‎ ‎PM +567ms   
  +1ms  ╔Received event [Back Door].contact = closed with a delay of 995ms  
  +94ms  ║RunTime Analysis CS > 17ms > PS > 38ms > PE > 39ms > CE  
  +97ms  ║Runtime (37269 bytes) successfully initialized in 38ms (v0.3.10a.20190223) (94ms)  
  +98ms  ║╔Execution stage started  
  +108ms  ║║Comparison (enum) closed changes_away_from (string) closed = false (1ms)  
  +110ms  ║║Cancelling condition #2's schedules...  
  +111ms  ║║Condition #2 evaluated false (7ms)  
  +113ms  ║║Cancelling condition #1's schedules...  
  +114ms  ║║Condition group #1 evaluated false (state changed) (11ms)  
  +117ms  ║╚Execution stage complete. (20ms)  
  +119ms  ║Setting up scheduled job for Sun, Apr 14 2019 @ 8:54:39 PM CDT (in 587.924s)  
  +131ms  ╚Event processed successfully (131ms)  
 ‎4‎/‎14‎/‎2019‎ ‎8‎:‎44‎:‎39‎ ‎PM +354ms   
  +1ms  ╔Received event [Back Door].contact = open with a delay of 997ms  
  +96ms  ║RunTime Analysis CS > 17ms > PS > 41ms > PE > 38ms > CE  
  +98ms  ║Runtime (37274 bytes) successfully initialized in 41ms (v0.3.10a.20190223) (96ms)  
  +100ms  ║╔Execution stage started  
  +111ms  ║║Comparison (enum) open changes_away_from (string) closed = true (0ms)  
  +113ms  ║║Cancelling condition #2's schedules...  
  +114ms  ║║Condition #2 evaluated true (8ms)  
  +152ms  ║║Comparison (time) 74679469 is_between (datetime) 1555289400000 .. (datetime) 1555329480000 = true (9ms)  
  +153ms  ║║Time restriction check passed  
  +156ms  ║║Condition #3 evaluated true (40ms)  
  +157ms  ║║Cancelling condition #1's schedules...  
  +158ms  ║║Condition group #1 evaluated true (state changed) (52ms)  
  +161ms  ║║Cancelling statement #4's schedules...  
  +239ms  ║║Executed physical command [Back Porch].on() (73ms)  
  +240ms  ║║Executed [Back Porch].on (76ms)  
  +247ms  ║║Skipped execution of physical command [Back Security Light].on([]) because it would make no change to the device. (3ms)  
  +248ms  ║║Executed [Back Security Light].on (6ms)  
  +252ms  ║║Executed virtual command [Back Porch, Back Security Light].wait (1ms)  
  +254ms  ║║Requesting a wake up for Sun, Apr 14 2019 @ 8:54:39 PM CDT (in 600.0s)  
  +259ms  ║╚Execution stage complete. (160ms)  
  +261ms  ║Setting up scheduled job for Sun, Apr 14 2019 @ 8:54:39 PM CDT (in 599.995s)  
  +269ms  ╚Event processed successfully (269ms)  
 ‎4‎/‎14‎/‎2019‎ ‎8‎:‎41‎:‎01‎ ‎PM +69ms   
  +0ms  ╔Received event [Home].time = 1555292462677 with a delay of -1609ms  
  +266ms  ║RunTime Analysis CS > 69ms > PS > 132ms > PE > 65ms > CE  
  +269ms  ║Runtime (37280 bytes) successfully initialized in 132ms (v0.3.10a.20190223) (268ms)  
  +271ms  ║╔Execution stage started  
  +299ms  ║║Skipped execution of physical command [Back Porch].off([]) because it would make no change to the device. (3ms)  
  +300ms  ║║Executed [Back Porch].off (7ms)  
  +938ms  ║║Executed physical command [Back Security Light].off() (634ms)  
  +940ms  ║║Executed [Back Security Light].off (637ms)  
  +943ms  ║╚Execution stage complete. (673ms)  
  +944ms  ╚Event processed successfully (945ms)  
 ‎4‎/‎14‎/‎2019‎ ‎8‎:‎31‎:‎03‎ ‎PM +647ms   
  +2ms  ╔Received event [Back Door].contact = closed with a delay of 1135ms  
  +118ms  ║RunTime Analysis CS > 23ms > PS > 49ms > PE > 46ms > CE  
  +121ms  ║Runtime (37271 bytes) successfully initialized in 49ms (v0.3.10a.20190223) (118ms)  
  +122ms  ║╔Execution stage started  
  +132ms  ║║Comparison (enum) closed changes_away_from (string) closed = false (1ms)  
  +134ms  ║║Cancelling condition #2's schedules...  
  +135ms  ║║Condition #2 evaluated false (7ms)  
  +136ms  ║║Cancelling condition #1's schedules...  
  +138ms  ║║Condition group #1 evaluated false (state changed) (10ms)  
  +141ms  ║╚Execution stage complete. (20ms)  
  +143ms  ║Setting up scheduled job for Sun, Apr 14 2019 @ 8:41:02 PM CDT (in 598.888s)  
  +154ms  ╚Event processed successfully (153ms)  
 ‎4‎/‎14‎/‎2019‎ ‎8‎:‎31‎:‎02‎ ‎PM +217ms   
  +1ms  ╔Received event [Back Door].contact = open with a delay of 1476ms  
  +297ms  ║RunTime Analysis CS > 18ms > PS > 240ms > PE > 39ms > CE  
  +299ms  ║Runtime (37278 bytes) successfully initialized in 240ms (v0.3.10a.20190223) (297ms)  
  +300ms  ║╔Execution stage started  
  +312ms  ║║Comparison (enum) open changes_away_from (string) closed = true (1ms)  
  +314ms  ║║Cancelling condition #2's schedules...  
  +315ms  ║║Condition #2 evaluated true (8ms)  
  +356ms  ║║Comparison (time) 73862533 is_between (datetime) 1555289400000 .. (datetime) 1555329480000 = true (9ms)  
  +357ms  ║║Time restriction check passed  
  +360ms  ║║Condition #3 evaluated true (43ms)  
  +361ms  ║║Cancelling condition #1's schedules...  
  +362ms  ║║Condition group #1 evaluated true (state changed) (55ms)  
  +365ms  ║║Cancelling statement #4's schedules...  
  +444ms  ║║Executed physical command [Back Porch].on() (74ms)  
  +446ms  ║║Executed [Back Porch].on (76ms)  
  +452ms  ║║Skipped execution of physical command [Back Security Light].on([]) because it would make no change to the device. (2ms)  
  +453ms  ║║Executed [Back Security Light].on (5ms)  
  +458ms  ║║Executed virtual command [Back Porch, Back Security Light].wait (0ms)  
  +459ms  ║║Requesting a wake up for Sun, Apr 14 2019 @ 8:41:02 PM CDT (in 600.0s)  
  +466ms  ║╚Execution stage complete. (165ms)  
  +468ms  ║Setting up scheduled job for Sun, Apr 14 2019 @ 8:41:02 PM CDT (in 599.993s)  
  +479ms  ╚Event processed successfully (479ms)  
 ‎4‎/‎14‎/‎2019‎ ‎8‎:‎30‎:‎57‎ ‎PM +6ms   
  +2ms  ╔Received event [Back Door].contact = closed with a delay of 993ms  
  +110ms  ║RunTime Analysis CS > 23ms > PS > 50ms > PE > 37ms > CE  
  +112ms  ║Runtime (37270 bytes) successfully initialized in 50ms (v0.3.10a.20190223) (109ms)  
  +113ms  ║╔Execution stage started  
  +124ms  ║║Comparison (enum) closed changes_away_from (string) closed = false (1ms)  
  +126ms  ║║Cancelling condition #2's schedules...  
  +127ms  ║║Condition #2 evaluated false (7ms)  
  +129ms  ║║Cancelling condition #1's schedules...  
  +130ms  ║║Condition group #1 evaluated false (state changed) (11ms)  
  +133ms  ║╚Execution stage complete. (20ms)  
  +135ms  ║Setting up scheduled job for Sun, Apr 14 2019 @ 8:40:55 PM CDT (in 597.997s)  
  +145ms  ╚Event processed successfully (145ms)  
 ‎4‎/‎14‎/‎2019‎ ‎8‎:‎30‎:‎54‎ ‎PM +856ms   
  +1ms  ╔Received event [Back Door].contact = open with a delay of 963ms  
  +95ms  ║RunTime Analysis CS > 19ms > PS > 39ms > PE > 37ms > CE  
  +97ms  ║Runtime (37275 bytes) successfully initialized in 39ms (v0.3.10a.20190223) (94ms)  
  +99ms  ║╔Execution stage started  
  +110ms  ║║Comparison (enum) open changes_away_from (string) closed = true (1ms)  
  +112ms  ║║Cancelling condition #2's schedules...  
  +114ms  ║║Condition #2 evaluated true (8ms)  
  +153ms  ║║Comparison (time) 73854971 is_between (datetime) 1555289400000 .. (datetime) 1555329480000 = true (9ms)  
  +154ms  ║║Time restriction check passed  
  +157ms  ║║Cancelling condition #3's schedules...  
  +158ms  ║║Condition #3 evaluated true (42ms)  
  +159ms  ║║Cancelling condition #1's schedules...  
  +160ms  ║║Condition group #1 evaluated true (state changed) (55ms)  
  +163ms  ║║Cancelling statement #4's schedules...  
  +244ms  ║║Executed physical command [Back Porch].on() (76ms)  
  +245ms  ║║Executed [Back Porch].on (78ms)  
  +273ms  ║║Executed physical command [Back Security Light].on() (24ms)  
  +274ms  ║║Executed [Back Security Light].on (26ms)  
  +278ms  ║║Executed virtual command [Back Porch, Back Security Light].wait (1ms)  
  +280ms  ║║Requesting a wake up for Sun, Apr 14 2019 @ 8:40:55 PM CDT (in 600.0s)  
  +286ms  ║╚Execution stage complete. (188ms)  
  +288ms  ║Setting up scheduled job for Sun, Apr 14 2019 @ 8:40:55 PM CDT (in 599.993s)  
  +297ms  ╚Event processed successfully (297ms)

#2

One way to do it…

Then
With
Lights
Do
Turn on
End do
End with

Else
With
Lights
Wait 10 minutes
Turn off
End do
End with

Also instead of using variable {$sunset} and {$nextsunrise} … consider using presets for sunset and sunrise :slight_smile:


#3

Are you saying like this?

That seems like it would only turn on if the time is between 7pm and 7am and would never turn off since the conditions were met.


#4

That’s it!

To get your sunset and sunrise, choose virtual device then time and your sunset/sunrise choices will be selectable and you can enter your offsets.


#5

So where is my logic wrong in what I said because it looks like you said that it was still right? Reading the syntax, my understanding is that its going to:

If the door contact changes away from closed and the time is between 7pm and 7am then turn on the lights, otherwise, wait 10 minutes and turn them off.


#6

Correct, when you close the door… it waits 10 minutes and turns off the lights.

Again, that is one of many ways to go about it.


#7

This fixes the problem. I wish there was a guide or something to help newbies understand the syntax. Maybe there is and I just didnt see it. Still trying to wrap my brain around everything.

Thanks for everything!