Guide · 9 minute read

How to build a farm monitoring system

Most farm monitoring projects fail in the same way: too many sensors at once, no alerts anyone trusts, and a dashboard nobody opens. Start small and build on what works.

In short

Start with the one failure that would cost you most, and put one sensor and one alert on it. Get that reading to a server, tie it to the right part of the farm, and make sure the alert reaches a phone. Then add the next sensor. A monitoring system is finished when it tells you about a problem before you find it yourself.

Step 1: Choose what to watch first

List what can go wrong and what each costs you. The first sensors go on the top of that list, not on what is easiest to measure.

If this failsYou loseWatch it with
The main pumpIrrigation, or the fishPump current and flow
The water supplyEverything downstreamTank level
Greenhouse ventilationA crop, in an afternoonAir temperature
The powerPumps, fans and the monitoring itselfVoltage, and a “no data” alert
Water qualityFish and rootsTemperature, pH, dissolved oxygen

Step 2: Choose how each sensor connects

Pick the link by where the sensor is, not by what is fashionable.

What are you connecting?
Where is it?
Suggested route

MQTT, straight to Urvara

MQTT logoMQTT ESPHome logoESPHome

The board joins the Wi-Fi and publishes each reading to the MQTT broker built into the Urvara server. Urvara can write an ESPHome configuration for an ESP32 with the device’s ID already filled in.

You need
  • Wi-Fi at the sensor
  • A device ID and token from the app
It carries
Readings and on/off commands
How to set it up
Suggested route

MQTT to the Urvara gateway

MQTT logoMQTT Raspberry Pi logoRaspberry Pi

Put the Urvara gateway on a Raspberry Pi where the farm network reaches. Boards talk MQTT to it with no token of their own, and it forwards the readings and keeps them on disk when the internet is down.

You need
  • A Raspberry Pi or other always-on computer
  • A network link from the board to it
It carries
Readings and on/off commands
How to set it up
Suggested route

Modbus through the gateway

Modbus logoModbus

Energy meters, inverters, pump drives and many industrial sensors speak Modbus. The Urvara gateway reads their registers over RS-485 or the network and sends the values on.

You need
  • The Urvara gateway
  • The device’s register list
  • An RS-485 adapter for serial devices
It carries
Readings only: the gateway never writes to a Modbus device
How to set it up
Suggested route

Zigbee through Zigbee2MQTT

Zigbee logoZigbee Zigbee2MQTT logoZigbee2MQTT

Ready-made Zigbee sensors for temperature, humidity, leaks and doors are cheap and run for a long time on a coin cell. Zigbee2MQTT receives them, and the Urvara gateway listens to it.

You need
  • A Zigbee coordinator stick
  • Zigbee2MQTT
  • The Urvara gateway
It carries
Readings only
How to set it up
Suggested route

LoRaWAN

LoRaWAN logoLoRaWAN ChirpStack logoChirpStack The Things Network logoThe Things Network

LoRaWAN sensors reach across a whole farm on a battery that lasts years. A LoRaWAN network server (ChirpStack or The Things Stack) decodes them and passes the values to Urvara.

You need
  • A LoRaWAN gateway in range
  • ChirpStack or The Things Stack with a payload decoder
It carries
Readings only
How to set it up
Suggested route

Snapshots through the gateway

The Urvara gateway fetches a still picture from the camera’s snapshot address on a timer and uploads it. The pictures can then be checked by the AI plant inspector. With the camera’s video address and ffmpeg on the gateway, you can also watch the camera live.

You need
  • A camera with an HTTP snapshot address
  • The Urvara gateway on the same network
It carries
Still pictures, at most one every 30 seconds, and a live view
How to set it up
Suggested route

USB, through your browser

Chrome logoChrome

Plug the board into your computer and Urvara reads the lines it prints, in Chrome or Edge. It is the quickest way to see a sensor working before you give it a network connection.

You need
  • Chrome or Edge on a computer
  • A board printing readings at 115200 baud
It carries
Readings only, while the tab is open
How to set it up

Step 3: Get one reading through

  1. Add a device in the monitoring software and get its token.
  2. Make the sensor send one value. A board on your desk, on USB or Wi-Fi, is enough for the first try.
  3. See the value arrive. Give it a clear name and the right unit.
  4. Tie it to the part of the farm it measures.

In Urvara the reading appears by itself the first time it is sent, and is recognised from its name: a name with “level” in it becomes a water level, “temp” a temperature, and so on.

Step 4: Set the alerts

Watch the reading for a few days first. Then set limits from what it really does, not from a textbook. Give each rule a delay so one odd value does not raise an alarm, and add a “no data” rule so a dead sensor is not mistaken for a healthy one.

00:0006:0012:0018:0024:00 limit

Step 5: Make sure alerts arrive

  • Send a test to every destination.
  • Use two destinations for anything critical.
  • Decide who is called at night, and for which severity.
  • Pull a sensor’s plug and check that the “no data” alert arrives.

Step 6: Plan for the bad day

What failsWhat to have
The internetA gateway on site that stores readings and sends them later
The powerA battery or a small UPS on the gateway and the router
A sensorA “no data” rule, and a spare on the shelf
A probe’s accuracyA calibration date in your calendar
Remote controlA float switch or a timer in the device itself

Step 7: Add, review, repeat

Add the next sensor on your list. Every month, look at which alerts fired. An alert that fires every day and is ignored is worse than none: fix its limit or remove it. In Urvara the AI agent can do this review, and proposes rules to add, tighten, loosen or remove. With AI watch turned on, the AI also reviews the readings on a timer and raises an alert for what your rules miss.

Questions people ask

How much does a farm monitoring system cost?

It ranges widely. A single home-built sensor node with an ESP32 costs little in parts, while industrial sensors, meters and LoRaWAN equipment cost a great deal more each. The larger cost is usually your time to install it and keep it working, so start with few sensors.

What should I monitor first on a farm?

Whatever would cost you most if it failed unnoticed. On most farms with pumped water that is the main pump and the water supply. In a greenhouse it is air temperature. In aquaponics it is water flow, oxygen and temperature.

Do I need internet on the farm for monitoring?

You need a link from the farm to wherever the readings are stored, which may be mobile data. A gateway on site can store readings while the link is down and send them when it returns.

Last checked against the product: .

Design your farm before you build it.

Open Urvara in your browser. Lay out the land, connect the water and the power, and see what the checks say.