Chain multiple event triggers with a specific minute range to soun a Siren

I'm not sure if this belongs under HSM or RM - feels more Rule Machine based on what I'm trying to do, but I've incorporated some ST Multi-sensor contacts to my Windows and enabled the vibration/acceleration aspect. What I'd like to do though is only trigger my Siren (in RM or HSM) when more advanced conditions have happened.

In particular I'd only like the acceleration/vibration aspect to be considered whenboth this and another action (e.g. outside camera movement, or motion sensor) is also triggered withing the last Xmins (say 3 minutes) to help me rule out false positives.

Specifically, only trigger the siren when a vibration/acceleration is accompanied by a motion trigger with a few minutes of each other.

Has anyone done anything like this?
My pseudo code would be something like;

If (Sensor.vibration == true){
       sendAlert: "Vibration Alert";
       If (MotionSensor == true in last 3min ){
            sendAlert: "Motion + Vibration Intrusion Alert";
            soundSiren(volumeLevel, chimeStyle);

Thanks for any suggestions.

(edit: Moved from the HSM, here to the RM)

There is probably a better way, but what I think I would try is create a virtual switch, call it simulated vibration for this sake.

Rule 1 would take actual vibration sensor, and set the simulated vibration switch to on, and turn off after 3 minutes.

Rule 2 would evaluate motion and the simulated vibration and if both are true, sound siren.

Another option might be to do something similar with Private Boolean.

1 Like

Here's a rule that will do more or less what you want. The actual action you need for your siren may be different depending on the device you're using (I chose to "Sound a chime or siren" and run the "siren" command):


I originally had something quite a bit simpler in mind (more or less starting with just the "wait for actions" with the timeout and no Private Boolean), but when I ran through the possible outcomes in my head, I kept finding problems. I arrived at this and hope I didn't miss anything. :slight_smile: I welcome feedback if something looks odd.

Note that this keeps things entirely outside of HSM. I don't know of any way to set HSM into an "alarm" state without providing HSM with a triggering device somehow. (Instead of sounding the siren directly, you could make a virtual motion sensor become active, then use that motion sensor in one or more of your HSM setups.) Keeping things in HSM has benefits, like the fact that it's an easily-accessible system-wide state that is easily viewed and modified from a dashboard, other apps, or the admin UI and generates alert states you need to acknowledge/cancel.