Miravo

Templates

Compose twins into a runnable environment with `.miravo.yaml` topology, namespace, protocol scope, and settings.

Compose twins into one environment when you need plant topology, namespace layout, runtime settings, or protocol scope.

Technical details

Start from a minimal template

kind: MiravoTemplate
version: "1"
name: "My Environment"

namespace:
  enterprise: AcmeCorp
  site: detroit-plant

areas:
  - name: production
    lines:
      - name: line-1
        twins:
          - model: centrifugal-pump
            count: 3
            variation: 0.05

settings:
  tick_interval_ms: 1000
  time_multiplier: 1

Save the file as my-plant.miravo.yaml.

Validate the file with miravo start before you start a runtime.

miravo start --template ./my-plant.miravo.yaml --dry-run

Inspect the resolved topology with miravo templates inspect.

miravo templates inspect ./my-plant.miravo.yaml

Model topology explicitly

Templates define areas, then lines, then twins. Each assignment sets model, instance count, optional parameter overrides, optional starting hours, and optional protocol scope.

Namespace uses ISA-95-style enterprise and site or a flat prefix. Emitted paths continue with area, line, instance, and member.

Scope protocols where they matter

protocols:
  opcua:
    port: 4840
  mqtt:
    port: 1883

areas:
  - name: machining
    protocol_scope: [opcua]
    lines:
      - name: cnc-cell
        twins:
          - model: cnc-spindle
            count: 2
          - model: storage-tank
            count: 1
            protocol_scope: [mqtt]

Nearest scope wins. Miravo resolves protocol_scope in this order: twin assignment, line, area, then global protocols.

Validate before you run

miravo start --template <id|path> --dry-run validates the template and its referenced models without starting the runtime. miravo templates inspect <id> shows the resolved topology and referenced model set.

Reference

Field or blockNotes
kindMust be MiravoTemplate
versionCurrent literal is "1"
namespaceUse { enterprise, site } or { prefix }
areas[].lines[].twins[]Supports model, count, variation, starting_hours, parameters, protocol_scope
protocolsConfigure mqtt, opcua, modbus
settingsSupports tick_interval_ms, time_mode, time_multiplier, seed, overrun_threshold_multiplier

Was this page useful?

Last updated on