Rules
Last updated
Was this helpful?
Last updated
Was this helpful?
Rules are a powerful feature that can make automation via the Enteprise platform very easy. They are intuitive to use and configuration is done directly from the GUI in a browser window, same way any other Enterprise features are utilised.
You can have one or multiple rules and control a single or many devices in order to create an automated structure that will not only save you time, but also keep you updated with important events in your building.
Navigate to the main building view and click on the "Rules" button, it is in the top panel, right below the weather info.
You will see the main rule creation window that appear if you have no rules created. Create a new rule via one of the two buttons (the lower one will not be available once you have your first rule).
Give you rule a "Name", the "Description" is optional. Once you click on the "Create" button your new rule will be brought into existence.
You still need to configure the rule itself though, so lets begin.
To start off you need a "Trigger" for any rule, which is the actual device that will be observed and acted upon.
Press on the "Add trigger" button and a window with a table will open. All devices that are currently in the building will be listed on the left.
You can select as many trigger devices as you like via the check boxes, once done press on the right arrow to move them to the other side of the table.
For simplicity we are going to use only 1 device for this example.
As the device is now in the right table you can go ahead and "Save".
This will close the table and the trigger device will pop up in the main rule window view.
Since this is your first device a Field widget will pop up next to it. It represent a property of the device that will be monitored for change in order to trigger the rule.
As you can have many devices and many field (you can add more with the "Add field" button below the first field). You need to associate the trigger device with the field.
Press on either of the purple dots and drag the line to the other (left to right or vice versa). Refer to the image below.
Once you connect the trigger and the field you see the connection line and an "x" symbol in the middle of it which you can click on if you want to sever the connection and associate the field with another device.
As your field now is connected to the trigger device you can go ahead and select a field value via the drop down menu. Press on it and the following window will pop up with a number of values.
Let's select the Energy field for this example and move to creating an Condition for it
A condition is the actual trigger of the rule. It is what governs what change in the field value is considered as a call to action.
A example would best explain how conditions work, so lets go through one. Each field is selected in order:
If - select Field 1 (Energy) this should be your only option
is - select more than
to - Const (this will let you enter a constant value), enter 10 000
If you have followed the example correctly you will end up with a condition as the one in the image below.
Set up in this way an action will be triggered if the Energy is more than a constant value of 10000W (10kW).
What the result of this triggered even will be is determined by the "Action"
Similarly to the other elements you can add one or more actions via the "Add action" button.
At the time of writing this document there are 3 options available:
Send notification via email
Send downlink
Webhook
Let's start with the simplest action, getting a notification email. Press on the "Add action" button and select the "Send notification" option
The action widget will pop up, where you need to connect it to the condition we set up in the previous step (the connection is done in a similar way to the one between the trigger and field). Refer to the image below.
Now you need to configure the actual Email you want to receive. You need to enter:
Recipient - add as many as you want via the blue button (refer to the image below)
Email - the body of the message itself, you can enter any text you want manually
You can also use a neat feature that is to auto populate the email with a field value from a device in your building, this can be any device, even one that is not participating in this rule.
For the sake of simplicity we are going to select the same 16ASPM device we are using as the trigger and select the Energy value in order to get the exact reading at the time of sending the email. This will add a piece of code to the body of the email that will extract the value (the blue box in the image below).
If you have followed the instructions the Send Email action should look more or less like the one in the image below.
Your rule is now all set up and the only thing left is to "Save" it. If you have made no configuration changes and there are no unused or unconfigured blocks you will be notified by a green "Rule updated successfully" message at the tip right corner above the "Save" button.
This mean your rule is not in effect and as soon as a condition for a field assigned to a trigger devices is met you will receive the result of the associated action.
In our case if the accumulated energy by the relay exceeds 10kW an email notification will be send with a custom text message and the exact value of the measured energy.