Help with alarm after hours


#1

1) Give a description of the problem
See below for the script. Both timed events trigger at 11PM and 6AM correctly, and the alarm will disarm itself if motion is detected within those times, but it does not re-arm as intended with a 10 minute wait.

  • I’m open to additional suggestions; My next step is figuring out how to NOT set the alarm off if someone opens a window or something after hours.

2) What is the expected behavior?
Alarm will re-arm itself after 10 minutes of detected activity.

3) What is happening/not happening?
Alarm is not re-arming

4) Post a Green Snapshot of the pistonimage

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

12/21/2017, 11:54:33 PM +710ms
+1ms ╔Received event [Kitchen Motion Detector].motion = active with a delay of 100ms
+139ms ║RunTime Analysis CS > 14ms > PS > 13ms > PE > 112ms > CE
+142ms ║Runtime (44145 bytes) successfully initialized in 13ms (v0.2.100.20171211) (141ms)
+143ms ║╔Execution stage started
+150ms ║║Comparison (enum) active changes_to (string) active = true (0ms)
+152ms ║║Cancelling condition #16’s schedules…
+152ms ║║Condition #16 evaluated true (4ms)
+158ms ║║Comparison (string) off is (string) stay = false (1ms)
+159ms ║║Condition #31 evaluated false (6ms)
+160ms ║║Condition group #8 evaluated false (state did not change) (13ms)
+166ms ║╚Execution stage complete. (23ms)
+167ms ║Setting up scheduled job for Fri, Dec 22 2017 @ 6:00:00 AM EST (in 21926.123s), with 1 more job pending
+179ms ╚Event processed successfully (179ms)
12/21/2017, 11:16:17 PM +221ms
+1ms ╔Received event [Kitchen Motion Detector].motion = inactive with a delay of 111ms
+158ms ║RunTime Analysis CS > 21ms > PS > 22ms > PE > 116ms > CE
+163ms ║Runtime (44144 bytes) successfully initialized in 22ms (v0.2.100.20171211) (161ms)
+163ms ║╔Execution stage started
+170ms ║║Comparison (enum) inactive changes_to (string) active = false (1ms)
+171ms ║║Cancelling condition #16’s schedules…
+172ms ║║Condition #16 evaluated false (5ms)
+172ms ║║Condition group #8 evaluated false (state did not change) (5ms)
+178ms ║╚Execution stage complete. (15ms)
+180ms ║Setting up scheduled job for Fri, Dec 22 2017 @ 6:00:00 AM EST (in 24222.6s), with 1 more job pending
+189ms ╚Event processed successfully (188ms)
12/21/2017, 11:16:06 PM +22ms
+2ms ╔Received event [Kitchen Motion Detector].motion = active with a delay of 115ms
+166ms ║RunTime Analysis CS > 21ms > PS > 25ms > PE > 119ms > CE
+171ms ║Runtime (44147 bytes) successfully initialized in 25ms (v0.2.100.20171211) (168ms)
+171ms ║╔Execution stage started
+178ms ║║Comparison (enum) active changes_to (string) active = true (1ms)
+179ms ║║Cancelling condition #16’s schedules…
+180ms ║║Condition #16 evaluated true (5ms)
+188ms ║║Comparison (string) off is (string) stay = false (1ms)
+189ms ║║Cancelling condition #31’s schedules…
+190ms ║║Condition #31 evaluated false (10ms)
+191ms ║║Condition group #8 evaluated false (state did not change) (15ms)
+196ms ║╚Execution stage complete. (25ms)
+198ms ║Setting up scheduled job for Fri, Dec 22 2017 @ 6:00:00 AM EST (in 24233.781s), with 1 more job pending
+205ms ╚Event processed successfully (205ms)
12/21/2017, 11:16:01 PM +938ms
+1ms ╔Received event [Kitchen Motion Detector].motion = inactive with a delay of 112ms
+163ms ║RunTime Analysis CS > 18ms > PS > 20ms > PE > 124ms > CE
+167ms ║Runtime (44142 bytes) successfully initialized in 20ms (v0.2.100.20171211) (165ms)
+168ms ║╔Execution stage started
+174ms ║║Comparison (enum) inactive changes_to (string) active = false (1ms)
+175ms ║║Cancelling condition #16’s schedules…
+176ms ║║Condition #16 evaluated false (4ms)
+177ms ║║Cancelling condition #8’s schedules…
+177ms ║║Condition group #8 evaluated false (state changed) (6ms)
+183ms ║╚Execution stage complete. (15ms)
+184ms ║Setting up scheduled job for Fri, Dec 22 2017 @ 6:00:00 AM EST (in 24237.878s), with 1 more job pending
+227ms ╚Event processed successfully (227ms)
12/21/2017, 11:15:51 PM +814ms
+2ms ╔Received event [Kitchen Motion Detector].motion = active with a delay of 118ms
+171ms ║RunTime Analysis CS > 20ms > PS > 29ms > PE > 121ms > CE
+175ms ║Runtime (44146 bytes) successfully initialized in 29ms (v0.2.100.20171211) (173ms)
+176ms ║╔Execution stage started
+183ms ║║Comparison (enum) active changes_to (string) active = true (1ms)
+184ms ║║Cancelling condition #16’s schedules…
+185ms ║║Condition #16 evaluated true (5ms)
+191ms ║║Comparison (string) stay is (string) stay = true (1ms)
+192ms ║║Cancelling condition #31’s schedules…
+193ms ║║Condition #31 evaluated true (8ms)
+199ms ║║Comparison (time) 83752007 is_between (time) 82800000 … (time) 21600000 = true (4ms)
+200ms ║║Time restriction check passed
+201ms ║║Cancelling condition #32’s schedules…
+202ms ║║Condition #32 evaluated true (9ms)
+203ms ║║Cancelling condition #8’s schedules…
+203ms ║║Condition group #8 evaluated true (state changed) (23ms)
+205ms ║║Cancelling statement #9’s schedules…
+216ms ║║Executed virtual command setAlarmSystemStatus (9ms)
+254ms ║║Executed virtual command sendNotificationToContacts (34ms)
+257ms ║║Executed virtual command wait (1ms)
+258ms ║║Requesting a wake up for Thu, Dec 21 2017 @ 11:25:52 PM EST (in 600.0s)
+262ms ║╚Execution stage complete. (86ms)
+264ms ║Setting up scheduled job for Thu, Dec 21 2017 @ 11:25:52 PM EST (in 599.994s), with 2 more jobs pending
+273ms ╚Event processed successfully (272ms)
12/21/2017, 10:59:59 PM +117ms
+0ms ╔Received event [Rozzly Home].time = 1513915200000 with a delay of -883ms
+135ms ║RunTime Analysis CS > 14ms > PS > 14ms > PE > 106ms > CE
+138ms ║Runtime (44140 bytes) successfully initialized in 14ms (v0.2.100.20171211) (137ms)
+140ms ║╔Execution stage started
+180ms ║║Comparison (string) off is (string) off = true (2ms)
+182ms ║║Condition #23 evaluated true (8ms)
+182ms ║║Condition group #18 evaluated true (state did not change) (10ms)
+185ms ║║Cancelling statement #19’s schedules…
+195ms ║║Executed virtual command setAlarmSystemStatus (6ms)
+240ms ║║Executed virtual command setLocationMode (43ms)
+321ms ║║Executed virtual command sendNotificationToContacts (74ms)
+328ms ║╚Execution stage complete. (188ms)
+331ms ║Setting up scheduled job for Fri, Dec 22 2017 @ 6:00:00 AM EST (in 25200.553s), with 1 more job pending
+339ms ╚Event processed successfully (338ms)


#3

My guess is the motion setting back to inactive/active cancels your 10 minute timer and now SHM is off, even with more motion, it will not restart the timer. You can set that block to Never Cancel so it will go on with the 10 minute timer until completed then set your SHM back to on, but you’ll get another notification when there’s more activity after that.


#4

I am trying to do a very similar thing and running into the piston firing again due to motion while the wait command is running. I cant get it to work by telling it to never cancel either. Did you get around this?


#5

I actually moved it to a light control rule that currently works great. Swap out the light levels for your alarm arm/disarm and this should work good for you.