Simple piston not turning socket off


#1

1) Give a description of the problem
Socket stays on when it should not

2) What is the expected behaviour?
At 20 minutes before Sunset every day, the device turns on. At 10:30pm every day, the device turns off.

3) What is happening/not happening?
The device is not turning off.

4) Post a Green Snapshot of the pistonimage

5) Attach logs after turning logging level to Full

6/28/2020, 10:29:59 PM +76ms
+1ms ╔Received event [Home].time = 1593397800000 with a delay of -924ms
+91ms ║RunTime Analysis CS > 22ms > PS > 47ms > PE > 22ms > CE
+94ms ║Runtime (36546 bytes) successfully initialized in 47ms (v0.3.110.20191009) (92ms)
+94ms ║╔Execution stage started
+127ms ║║Comparison (time) 80999175 is_between (datetime) 1593390780000 .. (time) 81000000 = false (7ms)
+128ms ║║Cancelling condition #2's schedules...
+129ms ║║Condition #2 evaluated false (30ms)
+130ms ║║Cancelling statement #2's schedules...
+135ms ║║Requesting time schedule wake up at Mon, Jun 29 2020 @ 8:13:00 PM EDT
+137ms ║║Cancelling condition #1's schedules...
+138ms ║║Condition group #1 evaluated false (state changed) (40ms)
+140ms ║║Cancelling statement #3's schedules...
+152ms ║║Executed physical command [Basement Door Socket].off() (8ms)
+152ms ║║Executed [Basement Door Socket].off (9ms)
+155ms ║╚Execution stage complete. (61ms)
+156ms ║Setting up scheduled job for Mon, Jun 29 2020 @ 8:13:00 PM EDT (in 78180.769s)
+162ms ╚Event processed successfully (162ms)
6/28/2020, 8:12:59 PM +152ms
+1ms ╔Received event [Home].time = 1593389580000 with a delay of -848ms
+121ms ║RunTime Analysis CS > 32ms > PS > 48ms > PE > 41ms > CE
+124ms ║Runtime (36552 bytes) successfully initialized in 48ms (v0.3.110.20191009) (122ms)
+125ms ║╔Execution stage started
+170ms ║║Comparison (time) 72779284 is_between (datetime) 1593390780000 .. (time) 81000000 = true (10ms)
+172ms ║║Time restriction check passed
+174ms ║║Cancelling condition #2's schedules...
+175ms ║║Condition #2 evaluated true (44ms)
+176ms ║║Cancelling statement #2's schedules...
+183ms ║║Requesting time schedule wake up at Sun, Jun 28 2020 @ 10:30:00 PM EDT
+186ms ║║Cancelling condition #1's schedules...
+188ms ║║Condition group #1 evaluated true (state changed) (56ms)
+191ms ║║Cancelling statement #5's schedules...
+206ms ║║Executed physical command [Basement Door Socket].on() (12ms)
+207ms ║║Executed [Basement Door Socket].on (14ms)
+209ms ║╚Execution stage complete. (84ms)
+211ms ║Setting up scheduled job for Sun, Jun 28 2020 @ 10:30:00 PM EDT (in 8220.638s)
+220ms ╚Event processed successfully (219ms)
6/27/2020, 10:29:59 PM +81ms
+0ms ╔Received event [Home].time = 1593311400000 with a delay of -920ms
+102ms ║RunTime Analysis CS > 23ms > PS > 54ms > PE > 26ms > CE
+104ms ║Runtime (36547 bytes) successfully initialized in 54ms (v0.3.110.20191009) (103ms)
+105ms ║╔Execution stage started
+139ms ║║Comparison (time) 80999191 is_between (datetime) 1593304380000 .. (time) 81000000 = false (6ms)
+141ms ║║Cancelling condition #2's schedules...
+142ms ║║Condition #2 evaluated false (32ms)
+143ms ║║Cancelling statement #2's schedules...
+148ms ║║Requesting time schedule wake up at Sun, Jun 28 2020 @ 8:13:00 PM EDT
+150ms ║║Cancelling condition #1's schedules...
+151ms ║║Condition group #1 evaluated false (state changed) (41ms)
+152ms ║║Cancelling statement #3's schedules...
+167ms ║║Executed physical command [Basement Door Socket].off() (10ms)
+168ms ║║Executed [Basement Door Socket].off (12ms)
+170ms ║╚Execution stage complete. (65ms)
+171ms ║Setting up scheduled job for Sun, Jun 28 2020 @ 8:13:00 PM EDT (in 78180.748s)
+177ms ╚Event processed successfully (178ms)
6/27/2020, 8:12:59 PM +87ms
+0ms ╔Received event [Home].time = 1593303180000 with a delay of -913ms
+71ms ║RunTime Analysis CS > 18ms > PS > 28ms > PE > 25ms > CE
+73ms ║Runtime (36551 bytes) successfully initialized in 28ms (v0.3.110.20191009) (72ms)
+74ms ║╔Execution stage started
+105ms ║║Comparison (time) 72779166 is_between (datetime) 1593304380000 .. (time) 81000000 = true (6ms)
+106ms ║║Time restriction check passed
+107ms ║║Cancelling condition #2's schedules...
+108ms ║║Condition #2 evaluated true (30ms)
+109ms ║║Cancelling statement #2's schedules...
+114ms ║║Requesting time schedule wake up at Sat, Jun 27 2020 @ 10:30:00 PM EDT
+116ms ║║Cancelling condition #1's schedules...
+117ms ║║Condition group #1 evaluated true (state changed) (39ms)
+119ms ║║Cancelling statement #5's schedules...
+130ms ║║Executed physical command [Basement Door Socket].on() (8ms)
+131ms ║║Executed [Basement Door Socket].on (10ms)
+133ms ║╚Execution stage complete. (59ms)
+134ms ║Setting up scheduled job for Sat, Jun 27 2020 @ 10:30:00 PM EDT (in 8220.779s)
+141ms ╚Event processed successfully (141ms)
6/26/2020, 10:29:59 PM +100ms
+0ms ╔Received event [Home].time = 1593225000000 with a delay of -900ms
+114ms ║RunTime Analysis CS > 28ms > PS > 52ms > PE > 33ms > CE
+116ms ║Runtime (36547 bytes) successfully initialized in 52ms (v0.3.110.20191009) (115ms)
+117ms ║╔Execution stage started
+154ms ║║Comparison (time) 80999222 is_between (datetime) 1593217980000 .. (time) 81000000 = false (7ms)
+155ms ║║Cancelling condition #2's schedules...
+156ms ║║Condition #2 evaluated false (34ms)
+157ms ║║Cancelling statement #2's schedules...
+164ms ║║Requesting time schedule wake up at Sat, Jun 27 2020 @ 8:13:00 PM EDT
+166ms ║║Cancelling condition #1's schedules...
+167ms ║║Condition group #1 evaluated false (state changed) (44ms)
+168ms ║║Cancelling statement #3's schedules...
+183ms ║║Executed physical command [Basement Door Socket].off() (12ms)
+184ms ║║Executed [Basement Door Socket].off (14ms)
+187ms ║╚Execution stage complete. (70ms)
+189ms ║Setting up scheduled job for Sat, Jun 27 2020 @ 8:13:00 PM EDT (in 78180.712s)
+198ms ╚Event processed successfully (198ms)
6/26/2020, 8:12:59 PM +86ms
+0ms ╔Received event [Home].time = 1593216780000 with a delay of -914ms
+76ms ║RunTime Analysis CS > 18ms > PS > 31ms > PE > 27ms > CE
+78ms ║Runtime (36551 bytes) successfully initialized in 31ms (v0.3.110.20191009) (77ms)
+79ms ║╔Execution stage started
+113ms ║║Comparison (time) 72779170 is_between (datetime) 1593217980000 .. (time) 81000000 = true (6ms)
+114ms ║║Time restriction check passed
+115ms ║║Cancelling condition #2's schedules...
+116ms ║║Condition #2 evaluated true (32ms)
+117ms ║║Cancelling statement #2's schedules...
+123ms ║║Requesting time schedule wake up at Fri, Jun 26 2020 @ 10:30:00 PM EDT
+125ms ║║Cancelling condition #1's schedules...
+126ms ║║Condition group #1 evaluated true (state changed) (42ms)
+128ms ║║Cancelling statement #5's schedules...
+138ms ║║Executed physical command [Basement Door Socket].on() (7ms)
+139ms ║║Executed [Basement Door Socket].on (9ms)
+141ms ║╚Execution stage complete. (62ms)
+143ms ║Setting up scheduled job for Fri, Jun 26 2020 @ 10:30:00 PM EDT (in 8220.772s)
+152ms ╚Event processed successfully (152ms)
6/25/2020, 10:29:59 PM +63ms
+1ms ╔Received event [Home].time = 1593138600000 with a delay of -937ms
+79ms ║RunTime Analysis CS > 22ms > PS > 34ms > PE > 22ms > CE
+81ms ║Runtime (36546 bytes) successfully initialized in 34ms (v0.3.110.20191009) (79ms)
+82ms ║╔Execution stage started
+124ms ║║Comparison (time) 80999151 is_between (datetime) 1593131580000 .. (time) 81000000 = false (10ms)
+126ms ║║Cancelling condition #2's schedules...
+128ms ║║Condition #2 evaluated false (40ms)
+130ms ║║Cancelling statement #2's schedules...
+140ms ║║Requesting time schedule wake up at Fri, Jun 26 2020 @ 8:13:00 PM EDT
+143ms ║║Cancelling condition #1's schedules...
+145ms ║║Condition group #1 evaluated false (state changed) (57ms)
+148ms ║║Cancelling statement #3's schedules...
+163ms ║║Executed physical command [Basement Door Socket].off() (9ms)
+164ms ║║Executed [Basement Door Socket].off (13ms)
+170ms ║╚Execution stage complete. (87ms)
+172ms ║Setting up scheduled job for Fri, Jun 26 2020 @ 8:13:00 PM EDT (in 78180.766s)
+183ms ╚Event processed successfully (183ms)
6/25/2020, 8:12:59 PM +101ms
+1ms ╔Received event [Home].time = 1593130380000 with a delay of -900ms
+116ms ║RunTime Analysis CS > 27ms > PS > 60ms > PE > 29ms > CE
+119ms ║Runtime (36552 bytes) successfully initialized in 60ms (v0.3.110.20191009) (117ms)
+120ms ║╔Execution stage started
+164ms ║║Comparison (time) 72779229 is_between (datetime) 1593131580000 .. (time) 81000000 = true (9ms)
+165ms ║║Time restriction check passed
+166ms ║║Cancelling condition #2's schedules...
+167ms ║║Condition #2 evaluated true (39ms)
+168ms ║║Cancelling statement #2's schedules...
+174ms ║║Requesting time schedule wake up at Thu, Jun 25 2020 @ 10:30:00 PM EDT
+176ms ║║Cancelling condition #1's schedules...
+177ms ║║Condition group #1 evaluated true (state changed) (49ms)
+179ms ║║Cancelling statement #5's schedules...
+186ms ║║Skipped execution of physical command [Basement Door Socket].on([]) because it would make no change to the device. (3ms)
+187ms ║║Executed [Basement Door Socket].on (5ms)
+189ms ║╚Execution stage complete. (70ms)
+191ms ║Setting up scheduled job for Thu, Jun 25 2020 @ 10:30:00 PM EDT (in 8220.709s)
+322ms ╚Event processed successfully (322ms)
6/24/2020, 10:48:29 PM +243ms
+1ms ╔Received event [Home].execute = recovery with a delay of 62ms
+148ms ║RunTime Analysis CS > 23ms > PS > 95ms > PE > 29ms > CE
+150ms ║Runtime (36541 bytes) successfully initialized in 95ms (v0.3.110.20191009) (149ms)
+151ms ║╔Execution stage started
+189ms ║║Comparison (time) 82109398 is_between (datetime) 1593045180000 .. (time) 81000000 = false (7ms)
+191ms ║║Cancelling condition #2's schedules...
+192ms ║║Condition #2 evaluated false (36ms)
+193ms ║║Cancelling statement #2's schedules...
+198ms ║║Requesting time schedule wake up at Thu, Jun 25 2020 @ 8:13:00 PM EDT
+201ms ║║Cancelling condition #1's schedules...
+202ms ║║Condition group #1 evaluated false (state changed) (47ms)
+204ms ║║Cancelling statement #3's schedules...
+216ms ║║Executed physical command [Basement Door Socket].off() (9ms)
+217ms ║║Executed [Basement Door Socket].off (11ms)
+220ms ║╚Execution stage complete. (69ms)
+221ms ║Setting up scheduled job for Thu, Jun 25 2020 @ 8:13:00 PM EDT (in 77070.536s)
+229ms ╚Event processed successfully (228ms)
6/24/2020, 8:12:59 PM +123ms
+0ms ╔Received event [Home].time = 1593043980000 with a delay of -878ms
+148ms ║RunTime Analysis CS > 36ms > PS > 86ms > PE > 26ms > CE
+150ms ║Runtime (36550 bytes) successfully initialized in 86ms (v0.3.110.20191009) (149ms)
+151ms ║╔Execution stage started
+201ms ║║Comparison (time) 72779279 is_between (datetime) 1593045180000 .. (time) 81000000 = true (6ms)
+203ms ║║Time restriction check passed
+204ms ║║Cancelling condition #2's schedules...
+205ms ║║Condition #2 evaluated true (49ms)
+206ms ║║Cancelling statement #2's schedules...
+212ms ║║Requesting time schedule wake up at Wed, Jun 24 2020 @ 10:30:00 PM EDT
+214ms ║║Cancelling condition #1's schedules...
+215ms ║║Condition group #1 evaluated true (state changed) (60ms)
+217ms ║║Cancelling statement #5's schedules...
+235ms ║║Executed physical command [Basement Door Socket].on() (12ms)
+236ms ║║Executed [Basement Door Socket].on (14ms)
+238ms ║╚Execution stage complete. (87ms)
+240ms ║Setting up scheduled job for Wed, Jun 24 2020 @ 10:30:00 PM EDT (in 8220.638s)
+248ms ╚Event processed successfully (248ms)

#2

Your piston fired one second early, so the time did not match.

The two main ways to combat this is to either use the Preset Sunset (instead of the system variable $sunset), or split it into two blocks, also using the Preset;

Every day at Sunset -20min
    Turn on
END EVERY

Every day at 10:30pm
    Turn off
END EVERY

For example, this:

pic

spits out this:

pic

This keeps your triggers precise times, instead of vague windows…


#3

You know I know this. Heck, I think it was you that TAUGHT me this - to use preset sunset, not variable. Sigh. LOL Thank you!


#4

It’s all good… There are so many elements to remember here, LOL