An event (or alert) is any action triggered when data fulfills or exceeds a design rule. For example, an email or SMS message can be sent anytime a sensor stops sending data or a temperature exceeds a maximum threshold. In this article we will describe the setup and logic of Ubidots' Events Engine.
Creating an Event
To begin, we will tell Ubidots to send an alert via email when the variable called "Power" exceeds a predetermined 1,500 boundary.
To create an Event:
- Select Events (from the Device Management dropdown).
- Select Add Event
- Select a device: Machine 1 (the name of our device)
- Select a variable: Power
- If the value is greater than 1,500, then send an email.
Next, choose the format of your alert. In this case, we will use emails.
Alerts can be very helpful and with Ubidots you can customize who, when, why, and what will be said in any alert. You might be interested in sending this alert to your maintenance department, machinist, or a manufacturer for quality assurance.
Lastly, name this alert for simple identifying the next time it is needed.
Select "Finish" and you have now created an alert for the Power variable when it exceeds 1,500.
We also created an alert when Machine's 1 energy consumption is below 5000 and inserted the last value of the variable within the message.
Types of Text Message Alerts
SMS: SMS stands for Short Messaging Service and is a text-only messages with a limit of 160 characters per message.
Telegram: is an open source messaging app that allows you to send files in almost any format.
When Events are Triggered
The figure below describes how the Events Engine triggers alerts inside Ubidots core:
Please note that after an alert is triggered, the subsequent values will not trigger the alert again, even if they comply with the trigger conditions, unless the value goes outside the trigger condition and returns again:
For a closer look at Event and Alert creation check out the below video tutorial: