Skip to content

Field Schema

Define what data your device sends and how the platform displays it. Fields control chart grouping, map rendering, and alert evaluation.

Each field has a name, label, unit, and two optional properties:

PropertyRequiredDescription
nameYesLowercase letters, numbers, underscores (1-50 chars). The JSON key the device sends.
labelYesDisplay name shown in charts and tables (max 100 chars).
unitNoMeasurement unit (e.g., °C, %, g, m/km). Controls Y-axis labels and dual-axis grouping.
roleNoSemantic hint: location, boolean, timestamp, or status. Controls display behavior.
childrenNoArray of child fields for nested JSON data. Max 10 children, 1 level deep.

The simplest configuration. Each field maps to a top-level JSON key.

Field config:

[
{ "name": "temperature", "label": "Temperature", "unit": "°C" },
{ "name": "humidity", "label": "Humidity", "unit": "%" },
{ "name": "battery", "label": "Battery", "unit": "%" }
]

Device sends:

{ "temperature": 25.5, "humidity": 60, "battery": 87 }

Group related values by sending nested JSON objects. The parent field defines a group, and children are the individual values within it.

Field config:

[
{ "name": "iri", "label": "Road Roughness", "unit": "m/km" },
{ "name": "acc", "label": "Accelerometer", "unit": "g", "children": [
{ "name": "x", "label": "X" },
{ "name": "y", "label": "Y" },
{ "name": "z", "label": "Z" }
]},
{ "name": "gps", "label": "GPS", "role": "location", "children": [
{ "name": "lat", "label": "Latitude" },
{ "name": "lon", "label": "Longitude" }
]}
]

Device sends:

{
"iri": 3.45,
"acc": { "x": 1.23, "y": 0.95, "z": 2.11 },
"gps": { "lat": -1.2867, "lon": 36.8172 }
}

What happens automatically:

  • “Accelerometer” chart tab: X, Y, Z plotted together with a shared g-force Y-axis
  • “Road Roughness” chart tab: IRI plotted on its own
  • Map: GPS trail rendered from gps.lat/gps.lon
  • GPS is excluded from line charts because of role: "location"

Children inherit the parent’s unit unless they define their own.

Roles tell the platform how to display a field:

RoleChart behaviorDisplay
(none)Line chart (default)Numeric value
locationExcluded from chartsMap with trail
booleanExcluded from chartsOn/off badge
timestampExcluded from chartsFormatted date/time
statusExcluded from chartsStatus badge

Fields with role: "location" and children containing lat/lon (or latitude/longitude) are automatically detected and displayed on the map:

{ "name": "gps", "label": "GPS", "role": "location", "children": [
{ "name": "lat", "label": "Latitude" },
{ "name": "lon", "label": "Longitude" },
{ "name": "alt", "label": "Altitude", "unit": "m" }
]}

Altitude (and any other children) will be charted normally. Only the lat/lon pair goes to the map.

Fields with role: "boolean" display as on/off badges in the latest reading panel instead of numeric values:

{ "name": "online", "label": "Online", "role": "boolean" }
[
{ "name": "env", "label": "Environment", "children": [
{ "name": "temp", "label": "Temperature", "unit": "°C" },
{ "name": "humidity", "label": "Humidity", "unit": "%" },
{ "name": "pressure", "label": "Pressure", "unit": "hPa" }
]},
{ "name": "power", "label": "Power", "children": [
{ "name": "voltage", "label": "Voltage", "unit": "V" },
{ "name": "current", "label": "Current", "unit": "A" }
]},
{ "name": "gps", "label": "Location", "role": "location", "children": [
{ "name": "lat", "label": "Latitude" },
{ "name": "lon", "label": "Longitude" }
]},
{ "name": "battery", "label": "Battery", "unit": "%" },
{ "name": "online", "label": "Online", "role": "boolean" }
]

Auto-generated chart tabs:

  • Environment: temp, humidity, pressure (dual Y-axis by unit)
  • Power: voltage, current
  • Other: battery
  • Map section: GPS trail
  • Latest reading: battery as number, online as on/off badge

When creating alerts or automation rules, nested fields appear as dot-notation paths. For example, to alert when accelerometer X exceeds 2.5g:

  • Field: acc.x
  • Operator: greater than
  • Value: 2.5

Commands define what the platform can send to your device. The device subscribes to d/{device_id}/c via MQTT to receive them.

Command types:

TypeDescriptionExample
toggleOn/off switchLED control
buttonOne-shot actionReboot device
sliderNumeric rangeFan speed (0-100)
jsonArbitrary JSON payloadConfiguration update

Commands are configured separately from telemetry fields in the device settings.

The platform handles various edge cases gracefully:

ScenarioWhat happens
Extra top-level fieldSilently dropped. Only defined fields are stored.
Extra child fieldSilently dropped. e.g., sending acc.w when only acc.x/y/z are defined.
Missing fieldsAccepted. Missing fields show as gaps in charts, not errors.
Missing child fieldsAccepted. e.g., sending only acc.x when x/y/z are defined.
Wrong type (number where object expected)Stored as-is. e.g., sending "acc": 2.5 instead of "acc": {"x": 1.2}.
Completely different payloadAll fields dropped (none match). Empty data stored.

You can safely send partial data: only the fields you include are stored. This is useful for devices that don’t always have every sensor reading available.

Fields with role: "location" and lat/lon children automatically render as an interactive map with a trail of points. The map:

  • Auto-fits to show all points when data loads or the time range changes
  • Shows a marker at the latest position with coordinates and timestamp
  • Supports fullscreen mode (press Esc to exit)
  • Updates in real-time when new data arrives

If your device has no fields configured and sends its first data point, the platform automatically infers the schema:

  1. Nested objects become parent fields with children
  2. Boolean values get role: "boolean"
  3. Lat/lon children in an object get role: "location"
  4. Labels and units are guessed from field names (e.g., temp gets °C)
  5. The inferred schema is saved to your device settings

If the payload has more fields than your plan allows, the request is rejected with a clear message explaining the limit.

After auto-detection, review the inferred schema in your device settings and adjust labels, units, or roles as needed.

You can configure fields in several ways:

The field editor in your device’s settings tab provides these tools:

ToolDescription
AddAdd a new field row
Add Children (sitemap icon)Add child fields for nested data
Role dropdownSet field role (location, boolean, timestamp, status)
JSON ImportPaste or upload a JSON field configuration
CopyCopy current fields as JSON to clipboard
ExportDownload current fields as a JSON file
ClearRemove all fields
Browse fileUpload a JSON file with field definitions
ValidateCheck your JSON for errors before importing

Click the JSON import button and paste your field configuration array. The importer validates names, labels, roles, and children before applying. It also supports uploading a .json file.

Set settings.fields when creating or updating a device via the API.

LimitValue
Maximum payload size10 KB
Maximum nesting depth2 levels
Maximum top-level fields50
Maximum children per parent10
Total fields (including children)Per plan limit

Each device has a configurable data interval (default: 10 seconds). The platform enforces this as a rate limit: if your device sends data faster than its configured interval, the extra requests are rejected with a 429 (Rate Limit Exceeded) response.

Set the interval when creating the device. If you need to change it later, go to your device’s Settings tab and edit the Data Interval in the Configuration section.

For testing, use a short interval (e.g., 10 seconds). For production, match your sensor’s actual sampling rate.