Smart irrigation
The Smart irrigation solution template represents a generic field irrigation solution for provisioning fields and related devices. With this template you get an interactive dashboard that allows you to monitor soil moisture levels, manage irrigation schedules, track water consumption, and receive alarms when conditions require attention.
The solution uses calculated fields for moisture aggregation, irrigation state logic, and consumption tracking. Fields are modeled as assets with polygon boundaries on a satellite map, and each field contains soil moisture sensors, a water meter, and a smart valve.
Key application areas
Section titled “Key application areas”This solution template can be used as a baseline for:
- Vineyards and orchards: Managing water delivery to optimize fruit quality and reduce waste
- Industrial agriculture: Scaling operations by managing hundreds of fields from a single dashboard
- Smart landscaping: Automating watering for parks or golf courses based on real-time soil feedback
Install solution template
Section titled “Install solution template”To understand how the Smart irrigation solution works, start by installing the solution template.
- Go to Solution templates in the main menu.
- Find Smart irrigation and click Install.
- Follow the provided configuration instructions and click Close.
- The Irrigation Management dashboard opens automatically.
After installation, a fully functional irrigation monitoring simulation is created automatically. No devices, integrations, or custom code are required to start exploring the solution.
System components
Section titled “System components”The Smart irrigation solution includes:
- Dashboard: The Irrigation Management dashboard provides real-time visualization of field moisture levels, irrigation status, water consumption, scheduling controls, and sensor analytics
- Devices: 12 pre-provisioned demo devices across three device profiles (SI Soil Moisture Sensor, SI Water Meter, SI Smart Valve) with demo telemetry data
- Device profiles: Three profiles with pre-configured alarm rules for moisture thresholds and low battery conditions
- Asset profile: SI Field asset profile with calculated fields for moisture aggregation, irrigation state control, and water consumption tracking
- Rule chains: SI Device (telemetry processing), SI Field (irrigation control logic and valve RPC commands), SI Count Alarms (alarm aggregation for dashboard severity indicators)
- Entity groups: Smart Irrigation device and asset groups
Edge support. The solution can optionally be deployed to ThingsBoard Edge for local data processing and reduced latency. Edge is available as an add-on for your license or subscription. The edge computing instructions appear in the solution instructions dialog when the Edge add-on is active.
Dashboard
Section titled “Dashboard”The Irrigation Management dashboard displays field data on a satellite map and provides tools for irrigation scheduling, sensor monitoring, and alarm management.
The dashboard consists of two states:
Main state
- View all fields on a satellite map with moisture levels indicated by polygon color
- Browse fields in a list with crop type, average moisture, and irrigation status
- Add new fields by drawing polygons on the map and setting crop type and moisture thresholds
- Edit or delete existing fields
- Review 7-day moisture history trends across all fields
Field details state
Click a field on the map or in the list to open its details.
- Check whether irrigation is currently on or off and view average moisture and daily water consumption
- Review and acknowledge active alarms for the field
- Schedule recurring watering windows (Morning, Evening) with duration or volume limits
- Track past and upcoming irrigation tasks
- Browse individual sensors with their current status and readings
- Analyze how irrigation affects soil conditions using a moisture vs consumption chart
The dashboard can be fully customized using the dashboard development tools.
Devices
Section titled “Devices”The solution creates 12 devices with demo data across two fields (Wheat and Corn), simulating a working farm. Each field has four soil moisture sensors, one water meter, and one smart valve. To send telemetry on behalf of any device, replace $ACCESS_TOKEN with the actual access token and adjust the JSON payload to match the device type:
curl -v -X POST \-d '{"battery": 99, "moisture": 57}' \http://THINGSBOARD_HOST_NAME/api/v1/$ACCESS_TOKEN/telemetry \--header "Content-Type:application/json"The example uses the HTTP API. Other connectivity options (MQTT, CoAP, LwM2M, etc.) are supported as well. See connecting devices for details.
SI Soil Moisture Sensor
Section titled “SI Soil Moisture Sensor”Monitors soil saturation levels in the field. Each field has four sensors positioned across the irrigation zone. Reports moisture percentage (0–100%) and battery level.
{"battery": 99, "moisture": 57}SI Water Meter
Section titled “SI Water Meter”Tracks water flow using a pulse counter. Water consumption is calculated automatically from pulse counter deltas and propagated to the parent field. Reports pulse counter value and battery level.
{"battery": 99, "pulseCounter": 123000}SI Smart Valve
Section titled “SI Smart Valve”Controls water flow to the field. The irrigation scheduler sends RPC commands (TURN_ON, TURN_OFF) to open or close the valve. Reports battery level.
{"battery": 99}RPC command to start irrigation:
{"method": "TURN_ON", "params": {}}Alarms
Section titled “Alarms”Alarm generation is handled by alarm rules configured in the device profiles. The solution includes five alarm rules. All alarms propagate to the parent SI Field asset, enabling severity indicators on the dashboard map.
Moisture monitoring:
- Low Moisture Level (Critical) on SI Soil Moisture Sensor — triggers when moisture drops below
minMoistureThreshold - High Moisture Level (Critical) on SI Soil Moisture Sensor — triggers when moisture exceeds
maxMoistureThreshold
Moisture thresholds are configured per field and propagated to sensors via a calculated field. You can adjust them from the dashboard field settings.
Battery:
- Low Battery (Warning) on SI Soil Moisture Sensor, SI Water Meter, and SI Smart Valve — triggers when battery drops below
lowBatteryThreshold
Calculated fields
Section titled “Calculated fields”The solution uses seven calculated fields across three profiles to aggregate sensor data, control irrigation, and track consumption.
Moisture aggregation
Each soil moisture sensor propagates its latest reading to the parent field via the “Propagate moisture to Field” calculated field. This creates a stream of individual readings on the field entity. The field then processes this data in two ways: “Calculate average moisture” queries all active sensors directly and computes a real-time average (updated every 10 seconds), while “Calculate average 5 min moisture” averages the propagated readings over 5-minute intervals to produce a smooth historical trend line for the dashboard chart.
Water consumption
The water meter tracks flow using a pulse counter. The “Calculate water consumption and save on Field” calculated field computes the delta between consecutive pulse counter readings and propagates the result to the parent field as a water consumption value.
Irrigation control
Two script-based calculated fields on the field profile manage the irrigation cycle. “Calculate irrigation water consumption” accumulates total water used during an active irrigation session. “Update irrigation state” acts as a state machine that starts and stops irrigation based on the configured duration or volume limits, updating the valve state accordingly.
Threshold propagation
The “Propagate thresholds to moisture sensors” calculated field pushes the min/max moisture thresholds configured on the field down to all related sensors, so that alarm rules on each sensor use the field-level settings.
Conclusion
Section titled “Conclusion”The Smart irrigation solution template delivers a precision agriculture system with real-time soil moisture monitoring across field polygons on a satellite map, automated irrigation scheduling with duration and volume controls, seven calculated fields for moisture aggregation and irrigation state logic, and five configurable alarm rules. It enables fast onboarding and serves as a foundation for both demonstrations and production irrigation management use cases.