chenyc
2026-03-22 d23dc3235324e6bbe62e507eae807435d77dfc6d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{
  "reconnectIntervalMs": 5000,
  "reconnectPolicy": {
    "baseMs": 5000,
    "maxMs": 300000,
    "factor": 2,
    "jitterRatio": 0.2
  },
  "maxBufferBytes": 8388608,
  "cacheFile": "./cache/latest-device-cache.json",
  "healthProbe": {
    "enabled": true,
    "host": "127.0.0.1",
    "port": 18080,
    "staleFrameMs": 180000
  },
  "runtimeLog": {
    "logsDir": "logs",
    "level": "info",
    "maxDays": 30
  },
  "publishTargets": ["mqtt", "aliyunIot"],
  "devices": [
    {
      "name": "artis-bed-01",
      "host": "127.0.0.1",
      "port": 3021
    }
  ],
  "services": {
    "mqtt": {
      "enabled": true,
      "brokerUrl": "mqtt://127.0.0.1:1883",
      "topicPrefix": "dialysis/artis",
      "clientId": "artis-multi-gateway",
      "qos": 1,
      "failureQueue": {
        "enabled": true,
        "filePath": "./cache/mqtt-failed-queue.json",
        "maxItems": 5000,
        "retryIntervalMs": 5000,
        "retryBatchSize": 100,
        "dedupeEnabled": true,
        "dedupeFields": ["topic", "deviceKey", "frameTimestamp"]
      }
    },
    "aliyunIot": {
      "enabled": false,
      "deviceType": "Artis",
      "region": "cn-shanghai",
      "thingModelPath": "./阿里物模型.json",
      "deviceNameRule": {
        "mode": "fromDeviceNo",
        "prefix": ""
      },
      "deviceSecretStoreFile": "./cache/aliyun-device-secrets.json",
      "tripleApi": {
        "baseURL": "https://things.icoldchain.cn/",
        "url": "device/info/getAliyunDeviceSecret",
        "method": "post",
        "deviceNameField": "deviceName",
        "isAutoRegister": 1,
        "timeoutMs": 15000,
        "headers": {
          "Content-Type": "application/x-www-form-urlencoded"
        }
      },
      "preRegisteredDevices": {
        "SW_8.60.02_SN_34856": {
          "deviceName": "SW_8.60.02_SN_34856",
          "deviceSecret": "replace-your-device-secret"
        }
      }
    }
  }
}