config.json 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  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过滤时长",
  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反洗时长",
  71. "project_id": 92
  72. },
  73. "ceb_payload": {
  74. "_desc": "CEB次数读取配置 - 用于下发",
  75. "deviceId": "1",
  76. "deviceItems": "C.M.UF1_DB@cycle_sp",
  77. "deviceName": "UF1CEB次数设定",
  78. "project_id": 92
  79. }
  80. },
  81. {
  82. "_comment": "UF2超滤设备配置",
  83. "name": "UF2",
  84. "press_pv_item": "C.M.UF2_DB@press_PV",
  85. "control_payload": {
  86. "deviceId": "1",
  87. "deviceItems": "C.M.UF2_DB@word_control",
  88. "deviceName": "UF2_control_word",
  89. "project_id": 92
  90. },
  91. "target_payload": {
  92. "deviceId": "1",
  93. "deviceItems": "UF2_BW_After_TMP",
  94. "deviceName": "UF2_backwash_pressure_diff",
  95. "project_id": 92
  96. },
  97. "production_time_payload": {
  98. "deviceId": "1",
  99. "deviceItems": "C.M.UF2_DB@time_production",
  100. "deviceName": "UF2过滤时长",
  101. "project_id": 92
  102. },
  103. "backwashing_payload": {
  104. "deviceId": "1",
  105. "deviceItems": "C.M.UF2_DB@time_BW_SP",
  106. "deviceName": "UF2反洗时长",
  107. "project_id": 92
  108. },
  109. "ceb_payload": {
  110. "_desc": "CEB次数读取配置 - 用于下发",
  111. "deviceId": "1",
  112. "deviceItems": "C.M.UF2_DB@cycle_sp",
  113. "deviceName": "UF2CEB次数设定",
  114. "project_id": 92
  115. }
  116. },
  117. {
  118. "_comment": "UF3超滤设备配置",
  119. "name": "UF3",
  120. "press_pv_item": "C.M.UF3_DB@press_PV",
  121. "control_payload": {
  122. "deviceId": "1",
  123. "deviceItems": "C.M.UF3_DB@word_control",
  124. "deviceName": "UF3_control_word",
  125. "project_id": 92
  126. },
  127. "target_payload": {
  128. "deviceId": "1",
  129. "deviceItems": "UF3_BW_After_TMP",
  130. "deviceName": "UF3_backwash_pressure_diff",
  131. "project_id": 92
  132. },
  133. "production_time_payload": {
  134. "deviceId": "1",
  135. "deviceItems": "C.M.UF3_DB@time_production",
  136. "deviceName": "UF3过滤时长",
  137. "project_id": 92
  138. },
  139. "backwashing_payload": {
  140. "deviceId": "1",
  141. "deviceItems": "C.M.UF3_DB@time_BW_SP",
  142. "deviceName": "UF3反洗时长",
  143. "project_id": 92
  144. },
  145. "ceb_payload": {
  146. "_desc": "CEB次数读取配置 - 用于下发",
  147. "deviceId": "1",
  148. "deviceItems": "C.M.UF3_DB@cycle_sp",
  149. "deviceName": "UF3CEB次数设定",
  150. "project_id": 92
  151. }
  152. },
  153. {
  154. "_comment": "UF4超滤设备配置",
  155. "name": "UF4",
  156. "press_pv_item": "C.M.UF4_DB@press_PV",
  157. "control_payload": {
  158. "deviceId": "1",
  159. "deviceItems": "C.M.UF4_DB@word_control",
  160. "deviceName": "UF4_control_word",
  161. "project_id": 92
  162. },
  163. "target_payload": {
  164. "deviceId": "1",
  165. "deviceItems": "UF4_BW_After_TMP",
  166. "deviceName": "UF4_backwash_pressure_diff",
  167. "project_id": 92
  168. },
  169. "production_time_payload": {
  170. "deviceId": "1",
  171. "deviceItems": "C.M.UF4_DB@time_production",
  172. "deviceName": "UF4反洗时长",
  173. "project_id": 92
  174. },
  175. "backwashing_payload": {
  176. "deviceId": "1",
  177. "deviceItems": "C.M.UF4_DB@time_BW_SP",
  178. "deviceName": "UF4反洗时长",
  179. "project_id": 92
  180. },
  181. "ceb_payload": {
  182. "_desc": "CEB次数读取配置 - 用于下发",
  183. "deviceId": "1",
  184. "deviceItems": "C.M.UF4_DB@cycle_sp",
  185. "deviceName": "UF4CEB次数设定",
  186. "project_id": 92
  187. }
  188. }
  189. ],
  190. "_comment_usage": "配置文件使用说明",
  191. "_usage_notes": {
  192. "1_动态配置": "use_model支持运行时修改,无需重启程序",
  193. "2_签名验证": "PLC通信使用MD5签名验证,确保scada.secret与服务器端一致",
  194. "3_设备扩展": "新增设备时,复制现有设备配置并修改相应的deviceItems参数"
  195. }
  196. }