heshixin 1 долоо хоног өмнө
parent
commit
8f457c3698
1 өөрчлөгдсөн 7 нэмэгдсэн , 2 устгасан
  1. 7 2
      iotdb_util.py

+ 7 - 2
iotdb_util.py

@@ -225,7 +225,7 @@ def get_terminal_modify_data(org_id, terminal_ids, trigger_time_stamp):
     return result
 
 
-def get_chiller_modify_data(org_id, chiller_ids, capacityRates, trigger_time_stamp):
+def get_chiller_modify_data(org_id, chiller_ids, power_rates, trigger_time_stamp):
     result = {}
     if len(str(trigger_time_stamp)) == 13:
         trigger_time_stamp = trigger_time_stamp / 1000
@@ -235,7 +235,7 @@ def get_chiller_modify_data(org_id, chiller_ids, capacityRates, trigger_time_sta
     for index, chiller_id in enumerate(chiller_ids):
         dbpath = "root.org_" + str(org_id) + ".dev_" + str(chiller_id)
         data = query_chiller_7days(dbpath, start_time.strftime('%Y-%m-%dT%H:%M:00'),
-                                   trigger_time.strftime('%Y-%m-%dT%H:%M:00'), capacityRates[index])
+                                   trigger_time.strftime('%Y-%m-%dT%H:%M:00'), power_rates[index])
         result[str(chiller_id)] = data
 
     return result
@@ -257,10 +257,15 @@ def get_station_modify_data(org_id, device_id, trigger_time_stamp):
 if __name__ == '__main__':
     IotDbClient('192.168.1.70', username='root', password='root')
 
+    # 组织/租户ID
     org_id = 100
+    # 冷机ID
     chiller_ids = [159]
+    # 超标监测点ID
     terminal_ids = [121, 120]
+    # 冷机额定功率
     power_rates = [100, 100]
+    # 群控柜ID
     controller_id = 159
 
     trigger_time_stamp = 1748251717992