Rules
Creating Rule
Step 1 : Click on "Create New Rule" button, enter Rule Name, select Rule Category, and choose a Device from the given list.
![Rule Home](images/rule_home.png)
Step 2 : Enter Rule Name, select Rule Category, and choose a Device.
Step 3 : The selected device appears in the left panel under "Selected Devices", and its controls are displayed on the right panel with the device name at the top.
![Rule Create Device](images/rule_create_device.png)
Step 4 : Click "When Then" from the upper controls. Drag and drop it next to the device and connect them as shown below.
![Rule When Then](images/rule_when_then.png)
Step 5 : Configure the "When Then" conditions:
- Select a parameter (e.g., Temperature, Current) from the dropdown list.
- Select an operator (e.g., equals, greater than, less than).
- Enter a numerical value to define the condition limit.
- (Optional) Add another condition by repeating steps 2 and 3 for the same parameter.
Example: If Parameter Name is Humidity, the operator is "Greater Than", and the limit is 40, the condition created is "Humidity > 40".
Creating a Rule Using Email
![Check](/images/check.png)
Click on "Email" from the control panel, drag it next to "When Then", and connect them as shown below.
![Rule Email Create](images/rule_email_create.png)
![Check](/images/check.png)
Enter your email address in the Email section.
![Check](/images/check.png)
If the conditions set in Step 5 are met, an email will be triggered.
![Check](/images/check.png)
Click "Save Changes" and then "Submit."
Find your rule under "Non-Approved Rules" and select "Approve" from the settings dropdown list on the right side of the screen.
Note: Only approved rules will run in the Rule Engine.
Creating a Rule Using Action
![Check](/images/check.png)
Click on "Action", drag it next to "When Then", and connect them as shown below.
![Rule Action Create](images/rule_action_create.png)
![Check](/images/check.png)
Select an action name from the list.
![Check](/images/check.png)
If the conditions from Step 5 are met, the selected action will be triggered.
![Check](/images/check.png)
Click "Save Changes" and then "Submit."
Find your rule under "Non-Approved Rules" and select "Approve" from the settings dropdown list on the right side of the screen.
Note : Only approved rules will run in the Rule Engine.
Using Both Email and Action
![Rule Action Email Create](images/rule_action_email_create.png)
We can combine the steps for adding Email functionality and Action functionality when creating rules to achieve both functionalities together.
Editing a Rule
![Rule Home Settings](images/rule_home_settings.png)
![Check](/images/check.png)
To edit a rule, click on "Edit" from the settings dropdown in the rule section.
![Check](/images/check.png)
Modify the required fields and settings.
![Check](/images/check.png)
Click "Save Changes" and then "Submit."
![Rule Edit](images/rule_edit_rule.png)
Deleting a Rule
To delete a Sliding Window rule, navigate to the rule settings and click on "Delete" from the settings dropdown.
Confirm the deletion when prompted. Once deleted, the rule will no longer appear in the list of active rules.
![Rule Home Settings](images/rule_home_settings.png)
Note: Deleted rules cannot be recovered.