config.json 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  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. "tmp_history_count": 5,
  38. "_tmp_history_count_desc": "保存最近N次TMP平均值,用于趋势判断(可调整为任意次数)"
  39. },
  40. "_comment_devices": "设备配置列表 - 每个设备的API调用参数",
  41. "devices": [
  42. {
  43. "_comment": "UF1超滤设备配置",
  44. "name": "UF1",
  45. "press_pv_item": "C.M.UF1_DB@press_PV",
  46. "_press_pv_item_desc": "用于历史数据查询的压差",
  47. "control_payload": {
  48. "_desc": "控制字读取配置 - 用于触发条件检测",
  49. "deviceId": "1",
  50. "deviceItems": "C.M.UF1_DB@word_control",
  51. "deviceName": "UF1_control_word",
  52. "project_id": 92
  53. },
  54. "target_payload": {
  55. "_desc": "跨膜压差读取配置 - 用于数据收集",
  56. "deviceId": "1",
  57. "deviceItems": "UF1_BW_After_TMP",
  58. "deviceName": "UF1_backwash_pressure_diff",
  59. "project_id": 92
  60. },
  61. "production_time_payload": {
  62. "_desc": "产水时长读取配置 - 用于模型输入",
  63. "deviceId": "1",
  64. "deviceItems": "C.M.UF1_DB@time_production",
  65. "deviceName": "UF1过滤时长",
  66. "project_id": 92
  67. },
  68. "backwashing_payload": {
  69. "_desc": "反洗时长读取配置 - 用于模型输入",
  70. "deviceId": "1",
  71. "deviceItems": "C.M.UF1_DB@time_BW_SP",
  72. "deviceName": "UF1反洗时长",
  73. "project_id": 92
  74. },
  75. "ceb_payload": {
  76. "_desc": "CEB次数读取配置 - 用于下发",
  77. "deviceId": "1",
  78. "deviceItems": "C.M.UF1_DB@cycle_sp",
  79. "deviceName": "UF1CEB次数设定",
  80. "project_id": 92
  81. }
  82. },
  83. {
  84. "_comment": "UF2超滤设备配置",
  85. "name": "UF2",
  86. "press_pv_item": "C.M.UF2_DB@press_PV",
  87. "control_payload": {
  88. "deviceId": "1",
  89. "deviceItems": "C.M.UF2_DB@word_control",
  90. "deviceName": "UF2_control_word",
  91. "project_id": 92
  92. },
  93. "target_payload": {
  94. "deviceId": "1",
  95. "deviceItems": "UF2_BW_After_TMP",
  96. "deviceName": "UF2_backwash_pressure_diff",
  97. "project_id": 92
  98. },
  99. "production_time_payload": {
  100. "deviceId": "1",
  101. "deviceItems": "C.M.UF2_DB@time_production",
  102. "deviceName": "UF2过滤时长",
  103. "project_id": 92
  104. },
  105. "backwashing_payload": {
  106. "deviceId": "1",
  107. "deviceItems": "C.M.UF2_DB@time_BW_SP",
  108. "deviceName": "UF2反洗时长",
  109. "project_id": 92
  110. },
  111. "ceb_payload": {
  112. "_desc": "CEB次数读取配置 - 用于下发",
  113. "deviceId": "1",
  114. "deviceItems": "C.M.UF2_DB@cycle_sp",
  115. "deviceName": "UF2CEB次数设定",
  116. "project_id": 92
  117. }
  118. },
  119. {
  120. "_comment": "UF3超滤设备配置",
  121. "name": "UF3",
  122. "press_pv_item": "C.M.UF3_DB@press_PV",
  123. "control_payload": {
  124. "deviceId": "1",
  125. "deviceItems": "C.M.UF3_DB@word_control",
  126. "deviceName": "UF3_control_word",
  127. "project_id": 92
  128. },
  129. "target_payload": {
  130. "deviceId": "1",
  131. "deviceItems": "UF3_BW_After_TMP",
  132. "deviceName": "UF3_backwash_pressure_diff",
  133. "project_id": 92
  134. },
  135. "production_time_payload": {
  136. "deviceId": "1",
  137. "deviceItems": "C.M.UF3_DB@time_production",
  138. "deviceName": "UF3过滤时长",
  139. "project_id": 92
  140. },
  141. "backwashing_payload": {
  142. "deviceId": "1",
  143. "deviceItems": "C.M.UF3_DB@time_BW_SP",
  144. "deviceName": "UF3反洗时长",
  145. "project_id": 92
  146. },
  147. "ceb_payload": {
  148. "_desc": "CEB次数读取配置 - 用于下发",
  149. "deviceId": "1",
  150. "deviceItems": "C.M.UF3_DB@cycle_sp",
  151. "deviceName": "UF3CEB次数设定",
  152. "project_id": 92
  153. }
  154. },
  155. {
  156. "_comment": "UF4超滤设备配置",
  157. "name": "UF4",
  158. "press_pv_item": "C.M.UF4_DB@press_PV",
  159. "control_payload": {
  160. "deviceId": "1",
  161. "deviceItems": "C.M.UF4_DB@word_control",
  162. "deviceName": "UF4_control_word",
  163. "project_id": 92
  164. },
  165. "target_payload": {
  166. "deviceId": "1",
  167. "deviceItems": "UF4_BW_After_TMP",
  168. "deviceName": "UF4_backwash_pressure_diff",
  169. "project_id": 92
  170. },
  171. "production_time_payload": {
  172. "deviceId": "1",
  173. "deviceItems": "C.M.UF4_DB@time_production",
  174. "deviceName": "UF4反洗时长",
  175. "project_id": 92
  176. },
  177. "backwashing_payload": {
  178. "deviceId": "1",
  179. "deviceItems": "C.M.UF4_DB@time_BW_SP",
  180. "deviceName": "UF4反洗时长",
  181. "project_id": 92
  182. },
  183. "ceb_payload": {
  184. "_desc": "CEB次数读取配置 - 用于下发",
  185. "deviceId": "1",
  186. "deviceItems": "C.M.UF4_DB@cycle_sp",
  187. "deviceName": "UF4CEB次数设定",
  188. "project_id": 92
  189. }
  190. }
  191. ],
  192. "_comment_usage": "配置文件使用说明",
  193. "_usage_notes": {
  194. "1_动态配置": "use_model支持运行时修改,无需重启程序",
  195. "2_签名验证": "PLC通信使用MD5签名验证,确保scada.secret与服务器端一致",
  196. "3_设备扩展": "新增设备时,复制现有设备配置并修改相应的deviceItems参数"
  197. }
  198. }