Quick Start¶
Get your GreenThumb greenhouse running in 5 minutes.
Prerequisites¶
Complete the Installation guide first.
1. Start the System¶
On the Pi (Linux):
2. Access the Local Dashboard¶
Open your browser and navigate to:
The local dashboard has four pages: Dashboard (live readings, history, camera), Actuators, Cultivation (control rules) and Settings (sync).
3. View Live Video¶
The MJPEG stream is embedded in the dashboard. Direct URL:
4. Check System State¶
Get Current State¶
On the Pi (Linux):
Response:
{
"sensors": {...},
"sensor_values": {...},
"variables": {...},
"control_rules": [...],
"actuators": [...],
"effects": [...],
"active_phase": {...},
"safety_mode": false,
"timezone": "...",
"timestamp": "..."
}
Get Latest Sensor Data¶
Returns a list with the latest measurement row for each active sensor.
5. Control Actuators¶
On the Pi (Linux):
# List actuators
curl http://localhost:8080/actuator/
# Turn one on for 30 seconds
curl -X POST http://localhost:8080/actuator/<id>/command \
-H "Content-Type: application/json" \
-d '{"action": "on", "duration_s": 30}'
A manual command holds the actuator until you release it:
A 409 means a safety bound refused the command.
6. Monitor Logs¶
On the Pi (Linux), from deploy/:
# All services
make logs
# Specific services
make logs-api # API logs
make logs-controller # Controller logs
Common Commands¶
Run from deploy/ on the Pi.
| Command | Description |
|---|---|
make up |
Start all services |
make down |
Stop all services |
make ps |
Service status |
make logs |
Follow all logs |
make logs-<svc> |
Follow one service (e.g. make logs-controller) |
make restart-<svc> |
Restart one service |
make pull |
Pull new images (does not restart api or controller) |
make promote |
Apply pulled api and controller images (relays may switch; do it with the rig in view) |
make deploy |
git pull, then up |
make status |
Pi health: temperature, throttling, load |
make db-shell |
PostgreSQL shell |
make verify |
Project and volume names, build versions, sync backlog |
Trigger a Manual Cloud Sync¶
On the Pi (Linux):
Or click Sync Now in the local dashboard Settings page.
Troubleshooting¶
Run these on the Pi, from ~/Documents/greenthumb/rasp5/deploy.
Camera Not Working¶
Sensors Not Reading¶
# Check I2C devices
sudo i2cdetect -y 1
# Expected addresses:
# 0x38 - AHT10
# 0x39 - TSL2561
# 0x76 - BMP280
Controller Not Connecting¶
Safety Mode Activated¶
If actuators turn off unexpectedly, the API has not heard from the controller for 60 s and has entered safety mode. Check curl http://localhost:8080/state/safety, then: