Nicodème Westphalen
Products2026· 3 min read

SerreIA

An AI-powered closed greenhouse that autonomously monitors, waters, ventilates and pollinates a tomato plant in real time.

SerreIA

The story

For my birthday, my cousin's daughter — let's call her J. — turned up at my flat with a gift: a small tomato plant. A lovely gesture, with one flaw she couldn't have known about. Watering something a little, every day, reliably, forever is exactly the kind of disciplined, repetitive task I have not yet mastered. (I'm working on it. Give me time.)

So rather than simply water the plant, I decided the efficient move was to build a machine that would water it for me. The plan: a sealed greenhouse that measures its own climate — light, soil and air humidity, temperature, CO₂ — and keeps the plant supplied with fresh air and water in a first phase, then light and CO₂ in a second.

By the time all the hardware arrived, the tomato plant had, regrettably, already died.

The plant did not make it. The project did. So — no pressure, J. — next birthday, feel free to bring another one. This time I'll be ready.

What it does

Tomato plants grown indoors tend to suffer from inconsistent watering, poor air circulation and no pollination. SerreIA tackles all three inside a sealed PVC greenhouse.

It continuously monitors soil moisture, temperature, humidity and light, and automatically triggers a water pump, a fan and a vibration motor — which shakes the plant to pollinate it — whenever readings cross their thresholds. A live web dashboard, reachable from any device on the local network, shows real-time readings, historical graphs with trend lines, and per-session statistics. Every measurement is logged to CSV, building the dataset for a future machine-learning control model.

Stack & hardware

  • Microcontroller — ESP32 (AZDelivery DevKit C V4)
  • Sensors — DHT22 (temperature + humidity), capacitive soil-moisture V1.2, BH1750 (light)
  • Actuators — 5V submersible pump, 80mm DC fan, vibration motor, driven by a 4-channel relay module
  • Firmware — Arduino C++ on the ESP32
  • Controller + server — Python (Flask) on a Mac, talking to the ESP32 over USB serial
  • Dashboard — JavaScript / HTML with Chart.js
  • Key libraries — ArduinoJson, Flask, pySerial, Chart.js

How it works

The ESP32 reads the sensors and drives the relays, exchanging JSON with a Python controller on a Mac over the serial link. The Python side runs a Flask server that stores the readings and serves the dashboard, where Chart.js renders the live and historical views. Control today is rule-based — fixed thresholds per sensor — with all data logged so the thresholds can eventually give way to a learned model.

Roadmap

  • Phase 1 (built) — monitor temperature, humidity, soil moisture and light; automate watering, ventilation and pollination.
  • Phase 2 (planned) — CO₂ monitoring, supplemental grow lights and CO₂ enrichment.
  • Then — use the logged data to train an ML model that replaces the fixed thresholds with learned control.
  • And — acquire an actual living tomato plant.