1) Give a description of the problem
Morning all,
I, like others, am struggling with the ‘wait’ command. I have a piston that manages the porch light, it turns it on at 15% at sunset and off at 11:30pm.
I also have a trigger in there that if the Ring doorbell detects motion between sunset and sunrise, the brightness is set to 100% for 2 minutes, then it reverts back to its original setting (so 15% between sunset and 11:30pm, and off between 11:30pm and sunrise).
This issue I am having is that the light is going back to 15% as soon as the Ring doorbell is sending a motion=inactive which is about 30 seconds after sending a motion=active.
After reading through the forum, I did find info regarding the Task Cancellation Policy, which I have now set on the with statement that contains the wait command, but it doesn’t appear to have made any difference.
I have also tweak the motion detection from ‘is active’ to ‘changes to active’ but again with no success.
Any help would be much appreciated.
Thanks,
Mark
2) What is the expected behavior?
I hoped the wait command would effectively pause the piston for 2 minutes with the light on 100% before running again.
3) What is happening/not happening?
The piston is firing again when the motion=inactive is sent from the doorbell and resetting the light to 15% before the 2 minute wait has completed.
4) Post a Green Snapshot of the piston
(
)5) Attach any logs
(4/24/2018, 9:02:37 PM +208ms
+1ms ╔Received event [Home].time = 1524600157565 with a delay of -357ms
+205ms ║RunTime Analysis CS > 17ms > PS > 49ms > PE > 139ms > CE
+208ms ║Runtime (39649 bytes) successfully initialized in 49ms (v0.3.104.20180323) (206ms)
+209ms ║╔Execution stage started
+235ms ║║Comparison (string) on is (string) off = false (2ms)
+237ms ║║Cancelling condition #19's schedules...
+238ms ║║Condition #19 evaluated false (7ms)
+239ms ║║Cancelling condition #14's schedules...
+240ms ║║Condition group #14 evaluated false (state changed) (9ms)
+243ms ║║Cancelling statement #15's schedules...
+254ms ║║Skipped execution of physical command [Porch].setLevel([15]) because it would make no change to the device. (6ms)
+255ms ║║Executed [Porch].setLevel (7ms)
+259ms ║╚Execution stage complete. (49ms)
+260ms ╚Event processed successfully (260ms)
4/24/2018, 9:01:07 PM +126ms
+1ms ╔Received event [Leam Rd].motion = inactive with a delay of 92ms
+158ms ║RunTime Analysis CS > 11ms > PS > 32ms > PE > 114ms > CE
+160ms ║Runtime (39640 bytes) successfully initialized in 32ms (v0.3.104.20180323) (158ms)
+161ms ║╔Execution stage started
+214ms ║║Comparison (time) 75667292 is_between (time) 1524597540000 .. (time) 84600000 = true (8ms)
+215ms ║║Time restriction check passed
+216ms ║║Condition #4 evaluated true (50ms)
+217ms ║║Condition group #1 evaluated true (state did not change) (51ms)
+219ms ║║Cancelling statement #2's schedules...
+235ms ║║Executed physical command [Porch].setLevel([15]) (11ms)
+236ms ║║Executed [Porch].setLevel (13ms)
+242ms ║║Comparison (enum) inactive changes_to (string) active = false (0ms)
+244ms ║║Cancelling condition #6's schedules...
+244ms ║║Condition #6 evaluated false (5ms)
+245ms ║║Cancelling condition #5's schedules...
+246ms ║║Condition group #5 evaluated false (state changed) (7ms)
+249ms ║╚Execution stage complete. (88ms)
+250ms ║Setting up scheduled job for Tue, Apr 24 2018 @ 9:02:37 PM BST (in 90.19s)
+260ms ╚Event processed successfully (259ms)
4/24/2018, 9:00:37 PM +276ms
+1ms ╔Received event [Leam Rd].motion = active with a delay of 62ms
+161ms ║RunTime Analysis CS > 12ms > PS > 32ms > PE > 116ms > CE
+163ms ║Runtime (39647 bytes) successfully initialized in 32ms (v0.3.104.20180323) (161ms)
+164ms ║╔Execution stage started
+215ms ║║Comparison (time) 75637446 is_between (time) 1524597540000 .. (time) 84600000 = true (8ms)
+216ms ║║Time restriction check passed
+218ms ║║Condition #4 evaluated true (48ms)
+219ms ║║Condition group #1 evaluated true (state did not change) (50ms)
+221ms ║║Cancelling statement #2's schedules...
+232ms ║║Skipped execution of physical command [Porch].setLevel([15]) because it would make no change to the device. (7ms)
+232ms ║║Executed [Porch].setLevel (7ms)
+239ms ║║Comparison (enum) active changes_to (string) active = true (0ms)
+241ms ║║Cancelling condition #6's schedules...
+241ms ║║Condition #6 evaluated true (5ms)
+254ms ║║Comparison (time) 75637518 is_between (time) 1524597540000 .. (time) 1524545400000 = true (8ms)
+255ms ║║Time restriction check passed
+256ms ║║Condition #7 evaluated true (14ms)
+257ms ║║Cancelling condition #5's schedules...
+258ms ║║Condition group #5 evaluated true (state changed) (23ms)
+260ms ║║Cancelling statement #10's schedules...
+269ms ║║Executed virtual command [Porch].setVariable (3ms)
+284ms ║║Executed physical command [Porch].setLevel([100]) (12ms)
+285ms ║║Executed [Porch].setLevel (14ms)
+288ms ║║Executed virtual command [Porch].wait (1ms)
+289ms ║║Requesting a wake up for Tue, Apr 24 2018 @ 9:02:37 PM BST (in 120.0s)
+293ms ║╚Execution stage complete. (129ms)
+294ms ║Setting up scheduled job for Tue, Apr 24 2018 @ 9:02:37 PM BST (in 119.995s)
+302ms ╚Event processed successfully (302ms))
REMOVE BELOW AFTER READING