Simple library for sending measurements to an InfluxDB with a single network request. Supports ESP8266 and ESP32.
InfluxDBClient::writeRecord(const char *record)
.maxRetryAttempts
to zero: client.setWriteOptions(WriteOptions().maxRetryAttempts(0));
InfluxDBClient::setStreamWrite(bool enable = true)
. Writing by streaming lines of batch saves RAM as it sends data without allocating a buffer. On the other hand, this way of writing is about half times slower than the classic way, when allocating the buffer for writing the whole batch.HTTPOptions::httpReadTimeout
is also set as the connect timeout for HTTP connection on ESP32. It also works for HTTPS connection since ESP32 Arduino Core 2.0.0.InfluxDBClient::setInsecure
now works also for ESP32. Requires Arduino ESP32 SDK 1.0.5 or higherSecureWrite
and SecureBatchWrite
demos enhanced with example about using untrusted connection