Outside PIR Nearly there But


#1

1) Give a description of the problem
I am trying to get an outside PIR which is acting as a switch via a Fibraro Relay to turn on my lights when activated.

2) What is the expected behavior?
I need these to turn on after each other within random set times say light 1 then wait 15 seconds light 2 and so on, then switch off in a similar fashion. I have a simple piston set up so when an intruder goes on my driveway it sets of the sequences via my switch PIR. I have had this working flawlessy on the old Core…

3) What is happening/not happening?
All works really well if you activate it once and watch the sequence progress, however as soon as the PIR switches back on (picks you up again) it interferes with the sequence and everything just drops out. I need something in the piston to stop that happening and let the psiton run through it phase once it has been activated and maybe once it’s completed wait for a time then re-arm or something??

It’s to show burglar bill that someone may be coming downstairs and outside when he’s on my driveway.

4) Post a Green Snapshot of the pistonimage

5) Attach any logs (From ST IDE and by turning logging level to Full)

+1ms â•”Received event [Motion PIR - Outside].switch = off with a delay of 73ms
+175ms â•‘RunTime Analysis CS > 15ms > PS > 90ms > PE > 71ms > CE
+214ms â•‘Runtime (41164 bytes) successfully initialized in 90ms (v0.2.0ff.20171129) (212ms)
+215ms â•‘â•”Execution stage started
+228ms ║║Comparison (time) 36551430 is_between (time) 84600000 … (time) 79200000 = true (6ms)
+228ms â•‘â•‘Time restriction check passed
+230ms â•‘â•‘Condition #29 evaluated true (10ms)
+233ms â•‘â•‘Comparison (enum) off changes_to (string) on = false (0ms)
+235ms ║║Cancelling condition #30’s schedules…
+235ms â•‘â•‘Condition #30 evaluated false (5ms)
+236ms ║║Cancelling condition #1’s schedules…
+237ms â•‘â•‘Condition group #1 evaluated false (state changed) (18ms)
+239ms ║╚Execution stage complete. (25ms)
+248ms ╚Event processed successfully (247ms)
01/01/2018, 10:09:05 +135ms
+1ms â•”Received event [Home].time = 1514801346502 with a delay of -1367ms
+180ms â•‘RunTime Analysis CS > 24ms > PS > 87ms > PE > 69ms > CE
+190ms â•‘Runtime (41159 bytes) successfully initialized in 87ms (v0.2.0ff.20171129) (189ms)
+191ms â•‘â•”Execution stage started
+463ms â•‘â•‘Executed physical command [Outside Lights].on() (255ms)
+464ms â•‘â•‘Executed [Outside Lights].on (257ms)
+467ms ║║Cancelling statement #41’s schedules…
+471ms â•‘â•‘Executed virtual command [Hall, Kids Room, TV Room].wait (0ms)
+473ms â•‘â•‘Requesting a wake up for Mon, Jan 1 2018 @ 10:10:05 AM GMT (in 60.0s)
+478ms ║╚Execution stage complete. (287ms)
+479ms â•‘Setting up scheduled job for Mon, Jan 1 2018 @ 10:10:05 AM GMT (in 59.995s)
+495ms ╚Event processed successfully (495ms)
01/01/2018, 10:08:26 +124ms
+8ms â•”Received event [Home].time = 1514801307370 with a delay of -1246ms
+176ms â•‘RunTime Analysis CS > 21ms > PS > 71ms > PE > 78ms > CE
+266ms â•‘Runtime (41159 bytes) successfully initialized in 71ms (v0.2.0ff.20171129) (256ms)
+271ms â•‘â•”Execution stage started
+354ms â•‘â•‘Executed physical command [Hall].on() (35ms)
+355ms â•‘â•‘Executed [Hall].on (42ms)
+359ms ║║Cancelling statement #14’s schedules…
+370ms â•‘â•‘Executed virtual command [Outside Lights].wait (5ms)
+375ms â•‘â•‘Requesting a wake up for Mon, Jan 1 2018 @ 10:09:06 AM GMT (in 40.0s)
+383ms ║╚Execution stage complete. (116ms)
+390ms â•‘Setting up scheduled job for Mon, Jan 1 2018 @ 10:09:06 AM GMT (in 39.994s)
+423ms ╚Event processed successfully (423ms)
01/01/2018, 10:08:17 +122ms
+1ms â•”Received event [Home].time = 1514801298291 with a delay of -1169ms
+174ms â•‘RunTime Analysis CS > 14ms > PS > 94ms > PE > 65ms > CE
+185ms â•‘Runtime (41159 bytes) successfully initialized in 94ms (v0.2.0ff.20171129) (184ms)
+186ms â•‘â•”Execution stage started
+239ms â•‘â•‘Executed physical command [Kids Room].on() (40ms)
+240ms â•‘â•‘Executed [Kids Room].on (41ms)
+242ms ║║Cancelling statement #4’s schedules…
+247ms â•‘â•‘Executed virtual command [Hall].wait (1ms)
+248ms â•‘â•‘Requesting a wake up for Mon, Jan 1 2018 @ 10:08:27 AM GMT (in 10.0s)
+251ms ║╚Execution stage complete. (65ms)
+253ms â•‘Setting up scheduled job for Mon, Jan 1 2018 @ 10:08:27 AM GMT (in 9.996s)
+268ms ╚Event processed successfully (267ms)
01/01/2018, 10:08:03 +69ms
+0ms â•”Received event [Home].time = 1514801284396 with a delay of -1329ms
+183ms â•‘RunTime Analysis CS > 18ms > PS > 101ms > PE > 66ms > CE
+194ms â•‘Runtime (41161 bytes) successfully initialized in 101ms (v0.2.0ff.20171129) (192ms)
+195ms â•‘â•”Execution stage started
+212ms â•‘â•‘Skipped execution of physical command [TV Room].on([]) because it would make no change to the device. (3ms)
+213ms â•‘â•‘Executed [TV Room].on (4ms)
+216ms ║║Cancelling statement #34’s schedules…
+221ms â•‘â•‘Executed virtual command [Kids Room].wait (1ms)
+222ms â•‘â•‘Requesting a wake up for Mon, Jan 1 2018 @ 10:08:18 AM GMT (in 15.0s)
+226ms ║╚Execution stage complete. (31ms)
+228ms â•‘Setting up scheduled job for Mon, Jan 1 2018 @ 10:08:18 AM GMT (in 14.995s)
+242ms ╚Event processed successfully (243ms)
01/01/2018, 10:07:49 +152ms
+0ms â•”Received event [Home].time = 1514801270695 with a delay of -1543ms
+171ms â•‘RunTime Analysis CS > 19ms > PS > 88ms > PE > 64ms > CE
+183ms â•‘Runtime (41159 bytes) successfully initialized in 88ms (v0.2.0ff.20171129) (182ms)
+184ms â•‘â•”Execution stage started
+235ms â•‘â•‘Executed physical command [TV Room].on() (39ms)
+236ms â•‘â•‘Executed [TV Room].on (41ms)
+238ms ║║Cancelling statement #34’s schedules…
+242ms â•‘â•‘Executed virtual command [Kids Room].wait (0ms)
+243ms â•‘â•‘Requesting a wake up for Mon, Jan 1 2018 @ 10:08:04 AM GMT (in 15.0s)
+247ms ║╚Execution stage complete. (63ms)
+249ms â•‘Setting up scheduled job for Mon, Jan 1 2018 @ 10:08:04 AM GMT (in 14.996s)
+265ms ╚Event processed successfully (265ms)
01/01/2018, 10:07:45 +521ms
+1ms â•”Received event [Motion PIR - Outside].switch = on with a delay of 51ms
+131ms â•‘RunTime Analysis CS > 11ms > PS > 61ms > PE > 58ms > CE
+140ms â•‘Runtime (41169 bytes) successfully initialized in 61ms (v0.2.0ff.20171129) (138ms)
+141ms â•‘â•”Execution stage started
+155ms ║║Comparison (time) 36465667 is_between (time) 84600000 … (time) 79200000 = true (6ms)
+156ms â•‘â•‘Time restriction check passed
+157ms â•‘â•‘Condition #29 evaluated true (11ms)
+162ms â•‘â•‘Comparison (enum) on changes_to (string) on = true (2ms)
+163ms ║║Cancelling condition #30’s schedules…
+164ms â•‘â•‘Condition #30 evaluated true (6ms)
+165ms ║║Cancelling condition #1’s schedules…
+166ms â•‘â•‘Condition group #1 evaluated true (state changed) (21ms)
+168ms ║║Cancelling statement #7’s schedules…
+172ms â•‘â•‘Executed virtual command [TV Room].wait (0ms)
+174ms â•‘â•‘Requesting a wake up for Mon, Jan 1 2018 @ 10:07:50 AM GMT (in 5.0s)
+178ms ║╚Execution stage complete. (38ms)
+180ms â•‘Setting up scheduled job for Mon, Jan 1 2018 @ 10:07:50 AM GMT (in 4.995s)
+196ms ╚Event processed successfully (196ms)

NOW I MANUALLY closed the PIR just to show you that it cuts off the piston state, someone will laugh at me for this, I am sorry but I am crap at these things!


#2

Click on your IF statement, the click on the gear cog at the bottom of the window. Change the Task Cancellation Policy to “never cancel tasks” and it should work. If it doesn’t, repeat the same steps for each WITH statement and that will definitely do it.


#3

Thats really helpful, I’ll do that and let you know how I get on :slight_smile: thanks