Quickstart

There are two places to call:

Growbud CloudYour Edge Server
What you can doRead sensor data and thresholdsRead and switch outlets and Controllers
Addresshttps://growbud-api-a2a9c.web.apphttps://<edge-server>:8443
CostEach request is charged from your API balance. See costs.Free. No charge when it runs on your site.
StartThe four steps belowGet the Edge Server

Get the Edge Server

To switch equipment, install the Edge Server on a computer on your site:

Install on Linux or macOS: version 5.3.10

BASH
curl -fsSL https://growbud.io/edge/install.sh | sudo bash

Run it on the Edge Server computer. Run it again to upgrade. For Windows, the files, the SHA-256 and the signature, go to Download Edge Server.

Then follow Get the Edge Server to make a token and send your first call.

Read sensor data from the cloud

Read your sensor data from the Read API in four requests. You need a Growbud account with at least one sensor.

1. Get a token

Sign in at growbud.app and make an API token. Keep it secret: it reads every sensor on your account.

export TOKEN=eyJ...
export API=https://growbud-api-a2a9c.web.app

2. List your sensors

curl -s -H "Authorization: Bearer $TOKEN" "$API/api/list-sensors"

The answer has your Growbud sensor serial numbers, and your LoRaWAN sensors in lorawanSensors. Identify a LoRaWAN sensor by its devEui.

3. Read the latest values

curl -s -H "Authorization: Bearer $TOKEN" "$API/api/latest"

With no list, you get every sensor. To read some sensors only, send their serials in square brackets. Use curl -g so that curl sends the brackets as they are:

curl -sg -H "Authorization: Bearer $TOKEN" "$API/api/latest?serialNumbers=[E200201B,E2002022]"

4. Get history

The last 24 hours as CSV:

curl -sg -H "Authorization: Bearer $TOKEN" \
  "$API/api/query?duration=24&serialNumbers=[E200201B]&format=csv"

duration is in hours, 1 to 2160. For a LoRaWAN sensor, send devEuis=[70b3d57ed0000002].

Next