1) Give a description of the problem
Overall goal is to setup a light to turn on when there is motion is detected. I’m trying to use an boolean to wait 1 minute after the light is turned off before trying to detect motion or my motion detector will think that the light turning off is motion.
PS. It should be midnight to sunrise. But my code is using sunrise to sunrise so I could test it.
2) What is the expected behaviour?
It doesn’t appear that the boolean is ever set so if I go outside, the first IF statement is still triggered even though the WAIT is counting down.
3) What is happening/not happening?
It doesn’t appear that the boolean is ever set so if I go outside, the first IF statement is still triggered even though the WAIT is counting down.
**4) Post a Green Snapshot of the piston!
5) Attach logs after turning logging level to Full
6/5/2020, 3:11:15 PM +479ms
+1ms ╔Received event [Home].test = 1591395075479 with a delay of 0ms
+92ms ║RunTime Analysis CS > 19ms > PS > 40ms > PE > 32ms > CE
+94ms ║Runtime (40039 bytes) successfully initialized in 40ms (v0.3.110.20191009) (93ms)
+96ms ║╔Execution stage started
+106ms ║║Condition #2 evaluated false (6ms)
+107ms ║║Condition group #1 evaluated false (state did not change) (7ms)
+115ms ║║Condition #7 evaluated false (5ms)
+117ms ║║Condition group #6 evaluated false (state did not change) (6ms)
+121ms ║╚Execution stage complete. (26ms)
+122ms ╚Event processed successfully (122ms)
6/5/2020, 3:05:35 PM +461ms
+1ms ╔Starting piston... (v0.3.110.20191009)
+277ms ║╔Subscribing to devices...
+318ms ║║Subscribing to Side Gate Motion.motion...
+416ms ║║Subscribing to Garage Side Light...
+417ms ║╚Finished subscribing (153ms)
+481ms ║Comparison (time) 54335904 is_between (time) 1591361220000 .. (time) 1591361220000 = true (11ms)
+483ms ║Time restriction check passed
+484ms ║Cancelling condition #3's schedules...
+490ms ║Comparison (boolean) true is (boolean) true = true (1ms)
+519ms ║Comparison (time) 54335966 is_between (time) 1591361220000 .. (time) 1591361220000 = true (10ms)
+520ms ║Time restriction check passed
+522ms ║Cancelling condition #8's schedules...
+534ms ╚Piston successfully started (533ms)
6/5/2020, 3:05:05 PM +423ms
+0ms ╔Received event [Home].execute = 76.126.19.245 with a delay of 54ms
+91ms ║RunTime Analysis CS > 16ms > PS > 51ms > PE > 24ms > CE
+93ms ║Runtime (40047 bytes) successfully initialized in 51ms (v0.3.110.20191009) (92ms)
+94ms ║╔Execution stage started
+104ms ║║Condition #2 evaluated false (6ms)
+105ms ║║Condition group #1 evaluated false (state did not change) (7ms)
+111ms ║║Condition #7 evaluated false (4ms)
+112ms ║║Condition group #6 evaluated false (state did not change) (5ms)
+114ms ║╚Execution stage complete. (20ms)
+115ms ╚Event processed successfully (115ms)
6/5/2020, 3:04:15 PM +770ms
+1ms ╔Received event [Home].test = 1591394655770 with a delay of 0ms
+115ms ║RunTime Analysis CS > 21ms > PS > 61ms > PE > 32ms > CE
+118ms ║Runtime (40041 bytes) successfully initialized in 61ms (v0.3.110.20191009) (117ms)
+119ms ║╔Execution stage started
+129ms ║║Condition #2 evaluated false (5ms)
+130ms ║║Condition group #1 evaluated false (state did not change) (7ms)
+139ms ║║Condition #7 evaluated false (6ms)
+140ms ║║Condition group #6 evaluated false (state did not change) (7ms)
+144ms ║╚Execution stage complete. (25ms)
+145ms ╚Event processed successfully (145ms)
6/5/2020, 3:04:09 PM +390ms
+1ms ╔Starting piston... (v0.3.110.20191009)
+310ms ║╔Subscribing to devices...
+354ms ║║Subscribing to Side Gate Motion.motion...
+469ms ║║Subscribing to Garage Side Light...
+470ms ║╚Finished subscribing (173ms)
+543ms ║Comparison (time) 54249890 is_between (time) 1591340400000 .. (time) 1591361220000 = false (11ms)
+545ms ║Cancelling condition #3's schedules...
+551ms ║Comparison (boolean) true is (boolean) true = true (2ms)
+566ms ║Cancelling condition #7's schedules...
+583ms ║Comparison (time) 54249958 is_between (time) 1591340400000 .. (time) 1591361220000 = false (12ms)
+585ms ║Cancelling condition #8's schedules...
+586ms ║Cancelling condition #6's schedules...
+599ms ╚Piston successfully started (599ms)
6/5/2020, 2:55:11 PM +754ms
+0ms ╔Received event [Home].time = 1591394112487 with a delay of -733ms
+88ms ║RunTime Analysis CS > 20ms > PS > 49ms > PE > 19ms > CE
+90ms ║Runtime (40037 bytes) successfully initialized in 49ms (v0.3.110.20191009) (89ms)
+91ms ║╔Execution stage started
+106ms ║║Executed virtual command [Garage Side Light].setVariable (0ms)
+108ms ║╚Execution stage complete. (16ms)
+108ms ╚Event processed successfully (108ms)
6/5/2020, 2:54:12 PM +121ms
+1ms ╔Received event [Home].time = 1591394052792 with a delay of -672ms
+310ms ║RunTime Analysis CS > 37ms > PS > 248ms > PE > 25ms > CE
+312ms ║Runtime (40040 bytes) successfully initialized in 248ms (v0.3.110.20191009) (310ms)
+314ms ║╔Execution stage started
+358ms ║║Executed physical command [Garage Side Light].off() (27ms)
+360ms ║║Executed [Garage Side Light].off (30ms)
+364ms ║║Executed virtual command [Garage Side Light].wait (1ms)
+365ms ║║Requesting a wake up for Fri, Jun 5 2020 @ 2:55:12 PM PDT (in 60.0s)
+370ms ║╚Execution stage complete. (57ms)
+372ms ║Setting up scheduled job for Fri, Jun 5 2020 @ 2:55:12 PM PDT (in 59.995s)
+380ms ╚Event processed successfully (380ms)
6/5/2020, 2:53:18 PM +538ms
+1ms ╔Received event [Side Gate Motion].motion = inactive with a delay of 54ms
+90ms ║RunTime Analysis CS > 18ms > PS > 51ms > PE > 20ms > CE
+92ms ║Runtime (40045 bytes) successfully initialized in 51ms (v0.3.110.20191009) (90ms)
+93ms ║╔Execution stage started
+100ms ║║Comparison (enum) inactive changes_to (string) active = false (0ms)
+101ms ║║Cancelling condition #2's schedules...
+102ms ║║Condition #2 evaluated false (5ms)
+103ms ║║Cancelling condition #1's schedules...
+104ms ║║Condition group #1 evaluated false (state changed) (7ms)
+109ms ║║Comparison (enum) inactive changes_to (string) inactive = true (1ms)
+110ms ║║Cancelling condition #7's schedules...
+111ms ║║Condition #7 evaluated true (5ms)
+141ms ║║Comparison (time) 53598650 is_between (time) 1591361220000 .. (time) 1591361220000 = true (8ms)
+142ms ║║Time restriction check passed
+143ms ║║Condition #8 evaluated true (31ms)
+144ms ║║Cancelling condition #6's schedules...
+145ms ║║Condition group #6 evaluated true (state changed) (39ms)
+147ms ║║Cancelling statement #9's schedules...
+153ms ║║Executed virtual command [Garage Side Light].waitRandom (1ms)
+154ms ║║Requesting a wake up for Fri, Jun 5 2020 @ 2:54:12 PM PDT (in 54.099s)
+158ms ║╚Execution stage complete. (65ms)
+159ms ║Setting up scheduled job for Fri, Jun 5 2020 @ 2:54:12 PM PDT (in 54.095s)
+169ms ╚Event processed successfully (168ms)
6/5/2020, 2:53:06 PM +784ms
+1ms ╔Received event [Side Gate Motion].motion = active with a delay of 68ms
+101ms ║RunTime Analysis CS > 18ms > PS > 63ms > PE > 20ms > CE
+103ms ║Runtime (40043 bytes) successfully initialized in 63ms (v0.3.110.20191009) (101ms)
+104ms ║╔Execution stage started
+110ms ║║Comparison (enum) active changes_to (string) active = true (0ms)
+112ms ║║Cancelling condition #2's schedules...
+112ms ║║Condition #2 evaluated true (4ms)
+141ms ║║Comparison (time) 53586897 is_between (time) 1591361220000 .. (time) 1591361220000 = true (8ms)
+142ms ║║Time restriction check passed
+144ms ║║Condition #3 evaluated true (30ms)
+148ms ║║Comparison (boolean) true is (boolean) true = true (1ms)
+149ms ║║Condition #12 evaluated true (5ms)
+150ms ║║Cancelling condition #1's schedules...
+151ms ║║Condition group #1 evaluated true (state changed) (44ms)
+153ms ║║Cancelling statement #4's schedules...
+176ms ║║Executed physical command [Garage Side Light].on() (20ms)
+177ms ║║Executed [Garage Side Light].on (21ms)
+180ms ║║Executed virtual command [Garage Side Light].setVariable (1ms)
+186ms ║║Comparison (enum) active changes_to (string) inactive = false (0ms)
+187ms ║║Cancelling condition #7's schedules...
+188ms ║║Condition #7 evaluated false (4ms)
+189ms ║║Cancelling condition #6's schedules...
+189ms ║║Condition group #6 evaluated false (state changed) (6ms)
+191ms ║╚Execution stage complete. (87ms)
+192ms ╚Event processed successfully (192ms)
6/5/2020, 2:52:44 PM +390ms
+0ms ╔Received event [Home].time = 1591393965293 with a delay of -904ms
+184ms ║RunTime Analysis CS > 86ms > PS > 79ms > PE > 20ms > CE
+187ms ║Runtime (40038 bytes) successfully initialized in 79ms (v0.3.110.20191009) (186ms)
+188ms ║╔Execution stage started
+211ms ║║Executed virtual command [Garage Side Light].setVariable (1ms)
+214ms ║╚Execution stage complete. (26ms)
+216ms ╚Event processed successfully (216ms)
6/5/2020, 2:51:45 PM +170ms
+0ms ╔Received event [Home].time = 1591393906044 with a delay of -875ms
+69ms ║RunTime Analysis CS > 15ms > PS > 41ms > PE > 14ms > CE
+71ms ║Runtime (40037 bytes) successfully initialized in 41ms (v0.3.110.20191009) (70ms)
+72ms ║╔Execution stage started
+117ms ║║Executed physical command [Garage Side Light].off() (31ms)
+118ms ║║Executed [Garage Side Light].off (32ms)
+121ms ║║Executed virtual command [Garage Side Light].wait (1ms)
+122ms ║║Requesting a wake up for Fri, Jun 5 2020 @ 2:52:45 PM PDT (in 60.0s)
+125ms ║╚Execution stage complete. (53ms)
+127ms ║Setting up scheduled job for Fri, Jun 5 2020 @ 2:52:45 PM PDT (in 59.997s)
+139ms ╚Event processed successfully (139ms)
6/5/2020, 2:48:43 PM +344ms
+2ms ╔Received event [Side Gate Motion].motion = inactive with a delay of 62ms
+99ms ║RunTime Analysis CS > 19ms > PS > 60ms > PE > 19ms > CE
+101ms ║Runtime (40045 bytes) successfully initialized in 60ms (v0.3.110.20191009) (98ms)
+102ms ║╔Execution stage started
+109ms ║║Comparison (enum) inactive changes_to (string) active = false (0ms)
+110ms ║║Cancelling condition #2's schedules...
+111ms ║║Condition #2 evaluated false (5ms)
+112ms ║║Cancelling condition #1's schedules...
+113ms ║║Condition group #1 evaluated false (state changed) (7ms)
+118ms ║║Comparison (enum) inactive changes_to (string) inactive = true (0ms)
+119ms ║║Cancelling condition #7's schedules...
+120ms ║║Condition #7 evaluated true (5ms)
+149ms ║║Comparison (time) 53323465 is_between (time) 1591361220000 .. (time) 1591361220000 = true (9ms)
+150ms ║║Time restriction check passed
+152ms ║║Condition #8 evaluated true (30ms)
+153ms ║║Cancelling condition #6's schedules...
+153ms ║║Condition group #6 evaluated true (state changed) (38ms)
+155ms ║║Cancelling statement #9's schedules...
+161ms ║║Executed virtual command [Garage Side Light].waitRandom (0ms)
+162ms ║║Requesting a wake up for Fri, Jun 5 2020 @ 2:51:46 PM PDT (in 182.537s)
+166ms ║╚Execution stage complete. (64ms)
+168ms ║Setting up scheduled job for Fri, Jun 5 2020 @ 2:51:46 PM PDT (in 182.533s)
+181ms ╚Event processed successfully (180ms)
6/5/2020, 2:48:27 PM +130ms
+1ms ╔Received event [Side Gate Motion].motion = active with a delay of 43ms
+68ms ║RunTime Analysis CS > 15ms > PS > 37ms > PE > 15ms > CE
+70ms ║Runtime (40042 bytes) successfully initialized in 37ms (v0.3.110.20191009) (69ms)
+71ms ║╔Execution stage started
+78ms ║║Comparison (enum) active changes_to (string) active = true (0ms)
+79ms ║║Cancelling condition #2's schedules...
+80ms ║║Condition #2 evaluated true (4ms)
+106ms ║║Comparison (time) 53307211 is_between (time) 1591361220000 .. (time) 1591361220000 = true (8ms)
+107ms ║║Time restriction check passed
+109ms ║║Condition #3 evaluated true (29ms)
+114ms ║║Comparison (boolean) true is (boolean) true = true (1ms)
+115ms ║║Condition #12 evaluated true (6ms)
+116ms ║║Cancelling condition #1's schedules...
+117ms ║║Condition group #1 evaluated true (state changed) (43ms)
+119ms ║║Cancelling statement #4's schedules...
+125ms ║║Skipped execution of physical command [Garage Side Light].on([]) because it would make no change to the device. (2ms)
+125ms ║║Executed [Garage Side Light].on (4ms)
+129ms ║║Executed virtual command [Garage Side Light].setVariable (1ms)
+134ms ║║Comparison (enum) active changes_to (string) inactive = false (1ms)
+135ms ║║Cancelling condition #7's schedules...
+136ms ║║Condition #7 evaluated false (5ms)
+137ms ║║Cancelling condition #6's schedules...
+138ms ║║Condition group #6 evaluated false (state changed) (7ms)
+141ms ║╚Execution stage complete. (69ms)
+142ms ║Setting up scheduled job for Fri, Jun 5 2020 @ 2:49:04 PM PDT (in 37.551s)
+166ms ╚Event processed successfully (166ms)
6/5/2020, 2:48:11 PM +753ms
+1ms ╔Received event [Side Gate Motion].motion = inactive with a delay of 53ms
+86ms ║RunTime Analysis CS > 18ms > PS > 52ms > PE > 17ms > CE
+88ms ║Runtime (40045 bytes) successfully initialized in 52ms (v0.3.110.20191009) (86ms)
+89ms ║╔Execution stage started
+96ms ║║Comparison (enum) inactive changes_to (string) active = false (1ms)
+98ms ║║Cancelling condition #2's schedules...
+98ms ║║Condition #2 evaluated false (5ms)
+99ms ║║Cancelling condition #1's schedules...
+100ms ║║Condition group #1 evaluated false (state changed) (7ms)
+106ms ║║Comparison (enum) inactive changes_to (string) inactive = true (0ms)
+107ms ║║Cancelling condition #7's schedules...
+108ms ║║Condition #7 evaluated true (5ms)
+137ms ║║Comparison (time) 53291862 is_between (time) 1591361220000 .. (time) 1591361220000 = true (10ms)
+138ms ║║Time restriction check passed
+139ms ║║Condition #8 evaluated true (30ms)
+140ms ║║Cancelling condition #6's schedules...
+141ms ║║Condition group #6 evaluated true (state changed) (39ms)
+143ms ║║Cancelling statement #9's schedules...
+150ms ║║Executed virtual command [Garage Side Light].waitRandom (0ms)
+151ms ║║Requesting a wake up for Fri, Jun 5 2020 @ 2:49:04 PM PDT (in 52.918s)
+155ms ║╚Execution stage complete. (66ms)
+156ms ║Setting up scheduled job for Fri, Jun 5 2020 @ 2:49:04 PM PDT (in 52.913s)
+167ms ╚Event processed successfully (167ms)
6/5/2020, 2:47:57 PM +333ms
+1ms ╔Received event [Side Gate Motion].motion = active with a delay of 44ms
+84ms ║RunTime Analysis CS > 22ms > PS > 48ms > PE > 13ms > CE
+86ms ║Runtime (40042 bytes) successfully initialized in 48ms (v0.3.110.20191009) (84ms)
+87ms ║╔Execution stage started
+93ms ║║Comparison (enum) active changes_to (string) active = true (0ms)
+95ms ║║Cancelling condition #2's schedules...
+96ms ║║Condition #2 evaluated true (4ms)
+126ms ║║Comparison (time) 53277429 is_between (time) 1591361220000 .. (time) 1591361220000 = true (9ms)
+127ms ║║Time restriction check passed
+128ms ║║Condition #3 evaluated true (32ms)
+133ms ║║Comparison (boolean) true is (boolean) true = true (1ms)
+134ms ║║Condition #12 evaluated true (5ms)
+135ms ║║Cancelling condition #1's schedules...
+136ms ║║Condition group #1 evaluated true (state changed) (46ms)
+138ms ║║Cancelling statement #4's schedules...
+144ms ║║Skipped execution of physical command [Garage Side Light].on([]) because it would make no change to the device. (2ms)
+144ms ║║Executed [Garage Side Light].on (4ms)
+148ms ║║Executed virtual command [Garage Side Light].setVariable (1ms)
+153ms ║║Comparison (enum) active changes_to (string) inactive = false (0ms)
+155ms ║║Cancelling condition #7's schedules...
+156ms ║║Condition #7 evaluated false (4ms)
+156ms ║║Cancelling condition #6's schedules...
+157ms ║║Condition group #6 evaluated false (state changed) (7ms)
+160ms ║╚Execution stage complete. (74ms)
+161ms ║Setting up scheduled job for Fri, Jun 5 2020 @ 2:48:18 PM PDT (in 20.709s)
+171ms ╚Event processed successfully (171ms)
6/5/2020, 2:46:55 PM +398ms
+2ms ╔Received event [Side Gate Motion].motion = inactive with a delay of 54ms
+89ms ║RunTime Analysis CS > 22ms > PS > 52ms > PE > 14ms > CE
+91ms ║Runtime (40045 bytes) successfully initialized in 52ms (v0.3.110.20191009) (89ms)
+92ms ║╔Execution stage started
+99ms ║║Comparison (enum) inactive changes_to (string) active = false (1ms)
+100ms ║║Cancelling condition #2's schedules...
+101ms ║║Condition #2 evaluated false (5ms)
+102ms ║║Cancelling condition #1's schedules...
+103ms ║║Condition group #1 evaluated false (state changed) (7ms)
+108ms ║║Comparison (enum) inactive changes_to (string) inactive = true (1ms)
+109ms ║║Cancelling condition #7's schedules...
+110ms ║║Condition #7 evaluated true (5ms)
+139ms ║║Comparison (time) 53215509 is_between (time) 1591361220000 .. (time) 1591361220000 = true (8ms)
+140ms ║║Time restriction check passed
+142ms ║║Condition #8 evaluated true (31ms)
+143ms ║║Cancelling condition #6's schedules...
+144ms ║║Condition group #6 evaluated true (state changed) (39ms)
+146ms ║║Cancelling statement #9's schedules...
+152ms ║║Executed virtual command [Garage Side Light].waitRandom (0ms)
+153ms ║║Requesting a wake up for Fri, Jun 5 2020 @ 2:48:18 PM PDT (in 82.651s)
+157ms ║╚Execution stage complete. (65ms)
+158ms ║Setting up scheduled job for Fri, Jun 5 2020 @ 2:48:18 PM PDT (in 82.647s)
+166ms ╚Event processed successfully (166ms)
6/5/2020, 2:46:38 PM +935ms
+0ms ╔Received event [Side Gate Motion].motion = active with a delay of 44ms
+60ms ║RunTime Analysis CS > 14ms > PS > 36ms > PE > 10ms > CE
+62ms ║Runtime (40046 bytes) successfully initialized in 36ms (v0.3.110.20191009) (61ms)
+63ms ║╔Execution stage started
+70ms ║║Comparison (enum) active changes_to (string) active = true (1ms)
+72ms ║║Cancelling condition #2's schedules...
+72ms ║║Condition #2 evaluated true (5ms)
+98ms ║║Comparison (time) 53199008 is_between (time) 1591361220000 .. (time) 1591361220000 = true (8ms)
+99ms ║║Time restriction check passed
+101ms ║║Condition #3 evaluated true (27ms)
+106ms ║║Comparison (boolean) true is (boolean) true = true (1ms)
+107ms ║║Condition #12 evaluated true (6ms)
+108ms ║║Cancelling condition #1's schedules...
+109ms ║║Condition group #1 evaluated true (state changed) (42ms)
+111ms ║║Cancelling statement #4's schedules...
+133ms ║║Executed physical command [Garage Side Light].on() (19ms)
+134ms ║║Executed [Garage Side Light].on (21ms)
+137ms ║║Executed virtual command [Garage Side Light].setVariable (1ms)
+143ms ║║Comparison (enum) active changes_to (string) inactive = false (1ms)
+144ms ║║Condition #7 evaluated false (4ms)
+145ms ║║Condition group #6 evaluated false (state did not change) (5ms)
+147ms ║╚Execution stage complete. (84ms)
+148ms ╚Event processed successfully (148ms)