There are two kinds of triggers available for automations. The first one is the Schedule, where you can choose a time interval to regularly execute the actions of the automation. The second one is the Senseforce-Trigger which is a combination of a time interval and data source conditions, meaning that a data source is checked for the given conditions regularly.
Configuring a trigger schedule
First, you need to choose "Schedule" as your trigger type and give the trigger a name and description (the name is required). Finally, you need to define the time interval. Available interval types are,
Minute Interval, executes if the minutes are divisible by the given number (currently the minimum is 10 minutes), so for 29, it executes at 00:00, 00:29, 00:58, 01:00, 01:29, ...
Hourly, executes every hour at the given minute.
Hour Interval, executes every full hour if the hour is divisible by the given number, so for 10, it executes at 00:00, 10:00, 20:00.
Daily, executes every day at the given time.
Day Interval, executes every day of the month where the date - 1 is divisible by the given number, so for 20 it executes at 01-01-2020 00:00, 21-01-2020 00:00, 01-02-2020 00:00, ...
Weekly, executes every week at the given day and time.
Monthly, executes every month at the given day and time.
Month Interval, executes every month where the month - 1 is divisible by the given number, so for 6 it executes at 01-01-2020 00:00, 01-07-2020 00:00, 01-01-2021 00:00, ...
Yearly, executes every year at the given day and time.
Configuring a Senseforce-Trigger
After you chose the Senseforce-Trigger. The process for configuring it is similar to the scheduled trigger. You need to define the name for your trigger (optional: add a description) and at the end, you need to set a time interval (see the previous section for details). Additionally, you can add a data source, which will be checked every time the trigger is scheduled. If there is at least one row in the data source the trigger is active and the action will be executed otherwise the trigger is inactive then no action will be executed.
The data source is not checked all the time, only when scheduled. So an action only gets executed if a trigger is active at the scheduled time.
Dataset as a data source
If you select a dataset you can add some filters to specify your trigger condition. The "global things" are applied like the global thing filter on dashboards. Every additional filter is simply applied to the selected column. Otherwise, the filters defined in the dataset stay as they are.
Example: Let's say you want to get a notification if the value of Sensor A has exceeded 10 in the last hour for "DemoMachine1". To achieve this you can use the following filters on your dataset:
Note that the dataset will only contain a row if there were values of Sensor A that were higher than 10 in the last hour. Hence you only get a notification in this particular case.
Script as a data source
If you use a script as a data source you can apply filters to the script results as well as to the input data of the script to specify your trigger condition.
Click on "+ Add Filter" to add a filter for the script results and "+ Add Dataset Filter" to add a filter for the datasets which are used as input of the script. Note that the global thing filter gets applied to all the datasets used as input (but not the script results) in the same way as on a dashboard.
Multiple data sources
If multiple data sources are selected the trigger is active if all data sources contain at least one row after all filters were applied.