1) Give a description of the problem
Condition is true but action is not completing. Log says piston executed but the action doesn’t fire.
2) What is the expected behavior?
After motion stops, turn off lights after elapsed time period
3) What is happening/not happening?
Light stays on even though webCore says the action fired
**4) Post a Green Snapshot of the piston!
**5) Attach any logs
3/29/2018, 9:39:36 PM +281ms
+1ms ╔Received event [Kitchen Motion Sensor].motion = inactive with a delay of 72ms
+134ms ║RunTime Analysis CS > 13ms > PS > 27ms > PE > 94ms > CE
+136ms ║Runtime (43107 bytes) successfully initialized in 27ms (v0.3.104.20180323) (135ms)
+137ms ║╔Execution stage started
+153ms ║║Comparison (enum) inactive changes = true (1ms)
+155ms ║║Cancelling condition #2’s schedules…
+167ms ║║Comparison (enum) inactive is (string) active = false (2ms)
+170ms ║║Comparison (enum) inactive is (string) active = false (2ms)
+172ms ║║Cancelling condition #21’s schedules…
+173ms ║║Condition #21 evaluated false (14ms)
+174ms ║║Cancelling condition #20’s schedules…
+175ms ║║Condition group #20 evaluated false (state changed) (17ms)
+184ms ║║Comparison (enum) inactive is (string) inactive = true (2ms)
+185ms ║║Cancelling condition #23’s schedules…
+188ms ║║Cancelling statement #24’s schedules…
+193ms ║║Executed virtual command wait (0ms)
+194ms ║║Requesting a wake up for Thu, Mar 29 2018 @ 9:40:06 PM EDT (in 30.0s)
+197ms ║║Condition #23 evaluated true (19ms)
+199ms ║║Cancelling condition #22’s schedules…
+199ms ║║Condition group #22 evaluated true (state changed) (22ms)
+201ms ║║Condition #2 evaluated true (56ms)
+202ms ║║Cancelling condition #1’s schedules…
+203ms ║║Condition group #1 evaluated true (state changed) (59ms)
+206ms ║╚Execution stage complete. (69ms)
+208ms ║Setting up scheduled job for Thu, Mar 29 2018 @ 9:40:06 PM EDT (in 29.987s)
+217ms ╚Event processed successfully (218ms)
The logs show that the schedule for line 22 gets CANCELED when motion has been inactive for the time period. I had changed it to 1 minute while testing. Ignore all the async’s too, was seeing if that would help. The current structure of this piston is just the latest form. I have tried multiple setups and all work for a good while, but will eventually start exhibiting this same problem. The setup is fairly simple, if motion is detected and the lights are off and either the light level is low enough or the lights were on less than 5 minutes ago (light sensor takes up to 4 minutes to update light levels, this allows the light to turn right back on if you walk back into the room after the light turns off but the light level hasn’t updated that it is dark) Then wait for the motion sensors to all be inactive for 10 minutes and then turn the lights off.