Motion Piston - HELP Needed


#1

1) Give a description of the problem
I have created a piston to in theory fire between 11pm and 7am when one of two motion sensors are triggered.

2) What is the expected behaviour?
(PUT YOUR INFO HERE)
I’ve created two push messages to see how the script if flowing and I always get the ‘Motion not within time’ push message. I never get the ‘Motion porch off piston do’

3) What is happening/not happening?
The porch light turns on to 100% but then never does the dimming count down and doesn’t send me the ‘Motion porch off piston do’ message. but it does send me the ‘Motion not within time’ push message. it’s acting reverse to how I want it to operate.

**4) Post a Green Snapshot of the piston![image|45x37]

5) Attach logs after turning logging level to Full
(PASTE YOUR LOGS HERE THEN HIGHLIGHT ALL OF THE LOGS AND CLICK ON THE </> ICON TO FORMAT THEM CORRECTLY)
5/13/2019, 11:57:23 AM +367ms
+2ms ╔Received event [Garage Outdoor PIR Motion Detector].motion = inactive with a delay of 83ms
+143ms ║RunTime Analysis CS > 20ms > PS > 84ms > PE > 38ms > CE
+145ms ║Runtime (39018 bytes) successfully initialized in 84ms (v0.3.10a.20190223) (142ms)
+146ms ║╔Execution stage started
+162ms ║║Comparison (enum) inactive changes_to (string) active = false (1ms)
+164ms ║║Cancelling condition #18’s schedules…
+165ms ║║Condition #18 evaluated false (12ms)
+167ms ║║Cancelling condition #1’s schedules…
+168ms ║║Condition group #1 evaluated false (state changed) (15ms)
+171ms ║║Cancelling statement #16’s schedules…
+184ms ║║Executed virtual command sendPushNotification (8ms)
+188ms ║╚Execution stage complete. (42ms)
+189ms ╚Event processed successfully (189ms)


#2

Sorry wrong piston version disregard this post. This version I removed timeframe to simplify troubleshooting.


#3

Is it working now?
if not pls post the new version of the piston…

But meanwhile:
1 - Countdown does not happen because your trigger is no longer TRUE once it was activated.
You need to add NEVER CANCEL TASK to line 20 (let me know if you don’t know how)
so, somewhere around line 25 - while waiting maybe 15,20 seconds - your piston STOPS and cancels the task.
2 - You’ll ALWAYS get the ELSE message because your piston only registers TRUE when action is triggered.
Unless this is just for testing I wouldn’t use ELSE in this way… you will keep getting push messages:)