Automation
If sensors say X, do Y — even when the Wi-Fi drops
PlantHub's rules engine is more than IFTTT. Rules are device-scoped or zone-wide, respect per-actuator cooldowns and safety limits, and are compiled to on-device firmware so they keep running when the cloud is unreachable.
Anatomy of a rule
{
"sensor": "soilMoisture",
"operator": "LESS_THAN",
"threshold": 30,
"action": "WATER_PUMP_ON",
"durationSeconds": 20,
"cooldownSeconds": 1800,
"deviceId": "node-abc123", // null = applies to all your devices
"enabled": true,
"priority": 10
}Supported operators
LESS_THAN,LEGREATER_THAN,GEEQUALSBETWEEN(with two thresholds)
Supported actions
WATER_PUMP_ONwithdurationSecondsVENTILATION_ON/VENTILATION_OFFGROW_LIGHT_ON/GROW_LIGHT_OFFMIST_ON,HEATER_ON,SHADE_DEPLOY— when the device declares supportALERT_ONLY— for notify-only rules that don't actuate anything
Device-scoped vs tenant-wide
Set deviceId to apply a rule to one specific device, or leave it null to apply across every device whose sensors match. A tenant-wide rule like "alert me when any moisture reading drops below 10%" is a good catch-all baseline.
Offline execution
Active rules are compiled into a compact format and pushed to the device over MQTT during normal sync. If the device loses Wi-Fi or the backend goes down, the compiled rules continue to fire on schedule. When connectivity returns, queued readings flush and any missed actions are reported.
AI rule recommendations
The AI analyzes your sensor history, plant profile, and learned outcomes and proposes rule changes you can accept with one tap. See the AI overview for how those recommendations are generated and cached.
Safety
Every action runs through the same hard limits the AI is bound by: per-actuator cooldown, max duration, capability validation. A rule cannot bypass those — they are enforced in the command pipeline, not the rule evaluator.