Rule Engine and Scene Linkage: Making Devices Work Together Automatically
Connecting devices is only the first step; making data flow and devices collaborate is where the value of an IoT platform lies. FastBee provides two means: the Rule Engine for developers, and Scene Linkage for business users.
Rule Engine: Processing Data Flows with Groovy Scripts
The Rule Engine subscribes to messages reported by devices and uses Groovy scripts (whose syntax is largely identical to Java) to filter, transform, and forward them. Typical uses:
- Data filtering: write only temperature data that exceeds a threshold into the alarm table;
- Protocol conversion: convert custom device messages into the standard Thing Model format;
- Message forwarding: push data to Kafka, an HTTP Webhook, or a third-party platform.
// Trigger an alarm when the temperature exceeds 30℃
def temp = params.temperature?.value
if (temp != null && temp > 30) {
alarm.trigger(deviceId, "Temperature too high", temp)
}Scene Linkage: Zero-Code Automation
Scene Linkage configures "trigger condition → execution action" visually:
- Device trigger: e.g., a motion sensor detects a person;
- Scheduled trigger: e.g., 7:00 AM every day;
- Action execution: control another device, send a notification, or call an external API.
For example, "automatically turn on the corridor lights when the light sensor reads below 100 lux and someone is present" can be done in three clicks on the UI, without writing any code.
How to Choose
- Simple automation maintained by business users → Scene Linkage;
- Complex data processing and cross-system integration → Rule Engine;
- The two can be mixed: the Rule Engine handles data preprocessing, while Scene Linkage handles business orchestration.
For detailed syntax, see the Open Source Edition User Manual.

