Difference between revisions of "V2/Concepts/Expression"

From Senfi Docs
Jump to: navigation, search
 
(38 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
<h1 class="main-heading">Expression</h1>
 
<h1 class="main-heading">Expression</h1>
  
User can make use of Senfi's flexible autonomous intelligence engine to be alerted of abnormality in the system they are monitoring.
+
User can make use of Senfi's flexible autonomous workflow engine to be alerted of abnormality in the system they are monitoring.
  
<translate>
 
 
As introduced, an '''Expression''' is a tool that you can use to monitor your assets and be notified of abnormal situations or events. You can configure an expression to trigger an event to send email or notify your operators in the Digital Twin. Examples of use cases include: a fire is detected in a building, a lift has broken down, or when a machine is overdue for maintenance. Expression editor is the tool you can use to configure these conditions.
 
As introduced, an '''Expression''' is a tool that you can use to monitor your assets and be notified of abnormal situations or events. You can configure an expression to trigger an event to send email or notify your operators in the Digital Twin. Examples of use cases include: a fire is detected in a building, a lift has broken down, or when a machine is overdue for maintenance. Expression editor is the tool you can use to configure these conditions.
  
Line 14: Line 13:
  
 
'''Inputs''' are evaluated by '''Conditions''' to generate a single '''Result'''.
 
'''Inputs''' are evaluated by '''Conditions''' to generate a single '''Result'''.
When value of '''Result''' changes (from False to True or True to False), an '''Event''' can be triggered. '''Actions''' defined in the Event such as email and Digital Twin alerts, are executed when the Event is triggered.  
+
When value of '''Result''' changes (from False to True or True to False), an '''Event''' can be triggered. '''Actions''' defined in the Event such as notifications and commands, are executed when the Event is triggered.  
 
'''Expression execution type''' allows you to configure how the Expression is executed. e.g: how often the '''Expression''' is evaluated, whether it's immediate or on poll.
 
'''Expression execution type''' allows you to configure how the Expression is executed. e.g: how often the '''Expression''' is evaluated, whether it's immediate or on poll.
  
Line 22: Line 21:
  
 
== Example ==
 
== Example ==
Using our Smart Weighing Scale measurement from earlier, we can form one simple rule as follows:
+
Using our Smart Weighing Scale measurement from earlier, we can form one simple Expression as follows:
 
* Input: <tt>iot_weighingscale_v1.battery_level</tt>
 
* Input: <tt>iot_weighingscale_v1.battery_level</tt>
 
* Condition: < 20
 
* Condition: < 20
* Event: ''Email reminder to replace battery''
+
* Event: ''Battery level low''
* Expression execution option: Immediately (means evaluate this rule whenever there is any incoming measurement)
+
* Event action: ''Send email notification to remind changing of battery''
 +
* Expression execution type: Immediate (means evaluate this rule whenever there is any incoming measurement)
  
== Inputs, Conditions and Result == <!--T:7-->
+
== Inputs, Conditions and Result ==
  
<!--T:8-->
+
Before adding an Expression, you should already have an Event or situation that you wish to be notified about. The Event or situation should be one that can be detected by monitoring data received by Senfi.
Before adding a Rule, you should already have an event or situation that you wish to be notified about. The event or situation should be one that can be detected by monitoring data received by Senfi.
 
  
<!--T:9-->
+
[[File:Concepts_Automation_Expression.png|800px|center|link=]]
Select, as '''Inputs''', the '''Metrics''' and '''Measurements''' from which the event or situation can be detected from. Then, [[#Constructing_Condition|construct the set of '''Conditions''']] that will evaluate to true when event or situation occurs. The result of said '''Conditions''' is the '''Result''' of the Rule.
 
  
== Actions == <!--T:10-->
 
Whenever '''Result''' changes (from true to false and vice versa), '''Actions''' may be executed. '''Actions''' includes sending an email, request to a webhook or triggering an alert in the dashboard.
 
  
=== Content of Actions === <!--T:11-->
+
Select [[V2/CMS_Tutorial/User_Tools/Creating_Content/Automation/Expression/Node#Asset|'''Assets''']] as '''Inputs''', from which the '''Measurements''', [[V2/CMS_Tutorial/User_Tools/Creating_Content/Automation/Expression/Node#Metric|'''Metrics''']], [[V2/CMS_Tutorial/User_Tools/Creating_Content/Automation/Expression/Node#Location|'''Location''']] and [[V2/CMS_Tutorial/User_Tools/Creating_Content/Automation/Expression/Node#Attribute|'''Attribute''']] can be used to detect an Event or situation. Then, [[V2/CMS_Tutorial/User_Tools/Creating_Content/Automation/Expression|construct the set of '''Conditions''']] from [[V2/CMS_Tutorial/User_Tools/Creating_Content/Automation/Expression/Node#Data_Transformation|data transformation]] or [[V2/CMS_Tutorial/User_Tools/Creating_Content/Automation/Expression/Node#Logic|logic]] functions. The set of Conditions will evaluate from false to true or true to false when Event or situation occurs. The result of said '''Conditions''' is the [[V2/CMS_Tutorial/User_Tools/Creating_Content/Automation/Expression/Node#Result|'''Result''']] of the Expression. Whenever '''Result''' changes (from true to false and vice versa), [[V2/CMS_Tutorial/User_Tools/Creating_Content/Automation/Expression/Node#Event|'''Events''']] may be triggered.
Depending on the '''Action''', different content options are available. Some examples is the title & body of an email, and body content for webhook request. You will be able to describe the event or situation that has happened to the recipient of the notification in the content of an '''Action'''
 
  
<!--T:12-->
+
== Expression Execution Options ==
To further aid you in describing the event, you can embed the value or tag of an '''Input''' metric in the content of an '''Action'''. You can also embed the Rule's [[#Name_and_Description|Name, Description]] and [[#Severity|Severity]] in the content of an '''Action'''.
+
By setting '''Type''' to '''Immediate''' or '''Polling''', you can choose to execute an Expression when new values are received for any Input Measurements, or periodically, regardless of whether any Input Measurements have changed.
  
<!--T:13-->
+
If Expression is set to run periodically ('''Polling'''), you must specify how often the Expression is executed by setting '''Intervals''' in seconds.
To embed:
 
* metric's value, use <tt>${<measurement_code>.<metric_code>}</tt>. e.g: <tt>${iot_temperature_sensor_v1.temperature}</tt>
 
* metric's tag, use <tt>${<measurement_code>.<tag>}</tt>. e.g: <tt>${iot_temperature_sensor_v1.site_id}</tt>
 
* Rule's name, use <tt>${NAME}</tt>.
 
* Rule's description, use <tt>${DESCRIPTION}</tt>.
 
* Rule's severity, use <tt>${SEVERITY}</tt>.
 
  
<!--T:14-->
+
== Expression Editor ==
<div class="important">Note: embedding Rule's name, description and severity is case sensitive. You must use all capital letters.</div>
+
Expressions are defined using the Expression Editor. The Expression Editor is a graph-based '''Drag & Drop''' editor. [[File:Expression_editor.png|thumb|center|600px|Expression Editor|link=]]
  
<!--T:15-->
+
Arrows '''coming in''' from the '''left''' of a node indicate its '''input''' and those '''going out''' from its '''right''' indicate its '''output'''. [[File:Expression_input_output.png|thumb|center|600px|Input & Output of a Node|link=]]
Take a look at [[#Detailed_Example | this more detailed example]].
 
  
== Rule execution options == <!--T:16-->
+
Each Node falls into one of the following categories:
By setting '''Evaluate Type''' to '''Immediate''' or '''Polling''', you can choose to execute a Rule when new values are received for any Input Measurements, or periodically, regardless of whether any Input Measurements have changed.
+
* Asset Identifier
 +
* Input  
 +
* Data Transformation
 +
* Logic
 +
* Result
 +
* Event
  
<!--T:17-->
+
Data '''originates''' from '''Metric''' nodes, is '''transformed''' by '''Data Transformation and/or Logic''' nodes, and eventually '''consumed''' by '''Result & Event''' nodes.
If Rule is set to run periodically ('''Polling'''), you must specify how often a Rule is executed by setting '''Intervals''' in seconds.
 
  
== Misc == <!--T:18-->
 
=== Name and Description ===
 
A Rule also has a Name and Description. The Name and Description allows you to describe the event or situation that the Rule detects, such that recipients of the Rule's alert/notification knows exactly what happened and is able to react to it accordingly.
 
* The Rule's Name is displayed in the CMS' list of Rules.
 
* The Rule's Name and Description is displayed in the Dashboard.
 
 
<!--T:19-->
 
You can also embed the value or tag of '''Input''' metrics in the Description. The syntax is the same as embedding in the content of an '''Action''', as described [[#Content_of_Actions|here]].
 
 
<!--T:20-->
 
Description is also the default content of an '''Action'''. You can describe the event or situation once in the Description, and reuse the information in all the Actions of the Rule.
 
 
=== Severity === <!--T:21-->
 
You can also set the severity of the Rule. Default severity is '''Critical'''. Severity allows users of the Dashboard to filter '''Alerts''' by severity and attend to more severe '''Alerts''' first.
 
 
== Detailed Example == <!--T:22-->
 
The event that you would like to be notified about is potential fire in a building.
 
There are temperature sensors throughout the building. When a reading from any temperature sensor exceeds 60°C, a fire has probably broken out near the sensor.
 
You would like to be notified by email of such an occurrence.
 
 
<!--T:23-->
 
* The '''Input''' in this example would be the metric and measurement that readings from temperature sensor is sent to. e.g: <tt>iot_temperature_sensor_v1.temperature</tt>
 
* '''Condition''' is <tt>iot_temperature_sensor_v1.temperature > 60</tt>
 
* '''Action''' is email, with body text:
 
:<tt>"Potential fire detected in room: ${iot_temperature_sensor_v1.room}. Temperature in the room is ${iot_temperature_sensor_v1.temperature}°C"</tt>
 
 
<!--T:24-->
 
With the above '''Rule''' configured, when <tt>iot_temperature_sensor.temperature</tt> goes from 59 to 61, an email will be sent with the body text:
 
:"Potential fire detected in room: #03-00. Temperature in the room is 61°C"
 
 
<!--T:25-->
 
Note: "room" is a Tag of the <tt>iot_temperature_sensor_v1</tt> measurement that indicates which room the sensor is in.
 
 
== Constructing Condition == <!--T:26-->
 
This section will guide you to construct a condition using the Rule Editor when adding/editing a Rule in the CMS. The objective here is to tell Senfi how to detect the event or situation that you wish to be notified of.
 
[[File:rule_editor.png|thumb|Rule Editor|link=]]
 
The Rule Editor is a graph based "Drag and Drop" editor. Each node in the Editor represents either an '''Input''', Data Transformation, Logic, or an '''Action'''. Arrows are used to link the nodes and control the flow of data between nodes.
 
[[File:rule_editor_input_output_arrows.png|thumb|Input & Output of a node|link=]]
 
'''Arrows coming into the left of a node indicates the node's input, <br>and arrows going out the right of a node indicates the node's output'''.
 
 
<!--T:27-->
 
The graph must always start from '''Input''' nodes and ends in the '''Result''' or '''Action''' nodes (Data originates from '''Input''' nodes, is transformed by Data Transformation, Logic nodes, and is consumed by '''Result''' & '''Action''' nodes).
 
 
<!--T:28-->
 
 
;'''Input''' nodes
 
;'''Input''' nodes
 
:'''Metric''' - outputs the value/s of a metric. can be set to output the last known value, or a range of historical values
 
:'''Metric''' - outputs the value/s of a metric. can be set to output the last known value, or a range of historical values
Line 119: Line 67:
 
:'''Function''' - value-wise transformation. Transform each value, e.g ABS, Floor, Round etc. Can be used after a Metric node and before a Compare node. Outputs the same number of values as its input.
 
:'''Function''' - value-wise transformation. Transform each value, e.g ABS, Floor, Round etc. Can be used after a Metric node and before a Compare node. Outputs the same number of values as its input.
 
;Result node
 
;Result node
:'''Result''' - '''Result''' node. Must have 1 and only 1 node. Specifies the '''Result''' of a '''Rule'''
+
:'''Result''' - '''Result''' node. Specifies the '''Result''' of an '''Expression'''. Result can be False to True or True to False.
;Action nodes
+
;Event nodes
:'''Action''' - '''Action''' node. Input must always be from the "Result" node. Can have 0 or more "Action" nodes. Instructs Senfi to do something when '''Result''' changes.
+
:'''Event''' - '''Event''' node. Input must always be from the "Result" node. Can have 0 or more "Event" nodes. Instructs Senfi to do something when '''Result''' changes. Event Input Data is passed on to the related Event.
  
=== Basic Steps === <!--T:29-->
+
=== Expression Nodes ===  
 +
Each node contains attributes & options which you can modify. To modify the attributes of a node, click on the node and a window will popup to allow you to configure the node.
  
<!--T:30-->
+
See [[V2/CMS_Tutorial/User_Tools/Creating_Content/Automation/Expression/Node|Node Type]] for more information about each Node Type.
# Drag a node above working area into the working area to create a node.
 
# Create "Metric" nodes, one for each '''Input''' metric.
 
# Select the correct measurement and metric for each "Metric" node. Read: [[#Configuring_Nodes|how to configure a node]]
 
# (Optional) If you need to compare metric value against a constant value, use the "Constant" node.
 
# Create "Operator" and "Logic" nodes to construct necessary logic
 
#* logic graph should output a single boolean (true or false) value
 
#* output from "Metric" node must go to input of a "Operator" node.
 
#* "Operator" and "Logic" nodes can be nested.
 
#* You can attach more than 2 inputs to a "Logic" node
 
# Create a "Result" node and attach output of logic graph as its input
 
# Create "Action" nodes, one for each desired '''Action''' and attach output of "Result" node as its input
 
# Save when done
 
  
=== Example === <!--T:31-->
+
=== Example of Expression ===
[[File:rule_editor_example.png|center|Example 1|thumb|700px|link=]]
+
[[File:Concepts_Automation_Expression_Example1.png|center|Example 1|thumb|799px|link=]]
Example 1: A simple Rule detecting when a Lift has tripped (safetyTrip == 1).
+
Example 1: A simple Expression detecting when a Lift has tripped (safetyTrip == 1).
[[File:rule_editor_example2.png|center|Example 2|thumb|700px|link=]]
+
[[File:Concepts_Automation_Expression_Example2.png|center|Example 2|thumb|799px|link=]]
 
Example 2: Detects when a Lift tripped (safetyTrip == 1), AND passengers are trapped in the Lift (load > 0)
 
Example 2: Detects when a Lift tripped (safetyTrip == 1), AND passengers are trapped in the Lift (load > 0)
  
=== Working with historical values === <!--T:32-->
+
=== Working with historical values ===
 
When historical values is required to detect an event, the "Range", "Filter" and "Aggregate" nodes are needed.
 
When historical values is required to detect an event, the "Range", "Filter" and "Aggregate" nodes are needed.
  
<!--T:33-->
+
By default, a "Metric" node will output the Last Known value of the metric. To obtain historical values of a metric, select "Range value of" for "Metric" node type.  
By default, a "Metric" node will output the Last Known value of the metric. To obtain historical values of a metric, attach the output of "Metric" node to the input of a "Range" node. The output of the "Range" node will be historical values from the metric.
 
  
<!--T:34-->
+
The configuration options of the "Range value" type allows you to change the range of historical values to output. E.g: You can configure it to output metric values from 1 hour ago till now, or the last 10 received metric values.
The configuration options of the "Range" node allows you to change the range of historical values to output. E.g: You can configure it to output metric values from 1 hour ago till now, or the last 10 received metric values.
 
  
<!--T:35-->
 
 
After obtaining the list of historical values, you can:
 
After obtaining the list of historical values, you can:
 
* Filter the list using the "Filter" node.  
 
* Filter the list using the "Filter" node.  
Line 160: Line 94:
 
The "Filter" and "Function" nodes can be nested.
 
The "Filter" and "Function" nodes can be nested.
  
<!--T:36-->
+
Finally, the list of historical values must be aggregated using the "Aggregate" node before its output can be used by a "Logic" or "Compare" node.
Finally, the list of historical values must be aggregated using the "Aggregate" node before its output can be used by a "Logic" or "Operator" node.
 
 
 
=== Example using historical values === <!--T:37-->
 
[[File:rule_editor_example_historical.png|center|Historical Example 1|thumb|700px|link=]]
 
The example above detects when a Lift is stopped at Level 2 for over a minute.
 
 
 
=== Configuring Nodes === <!--T:38-->
 
Each node contains attributes & options which you can modify. To modify the attributes of a node, move your mouse over the node and click on the "Gear" button that appears near the top right corner of the node (Beside the "X" button). A window will popup to allow you to configure the node.
 
 
 
==== Aggregate node ==== <!--T:39-->
 
This section explains what each of the options for "Aggregate" node does.
 
;sum
 
:the sum of all input values
 
;count
 
:the number of input values
 
;average
 
:the average of input values
 
;median
 
:the median value of input values
 
;max
 
:the largest value
 
;min
 
:the smallest value
 
;mode
 
:the value that appears most often
 
;range
 
:the difference between the largest and smallest value (max - min)
 
;stddev
 
:[https://en.wikipedia.org/wiki/Standard_deviation standard deviation]
 
;percentile
 
:[https://en.wikipedia.org/wiki/Percentile percentile]. This option accepts an additional "Percentile Value" parameter.
 
;every
 
:outputs true if every value fulfills the condition. This option accepts an additional "Condition" parameter.
 
;any
 
:outputs true if at least 1 value fulfills the condition. This option accepts an additional "Condition" parameter.
 
 
 
==== Function node ==== <!--T:40-->
 
This section explains what each of the options in "Function" node does.
 
;abs
 
:absolute value
 
;round
 
:round to nearest integer
 
;ceil
 
:round up
 
;floor
 
:round down
 
;map
 
:This option accepts an additional "function" parameter. Using the custom "function" parameter, transforms each input value
 
 
 
<!--T:41-->
 
<span class="right">[[Computed_measurement|Next: Computed Measurement]]</span>
 
 
 
</translate>
 
  
=== Pre-requisites === <!--T:1-->
+
=== Example using historical values ===
A rule requires design and logical programing in order for it to work correctly. If this is your first time creating a rule, please read [[Rule|this guide]] first.
+
[[File:Concepts_Automation_Expression_Example3.png|center|Historical Example 1|thumb|800px|link=]]
 +
The example above detects when the average return air temperature for an air-conditioner is more than 21°C for over a minute.
  
<!--T:2-->
+
=== Points to note when working with data ===
You should also be familiar with the basic [[Measurement|measurements]] and its concepts. Please read [[Concepts#Measurement.2C_Metric.2C_Tag|this section]] if you require a refresher.
+
* Expression will evaluate using available data, even if data is not available for the full range that was specified. E.g. for an expression to use the average of the past 5 minutes data, if only 1 minute of data is available, then instead of waiting until 5 minutes of past data are available, the 1 minute data is used to evaluate the expression.
 +
* The most recently received data may not be used in the range for expression that uses immediate execution type.
 +
* For expression of "immediate" execution type, after the expression is modified, it is not immediately re-evaluated, and is only re-evaluated when new data arrives.
  
<!--T:3-->
+
==== What's Next ====
You should
+
-----
* Know what event the Rule should detect.
+
* [[V2/Concepts/Preparing for Expression Creation|What is needed to create an Expression]]
* Know what you would like Senfi to do ('''Action''') when the event is detected
+
* Start [[V2/CMS_Tutorial/User_Tools/Creating_Content/Automation/Expression|creating your own Expression]]
* Have already created the '''Input''' measurement & metrics.
+
* Learn about [[V2/Concepts/Event|Event]]
* Know the thresholds or values which indicates occurrence of event.
+
* Learn about [[V2/Concepts/Alarm|Alarm]]
* Be able to send records to '''Input''' measurement & metric.
 
* (Optional) Be able to send simulated records to '''Input''' measurement & metric (to simulate occurrence of event or situation)
 

Latest revision as of 14:49, 29 November 2022

Expression

User can make use of Senfi's flexible autonomous workflow engine to be alerted of abnormality in the system they are monitoring.

As introduced, an Expression is a tool that you can use to monitor your assets and be notified of abnormal situations or events. You can configure an expression to trigger an event to send email or notify your operators in the Digital Twin. Examples of use cases include: a fire is detected in a building, a lift has broken down, or when a machine is overdue for maintenance. Expression editor is the tool you can use to configure these conditions.

An Expression in Senfi comprises of:

  • Inputs - Assets, Metric & Tag values
  • Conditions - Data transformation and/or logic
  • Result - False to True / True to False
  • Event - Trigger Event when Result changes. e.g. fire detected
  • Expression execution type - Configures when a Expression is evaluated

Inputs are evaluated by Conditions to generate a single Result. When value of Result changes (from False to True or True to False), an Event can be triggered. Actions defined in the Event such as notifications and commands, are executed when the Event is triggered. Expression execution type allows you to configure how the Expression is executed. e.g: how often the Expression is evaluated, whether it's immediate or on poll.

Inputs --> Conditions --> Result

Result Changed --> Event --> Actions

Example

Using our Smart Weighing Scale measurement from earlier, we can form one simple Expression as follows:

  • Input: iot_weighingscale_v1.battery_level
  • Condition: < 20
  • Event: Battery level low
  • Event action: Send email notification to remind changing of battery
  • Expression execution type: Immediate (means evaluate this rule whenever there is any incoming measurement)

Inputs, Conditions and Result

Before adding an Expression, you should already have an Event or situation that you wish to be notified about. The Event or situation should be one that can be detected by monitoring data received by Senfi.

Concepts Automation Expression.png


Select Assets as Inputs, from which the Measurements, Metrics, Location and Attribute can be used to detect an Event or situation. Then, construct the set of Conditions from data transformation or logic functions. The set of Conditions will evaluate from false to true or true to false when Event or situation occurs. The result of said Conditions is the Result of the Expression. Whenever Result changes (from true to false and vice versa), Events may be triggered.

Expression Execution Options

By setting Type to Immediate or Polling, you can choose to execute an Expression when new values are received for any Input Measurements, or periodically, regardless of whether any Input Measurements have changed.

If Expression is set to run periodically (Polling), you must specify how often the Expression is executed by setting Intervals in seconds.

Expression Editor

Expressions are defined using the Expression Editor. The Expression Editor is a graph-based Drag & Drop editor.

Expression Editor

Arrows coming in from the left of a node indicate its input and those going out from its right indicate its output.

Input & Output of a Node

Each Node falls into one of the following categories:

  • Asset Identifier
  • Input
  • Data Transformation
  • Logic
  • Result
  • Event

Data originates from Metric nodes, is transformed by Data Transformation and/or Logic nodes, and eventually consumed by Result & Event nodes.

Input nodes
Metric - outputs the value/s of a metric. can be set to output the last known value, or a range of historical values
Logic Nodes
Compare - comparison operators. e.g. <, >=, ==, !=
Logic - perform "AND" or "OR" between 2 or more boolean values
Data Transformation nodes
Filter - used to filter a range of values and output a subset number of values. Can only be used after a Metric node in "Range of Value" mode and before an Aggregate
Aggregate - used to aggregates a range of values into a single value. E.g. sum, average, median. Can only be used after a Metric node in "Range of Value" mode
Function - value-wise transformation. Transform each value, e.g ABS, Floor, Round etc. Can be used after a Metric node and before a Compare node. Outputs the same number of values as its input.
Result node
Result - Result node. Specifies the Result of an Expression. Result can be False to True or True to False.
Event nodes
Event - Event node. Input must always be from the "Result" node. Can have 0 or more "Event" nodes. Instructs Senfi to do something when Result changes. Event Input Data is passed on to the related Event.

Expression Nodes

Each node contains attributes & options which you can modify. To modify the attributes of a node, click on the node and a window will popup to allow you to configure the node.

See Node Type for more information about each Node Type.

Example of Expression

Example 1

Example 1: A simple Expression detecting when a Lift has tripped (safetyTrip == 1).

Example 2

Example 2: Detects when a Lift tripped (safetyTrip == 1), AND passengers are trapped in the Lift (load > 0)

Working with historical values

When historical values is required to detect an event, the "Range", "Filter" and "Aggregate" nodes are needed.

By default, a "Metric" node will output the Last Known value of the metric. To obtain historical values of a metric, select "Range value of" for "Metric" node type.

The configuration options of the "Range value" type allows you to change the range of historical values to output. E.g: You can configure it to output metric values from 1 hour ago till now, or the last 10 received metric values.

After obtaining the list of historical values, you can:

  • Filter the list using the "Filter" node.
  • Transform each value in the list using the "Function" node.

The "Filter" and "Function" nodes can be nested.

Finally, the list of historical values must be aggregated using the "Aggregate" node before its output can be used by a "Logic" or "Compare" node.

Example using historical values

Historical Example 1

The example above detects when the average return air temperature for an air-conditioner is more than 21°C for over a minute.

Points to note when working with data

  • Expression will evaluate using available data, even if data is not available for the full range that was specified. E.g. for an expression to use the average of the past 5 minutes data, if only 1 minute of data is available, then instead of waiting until 5 minutes of past data are available, the 1 minute data is used to evaluate the expression.
  • The most recently received data may not be used in the range for expression that uses immediate execution type.
  • For expression of "immediate" execution type, after the expression is modified, it is not immediately re-evaluated, and is only re-evaluated when new data arrives.

What's Next