Connect Sensors, Cameras, and Automation Devices Directly to PLNTRK
Build a fully connected grow environment with the PLNTRK Automation API. Send live temperature, humidity, soil moisture, device telemetry, and even camera images directly into your PLNTRK grow rooms and plants.
Devices can automatically poll PLNTRK for logging schedules, upload environmental readings, and submit grow images for AI-powered plant health analysis using OpenAI vision models.
How it works
- Create a sensor node in a PLNTRK area. (Do this by editing an area in a rooms.)
- Copy the generated device API key to your PLNTRK or automation device.
- The device calls
/should-logto check if logging is enabled. - If enabled, the device sends readings to
/log.
Authentication
Every request should include the device API key.
Authorization: Bearer YOUR_DEVICE_API_KEY
Available endpoints
Device flow
Most devices follow a simple two-step loop: check whether PLNTRK wants a log, then submit sensor data if logging is enabled.
Your PLNTRK device or other automation software should call this endpoint on its configured polling interval. PLNTRK returns whether the device should log data now.
curl -X GET "https://www.plntrk.com/api/Automation/device/should-log" \
-H "Authorization: Bearer YOUR_DEVICE_API_KEY"
If shouldLogData is true, submit the current environmental readings from the sensor.
curl -X POST "https://www.plntrk.com/api/Automation/device/log" \
-H "Authorization: Bearer YOUR_DEVICE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"temperatureF": 75.4,
"humidity": 58.2,
"soilMoisture": 420
}'
| Field | Type | Required | Description |
|---|---|---|---|
deviceName |
string | No | Friendly name of the PLNTRK or automation device. |
temperatureF |
decimal | No | Air temperature in Fahrenheit. |
humidity |
decimal | No | Relative humidity percentage. |
soilMoisture |
decimal | No | Soil moisture sensor reading. |
image |
file | No | Optional image uploaded from the device camera. |
serverUrl |
string | No | PLNTRK server URL configured on the device. |
localUrl |
string | No | Local network URL for accessing the device configuration page. |
dnsName |
string | No | mDNS or DNS hostname assigned to the device. |
ipAddress |
string | No | Current IP address of the device. |
ipMode |
string | No | Network mode such as DHCP or Static. |
subnet |
string | No | Subnet mask configured on the device. |
gateway |
string | No | Gateway IP address used by the device. |
macAddress |
string | No | Wi-Fi MAC address of the device. |
wifiSSID |
string | No | Name of the connected Wi-Fi network. |
wifiRSSI |
string | No | Wi-Fi signal strength reported by the device. |
uptime |
string | No | Current uptime of the device. |
sensor |
string | No | Name or model of the connected sensor hardware. |
lastHTTPCode |
string | No | Last HTTP response code received by the device. |
pollingIntervalMinutes |
integer | No | Current device polling interval in minutes. |
Interactive API Explorer
Inspect request fields, response codes, and test the automation endpoints.