- Click the Add rule
button on the initial screen
- New Create dialog will appear, displaying three sections needed to create a rule:
- Describe rule
- If
- Then
Describe Rule
Describe a rule by defining its name, description and choosing its ON/OFF status which defines if the rule will be immediately active or not. All these data will be displayed on the initial Rules screen.
In Describe rule dialog enter: Rule name (e.g. Temperature Rule) and Description (e.g. Rule for Temperature) and choose its ON/OFF status which indicates if the rule is immediately active or not.
If
This section defines condition(s) that trigger the rule.
- Click the
button next to Add condition
- You can choose to create Feed Condition or Semantic Group(s) Condition
Feed Condition
Choose Feed Condition to create a condition for a single feed that needs to be fulfilled for a rule to be triggered.
If you choose Feed Condition:
- New section will appear with the Feed and Operators fields
Feed field: Search for the feed
Operators field: Defines a type of condition needed for the rule to be triggered. It contains a drop-down list which requires you to select one operator out of three possible groups:
Value Operator
Compares the data with the static value or with the data from another feed. According to that, you can choose between:
- Is equal to
- Is not equal to
- Is lower than
- Is lower than or equal to
- Is higher than
- Is higher than or equal to
If you select the operator from the value group it will open a new Compare with drop-down which requires you to choose if you want to compare it to the Static value, or another Feed.
Static value: numerically input the value for comparison
Feed: After you select to compare it with another feed, a drop-down list automatically opens where you can choose to select:
- Feed: With this option, the Platform itself populates the appropriate semantic (sub)group displaying the same type of feed as the one in the previous Feed field.
- Threshold: It appears if is lower than or is higher than is selected as the value operator. It requires you to enter a number which represents a minimum difference between the feeds that would consequently trigger the rule. After you have defined all the necessary settings, go to the next section.
Trend Operator
- Indicates if feed’s data have Rising, Falling or Steady trend
Status Operator
- Indicates if feeds have been connected or not: Connected, Inactive
Note: At this stage you can always edit the rule by adding new condition(s).
Semantic Group(s) Condition
Choose Semantic Group(s) condition to create a condition for semantic group(s). At least one condition, for one feed, needs to be fulfilled within these semantic group(s) for the rule to be triggered.
If you choose Semantic Group(s) Condition:
- New section will appear
- In the Reading type field, choose reading type of the feeds in the semantic group you are creating the rule for
- In the Search for semantic groups field, choose semantic group from a drop-down list
Please note that you can choose more than one semantic group.
Operators field: Defines a type of condition needed for the rule to be triggered. It contains a drop-down list in which you need to select one operator out of three possible groups. These are the same types of operators used for making the condition for feeds.
If you select an operator from a value group, it will open a new Compare with drop-down which requires you to choose if you want to compare it to a Static value, or a Feed.
Static value: Numerically input the value for comparison
Feed: With this option the Platform itself populates the appropriate semantic (sub)group displaying the same type of feed as the one in the previous Feed field
- Threshold: It appears if is lower than or is higher than is selected as the value operator. It requires you to enter a number which represents a minimum difference between the feeds that would consequently trigger the rule. After you have defined all the necessary settings, go to the next section.
Then
Defines action(s) that will be performed as a result. It can either inform the user about it or automate an action which will be performed on a certain device.
Options are as follows:
1. Generate Message
You will receive a message displayed on the Messages screen when a rule is being triggered.
Message field: Enter the text you would like to be displayed Message type field: Define a type of message based on its urgency
2. Send Email
You will receive an email when a rule is being triggered.
- Add one or multiple number of users registered to the Platform who will receive the email
- Define Subject and Body of the message
3. Send Push Notification
You are opting for push notification to be sent to a mobile phone of one or more recipients who all need to be registered to the Platform and have WolkReact Mobile application installed.
- Add one or a multiple number of users registered to the Platform who will receive notification
- Define Title and Body of the notification
4. Set/Actuate
You are opting for an action to be performed on a device if a rule is triggered.
- New Actuators text field will open with the list of actuators (switch/slider (count)/string) and the semantic (sub)groups they belong to
- Insert all the additional settings in the Value text field:
- Switch the actuator ON/OFF
- Send a numerical actuation value with slider (count) - its limit value is defined in device template
- Send a textual actuation value with string
Note that at this stage you can always edit the rule by adding new action(s).
- Click Save after you have completed all the sections
- The rule will be on the Rule list on the initial Rules screen
5. Make HTTP request
Make an HTTP request to execute an HTTP action on a given target URL, if a rule is triggered.
If you choose this action:
- New dialog will open with select and text fields
In Method select field choose an HTTP request method you would like to be performed.
In URL text field insert URL to a given resource.
6. Set feed status
With this option, a feed changes its status if a rule is triggered.
If you choose this action:
- New dialog will open with text and select fields
- In Search data feeds text field choose the feed you would like to set an action for
- In State select field choose status (normal, warning, error) the feed would obtain if a rule is triggered
If all the conditions are fulfilled, the Platform will perform an action.