Smart Agriculture

MQTT for Smart Agriculture

Soil-moisture probes, weather stations, valves and greenhouse controllers publish to one MQTT broker over LTE-M, NB-IoT or a LoRaWAN gateway. Your irrigation controller, farm dashboard and phone app subscribe, and valve commands still reach the field when the rural link drops for a while.

No card required

What you can build

Build your farm monitoring and irrigation on ConnectMQ

You build the applications, ConnectMQ moves the data. Probes, weather stations and valve controllers publish once over MQTT; the farm dashboard, irrigation controller, phone app and agronomy analytics you build each subscribe to the topics they need — add a new field or greenhouse without touching the others.

Your fields
Soil-moisture probefarm/{field}/soil-{id}/moisture
Weather stationfarm/{field}/weather
Irrigation valve & pumpfarm/{field}/valve-{id}/state
Greenhouse climatefarm/greenhouse-{id}/climate
ConnectMQ
  • TLS on 8883
  • persistent sessions
  • retained messages
  • QoS 0, 1 and 2
What you build on top
Farm dashboard
Irrigation controller
Farmer’s phone app
Agronomy analytics
What you get

Smart Agriculture on ConnectMQ

  • Probes, weather stations, valves and pumps on one broker
  • Persistent sessions for rural links that come and go
  • Retained last state for every valve, pump and sensor
  • QoS 1 delivery for valve and pump commands
example topic design
farm/field-7/soil-03/moisture
farm/field-7/valve-2/set
farm/field-7/valve-2/state           (retained)
Cellular data per soil sensor / month
MQTT over TLS0.9 MB
one session, tiny frames
HTTPS polling (keep-alive)2.6 MB
headers on every request
HTTPS, new connection per reading15.6 MB
TLS handshake every time

Estimate per sensor and month: one small reading every 15 minutes (2,880 a month) over TLS, including TCP/IP and TLS overhead — about 300 bytes per reading with MQTT QoS 1, 900 bytes with HTTPS keep-alive and 5.4 kB with a new HTTPS connection. Illustrative values, not measurements.

Data plans

Up to 3× less cellular data per sensor

A soil reading is only a few bytes. With MQTT the frame around it stays small too; with HTTPS, headers and handshakes make up most of what goes over the air. Fewer bytes means a smaller IoT data plan and less radio time on a battery-powered probe.

Real-life example

Dry soil at dawn — valve 2 opens before the crop is stressed

A common irrigation setup with MQTT: soil probes and valve controllers in the field publish over LTE-M, the irrigation controller in the farm office subscribes, and its commands travel back to the valves the same way.

ConnectMQMQTT broker · TLS 8883Rule: soil below 22 %FIELD 731 %18 % ▼V2 ▸ 40 minvalve-2: openFarm officeIrrigation controller · subscribedSOIL-0331 %24 %18 %Soil moistureValve 2Valve 2: open · 40 minField 7Soil probe & valve 2 · LTE-Mfarm/field-7/soil-03/moisture {"pct":18}farm/field-7/soil-03/moisture {"pct":18}farm/field-7/valve-2/set {"state":"open"}farm/field-7/valve-2/set {"state":"open"}farm/field-7/valve-2/state {"state":"open"}Farm app · nowField 7 irrigating — valve 2 open for 40 minConnectMQMQTT broker · TLS 8883Rule: soil below 22 %FIELD 731 %18 % ▼V2 ▸ 40 minvalve-2: openFarm officeIrrigation controller · subscribedSOIL-0331 %24 %18 %Soil moistureValve 2Valve 2: open · 40 minField 7Soil probe & valve 2 · LTE-Mfarm/field-7/soil-03/moisture {"pct":18}farm/field-7/soil-03/moisture {"pct":18}farm/field-7/valve-2/set {"state":"open"}farm/field-7/valve-2/set {"state":"open"}farm/field-7/valve-2/state {"state":"open"}Farm app · nowField 7 irrigating — valve 2 open for 40 min
  1. 05:45 Soil probe in field 7

    Publishes soil moisture every 15 minutes over LTE-M. After a dry, windy night the reading at root depth falls to 18 %.

    farm/field-7/soil-03/moisture → {"pct":18,"depth_cm":30}
  2. 05:45 Irrigation controller

    Subscribed to farm/field-7/+/moisture through ConnectMQ: below 22 % its rule schedules 40 minutes and sends the open command to valve 2 with QoS 1.

    farm/field-7/valve-2/set → {"state":"open","minutes":40} · QoS 1
  3. 05:46 Valve controller 2

    Opens the valve for 40 minutes — it closes on its own afterwards — and publishes its new state as a retained message, so every dashboard shows it at once.

    farm/field-7/valve-2/state → {"state":"open","until":"06:26"} · retained
  4. 05:46 Farmer

    Gets a notification from the farm app, which subscribes to the valve state — no drive out to the field to check.

If the rural LTE-M link drops, the open command waits in the valve controller’s persistent session on ConnectMQ and is delivered with QoS 1 as soon as it reconnects (QoS 1 · persistent session).

Industries & use cases

Where teams use Smart Agriculture

Pilot

Pilot one field this week

Start on the Free plan with no card. Basic covers up to 100 concurrent connections — enough for the probes, valves and weather station of a pilot field or greenhouse. Move to Scale when more fields, barns and cold stores come online.