﻿{
  "$comment": "AttendanceHub Sync V2 (service runtime config). Device list is DYNAMIC by default: devices.source=laravel resolves count/IP/port/comm key from GET /api/v1/devices (the same source the old web service used). The static 'device' below is only the fallback when the API is unreachable. idOverrides keeps an existing local SQLite identity stable for a known IP.",
  "device": {
    "deviceId": "phase1-test-01",
    "displayName": "Phase 1 designated test device",
    "ip": "172.24.30.9",
    "port": 4370,
    "machineNumber": 1,
    "commKey": 0
  },
  "devices": {
    "source": "laravel",
    "baseAddress": "",
    "listPath": "/api/v1/devices",
    "apiToken": "",
    "refreshSeconds": 60,
    "fallbackToStatic": true,
    "machineNumber": 1,
    "idOverrides": {
      "172.24.30.9": "phase1-test-01"
    }
  },
  "sdk": {
    "commTimeoutSeconds": 5,
    "expectedSdkVersion": "6.3.1.45"
  },
  "session": {
    "operationTimeoutMs": 30000,
    "connectTimeoutMs": 15000
  },
  "realtime": {
    "eventMask": 1,
    "channelCapacity": 256
  },
  "read": {
    "mode": "Auto",
    "lookbackMinutes": 1440,
    "maxRecordsPerRead": 1000000,
    "failureRetryLimit": 3,
    "failureRetryBackoffMs": 15000,
    "tryTimeWindow": true,
    "windowedIntervalMs": 15000,
    "fullReconcileMinutes": 10,
    "overlapMinutes": 10
  },
  "supervisor": {
    "reconnectDelayMs": 5000,
    "healthIntervalMs": 15000,
    "readIntervalMs": 60000,
    "maxReconnectDelayMs": 60000,
    "pingFailThreshold": 2,
    "readRecreateThreshold": 6,
    "liveStaleMinutes": 15
  },
  "persistence": {
    "dedupeLogEnabled": false
  },
  "upload": {
    "enabled": true,
    "baseAddress": "http://localhost/AttendanceHub/public",
    "batchPath": "/api/v1/sync/punches",
    "apiToken": "8ad88bf216991a5d5447c2c84ff008fa2fa9c5dc31048e3e5c16ad198381e6b4",
    "deviceId": "172.24.30.9",
    "timeoutSeconds": 30,
    "batchSize": 200,
    "maxConcurrency": 1,
    "pollingIntervalMs": 15000
  }
}
