# OCETS v1.1 Plant Registry — plant "solar-example"
# Authoritative source of truth (OCETS-REGISTRY-1.1).
# Edge-acquisition topology: Raspberry Pi edge collector, no field devices yet.
# Validate with: scripts/validate_registry.py

version: "1.1"
registry_id: "example-registry"
revision: "2026-07-13T10:00:00Z"

organizations:
  - id: "example-energy"
    name: "Example Energy"
    status: "active"
    data_residency_region: "DE"

portfolios:
  - id: "germany"
    organization_id: "example-energy"
    name: "German Plants"
    status: "active"

plants:
  - id: "solar-example"
    organization_id: "example-energy"
    portfolio_ids:
      - "germany"
    name: "Example Solar Plant"
    timezone: "Europe/Berlin"
    status: "active"
    country: "DE"
    operator: "Example Energy"

assets:
  - id: "plant-operations"
    plant_id: "solar-example"
    type: "telemetry_infrastructure"
    name: "Plant Telemetry Infrastructure"
    status: "active"
    location: "Example site cabinet"

devices:
  # Logical edge collector. ID is stable and NOT derived from hostname,
  # IP, or hardware serial (OCETS-REGISTRY-1.1 §9). The physical Pi can be
  # replaced without changing this identity.
  - id: "edge-collector-01"
    plant_id: "solar-example"
    asset_id: "plant-operations"
    role: "collector"
    energy_form: "operational"
    status: "active"
    profiles:
      - "edge_collector_observability"
    capabilities:
      # Required by the Edge Collector Observability Profile (OCETS-CORE-1.1 §15.1)
      - "device_available"
      - "collector_status"
      - "pipeline_status"
      - "communication_status"
      - "data_freshness"
      - "time_sync_status"
      - "timestamp_skew"
      - "buffer_utilization"
      - "buffer_oldest_age"
      - "storage_utilization"
      - "storage_status"
      - "transport_error_count"
      - "collector_restart_count"
      - "mapping_error_count"
      - "validation_error_count"
      # Optional host metrics this deployment can supply
      - "cpu_utilization"
      - "memory_utilization"
      - "host_temperature"

measurement_points:
  # Storage required by the telemetry pipeline (SD card root filesystem).
  # The mount path stays an implementation detail; this ID is the identity.
  - id: "mp-collector-storage"
    plant_id: "solar-example"
    device_id: "edge-collector-01"
    type: "collector_storage"
    name: "Edge Collector Pipeline Storage"
    role: "collector"
    energy_form: "operational"

  # SoC thermal zone of the edge host. Operational indicator, not an
  # environmental measurement (OCETS-GUIDE-1.1 §19.2).
  - id: "mp-collector-soc"
    plant_id: "solar-example"
    device_id: "edge-collector-01"
    type: "collector_host_thermal"
    name: "Edge Collector SoC Temperature"
    role: "collector"
    energy_form: "operational"

topologies:
  - id: "telemetry-infrastructure"
    plant_id: "solar-example"
    kind: "telemetry"
    version: 1
    name: "Plant Telemetry Infrastructure"
    status: "active"
    valid_from: "2026-07-13T10:00:00Z"

relationships:
  - id: "rel-plant-collector"
    plant_id: "solar-example"
    topology_id: "telemetry-infrastructure"
    topology_version: 1
    type: "contains"
    from: {kind: "plant", id: "solar-example"}
    to: {kind: "device", id: "edge-collector-01"}
    status: "active"
    valid_from: "2026-07-13T10:00:00Z"

  - id: "rel-collector-storage"
    plant_id: "solar-example"
    topology_id: "telemetry-infrastructure"
    topology_version: 1
    type: "contains"
    from: {kind: "device", id: "edge-collector-01"}
    to: {kind: "measurement_point", id: "mp-collector-storage"}
    status: "active"
    valid_from: "2026-07-13T10:00:00Z"

  - id: "rel-collector-soc"
    plant_id: "solar-example"
    topology_id: "telemetry-infrastructure"
    topology_version: 1
    type: "contains"
    from: {kind: "device", id: "edge-collector-01"}
    to: {kind: "measurement_point", id: "mp-collector-soc"}
    status: "active"
    valid_from: "2026-07-13T10:00:00Z"
