config.json 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. {
  2. "_comment_api": "API接口配置",
  3. "api": {
  4. "base_url": "http://120.55.44.4:8900",
  5. "current_data_endpoint": "/api/v1/jinke-cloud/device/current-data",
  6. "callback_endpoint": "/api/dtgateway/v1/decision/data",
  7. "plc_endpoint": "/api/v1/plc/set-var-values",
  8. "jwt_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJRCI6NywiVXNlcm5hbWUiOiJhZG1pbiIsIkRlcCI6IjEzNSIsImV4cCI6MTc3NjExOTExNCwiaXNzIjoiZ2luLWJsb2cifQ.0HTtzHZjyd2mHo8VCy8icYROxmntRMuQhyoZsAYRL_M"
  9. },
  10. "_comment_database": "MySQL数据库连接配置",
  11. "database": {
  12. "host": "222.130.26.206",
  13. "port": 4000,
  14. "user": "whu",
  15. "password": "09093f4e6b33ddd",
  16. "database": "ws_data",
  17. "table_name": "dc_item_history_data_minute"
  18. },
  19. "_comment_scada": "SCADA系统配置 - PLC通信签名验证",
  20. "scada": {
  21. "secret": "237c92d2-8795-1094-11ef-00e2e48fce4a",
  22. "project_id": 92
  23. },
  24. "_comment_system": "系统运行参数配置",
  25. "system": {
  26. "use_model": 0,
  27. "_use_model_desc": "模型开关: 1=启用模型决策, 0=禁用模型仅记录数据 (支持运行时修改)",
  28. "trigger_value": 95,
  29. "_trigger_value_desc": "触发监控的控制值",
  30. "num_values_to_collect": 10,
  31. "_num_values_to_collect_desc": "每次收集的数据点数量",
  32. "poll_interval": 2,
  33. "_poll_interval_desc": "轮询间隔时间(秒)",
  34. "backwash_time": 100,
  35. "_backwash_time_desc": "默认反洗时间(秒)",
  36. "ceb_count": 45
  37. },
  38. "_comment_devices": "设备配置列表 - 每个设备的API调用参数",
  39. "devices": [
  40. {
  41. "_comment": "UF1超滤设备配置",
  42. "name": "UF1",
  43. "press_pv_item": "C.M.UF1_DB@press_PV",
  44. "_press_pv_item_desc": "用于历史数据查询的压差",
  45. "control_payload": {
  46. "_desc": "控制字读取配置 - 用于触发条件检测",
  47. "deviceId": "1",
  48. "deviceItems": "C.M.UF1_DB@word_control",
  49. "deviceName": "UF1_control_word",
  50. "project_id": 92
  51. },
  52. "target_payload": {
  53. "_desc": "跨膜压差读取配置 - 用于数据收集",
  54. "deviceId": "1",
  55. "deviceItems": "UF1_BW_After_TMP",
  56. "deviceName": "UF1_backwash_pressure_diff",
  57. "project_id": 92
  58. },
  59. "production_time_payload": {
  60. "_desc": "产水时长读取配置 - 用于模型输入",
  61. "deviceId": "1",
  62. "deviceItems": "C.M.UF1_DB@time_production",
  63. "deviceName": "UF1_production_time",
  64. "project_id": 92
  65. },
  66. "backwashing_payload": {
  67. "_desc": "反洗时长读取配置 - 用于模型输入",
  68. "deviceId": "1",
  69. "deviceItems": "C.M.UF1_DB@time_BW_SP",
  70. "deviceName": "UF1_time_BW_SP",
  71. "project_id": 92
  72. }
  73. },
  74. {
  75. "_comment": "UF2超滤设备配置",
  76. "name": "UF2",
  77. "press_pv_item": "C.M.UF2_DB@press_PV",
  78. "control_payload": {
  79. "deviceId": "1",
  80. "deviceItems": "C.M.UF2_DB@word_control",
  81. "deviceName": "UF2_control_word",
  82. "project_id": 92
  83. },
  84. "target_payload": {
  85. "deviceId": "1",
  86. "deviceItems": "UF2_BW_After_TMP",
  87. "deviceName": "UF2_backwash_pressure_diff",
  88. "project_id": 92
  89. },
  90. "production_time_payload": {
  91. "deviceId": "1",
  92. "deviceItems": "C.M.UF2_DB@time_production",
  93. "deviceName": "UF2_production_time",
  94. "project_id": 92
  95. },
  96. "backwashing_payload": {
  97. "deviceId": "1",
  98. "deviceItems": "C.M.UF2_DB@time_BW_SP",
  99. "deviceName": "UF2_time_BW_SP",
  100. "project_id": 92
  101. }
  102. },
  103. {
  104. "_comment": "UF3超滤设备配置",
  105. "name": "UF3",
  106. "press_pv_item": "C.M.UF3_DB@press_PV",
  107. "control_payload": {
  108. "deviceId": "1",
  109. "deviceItems": "C.M.UF3_DB@word_control",
  110. "deviceName": "UF3_control_word",
  111. "project_id": 92
  112. },
  113. "target_payload": {
  114. "deviceId": "1",
  115. "deviceItems": "UF3_BW_After_TMP",
  116. "deviceName": "UF3_backwash_pressure_diff",
  117. "project_id": 92
  118. },
  119. "production_time_payload": {
  120. "deviceId": "1",
  121. "deviceItems": "C.M.UF3_DB@time_production",
  122. "deviceName": "UF3_production_time",
  123. "project_id": 92
  124. },
  125. "backwashing_payload": {
  126. "deviceId": "1",
  127. "deviceItems": "C.M.UF3_DB@time_BW_SP",
  128. "deviceName": "UF3_time_BW_SP",
  129. "project_id": 92
  130. }
  131. },
  132. {
  133. "_comment": "UF4超滤设备配置",
  134. "name": "UF4",
  135. "press_pv_item": "C.M.UF4_DB@press_PV",
  136. "control_payload": {
  137. "deviceId": "1",
  138. "deviceItems": "C.M.UF4_DB@word_control",
  139. "deviceName": "UF4_control_word",
  140. "project_id": 92
  141. },
  142. "target_payload": {
  143. "deviceId": "1",
  144. "deviceItems": "UF4_BW_After_TMP",
  145. "deviceName": "UF4_backwash_pressure_diff",
  146. "project_id": 92
  147. },
  148. "production_time_payload": {
  149. "deviceId": "1",
  150. "deviceItems": "C.M.UF4_DB@time_production",
  151. "deviceName": "UF4_production_time",
  152. "project_id": 92
  153. },
  154. "backwashing_payload": {
  155. "deviceId": "1",
  156. "deviceItems": "C.M.UF4_DB@time_BW_SP",
  157. "deviceName": "UF4_time_BW_SP",
  158. "project_id": 92
  159. }
  160. }
  161. ],
  162. "_comment_usage": "配置文件使用说明",
  163. "_usage_notes": {
  164. "1_动态配置": "use_model支持运行时修改,无需重启程序",
  165. "2_签名验证": "PLC通信使用MD5签名验证,确保scada.secret与服务器端一致",
  166. "3_设备扩展": "新增设备时,复制现有设备配置并修改相应的deviceItems参数"
  167. }
  168. }