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
| Sensor | You can read it when |
|---|---|
| Growbud sensor (Dro, Vero, Terra, CO2) | It is on your account or on your organization. |
| LoRaWAN Climate Sensor or CO2 Sensor | You 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:
| Id | Example | Names |
|---|---|---|
| 8 hex characters | E200202B | A Growbud sensor, by the serial on its label. Upper or lower case. |
| 9 or 10 digits | 3791659051 | The same Growbud sensor, by its decimal serial. |
| 16 hex characters | a84041000181b2c3 | A LoRaWAN sensor, by its DevEUI. |
A2… or A3…, 8 characters | A2001001 | A 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
| Method | Path | Answer |
|---|---|---|
| GET | /sensing/v1/sensors | The sensors you can read |
| GET | /sensing/v1/sensors/{serial}/latest?maxAge | The newest reading |
| GET | /sensing/v1/sensors/{serial}/readings?from&to&duration&bucketSeconds | Readings for a time range |
| GET | /sensing/v1/sensors/{serial}/thresholds | Alert 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
}
]
}
| Parameter | Value | Default |
|---|---|---|
from | Start, ISO 8601 | 24 hours before to |
to | End, ISO 8601. Readings at this time are not included. | Now |
duration | Hours back from to, 1 to 2160. Used only when you do not send from. | 24 |
bucketSeconds | Average 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.
bucketSecondsin the answer gives the bucket that it used. - With
bucketSeconds=0, you get the first 10,000 readings of the range. _timeis the start of the bucket, or the time of the reading.datais 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:
thresholdSource | The bands come from |
|---|---|
device | The sensor itself. |
zone | The zone of the sensor. fallbackZoneName gives the zone. |
default | Nothing 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
| Field | Unit |
|---|---|
air_temp, soil_temp, probe_temp | °F |
humidity, soil_vwc | % |
pore_ec, bulk_ec | mS/cm |
vpd | kPa |
co2 | ppm |
battery_level | V |
rssi | dBm |
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 Cloud | Edge Server |
|---|---|
GET /api/list-sensors | GET /sensing/v1/sensors. The answer also has sensors. |
GET /api/latest?serialNumbers=[...] gives a list | GET /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 hours | 15-minute averages by default, up to 90 days. You can set bucketSeconds, or get each reading. |
/api/query can give CSV | JSON only. |
GET /api/thresholds?serialNumbers=[...] gives a list | GET /sensing/v1/sensors/{serial}/thresholds gives one object, with zone. |
CO2 Sensor (AQS01-L) history has pressure_hpa | No pressure_hpa. The Edge Server does not keep air pressure. |
LoRaWAN metadata has retentionHours, historyStart and clamped | Not given. |
| Errors are plain text | Errors are JSON: { "error": { "code", "message" } }. See Errors and limits. |
Each call is charged; X-API-Balance-USD gives the balance | Free. No balance header. |
GET /api/balance | Not on the Edge Server. The account balance is in Growbud Cloud only. |
Errors
| Status | Code | Cause |
|---|---|---|
| 400 | invalid_argument | A bad from, to, duration, bucketSeconds or maxAge. |
| 401 | unauthenticated | No token, or the token is not valid on this Edge Server, is revoked or has expired. |
| 404 | not_found | No sensor with this id, or you cannot read it. |
| 503 | unavailable | The Edge Server cannot read the readings store now. Try again. |