Create a Rule from Scratch

Description

When no Community Library template fits, you can build your own Rule Template. A Rule Template holds the logic; a Working Rule applies that logic to specific Trend Logs in a building. This article walks through creating a template from a blank canvas, setting when it raises an Insight, and turning it into a Working Rule.

Create a New Rule Template

From the Building Dashboard:

  1. Click the Insights tab.
  2. Click the settings to open Manage Rules.
  3. Click the Add icon in the top-left.
  4. Select Create a new Rule Template and click proceed.
Manage Rules Under the Insights Tab
Click on + icon to add new Rules

Enter the Template Details

Fill in the details page:

FieldWhat to enter
NameA clear name, e.g. “Zone heating and cooling simultaneously”
Insight TypeFault Detection, Energy, Energy KPI or Integrity KPI
Description/MethodWhat the rule checks and how
Diagnosis/Recommended ActionLikely causes and what to check. This is shown on the Insight Details page.
MessageDefault Insight message. It can be changed per Working Rule.
PriorityLow, Medium or High. Used for filtering only.
Notes and Default InputsOptional

Click proceed to open the Logic Builder.

Build the Logic Flow

  1. Click Logic Blocks and drag an Input Data block onto the canvas for each input.
  2. Add a combination of Functional Blocks to achieved desired outcomes.
  3. Optionally add a Calculated Trend Log output block to save the result as a CTL.
  4. Select a block and click Preview to check its output on real data.
  5. Click Save, then Next.
Rule builder canvas

Please note: every block must be connected. Series must share timestamps, so aggregate or normalize inputs to a common interval before combining them. See List of Logic Blocks and the expression syntax in Rules and Logic.

Set the Insight Trigger

  1. Choose the Trigger Block – the block whose output raises the Insight (the Multiple Expression block in this example).
  2. Choose the Trigger Type: Active High, Rising Edge, Falling Edge, or Rising and Falling Edge.
  3. Set the Aggregation Interval and Date Range. The date range must hold enough data for the calculation; for a monthly average use at least two months.
  4. Click proceed.
Select Insight Trigger

Review and Finish

  1. Check the final page shows two green checkmarks for Details and Settings, and Status shows enabled.
  2. Click the final button to save the template to the building.

Create a Working Rule

  1. In Manage Rules, click the view of the new template.
  2. Click Add under Working Rules.
  3. Enter a name, message and priority, and check Enabled.
  4. Assign a Trend Log or constant to each input.
  5. Click Save, then select the rule and click Run to test it on existing data.

To add the rule to many Systems at once, see Configuring Rules Using Systems.

Please note: Working Rules run when all input Trend Logs have new samples. Insights older than two years are not generated. See Working Rule Execution and Insight/CTL Generation.