A developer has given an AI agent control of a small vegetable garden, letting it decide how much water the lawn and vegetable bed receive each morning. The agent reviews overnight sensor data stored in an Apache Iceberg lakehouse and can change the watering schedule within set limits. An old Android phone operates the Rain Bird app.

A developer has given an AI agent control of a small vegetable garden, and the agent now decides how much water the lawn and the vegetable bed get. The setup relies on eight soil probes, a weather station, a leaf-wetness sensor, a security camera and a custom lakehouse platform that stores everything in Apache Iceberg tables. Each morning, a hosted agent reviews the overnight data and can change the watering schedule within set limits.

The project started modestly. The developer planted cabbage, broccoli, lettuce and spinach in a raised bed of about two square meters, and used Claude to answer basic questions about soil depth, spacing and watering. That led to a bigger question: what else could an agent decide?

From sensors to a lakehouse

What sensors does the garden use?

The developer bought Ecowitt sensors, which are battery-powered and send readings wirelessly to a gateway connected to the internet. In total, the setup cost about €300 for a garden that might eventually produce about €40 worth of vegetables. The sensors include eight soil probes, a weather station, a leaf-wetness sensor and the gateway's own indoor sensor. The developer also mapped each device's position in Google Earth, so the agent could reason about where moisture collects, not just how it changes over time.

A standard Reolink security camera takes high-resolution pictures of the bed, and the developer says it has also picked up a neighbor's cat using the bed as a toilet. The camera, however, did not catch the real problem. When something began chewing holes in the leaves, the camera footage showed nothing useful. The developer took close-up photos with a phone, and the agent identified fresh frass, or caterpillar droppings, on the undersides of the leaves. The developer then changed the agent's instructions so it examines full-resolution crops of the bed and compares them with previous days.

Where is the garden data stored?

The data is stored in LakehouseBox, a platform the developer built to avoid running a separate database server or a set of small services. The gateway posts 62 rows of readings every 60 seconds directly into the lakehouse. Since September 18, the garden has collected a little over four million readings, and the full table takes up 3.22 megabytes. The camera uploads images through FTP, which the platform did not originally support, so the developer added that feature. The photos are stored as files, and each one appears as a row in a table with its capture time and dimensions.

A forecast feed from Open-Meteo runs every morning at 05:30 UTC and saves the public weather forecast to a table. Official observations from a nearby AEMET station are stored separately as a reference check on the garden's own readings.

An agent that waters the lawn

The morning agent, named garden_morning, runs at 08:45 Madrid time, just after the scheduled watering. It compares the last day with previous days, checks the forecast and writes a short note to the developer. The developer says the agent's notes are kept to four paragraphs covering what happened, what should change, why and anything unusual. The agent also keeps a log of its decisions, what it expects each change to do and when it should check the result. Hosted agents are still in preview.

How does the AI agent change watering schedules?

Watering changes were the hardest part. The developer's Rain Bird controller uses Bluetooth and an app, and the developer's attempt to talk to it directly with a small circuit board failed because the controller uses a different protocol. The workaround was an old Android phone next to the valve box. An automation app on the phone taps through the official Rain Bird app, reads the schedule, changes a zone's minutes and waits for the controller to sync. The phone exposes a small web interface that the agent can call.

The first end-to-end test moved the lawn's start time to 15:27. When the sprinklers ran, two lawn probes rose from 53 percent to 66 percent and from 31 percent to 57 percent. The agent is governed by rules written into its instructions. It may make at most one change per zone per run, and no change may exceed 20 percent. Run times must stay between 1 and 15 minutes. Watering may be stopped only when at least 5 millimeters of rain is forecast for the next 24 hours.

The agent has also been persistent. A Claude Code routine that ran the garden earlier flagged low batteries in three sensors in early October and has asked for replacements every morning since. Its November 1 entry read: \u201cBATTERIES, 29TH DAY OF ASKING.\u201d The developer says the batteries have not been replaced.

The developer acknowledges several gaps. The rules now live in the agent's prompt rather than in the controller, which the developer says should change. The gateway does not retry failed posts, so a minute without internet means a minute of missing data. The sensor positions reveal details about the developer's home, which is why the catalog is private. The tunnel that connects the agent to the phone also runs through an American service, so the system is not fully sovereign.

Cet article a été rédigé avec l'assistance de l'IA.
News Factory APP - actualités agentiques pour booster votre SEO et AEO.