Rule Engine

Overview

Modern industrial society is divided into many vertical fields, and different types of buildings represent different fields, such as commercial centers, interstellar hotels, hospitals, office buildings, factories, parking lots, and apartment buildings. These buildings basically contain HVAC, lighting, water supply and drainage, air supply and exhaust, elevators, fire protection and other mechanical and electrical equipment systems. The main users of these electromechanical equipment systems are generally the property or engineering team in the building. They have similar management requirements for these subsystems, which can be roughly classified into the following major contents: real-time equipment monitoring, alarm notification, viewing records and reports, schedule management, user management, etc.

Application Scenario

Parking Lot Lighting Control Scenario

One or more of the following control requirements may exist at the same time:

  • During the day, work schedule control is required (lights are turned on from 8 am to 6 pm every day, and lights are turned off during the rest of the time)
  • Need to carry out personnel occupancy detection control, during non-working hours at night, turn on the light when someone is detected, and turn off the light after a delay of 3 minutes if no one is.
  • Support manual forced switch control.
  • Control failure detection, a certain lighting circuit is in automatic mode. After the system sends a control command, it checks whether the loop state follows the control command. If the state and the command value are inconsistent with a delay of 2 minutes (adjustable), a control failure alarm will be issued.

Roof Flood Lighting Control

One or more of the following control requirements may exist at the same time:

  • Work schedule control is required at night (lights are turned on from 6 pm to 6 am the next day, and lights are turned off during the rest of the time)
  • It is necessary to enter the outdoor illumination detection control. During the non-opening time during the day, if the illumination is detected to be below a certain range and lasts for 5 minutes (adjustable), the flood lighting is turned on.
  • Support manual forced switch control.

Product Description

The rule engine greatly alleviates the disasters caused by frequent demand changes to the business system, helps users separate business rules from the program code, arranges business rules by combining predefined function operators, and executes corresponding operations according to business rules . The front-end is based on the workflow framework, and the back-end is based on the streamset for secondary development, providing a complete set of operators, supporting drag-and-drop operators, associating measurement points, forming a pipeline, and implementing business logic.

Edit Rules

Log in to the EnOS Management Console, select EnOS Edge> Rule Engine> New Rule; fill in the rule name. Or select the rule to be edited in the list, click to enter the rule engine interface, drag the operator to edit the rule. After editing, click Publish to publish the rule.

../_images/rules_engine_edit_rules.png

Associate Edge

After creating a new rule and publishing it, you need to associate it with a specific Edge (enter the Edge details page and add a rule).

../_images/rules_engine_associated_rules.png

Debug Function

The system supports online debugging function, you can view the value of input, output, and intermediate variables. Since the configuration center and the Edge box run separately, the rule engine configuration center cannot obtain the Edge data in real time. Therefore, when the user is debugging, enter “Debug” and temporarily open the debugging channel (MQTT) between the configuration center and the Edge box. In the debugging state, the rule can call the real data source of the device, but the generated control result will not take effect on the device. Exit the Debug state, the debug channel is closed.

../_images/rules_engine_debugging_features.png