mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-08 04:26:58 +03:00
Rewrite InfluxDB Interfache (#3520)
* Replace influxdb interface * Implement InfluxDBV2 * Update interface_influxdb.cpp * Cleanup new InfluxDB interface
This commit is contained in:
@@ -117,7 +117,12 @@ bool ClassFlowInfluxDB::ReadParameter(FILE* pfile, string& aktparamgraph)
|
||||
{
|
||||
// ESP_LOGD(TAG, "Init InfluxDB with uri: %s, measurement: %s, user: %s, password: %s", uri.c_str(), measurement.c_str(), user.c_str(), password.c_str());
|
||||
LogFile.WriteToFile(ESP_LOG_DEBUG, TAG, "Init InfluxDB with uri: " + uri + ", user: " + user + ", password: " + password);
|
||||
InfluxDBInit(uri, database, user, password);
|
||||
|
||||
/////////////////////// NEW //////////////////////////
|
||||
// InfluxDBInit(uri, database, user, password);
|
||||
influxDB.InfluxDBInitV1(uri, database, user, password);
|
||||
/////////////////////// NEW //////////////////////////
|
||||
|
||||
InfluxDBenable = true;
|
||||
} else {
|
||||
LogFile.WriteToFile(ESP_LOG_DEBUG, TAG, "InfluxDB init skipped as we are missing some parameters");
|
||||
@@ -169,7 +174,12 @@ bool ClassFlowInfluxDB::doFlow(string zwtime)
|
||||
}
|
||||
|
||||
if (result.length() > 0)
|
||||
InfluxDBPublish(measurement, namenumber, result, timeutc);
|
||||
//////////////////////// NEW //////////////////////////
|
||||
// InfluxDBPublish(measurement, namenumber, result, timeutc);
|
||||
influxDB.InfluxDBPublish(measurement, namenumber, result, timeutc);
|
||||
//////////////////////// NEW //////////////////////////
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user