In this guide, you will learn how to use the “For” function to set up rules and triggers that allow you to trigger events based on certain conditions.
By taking a quick look at the app, you will find explanations of various functions you can use to set rules and triggers.
The “For” function is a trigger that you can use to specify the length of time a trigger condition must meet before proceeding with the next action. The trigger condition can only become “True” if it can sustain the result through the period you specified.
“At Least” Function
“At Least” function creates notifications when the set period is achieved, rather than giving notifications for shorter periods. For example, a sensor that switches on a hallway light whenever it detects motion and off when motion stops. You don’t want notifications whenever motion temporarily halts for a few seconds.
“Less Than” Function
The “Less than” function is where a trigger only activates if the condition is true for less than the specified time. It helps avoid the sensor reacting to inconsistent use of lighting controls, for example, turning on and off lights in quick succession.
An Example of Door Notification
Go to “Create New MeshBot,” select “Local,” and give your rule a name.
Add the trigger, and on the dropdown, select the “Device” node.
Then select your door sensor, and on the dropdown, select device capability; for example, we select “Whenever Everspring Door Sensor is opened whether is armed or disarmed.”
Click on the function button and select “For,” on the dropdown, select “At Least,” and specify your time length so that it sends a notification if the door is opened for such a length of time (we use 20 seconds in our example).
We are done with the trigger.
Next, add your notification action by clicking “Add Action” and selecting the “Notification” node.
Choose the user account to receive notifications, and by default, it displays email and push notifications.
We go with the “Push” notification.
Type your notification text on the “Message Body,” such as “this door has been left open.”
You have successfully set the trigger (Everspring Door Sensor) to notify you when the door is opened for at least 20 seconds, with the message “this door has been left opened.”
Save the rule and go to the mobile app.
On the Vera mobile app, your door sensor is displayed (the Everspring Door Sensor) is on ready mode.
If you trip the sensor, the icon changes to red and, in 20 seconds, sends a notification to your Vera mobile app with your custom text.
Our next article will guide you on using the “For” function with a motion-activated light.