@@ -208,27 +208,35 @@ def ep_read_outputs(self):
208
208
raise JobExceptionSimulation (f"EP returned an api error while reading from point: { point .name } " )
209
209
point .value = value
210
210
if self .options .historian_enabled :
211
- influx_points .append ({
212
- "measurement" : self .run .ref_id ,
213
- "time" : self .run .sim_time ,
214
- "value" : value ,
215
- "id" : point .ref_id ,
216
- "point" : True ,
217
- "source" : "alfalfa"
218
- })
211
+ influx_points .append ({"fields" :
212
+ {
213
+ "value" : value
214
+ }, "tags" :
215
+ {
216
+ "id" : point .ref_id ,
217
+ "point" : True ,
218
+ "source" : "alfalfa"
219
+ },
220
+ "measurement" : self .run .ref_id ,
221
+ "time" : self .run .sim_time ,
222
+ })
219
223
for additional_point in self .additional_points :
220
224
value = self .ep_api .exchange .get_meter_value (self .ep_state , additional_point .handle )
221
225
value = additional_point .converter (value )
222
226
additional_point .point .value = value
223
227
if self .options .historian_enabled :
224
- influx_points .append ({
225
- "measurement" : self .run .ref_id ,
226
- "time" : self .run .sim_time ,
227
- "value" : value ,
228
- "id" : additional_point .point .ref_id ,
229
- "point" : True ,
230
- "source" : "alfalfa"
231
- })
228
+ influx_points .append ({"fields" :
229
+ {
230
+ "value" : value
231
+ }, "tags" :
232
+ {
233
+ "id" : additional_point .point .ref_id ,
234
+ "point" : True ,
235
+ "source" : "alfalfa"
236
+ },
237
+ "measurement" : self .run .ref_id ,
238
+ "time" : self .run .sim_time
239
+ })
232
240
if self .historian_enabled :
233
241
try :
234
242
response = self .influx_client .write_points (points = influx_points ,
0 commit comments