• 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

Timer Rule


Creating Timer Rules


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.

Rule Create Device


Note: These three steps are common for creating any Timer rule. Remaining steps are provided seperately for each type of Timer rule.

Cron Expression Details


After selecting the Timer type, fill in the following Cron Expression fields with the below description in mind:

Field Name Description Example
Seconds Specify the second at which the rule should fire 0
Minutes Specify the minute at which the rule should fire 15
Hours Specify the hour at which the rule should fire 10
Day of Month Specify the day of the month for firing the rule 1,15
Month Specify the month for firing the rule * (every month)
Day of Week Specify the day of the week for firing the rule MON,FRI (Monday and Friday)

Example: `0 15 10 1,15 * MON,FRI` — This means the rule will fire at 10:15 AM on the 1st and 15th day of every month, on Monday and Friday.


Timer Rule (Without Condition)


Alt Text
Step 4 : Select the Timer Control and connect it to the Device Control as shown below. Select Timer Rule from the dropdown list.

Timer Control Connected to Device


Alt Text
Step 5 : Select any Action Control (Email, SMS, Call, or Action) for the action to be performed when the timer fires as shown below.

Action Module Selection


Alt Text
Step 6 : Click the Save Changes button and then the Submit button.


Parameter Based Timer Rule


Alt Text
Step 4 : Select the Timer Control and connect it to the Device Control. Select Timer Rule with Parameter-based Condition from the dropdown list shown in Timer control.

Timer Control Connected to Device - Parameter Rule


Alt Text
Step 5 : Select the When Then Control and connect it to the Timer Control.

When Then Connected


Alt Text
Step 6 : Configure the When Then Control:
  1. Select a Parameter Name (e.g., Temperature, Current, etc.) from the dropdown.
  2. Select an Operator (e.g., equals, greater than, less than, etc.).
  3. Specify the Threshold Value for the condition.

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 <>, which will be interpreted as Humidity between 40 and 60.

Alt Text
Step 7 : Select any Action Control (Email, SMS, Call, or Action) for the action to be performed when the condition is met.

Action Module Parameter Rule


Alt Text
Step 8 : Click Save Changes and then Submit.


Device Status Alert Rule


Alt Text
Step 4 : Select the Timer Control and connect it to the Device Control. From the dropdown list inside the Timer Control, select the option Device Status Alert Rule.

Device Status Alert Rule Selection


Alt Text
Step 5 : Select the Action Control (Email, SMS, Call, or Action) to send an alert when the device goes offline.

Action Module Device Alert


Alt Text
Step 6 : Click Save Changes and Submit.

Note: Once you click 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. Only approved rules will run in the RuleEngine. Ensure all rules are reviewed and approved before deployment.


Managing Timer Rules


Creating Rule using Email


Alt Text
Click on Email from the above controls, and place it beside Timer Control and connect them from Timer’s output Then terminal to Email Control’s input Then terminal as shown below.

Alt Text


Alt Text In the Email section, provide your Email ID.

Alt Text Now, whenever the timer condition matches, 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 Step 1. Click on Non Approved Rules and find your rule and select Approve from the settings dropdown list on the right side of the screen.


Note: Instead of Timer Control, we can connect Email control with When Then control if we are creating Parameter based Timer Rule.

Creating Rule using Action



Alt Text
Click on Action from the above controls, and place it beside Timer Control and connect them from Timer’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, whenever the timer condition matches, that Action will be triggered.

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

You will be redirected to Step 1. Click on Non Approved Rules and find your rule and select Approve from the settings dropdown list on the right side of the screen.


Note: Instead of Timer Control, we can connect Action control with When Then control if we are creating Parameter based Timer Rule.

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 Timer Rule



Alt Text


Alt Text To update a Timer 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 timer or conditions 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 Timer Rule


Alt Text To delete a Timer 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.


Previous
Sliding Window Rules
Next
Snowflake Rules