Read sensors on the Edge Server

Needs Edge Server 5.4.4 or later.

The Edge Server keeps the readings of the sensors that report to it. You can read them with an Edge Server token, on your network. Calls to your Edge Server are free.

The answers use the field names and units of the Growbud Cloud Read API (/api/list-sensors, /api/latest, /api/query, /api/thresholds). To move a client from Growbud Cloud to the Edge Server, change the base URL and the paths. "Differences from Growbud Cloud" below lists the other changes.

Before you start

You need:

  • An Edge Server, and a user account on it.
  • An Edge Server token. Any token can read. See Authentication.

Set two shell variables:

EDGE=https://192.168.1.27:8443
TOKEN=<your Edge Server token>

If your client does not trust the Edge Server certificate, use curl with -k.

Which sensors you can read

SensorYou can read it when
Growbud sensor (Dro, Vero, Terra, CO2)It is on your account or on your organization.
LoRaWAN Climate Sensor or CO2 SensorYou own it.

Any other sensor gives 404 not_found, also when it exists. The Edge Server does not tell you that another account has it.

Serial numbers

Each route takes one sensor id in the path:

IdExampleNames
8 hex charactersE200202BA Growbud sensor, by the serial on its label. Upper or lower case.
9 or 10 digits3791659051The same Growbud sensor, by its decimal serial.
16 hex charactersa84041000181b2c3A LoRaWAN sensor, by its DevEUI.
A2… or A3…, 8 charactersA2001001A LoRaWAN sensor, by the serial on its label.

The answers name a Growbud sensor by its 8-character serial. They name a LoRaWAN sensor by its label serial, or by its DevEUI when it has no label serial.

Routes

MethodPathAnswer
GET/sensing/v1/sensorsThe sensors you can read
GET/sensing/v1/sensors/{serial}/latest?maxAgeThe newest reading
GET/sensing/v1/sensors/{serial}/readings?from&to&duration&bucketSecondsReadings for a time range
GET/sensing/v1/sensors/{serial}/thresholdsAlert limits

All routes are GET. They change nothing.

List sensors

curl -s -H "Authorization: Bearer $TOKEN" "$EDGE/sensing/v1/sensors"
{
  "serialNumbers": ["E200202B"],
  "lorawanSensors": [
    {
      "devEui": "a84041000181b2c3",
      "serial": "A2001001",
      "model": "dragino-lht65n",
      "modelName": "LHT65N",
      "displayName": "Climate Sensor",
      "name": "Veg room climate",
      "fields": ["air_temp", "humidity", "vpd", "probe_temp", "battery_level"],
      "thresholdKeys": ["air_temp", "humidity", "vpd", "probe_temp"],
      "lastSeen": "2026-11-12T11:45:00.000Z",
      "isOnline": true
    }
  ],
  "sensors": [
    {
      "serialNumber": "E200202B",
      "name": "Bench Dro",
      "type": "Dro",
      "kind": "growbud",
      "decimalSerial": 3791659051,
      "growMedia": "promix",
      "firmwareVersion": "5.4.3",
      "zone": { "id": "z1", "name": "Room 1" },
      "fields": ["air_temp", "humidity", "soil_vwc", "pore_ec", "bulk_ec", "vpd", "battery_level", "rssi"],
      "lastSeen": "2026-11-12T11:30:00.000Z",
      "isOnline": true
    },
    {
      "serialNumber": "A2001001",
      "name": "Veg room climate",
      "type": "Climate Sensor",
      "kind": "lorawan",
      "devEui": "a84041000181b2c3",
      "model": "dragino-lht65n",
      "zone": { "name": "Climate room" },
      "fields": ["air_temp", "humidity", "vpd", "probe_temp", "battery_level"],
      "lastSeen": "2026-11-12T11:45:00.000Z",
      "isOnline": true
    }
  ]
}

serialNumbers and lorawanSensors are the Growbud Cloud list. sensors gives each sensor with its name, type and zone. zone is null when the sensor is in no zone.

isOnline is true when a Growbud sensor sent a reading in the last 7 hours. For a LoRaWAN sensor, the limit is 65 minutes.

Get the latest reading

curl -s -H "Authorization: Bearer $TOKEN" "$EDGE/sensing/v1/sensors/E200202B/latest"
{
  "serialNumber": "E200202B",
  "hexSerialNumber": "E200202B",
  "name": "Bench Dro",
  "lastSeen": "2026-11-12T11:30:00.000Z",
  "isOnline": true,
  "data": {
    "time": 1794483000000,
    "serial_number": 3791659051,
    "battery_level": 7.9,
    "air_temp": 76.12,
    "humidity": 56,
    "vpd": 1.3,
    "rssi": -88,
    "soil_vwc": 28.27,
    "pore_ec": 15,
    "bulk_ec": 2.94,
    "soil_temp": 72
  },
  "thresholds": { "soil_vwc": { "min": 10, "max": 70, "low": 30, "good": 50 }, "...": "..." },
  "growMedia": "promix",
  "firmwareVersion": "5.4.3",
  "zone": { "id": "z1", "name": "Room 1" }
}

maxAge is the oldest reading to return, in days: 1 to 8. The default is 8. When the sensor sent no reading in that time, data and lastSeen are null.

A LoRaWAN sensor adds devEui, model and thresholdSource. Its data has co2 (CO2 Sensor) and probe_temp (Climate Sensor with a probe).

Get readings for a time range

curl -s -H "Authorization: Bearer $TOKEN" \
  "$EDGE/sensing/v1/sensors/E200202B/readings?duration=24"
{
  "serialNumber": "E200202B",
  "from": "2026-11-11T12:00:00.000Z",
  "to": "2026-11-12T12:00:00.000Z",
  "bucketSeconds": 900,
  "metadata": {
    "fields": ["_time", "air_temp", "humidity", "soil_vwc", "pore_ec", "bulk_ec", "vpd", "battery_level", "rssi"],
    "units": {
      "air_temp": "°F",
      "humidity": "%",
      "soil_vwc": "%",
      "pore_ec": "mS/cm",
      "bulk_ec": "mS/cm",
      "vpd": "kPa",
      "battery_level": "V",
      "rssi": "dBm"
    }
  },
  "data": [
    {
      "_time": "2026-11-12T11:30:00.000Z",
      "air_temp": 76.12,
      "humidity": 56,
      "soil_vwc": 28.27,
      "pore_ec": 15,
      "bulk_ec": 2.94,
      "vpd": 1.3,
      "battery_level": 7.9,
      "rssi": -88
    }
  ]
}
ParameterValueDefault
fromStart, ISO 860124 hours before to
toEnd, ISO 8601. Readings at this time are not included.Now
durationHours back from to, 1 to 2160. Used only when you do not send from.24
bucketSecondsAverage the readings in buckets of this many seconds, 1 to 86400. Send 0 to get each reading.900
  • The range is 90 days or less. The Edge Server keeps readings for 90 days.
  • An answer has 10,000 rows or fewer. If a bucket would give more, the Edge Server makes the bucket wider. bucketSeconds in the answer gives the bucket that it used.
  • With bucketSeconds=0, you get the first 10,000 readings of the range.
  • _time is the start of the bucket, or the time of the reading.
  • data is in time order. It is empty when the sensor sent nothing in the range.
  • A value that the sensor did not send is null.

Get thresholds

curl -s -H "Authorization: Bearer $TOKEN" "$EDGE/sensing/v1/sensors/E200202B/thresholds"
{
  "serialNumber": "E200202B",
  "name": "Bench Dro",
  "thresholds": { "soil_vwc": { "min": 10, "max": 70, "low": 30, "good": 50 }, "...": "..." },
  "growMedia": "promix",
  "zone": {
    "id": "z1",
    "name": "Room 1",
    "thresholds": { "humidity": { "min": 20, "max": 90, "low": 40, "good": 60 }, "...": "..." }
  }
}

A Growbud sensor gets all threshold keys. A key that the sensor has no value for has the default band.

A LoRaWAN sensor gets only the keys that its model supports. It adds devEui, model, thresholdKeys and thresholdSource:

thresholdSourceThe bands come from
deviceThe sensor itself.
zoneThe zone of the sensor. fallbackZoneName gives the zone.
defaultNothing is set. No alerts go out. The bands are the defaults.

You cannot change thresholds with the API. Change them in the Growbud app.

Units

FieldUnit
air_temp, soil_temp, probe_temp°F
humidity, soil_vwc%
pore_ec, bulk_ecmS/cm
vpdkPa
co2ppm
battery_levelV
rssidBm

The Edge Server calibrates soil_vwc, pore_ec and bulk_ec with the same calibration tables and grow medium as Growbud Cloud.

Differences from Growbud Cloud

Growbud CloudEdge Server
GET /api/list-sensorsGET /sensing/v1/sensors. The answer also has sensors.
GET /api/latest?serialNumbers=[...] gives a listGET /sensing/v1/sensors/{serial}/latest gives one object. It also has zone, and data has rssi. With no recent reading, data is null; the cloud leaves the sensor out of the list.
GET /api/query?duration=24&serialNumbers=[...] gives { "<serial>": { metadata, data } }GET /sensing/v1/sensors/{serial}/readings?duration=24 gives { serialNumber, from, to, bucketSeconds, metadata, data }.
/api/query gives 15-minute averages, up to 2160 hours15-minute averages by default, up to 90 days. You can set bucketSeconds, or get each reading.
/api/query can give CSVJSON only.
GET /api/thresholds?serialNumbers=[...] gives a listGET /sensing/v1/sensors/{serial}/thresholds gives one object, with zone.
CO2 Sensor (AQS01-L) history has pressure_hpaNo pressure_hpa. The Edge Server does not keep air pressure.
LoRaWAN metadata has retentionHours, historyStart and clampedNot given.
Errors are plain textErrors are JSON: { "error": { "code", "message" } }. See Errors and limits.
Each call is charged; X-API-Balance-USD gives the balanceFree. No balance header.
GET /api/balanceNot on the Edge Server. The account balance is in Growbud Cloud only.

Errors

StatusCodeCause
400invalid_argumentA bad from, to, duration, bucketSeconds or maxAge.
401unauthenticatedNo token, or the token is not valid on this Edge Server, is revoked or has expired.
404not_foundNo sensor with this id, or you cannot read it.
503unavailableThe Edge Server cannot read the readings store now. Try again.