YAML Schema Reference

Every Tetrapus deployment is configured through a set of composable YAML files. The entry point is config.yaml, which includes the others. This page is the definitive reference for every file type.

config.yaml — Entry Point

A manifest that lists the files to merge into a single configuration.

YAML
includes:
  - data_schema.yaml
  - command_schema.yaml
  - assets.yaml
  - groups.yaml
  - policies.yaml
  - rules.yaml
  - layout.yaml

data_schema.yaml — Telemetry Fields

Declares every telemetry field emitted by the source, plus fleet-level aggregates. Field order must match the SDK binary layout.

KeyTypeRequiredDescription
idStringyesSchema name (e.g. "hvac_v1")
schema_idStringyesHex wire identifier (e.g. "0xAC000001")
fields[]FieldSpec[]yesOrdered list of per-entity fields
aggregates[]AggregateSpec[]noFleet-level derived values

FieldSpec keys:

KeyTypeDescription
nameStringField identifier (referenced in rules, widgets, commands)
typeStringu8, u16, u32, u64, i16, f32, f64, or enum
unitString?Display unit (e.g. "°C", "kts", "%")
range[min, max]?Expected value range for UI scaling
variantsMap?Enum variant mapping: {"0": "Off", "1": "On"}
YAML
data_schema:
  id: hvac_v1
  schema_id: "0xAC000001"
  fields:
    - name: zone_temp
      type: f32
      unit: "°C"
      range: [10.0, 45.0]
    - name: mode
      type: enum
      variants:
        "0": "Off"
        "1": "Cool"
        "2": "Heat"
  aggregates:
    - name: avg_zone_temp
      description: "Average temperature across all zones"

command_schema.yaml — Commandable Fields

Declares fields the control bus can write to devices. Presence of this file enables the CommandRouter.

KeyTypeDescription
nameStringCommand field identifier
value_typeStringfloat, enum, or bool
range[min, max]?Valid value range (used for UI slider clamps)
variantsMap?Enum variant labels (for enum type)

assets.yaml — Spatial Inventory

Defines the physical/spatial asset layout — zones, regions, exchanges. The schema is domain-specific. Three common patterns:

YAML Zone grid (HVAC, facility)
assets:
  - id: caravan_park
    zones:
      - zone_id: 1
        name: "Zone A - Reception"
        lat: -33.8688
        lon: 151.2093
        spread_m: 50.0
        grid_cols: 4
        units: ["room-1", "room-2", "room-3", "room-4"]
YAML Regional grouping (Aviation)
assets:
  - id: global_regions
    regions:
      - region_id: 1
        name: "North America"
        short: "NAM"
        color: "#3b82f6"
        airport_count: 150
        major_hubs: ["KJFK", "KLAX", "KORD"]

groups.yaml — Entity Groups

Named entity groupings for targeted commands and policy assignment.

KeyTypeDescription
idStringUnique group ID (referenced in bus_command targets)
nameStringDisplay name
zone_idsu32[]?Zones whose entities are members
entity_idsString[]?Explicit entity ID list
filter.fieldString?Dynamic membership: field to match
filter.valuenumber?Dynamic membership: entities where field == value
policy_idString?Policy to enforce on this group

policies.yaml — Automation Rules

Continuously-evaluated rules that constrain or override entity fields. See Policy Engine for runtime details.

Condition types (tagged union on type):

typeExtra keysFires when
field_abovefield, thresholdfield > threshold
field_belowfield, thresholdfield < threshold
field_equalsfield, valuefield == value
time_windowstart_min, end_minCurrent time in [start, end] minutes since midnight
andconditions[]All sub-conditions true
orconditions[]Any sub-condition true
notconditionSub-condition false

Action types:

typeExtra keysEffect
set_fieldfield, valueForce field to value every tick
clamp_fieldfield, min, maxConstrain field to [min, max]
enforce_rangefield, min, maxVeto commands pushing field outside range

rules.yaml — Visual Mapping

Controls entity appearance in Scene3D. See Visual Mapper for full details. Supports defaults, rules (gradient mappings), conditional_rules (overrides), and geofences.

layout.yaml — Pane Arrangement

Declares the complete pane layout with per-pane configuration.

YAML
layout:
  panes:
    - pane_type: Scene3D
      title: "Global View"
      position: center
      active: true
      state:
        camera:
          target: [151.2093, -33.8688, 0.0]
          distance: 250000.0

    - pane_type: Table
      title: "Fleet Status"
      position: right
      state:
        data_source: fleet_tracker
        per_page: 50
        columns:
          - field: callsign
            header: "Callsign"
          - field: altitude_ft
            header: "Altitude"
            format: "{:.0} ft"

    - pane_type: Control
      title: "HVAC Controls"
      position: left
      state:
        columns: 4
        data_source: hvac_sdk
        tabs:
          - label: "Zone A"
            widgets:
              - id: temp-slider
                widget_type: slider
                label: "Setpoint"
                min: 16.0
                max: 30.0
                unit: "°C"
                bus_command:
                  target: { group: zone_a }
                  fields:
                    - field: setpoint_temp
                      use_widget_value: true
                  label: "Adjust setpoint"

Questions?

Reach out for help with integration, deployment, or custom domain codecs.