IOT SOFTWARE PLATFORM DOCS

Table of Contents

  • Onboarding
  • Devices Manager
  • Assets Manager
  • Account Manager
  • Tutorials - How To?
  • Smart Solutions
  • LoRaWAN
  • Concepts & Terminology
  • Mobile App
  • Release Notes
  • Integrated LNS
  • APIs
  • dokuwiki
  • Live Demo
IOT SOFTWARE PLATFORM DOCS
You are here: Welcome ! » Devices Manager » Rules
Trace: • Rules

Rules

The Rules module allows the configuration of the Rules Engine, in charge of processing events and triggering alerts.

There are 6 types of Rules:

  • Measurement: the most frequently used one. It allows to trigger alerts based on the content of measurements (payloads) received from Devices (or Assets to which devices are attached). Those alerts are generated in real time.
  • Scheduled : To assess a situation at regular intervals.
  • Timeout: for the trigger of alerts based on device timeout (no data received for 24hours, or for the <timeout> value set in the rule settings). These rules are assessed on a quarter-hourly basis.
  • Geofencing: alerts related to geographical areas (sites)
  • User notes: not really an alert trigger. A template for User Notes.
  • System: trigger alerts when some errors are detected in the Agent.

As for most modules, the creation of a rule is done by pressing the “Add” button at the top/right of the screen.

Meta Data

Every rule is defined by a name and a type (see above). Meta data like Category and Level are just there to help you categorize them. This categorization can be used, for example, to:

  • filter alerts in a Dashboard (using the Journal widget)
  • see the list of alerts in the Journal panel for the device, smart device or asset causing the alert.
  • filter alerts in the Alerts module.
  • filter alerts sent by email in the Scheduled Report module.

Tags defined in a rule will be automatically added to all related alerts.

Only Active Rules can generate Alerts.

"Measurement" Rules

The conditions that will be evaluated before triggering an alert are defined in the Condition tab. The concept is to define a condition (“a logical string”), written using variables (that represent measurement data from devices/assets), and to define whether to trigger an alert of not when the evaluation of this condition is true or false.

You can decide when the Alert will be triggered:

  • The formula goes to true once. If the same condition occurs next time, no new alert will be triggered
  • The formula goes to false once. If the same condition occurs next time, no new alert will be triggered
  • Every time the formula goes to true.
  • Every time the formula goes to false.

Message Configure the message content of the alert that will be generated.

Variables Variables are the data that will be used in the formula. Variables can be Device measures, Asset measure, Static List measure. Devices or Assets can be explicitly referenced. But you can also write a Formula that will be valid for a set of Devices or Assets (sharing identical measures), by using tags.

If you use a tag (see screenshot here above), you will see that the live result of the evaluation (below the formula) will show you multiple answers (one for each device/asset referenced by the tag).

Formula The formula is a mathematical expression that combines the variables and must return a Boolean value.

Rules on multiple Assets, Devices or Smart Devices

Rules can be configured based on tags. Adding the same tag to multiple Devices, Assets or Smart Devices allows a dynamic grouping of them. You may then configure a rule based on a tag. This rule will be triggered when measurements are received for any item of this group.

When defining the rule, add a variable linked to an object “Tags”, specify the tag, then the measurement (a list of all common measurements, available in all items with the specified tag, will be displayed).

Write your formula as described in chapters above.

More info on tags: About Tags

"Scheduled" Rules

To assess a situation at regular intervals, you can utilize “scheduled” rules. These rules allow you to specify:

  • The starting time
  • The days

You can then set the conditions for generating alerts. However, since the evaluation is scheduled and not triggered by an input, you must designate which input serves as the context by selecting it.

The context is used to customize the message and to determine who or what generated the alerts. Consequently, the alert can be displayed in the journal of the associated context.

"Timeout" Rules

All objects monitored by the timeout rules will be evaluated every quarter of an hour. An alert is generated when the time elapses between the timestamp of the last event (measurement or log) and the timeout value.

The conditions that will be evaluated before an alert is triggered are defined in the Condition tab.

  • You can decide when the alert is triggered: Once true, Once false, Each true or Each false.
  • You can activate the option to automatically acknowledge previous alerts when the condition evaluation returns to normal.
  • Write a custom alert message.
  • Variables can be devices, smart devices or agents that will be monitored. You can select one or more objects or define a set of objects using tag selection.
  • The delay is the time in minutes after which the condition becomes true again.

"Geofencing" rules

All objects monitored by the geofencing rules will be evaluated according to their position in relation to a geographical area (site). An alert is generated when the position crosses the perimeter of a site, or is inside or outside the site.

The site is part of the meta data of the geofencing rule and has to be selected at the creation of the rule.

The conditions that will be evaluated before an alert is triggered are defined in the Condition tab.

  • You can decide when the alert is triggered: Once in, Once out, While in or While out.
  • You can activate the option to automatically acknowledge previous alerts when the condition evaluation returns to normal.
  • Write a custom alert message.
  • Variables can be devices, smart devices or agents that will be monitored. You can select one or more objects or define a set of objects using tag selection. The object must have a position in its measurements.

"User Notes" rules

In order to attach Notes and Tasks to Assets or Devices, you must create a Rule (source: UserNote). Once this rule is created and active, a button “add Note” will appear in the Asset and Device “Journal” tab.

Steps:

  • Press the <Add> button (upper right)
  • Enter a name (it will be the type of Note / Task)
  • Source: “User note”
  • Choose a Level and Category
  • <Save>

Downlinks

A downlink command can be sent to devices when an alarm is generated.

The Downlink tabs allow you to configure the downlink to be sent.

  • The ‘Active’ option toggles the sending of the downlink to the device.
  • The device is the device to which the downlink command will be sent.
  • The port and payload must comply with the technical specifications for the device type.

If you have already registered a downlink command for this device type, you can select it.

History

All alerts generated by the rule are recorded in the History tab. By default, the alerts displayed are those that have not yet been read or acknowledged. You can change the filter setting by clicking on the gear icon or by changing the time interval.

Each alert message tells you the time the alert is created, the name of the rule, the object which triggered the rule, the body of the message and the tags.

By clicking on the icons, you can mark the alert as read, acknowledge it or view the details of the alert.

Alerts can be 'acknowledged' by the system if automatic acknowledgement is set or the rule is updated.

Previous Next