Ubidots users have the added events and alerts feature of Conditional statements. A conditional is any IF / Then statement arranged to qualify an action based on a series of inputs (or lacking inputs). 

Table of Contents:

  1. When and how does an Ubidots Event trigger?
  2. Creating a Conditional Event

1. When and how does an Ubidots Event trigger?

The figure below describes how the Events Engine triggers alerts inside an active event window. Note that data (blue line) passes through the Threshold triggering an event; then the data must fall below the threshold agains before Ubidots triggers then next event.

Please note that after an alert is triggered, subsequent values will not be triggered again, even if they comply with the trigger conditions. A second trigger cannot take place unless the data values return below the threshold value and exceed the threshold again:

Events can ONLY be triggered in an Active Event Window as depicted below. Activity Windows are described further in Step 9 later in this guide.

'Has been inactive' condition events will ONLY be triggered if the inactiveness is within the active window. 'Has been inactive' condition is described better in Step 5 down in this guide.

2. Creating a Conditional Event

To create an Event:

  1. Select Events (from the Device Management dropdown).
  2. Select the If triggers tab to organize your event logic (If A,B, and/or C exists, then execute XYZ)
  3. Select a device(s): Data Sim (the name of your device)
  4. Select a variable(s): Temperature and Humidity
  5. Establish Conditions: If the value is greater than 90, for 60 minutes (building the event logic with further AND / OR conditionals as needed)
  6. Select the Then actions tab to execute the planed Event or Alert (SMS, Email, Telegram, and/or Webhook)
  7. Establish which actions are to be executed and the message to the receiver: Send SMS and Email to Repair Rob.
  8. Press the center "right arrow" icon in the center screen to proceed to Operational Window
  9. Determine the time window the events may/may not be valid
  10. Confirm your Events

Tip: In Ubidots conditional events engine you may select multiple devices and multiple variables within a single event or built complex events with triggers exist for multi-logic events (If {dev 1, varA} or {device 2, varB} are 100, then send SMS message)

Step 2: Select the If triggers tab to organize your event logic (If A,B, and/or C exists, then execute XYZ)

Step 3: Select a device: Field 2 - Chardonnay (one device per conditional expression; multiple devices can be added using AND / OR conditionals)

Step 4: Select a variable: Temperature (one variable per device can be selected at a time. Step 6 below states how to add multiple device variable conditions to an event)

Step 5: Establish event logic: if the value is greater than 90, for 60 minutes. (Assign the event trigger logic as desired.

Step 6 (OPTIONAL): Add additional Device and Variable triggers by adding in additional AND or OR statements. Click the +And  or +Or button to add an additional If triggers expression.   

Step 7: Select the Then actions tab to execute the planed Event or Alert (SMS, Email, Telegram, Slack, and/or Webhook)

Step 8: Establish which actions are to be executed and the message to the receiver: Send SMS, Email, Webhooks, and Telegrams to those who need to know.

Pro Tip: Add Specific Data Inputs into the Event for immediate info

  • Last_value
  • Context
  • Trigger_timestamp
  • Variable
  • Variable Name
  • Varibale_id
  • Variable properties

Stop 8: Press the center "right arrow" or "check mark" icon in the center screen to proceed to Operational Window

Step 9: Determine the activity window the events may/may not be executed.

Step 10: Confirm your Events

Now it is your turn to build your very own conditional events with Ubidots. If you need a little help along the way, no problem, just message our team via email at support@ubidots.com or by the in-app chat channel with that little blue chat bubble in the bottom right of your App. 

Other users also found helpful:

  1. Events: Was my event triggered? How to check the event's Log
  2. Events: Slack Webhook setup
  3. Ubifunctions: Process/Parse data from 3rd party platforms
Did this answer your question?