Receiving multiple sms notifications


#1

When my piston is triggered I get 4 SMS notifications instead of just one single one.
I should just get a single SMS notification

I am getting three more SMS notifications than expected

17/03/2018, 11:52:32 +14ms
+1ms ╔Received event [front Door movement sensor].motion = inactive with a delay of 91ms
+140ms ║RunTime Analysis CS > 12ms > PS > 61ms > PE > 68ms > CE
+142ms ║Runtime (38731 bytes) successfully initialized in 61ms (v0.3.000.20180224) (141ms)
+143ms ║╔Execution stage started
+157ms ║║Comparison (long) 247 is_less_than_or_equal_to (integer) 30000 = true (1ms)
+159ms ║║Condition #6 evaluated true (9ms)
+166ms ║║Comparison (long) 46023 is_less_than_or_equal_to (integer) 30000 = false (2ms)
+167ms ║║Cancelling condition #7’s schedules…
+168ms ║║Condition #7 evaluated false (9ms)
+169ms ║║Cancelling condition #2’s schedules…
+169ms ║║Condition group #2 evaluated false (state changed) (20ms)
+172ms ║╚Execution stage complete. (29ms)
+173ms ╚Event processed successfully (173ms)
17/03/2018, 11:51:46 +206ms
+1ms ╔Received event [front cctv move].motion = inactive with a delay of 51ms
+162ms ║RunTime Analysis CS > 14ms > PS > 82ms > PE > 66ms > CE
+164ms ║Runtime (38720 bytes) successfully initialized in 82ms (v0.3.000.20180224) (163ms)
+165ms ║╔Execution stage started
+178ms ║║Comparison (long) 4001 is_less_than_or_equal_to (integer) 30000 = true (1ms)
+179ms ║║Condition #6 evaluated true (8ms)
+186ms ║║Comparison (long) 236 is_less_than_or_equal_to (integer) 30000 = true (1ms)
+187ms ║║Condition #7 evaluated true (7ms)
+188ms ║║Condition group #2 evaluated true (state did not change) (17ms)
+190ms ║║Cancelling statement #4’s schedules…
+212ms ║║Executed virtual command sendSMSNotification (17ms)
+215ms ║║Cancelling statement #8’s schedules…
+259ms ║║Executed physical command [VS-sonos-front-night].on() (42ms)
+260ms ║║Executed [VS-sonos-front-night].on (43ms)
+262ms ║╚Execution stage complete. (98ms)
+263ms ╚Event processed successfully (263ms)
17/03/2018, 11:51:42 +498ms
+1ms ╔Received event [front Door movement sensor].motion = active with a delay of 117ms
+158ms ║RunTime Analysis CS > 18ms > PS > 72ms > PE > 69ms > CE
+161ms ║Runtime (38737 bytes) successfully initialized in 72ms (v0.3.000.20180224) (159ms)
+162ms ║╔Execution stage started
+175ms ║║Comparison (long) 290 is_less_than_or_equal_to (integer) 30000 = true (1ms)
+176ms ║║Cancelling condition #6’s schedules…
+177ms ║║Condition #6 evaluated true (8ms)
+186ms ║║Comparison (long) 1169 is_less_than_or_equal_to (integer) 30000 = true (1ms)
+187ms ║║Condition #7 evaluated true (10ms)
+188ms ║║Cancelling condition #2’s schedules…
+188ms ║║Condition group #2 evaluated true (state changed) (21ms)
+190ms ║║Cancelling statement #4’s schedules…
+213ms ║║Executed virtual command sendSMSNotification (17ms)
+215ms ║║Cancelling statement #8’s schedules…
+264ms ║║Executed physical command [VS-sonos-front-night].on() (46ms)
+265ms ║║Executed [VS-sonos-front-night].on (47ms)
+267ms ║╚Execution stage complete. (106ms)
+268ms ╚Event processed successfully (268ms)
17/03/2018, 11:51:41 +561ms
+1ms ╔Received event [front cctv move].motion = active with a delay of 49ms
+140ms ║RunTime Analysis CS > 12ms > PS > 62ms > PE > 66ms > CE
+143ms ║Runtime (38724 bytes) successfully initialized in 62ms (v0.3.000.20180224) (140ms)
+144ms ║╔Execution stage started
+158ms ║║Comparison (long) 1344780 is_less_than_or_equal_to (integer) 30000 = false (2ms)
+159ms ║║Condition #6 evaluated false (9ms)
+160ms ║║Condition group #2 evaluated false (state did not change) (10ms)
+162ms ║╚Execution stage complete. (19ms)
+163ms ╚Event processed successfully (163ms)


#2

Looks like each motion sensor is triggering the SMS on active and inactive, hence the 4 SMS. What did you want the age() statement to do?


#3

Hi, I was trying to get a single alert when someone triggered both the movement sensors due to false alerts when only using a single sensor. The age statement was mean to allow for a gap between each sensor being triggered. ie if both are triggered within 30 seconds of each other then I receive a single alert.


#4

See if constructing it like this yields better result.


#5

Excellent ! does exactly what I wanted with a single txt ! thanks a lot for your help its greatly appreciated :slight_smile: