Followed by (help required, especially the matching method: loose, strict, negated)


#1

1) Give a description of the problem
I’m wondering why this piston does not fire. I expect it to fire. The button is pressed, and there is motion in the sensor within 25 seconds. The logging shows that there is both, because it logs both the button press and the motion. Both are triggers, so that should work, right?

Keypad 3 = a button, only 1 button (the only button is selected, and I tried not selecting any button number, and nothing)
Motion sensor is a motion sensor that is correctly reporting as motion active.
Switch is a power socker that turns on a bedside lamp.

2) What is the expected behavior?
Turn on light switch.

3) What is happening/not happening?
Light is not turned on. It’s either the “followed by” is not working, or I’ve selected the wrong matching method.

4) Post a Green Snapshot of the pistonimage

5) Attach any logs and by turning logging level to Full)
17/09/2018, 20:36:47 +90ms
+0ms ╔Received event [EU Location].time = 1537180607612 with a delay of -523ms
+160ms ║RunTime Analysis CS > 44ms > PS > 63ms > PE > 53ms > CE
+163ms ║Runtime (37813 bytes) successfully initialized in 63ms (v0.3.108.20180906) (161ms)
+164ms ║╔Execution stage started
+177ms ║╚Execution stage complete. (14ms)
+179ms ╚Event processed successfully (178ms)
17/09/2018, 20:36:31 +288ms
+1ms ╔Received event [MD - Main Bed].motion = active with a delay of 84ms
+115ms ║RunTime Analysis CS > 16ms > PS > 50ms > PE > 49ms > CE
+117ms ║Runtime (37808 bytes) successfully initialized in 50ms (v0.3.108.20180906) (115ms)
+118ms ║╔Execution stage started
+131ms ║║Comparison (enum) active changes_to (string) active = false (0ms)
+132ms ║║Condition #3 evaluated false (6ms)
+135ms ║╚Execution stage complete. (17ms)
+137ms ║Setting up scheduled job for Mon, Sep 17 2018 @ 8:36:47 PM AEST (in 16.188s)
+148ms ╚Event processed successfully (148ms)
17/09/2018, 20:36:22 +454ms
+2ms ╔Received event [Button 4 - Mike Comp].button = pushed with a delay of 179ms
+128ms ║RunTime Analysis CS > 22ms > PS > 52ms > PE > 53ms > CE
+130ms ║Runtime (37805 bytes) successfully initialized in 52ms (v0.3.108.20180906) (127ms)
+131ms ║╔Execution stage started
+144ms ║║Comparison (enum) pushed gets (string) pushed = true (3ms)
+146ms ║║Cancelling condition #2’s schedules…
+147ms ║║Condition #2 evaluated true (10ms)
+148ms ║║Cancelling statement #1’s schedules…
+151ms ║║Condition group #1 made progress up the ladder, currently at step 1 of 2
+163ms ║╚Execution stage complete. (31ms)
+165ms ║Setting up scheduled job for Mon, Sep 17 2018 @ 8:36:47 PM AEST (in 24.994s)
+174ms ╚Event processed successfully (174ms)
17/09/2018, 20:36:15 +734ms
+1ms ╔Received event [EU Location].test = 1537180575733 with a delay of 1ms
+148ms ║RunTime Analysis CS > 24ms > PS > 56ms > PE > 68ms > CE
+152ms ║Runtime (37797 bytes) successfully initialized in 56ms (v0.3.108.20180906) (149ms)
+153ms ║╔Execution stage started
+170ms ║║Cancelling condition #2’s schedules…
+171ms ║║Condition #2 evaluated false (10ms)
+173ms ║║Cancelling statement #1’s schedules…
+175ms ║║Cancelling condition #1’s schedules…
+176ms ║║Condition group #1 evaluated false (state changed) (17ms)
+183ms ║╚Execution stage complete. (31ms)
+185ms ╚Event processed successfully (185ms)
17/09/2018, 20:36:10 +245ms
+1ms ╔Starting piston… (v0.3.108.20180906)
+468ms ║╔Subscribing to devices…
+503ms ║║Subscribing to Button 4 - Mike Comp.button…
+520ms ║║Subscribing to MD - Main Bed.motion…
+666ms ║║Subscribing to PS - Mike’s Lamp…
+667ms ║╚Finished subscribing (211ms)
+692ms ║Cancelling condition #1’s schedules…
+705ms ╚Piston successfully started (704ms)


#2

Your logic looks good, but the condition “followed within 25 seconds” never seems reliable for me.

The method below worked with 100% reliability in my testing (as seen in the log at the bottom):

The three log commands are entirely optional, but I added them so you could see what is happening behind the scenes.


#3

Thanks for this, I’ll give it a go tonight.


#4

Wow, that was the easier piston import I’ve ever done. Thanks for the easy instructions in there.

it works as expected. Just out of curiosity, where does it store the Log debug data, and how can I utilise this?


#5

Glad to help :sunglasses:

When viewing the piston (not in edit mode) the log is right below the piston code.
It will automatically write there each time a step happens.


#6

as fyi

see