Settings¶
Device settings can be configured both locally via the API and through the cloud portal.
Read Settings¶
curl http://ww.local/api/v1/settings \
-H "Authorization: Bearer READ_TOKEN"
Change Settings¶
Settings are sent via POST. Only the part to be changed needs to be sent (partial update):
curl -X POST http://ww.local/api/v1/settings \
-H "Authorization: Bearer WRITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"key": "value"}'
Available Settings¶
WiFi¶
{
"wifi": {
"primary": {
"ssid": "MyNetwork",
"password": "secret",
"enable": true
}
}
}
| Field | Description |
|---|---|
ssid |
WiFi network name |
password |
WiFi password |
enable |
WiFi enabled/disabled |
MQTT¶
{
"mqtt": {
"enable": true,
"host": "mqtt.example.com",
"port": 8883
}
}
| Field | Description |
|---|---|
enable |
MQTT enabled/disabled |
host |
Broker hostname |
port |
Broker port (1883 unencrypted, 8883 TLS) |
LED¶
{
"ledEnable": false
}
Turns the status LED on or off.
API Authentication¶
{
"api_auth_required": false
}
Security Notice
Disabling API authentication allows anyone on the network full access to the device. Only recommended for development purposes.
Token Management¶
Generate New Tokens¶
The process is two-phase to prevent accidental lockout:
Phase 1 — Generate:
curl -X POST http://ww.local/api/v1/auth/tokens/generate \
-H "Authorization: Bearer WRITE_TOKEN"
Response:
{
"success": true,
"pending": {
"token_read": "A1B2C3D4E5F6G7H8",
"token_write": "X9Y8Z7W6V5U4T3S2"
},
"expires_in": 60,
"message": "Call /api/v1/auth/tokens/confirm within 60 seconds to activate"
}
Phase 2 — Confirm (within 60 seconds):
curl -X POST http://ww.local/api/v1/auth/tokens/confirm \
-H "Authorization: Bearer WRITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"new_write_token": "X9Y8Z7W6V5U4T3S2"}'
Save Your Tokens
After confirmation, the old tokens are invalidated. Make sure to save the new tokens securely!
MQTT CA Certificate¶
For MQTT brokers with a custom/self-signed certificate:
Check Status¶
curl http://ww.local/api/v1/mqtt/ca \
-H "Authorization: Bearer READ_TOKEN"
Upload Certificate¶
curl -X POST http://ww.local/api/v1/mqtt/ca \
-H "Authorization: Bearer WRITE_TOKEN" \
-H "Content-Type: text/plain" \
--data-binary @my_ca.pem
Delete Certificate¶
curl -X DELETE http://ww.local/api/v1/mqtt/ca \
-H "Authorization: Bearer WRITE_TOKEN"
Cloud Settings¶
Cloud pairing is managed via the pairing token. See User Portal → Pair a Device.