Action not firing but logs says executed


#1

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.


#2

Tried this based on other similar threads and it fails the same way.

When motion stops rom the sensor, it cancels the schedule.
3/29/2018, 10:41:11 PM +157ms
+1ms ╔Received event [Kitchen Motion Sensor].motion = inactive with a delay of 70ms
+74ms ║RunTime Analysis CS > 13ms > PS > 36ms > PE > 24ms > CE
+76ms ║Runtime (37418 bytes) successfully initialized in 36ms (v0.3.104.20180323) (74ms)
+77ms ║╔Execution stage started
+89ms ║║Comparison (enum) inactive is (string) active = false (2ms)
+91ms ║║Cancelling condition #2’s schedules…
+92ms ║║Condition #2 evaluated false (8ms)
+93ms ║║Cancelling condition #1’s schedules…
+94ms ║║Condition group #1 evaluated false (state changed) (11ms)
+97ms ║╚Execution stage complete. (21ms)
+98ms ╚Event processed successfully (98ms)


#3


#4

That’s what I tried above. Does it matter if the wait is on location instead of the device?


#5

I tried it with “changes to” as well, instead of “is” that is shown in the picture.


#6

This seems to be working for now. But would love to know why it was failing in the above examples, if anyone could solve the mystery.