Inspiration
Regional weather forecasts in Kenya cover areas of 100 km or more, but farming decisions happen at the level of a single field. A smallholder in Juja might irrigate hours before a sudden downpour, or spray pesticide that gets washed into the Ndarugu River. The data to prevent this already exists: JKUAT's Conduit@Empathy station measures the local microclimate every few minutes. That data wasn't reaching farmers in a form they could act on, and many of them only have basic 2G phones.
That gap, between good data and everyday farm decisions, inspired Conduit Sentinel.
What it does
Conduit Sentinel turns Conduit station telemetry into three concrete decisions:
- When to irrigate: a 7-day, crop-specific irrigation plan based on FAO-56 evapotranspiration, with automatic rain holds.
- When to spray: spray-safety windows based on wind speed and short-term rain risk, to prevent drift and wash-off.
- When to rest: heat-stress alerts for farm workers using the WBGT index.
The advice reaches farmers through a web dashboard, a Kiswahili USSD menu (*384*96#) for feature phones, SMS and Telegram alerts, spoken audio in English and Kiswahili, and a printable report for county extension officers. Ask Sentinel, a grounded AI assistant, answers farmer questions in English or Kiswahili using only verified station data.
How we built it
Data pipeline. Conduit telemetry, along with Open-Meteo forecasts and NASA POWER solar data (both labelled as secondary sources), flows through a Bronze → Silver → Gold medallion architecture. Quality control flags bad readings and never silently deletes them.
Dual rain-gauge validation. The station's two tipping-bucket gauges check each other. When
$$|R_1 - R_2| > \varepsilon$$
Sentinel raises a hardware-fault flag instead of passing corrupted rainfall on to farmers.
Physics first. Reference evapotranspiration is computed with the FAO-56 Penman-Monteith equation:
$$ET_0 = \frac{0.408\,\Delta\,(R_n - G) + \gamma\,\frac{900}{T + 273}\,u_2\,(e_s - e_a)}{\Delta + \gamma\,(1 + 0.34\,u_2)}$$
Crop water demand is $ET_c = K_c \times ET_0$, where the crop coefficient $K_c$ depends on crop type and growth stage. The root-zone soil water balance is updated as
$$S_t = S_{t-1} + P_t - ET_{c,t}$$
and Sentinel recommends irrigating before 08:00 EAT when the deficit drops below $-20\ \text{mm}$.
Five models, running offline.
- M1: LightGBM rain risk, 3 h and 24 h
- M2: Isolation Forest sensor-drift detection
- M3: solar irradiance calibration against NASA POWER
- M4: FAO-56 evapotranspiration
- M5: ISO 7933 WBGT heat stress
Decision engine. Model outputs become advisories. For example, spraying is delayed when the 3-hour rain probability exceeds 70% or wind speed exceeds $4.5\ \text{m/s}$.
Stack. Python, FastAPI and Pandas/PyArrow on the backend; React, TypeScript, Vite, Three.js and Leaflet on the frontend; Groq-hosted LLMs for Ask Sentinel, with an offline rule-based fallback; the Web Speech API for audio; and Pytest for testing.
Challenges we faced
- Access to live Conduit history. Portal credentials weren't available in our development environment for most of the build. We built a clearly labelled demo-climatology fallback (
data_source = "demo_climatology") so demo data is never shown as live. Because of this, our rain model hasn't yet been back-tested on real rain events. Until it's trained, it falls back to a transparent persistence baseline, $p_{rain,3h} = \text{clip}(R_{3h}/5,\ 0,\ 1)$. - Keeping the AI honest. A confident wrong answer can cost a farmer a harvest. The LLM is only allowed to narrate numbers returned by our API. When data is missing, it says so instead of guessing.
- Reaching farmers without smartphones. Designing Kiswahili USSD and SMS flows within the tight character and menu limits of 2G phones took several iterations.
- Staying reliable without internet or API quota. When the cloud LLM is unavailable, an offline deterministic engine answers instead, so the system keeps working.
What we learned
- Physics-based models such as FAO-56 give trustworthy, explainable results with very little training data. Machine learning adds most value on top of them, not in place of them.
- Data quality control matters as much as modelling. One clogged rain gauge could have produced wrong irrigation advice across a whole catchment.
- The last mile is the hardest part. A great model is useless if its output never reaches a farmer's phone in a language they speak.
- Being clear about limitations, such as which data is live and what hasn't been validated yet, builds more trust than overclaiming.
What's next
- Retrain and back-test the rain-risk model on live Conduit rain events, and publish PR-AUC, Brier score and lead time.
- Connect the USSD and SMS simulator to real telecom infrastructure through Africa's Talking.
- Deploy low-cost LoRaWAN soil-moisture sensors across the four Juja zones.
- Fuse Sentinel-1 satellite soil-moisture data for field-level calibration.
- Scale to other Conduit stations. The station location is a single configuration setting.
Built With
- conduit-empathy
- fastapi
- gemini
- groq
- leaflet.js
- lightgbm
- nasa-power
- numpy
- open-meteo
- pandas
- pvlib
- pyarrow
- pydantic
- pytest
- python
- react
- react-three-fiber
- recharts
- scikit-learn
- tailwindcss
- telegram
- three.js
- typescript
- vite
- web-speech-api
Log in or sign up for Devpost to join the conversation.