AgroPulse lets you define automation rules that watch a specific sensor type and activate a physical actuator whenever a condition is met. When the greenhouse monitor processes an incoming reading, it evaluates all active rules and dispatches commands to any matching actuators — no polling or custom firmware logic required.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/diarpicu2022-commits/backend-AgroPulse/llms.txt
Use this file to discover all available pages before exploring further.
The Rule model
| Field | Type | Description |
|---|---|---|
name | string | Human-readable label for the rule |
sensor | string | Sensor type string to monitor (e.g. SOIL_MOISTURE) |
condition | string | Comparison operator: gt, lt, eq, gte, or lte |
conditionValue | number | Threshold value for the comparison |
action | string | Description of what happens when the condition is met |
actuatorId | integer | ID of the actuator to activate |
active | boolean | Whether the rule is currently enabled |
The Actuator model
Actuators represent the physical output devices controlled by rules. Supported actuator types (stored as plain strings) include:PUMP— water pump or irrigation valveFAN— ventilation or cooling fanHEATER— heating elementLIGHT— grow light or supplemental lightingVALVE— solenoid valve
gpioPin (GPIO number on the ESP32), activeLow (set true for HW-383-style relay boards where LOW signal activates the relay), deviceSource (ESP32 identifier), and status (ON, OFF, or AUTO).
Setup workflow
Create the actuator
Register the physical actuator in AgroPulse before creating a rule that references it.Note the
id returned (5 in this example). You will use it as actuatorId in the rule.Listing rules
Updating a rule
Send aPUT to /api/rules/{id} with the fields to change. For example, to raise the soil moisture threshold to 35 % and update the name:
"active": false.
Deleting a rule
{"deleted": true}