ST Alarm send repeated text messages


#1

Trying to create a piston that will trigger when my ST alarm goes off and send me repeated txt messages about what sensors are being activated. I have a virtual switch that ST turns on which is what the piston is listening to. I originally tried to use the “switch changes to On” type of logic but it didn’t seem to fire all of the time so I’m using “switch is on” with a blocking variable to keep it from running constantly.

The problem is with the while loop and the device list. I’m experimenting with the motion sensors which is why they are set the “changes to active” instead of “is active”.

When the alarm goes off and the lights all come on like expected, I’ll get anywhere from 4 to 6 text messages for a single motion sensor when it changes to active rather than just a single text like I would expect. Also I don’t get text messages from the other motion sensors when I trigger them. When it was set to is active instead, I would get multiple texts per sensor.

Should I dump the while loop and just use the blocking variable with changes to active / open on the sensors? Or should I dump the virtual switch idea entirely and just work off of the ST being set to away or stay and listen for sensors that way?


#2

So you want to get these text messages every two seconds until the switch is turned off? I assume you have SHM armed so this will loop? Right now it won’t trigger on the switch or the blocking variable since you have the motion ‘changes’ trigger. As far as the multiple messages, are you walking through the area to test it? It is likely they don’t all change at the same time so you are getting independent messages for each motion sensor as it is triggered.


#3

You should dump the whole piston and let SHM handle it. Why are you trying to re-invent SHM? Are you not happy with getting SMS messages from that? I really don’t understand what you’re trying to accomplish. You’re not going to rebuild SHM with 1 pston.


#4

Unless I’m missing something SHM doesn’t continue sending you text messages for every sensor as they are being tripped. The idea of this is to make sure that my entire home security isn’t predicated on me hearing a single app notification. I’m trying to come up with a way where I’ll basically be barraged with notifications until I pickup my phone and disarm the home. This also allows me to notify a neighbor for example if I’m on vacation and didn’t have service when the alarm tripped so this route seemed more flexible.

I have dumped the while loop and made some changes to the app is behaving, for the most part, the way I intended it to but still never figured out why the while loop was always sending four sms messages for each sensor trip. Even if I made sure to trip only one sensor and stop moving, I still received four sms messages when I had that while loop.

If there is a different way built into SHM to do something similar, please share.


#5

Nope…it sure can’t. Probably because no one has ever wanted to send themselves dozens of text messages for one alert. What if you do pick up your phone after the first message? It’s not going to keep going off over and over and over and over and over and over and over…you get the idea.


#6

The method I use for this is quite simple, but it only works on Android devices…

I tell webCoRE to send me one SMS when I want an extreme alert sent to me… but I use a specific keyword in that SMS so it stands out from other SMS messages.

Then I use the Android app called Tasker to play a real loud (obnoxious) sound effect for X seconds whenever a SMS with that keyword comes in.

Pro Tip:
On my setup, Tasker will increase my phone’s volume, and then play the sound effect… If I don’t hit a button within 30 seconds, it sends a similar alert to my ‘second in command’.

90% of the coding is done in Tasker, with only a single line of code needed in webCoRE. :sunglasses:


An advanced version of this sends out one sound effect as an ‘early warning’ system, and then a louder sound effect when we are in ‘code red’ mode. (of course for this, all of the logic is created in webCoRE, and Tasker plays different tracks depending on the SMS sent)

This also works great for the elderly, so for instance, Grandmother can call out, “Alexa, help” and my phone would automatically jump to maximum volume and play a special alert sound, day or night.


This is actually a fun thing to play around with, and also works well for events that are not critical… For instance, when you walk in the bathroom, your phone could start playing Darth Vader’s theme song, or when a motion sensor goes inactive, C3PO could say this famous line before turning off the lights…


#7

I like it! That s is exactly what I’m looking for.