← Back to API Reference
API: Device Configuration & Control
Configure WiFi, update user settings, check firmware version, and send control commands to your Annaboto.
PUT /config/wifi
Sets the WiFi network credentials. Used during initial setup or when changing networks.
Endpoint:
Content-Type:
Returns:
PUT http://<device-ip>:8080/annaboto/api/config/wifiContent-Type:
application/jsonReturns:
200 on success
Request Body
{
"ssid": "YourNetworkName",
"pwd": "YourPassword"
}
Important Details
- Field name is
"pwd"— not "password" or "psk". - The device saves credentials and returns HTTP 200 immediately.
- Connection sequence after 200:
- ~50–100ms: config change signal sent internally
- Device generates network connection file
- Access Point mode is dropped
- Device attempts to connect to the specified WiFi
- Total time from HTTP 200 to AP drop: ~2–5 seconds
- No validation before 200: The device does not verify SSID/password before responding. If credentials are wrong, it will fail silently and re-enter AP mode after ~3 failed attempts (~90 seconds).
Example
curl -X PUT \
http://10.42.0.1:8080/annaboto/api/config/wifi \
-H "Content-Type: application/json" \
-d '{"ssid": "MyHomeWiFi", "pwd": "secret123"}'
Note: During initial setup, the device runs in Access Point mode at IP
10.42.0.1. After WiFi is configured, it will be reachable at whatever IP your router assigns.
PUT /config/user
Updates user-facing settings like the plant name.
Endpoint:
Content-Type:
Returns:
PUT http://<device-ip>:8080/annaboto/api/config/userContent-Type:
application/jsonReturns:
200 on success
Request Body
{
"plant": "My Basil Plant"
}
Notes
- The
plantfield sets the user-facing plant name displayed in the app and returned byGET /statusasplant_name. - Changes are reflected immediately in subsequent
GET /statuscalls (no restart needed). - The
strainfield (botanical strain name) is a separate concept and also accepted here.
Example
curl -X PUT \
http://192.168.0.103:8080/annaboto/api/config/user \
-H "Content-Type: application/json" \
-d '{"plant": "Kitchen Basil"}'
GET /version
Returns the device's firmware version. This is a lightweight endpoint — ideal as a connectivity/health check before making other API calls.
Endpoint:
GET http://<device-ip>:8080/annaboto/api/version
Example
curl http://192.168.0.103:8080/annaboto/api/version
Usage
Use this as a quick "is the device reachable?" check before issuing heavier requests like /status or /sensor_history.
POST /control/reload
Triggers a configuration reload on the device. The device re-reads its settings files and applies changes without a full reboot.
Endpoint:
Returns:
POST http://<device-ip>:8080/annaboto/api/control/reloadReturns:
202 Accepted (async operation)
Behavior
- Returns
202immediately — the reload happens asynchronously in the background. - The device re-reads configuration files, reloads recipes, and updates internal state.
- No request body needed.
Example
curl -X POST http://192.168.0.103:8080/annaboto/api/control/reload