version: "1.0"

roaster:
  id: "tr-12"
  name: "Camellia Micro Roaster"
  model: "LeafCraft R12"
  batch_capacity_kg: 12
  location: "production-floor-a"
  timezone: "America/Toronto"

defaults:
  preheat_temperature_c: 145
  cooling_target_c: 35
  cooling_timeout_seconds: 300
  sample_interval_seconds: 5
  exhaust_fan_percent: 55
  drum_speed_rpm: 42

profiles:
  green_tea:
    enabled: true
    maximum_batch_kg: 8
    stages:
      - name: "preheat"
        target_temperature_c: 110
        duration_seconds: 240
        airflow_percent: 45
      - name: "dry"
        target_temperature_c: 125
        duration_seconds: 420
        airflow_percent: 55
      - name: "finish"
        target_temperature_c: 138
        duration_seconds: 150
        airflow_percent: 70

  oolong:
    enabled: true
    maximum_batch_kg: 10
    stages:
      - name: "preheat"
        target_temperature_c: 130
        duration_seconds: 300
        airflow_percent: 45
      - name: "roast"
        target_temperature_c: 155
        duration_seconds: 720
        airflow_percent: 60
      - name: "finish"
        target_temperature_c: 170
        duration_seconds: 180
        airflow_percent: 75

  black_tea:
    enabled: true
    maximum_batch_kg: 12
    stages:
      - name: "preheat"
        target_temperature_c: 145
        duration_seconds: 300
        airflow_percent: 50
      - name: "roast"
        target_temperature_c: 175
        duration_seconds: 600
        airflow_percent: 65
      - name: "finish"
        target_temperature_c: 190
        duration_seconds: 120
        airflow_percent: 80

safety:
  emergency_shutdown_temperature_c: 220
  maximum_exhaust_temperature_c: 195
  require_door_interlock: true
  require_exhaust_flow: true
  minimum_exhaust_flow_m3_per_hour: 350
  abort_on_sensor_failure: true
  alarm_delay_seconds: 10

quality_control:
  require_lot_number: true
  require_operator_id: true
  record_temperature_curve: true
  record_weight_loss: true
  acceptable_weight_loss_percent:
    minimum: 7
    maximum: 18
  retain_batch_records_days: 730

maintenance:
  cleaning_interval_batches: 20
  inspection_interval_hours: 100
  calibration_interval_days: 90
  reminders:
    enabled: true
    notify_before_batches: 2

telemetry:
  enabled: true
  endpoint: "http://roastery-monitor:9090/ingest"
  publish_interval_seconds: 10
  metrics:
    - "drum_temperature_c"
    - "exhaust_temperature_c"
    - "airflow_percent"
    - "drum_speed_rpm"
    - "batch_elapsed_seconds"

notifications:
  on_batch_complete:
    - "quality-control"
  on_safety_shutdown:
    - "shift-supervisor"
    - "maintenance"
  on_calibration_due:
    - "maintenance"