• Docs
Show / Hide Table of Contents
  • Introduction
  • OneSense.io
    • Login
    • Home page
    • GeoConfiguration
      • Regions
      • Locations
    • Devices
      • Device Profiles
      • Devices
      • Device Config
      • Device Groups
      • Pump Controller
      • Device Anomalies
    • Dashboards
      • Dashboards
      • Dashboard Templates
    • Operations
      • Rules
      • Sliding Window Rules
      • Timer Rules
      • Snowflake Rules
      • Alerts
      • Actions
      • Device Updates
    • Assets
    • Administration
      • Users
      • Roles
      • Subscription
      • Settings
  • OneSense BLE Application
    • OneSense BLE App
  • OneSense Monitoring Station
    • Assembly Guide

Sliding Window Rule


Creating Sliding Window Rule


Alt Text
Step 1 :Open the Rules section from Operations component in the sidebar. Click on Create New Rule button.

Alt Text


Alt Text
Step 2 : Give Rule Name, select Rule Category and Select Device.
Alt Text
Step 3 : Now you’ll get the Device control for the device which you have selected from the list on the left side of the screen.

Alt Text


Alt Text
Step 4 : Click on the 'Sliding Window' module and connect it to the selected Device as shown below.

Alt Text


Alt Text
Step 5 : In the Sliding Window module, specify the time period in the input box provided (e.g., '10m' for 10 minutes). During this time period, data is accumulated, and the rule fires only if the average of the accumulated values exceeds the defined threshold.
  1. Select parameter name (like Temperature, Current, etc.) from the dropdown list.
  2. Select an operator (like equals, greater than, less than, etc.) from the dropdown list.
  3. Specify the threshold value to define the limits for the selected operator.

Example: If Parameter Name is Humidity, the operator is Greater Than, and the limit is 40, the condition created is "Humidity > 40".

Note: You can also define multiple conditions. For example, to set a range, you could create conditions like Humidity > 40 and Humidity < 60,="" which="" will="" be="" interpreted="" as="" humidity="" between="" 40="" and="" 60.="">

Creating Rule using Email


Alt Text Click on Email from the above controls, and place it besides "Sliding Window" and connect them from Sliding Window’s output, "Then" terminal to Email’s input's "Then" terminal as shown below.


Alt Text


Alt Text In Email section give your Email id.

Alt Text Now if Conditions(given in 5th step) are met you will receive an Email.

Alt Text Now click on the Save Changes button And then click on submit button.

You will be redirected to 1st step, click on Non Approved Rules and find your rule and Select Approve from the setting drop down list on the right side of the screen.


Creating Rule using Action


Alt Text Click on Action from the above controls, and place it besides "Sliding Window" and connect them from Sliding Window’s output "Then" terminal to Action’s input "Then" terminal as shown below.


Alt Text


Alt Text In Action select an Action name from the list.

Alt Text Now if conditions (given in 5th step) are met that Action will be called.

Alt Text Now click on the Save Changes button and then click on submit button.

You will be redirected to 1st step, click on Non Approved Rules and find your rule and Select Approve from the setting dropdown list on the right side of the screen.


Using both Email and Action



Alt Text


We can combine the steps for adding Email functionality and Action functionality when creating rules to achieve both functionalities together.


Updating Sliding Window Rule



Alt Text


Alt Text To update a Sliding Window rule, click on "Edit" from the settings dropdown to access the rule settings.

Alt Text The window that appears allows you to make the necessary modifications.

Alt Text Enter the updated rule name in the designated field.

Alt Text Select the appropriate rule category and device from the provided lists.

Alt Text Adjust the time period or conditions in the Sliding Window module as needed.

Alt Text After making the desired changes, click on the "Save changes" button to save the updated rule settings. Once you have saved the changes, click on the "Submit" button to finalize and apply the updated rule.

Find your rule under "Non-Approved Rules" and select "Approve" from the settings dropdown list on the right side of the screen.


Alt Text


Deleting Sliding Window Rule


Alt Text To delete a Sliding Window rule, navigate to the rule settings and click on "Delete" from the settings dropdown.

Alt Text Confirm the deletion when prompted. Once deleted, the rule will no longer appear in the list of active rules.


Note


Note: Only approved rules will run in the RuleEngine. Ensure all rules are reviewed and approved before deployment.

Previous
Rules
Next
Timer Rules