Weigh a pot to see exactly how much water a plant used — and water it locally, with no cloud in the loop.
| Status | Source release — build & flash it yourself |
| Interface | HX711 load-cell amplifier (+ optional relay for the local loop) |
| Delivers | Webhook (HTTP POST) · MQTT — oat-ods/0.3 |
| Site page | openagriculturetechnology.com/build/sketches/loadcell-water/ |
| License | Apache-2.0 |
The most honest irrigation signal is weight: a pot gets lighter as the plant drinks. This node weighs a pot or basket on a load cell (via an HX711), emits the readings as oat-ods, and runs a local weigh-and-water loop. One cheap build gives you two signals and an irrigation trigger:
weight (g) — what's on the celltranspiration (g/h) — the drydown slope between samples = the plant's water useThe watering decision lives entirely on the device. oat-ods carries readings out for monitoring; nothing ever commands the valve from the cloud. Failure is designed for:
A lost network changes nothing about whether the plant gets watered — only the monitoring stops.
HX711 DOUT + SCK to two GPIOs (default 16 / 17), plus VCC/GND; the load cell's four wires to the HX711. The valve/pump on the relay GPIO (default 25) — usually a 12 V solenoid switched through the relay, on its own supply, separate from the ESP32. Set "Active high" to match your relay module.
Flash (see Build), join OAT-Scale-xxxx, open the setup page (admin / oatsetup),
set Wi-Fi + delivery + the stream id (the pot, e.g. bench-pot-3). Calibrate on
the status page. To use the loop: tick Enable local watering, set the relay pin,
water-below / refill-to weights, the pump-max cap, and the cooldown. Point delivery
at the test endpoint
to watch the weight + transpiration arrive.
pipx install platformio # or: pip install --user platformio
cd oat-loadcell-water
./build.sh
This is a source release: it compiles against the pinned deps but hasn't
earned the bench-verified badge the live sketches carry — build it, flash it, and
prove it on your bench before you trust it with a valve. Deps (pinned in
platformio.ini): bogde/HX711, PubSubClient, ArduinoJson, and the local
oat_ods module.
Can you automate watering without a cloud service? Yes. A microcontroller can weigh a pot, decide when it is light enough to water, and switch a valve entirely on the device, with no internet involved. Safety comes from local rules: the relay starts closed, each watering has a hard time cap, a cooldown prevents rapid cycling, and it acts only on a valid calibrated reading. Readings are still sent out for monitoring, but the decision never depends on the network.
How do you measure how much water a plant uses? Weigh the pot over time. As the plant transpires and the medium dries, the pot gets lighter; the rate of weight loss (grams per hour) is a direct measure of water use. A load cell with an HX711 amplifier on a microcontroller gives the weight, and the slope between readings gives the drydown rate.
../lib/oat_ods/ — the shared oat-ods encoder + measurand vocabulary.Shared core: this sketch carries its own copy of the config / Wi-Fi / delivery scaffolding; as the shared
oat-node-corelibrary is adopted, only the load-cell read + the local loop stays sketch-specific. This is also the first sketch that actuates — the fail-safe rules (off-on-boot, time cap, cooldown) are load-bearing in any future revision.
Code: Apache-2.0 · Docs: CC BY 4.0 · An OAT sketch — an OpenCDC initiative.