Skip to content

Commit a681065

Browse files
committed
InfluxDB authentication support added.
1 parent a4aa032 commit a681065

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ Library for NodeMcu / ESP8266 (and Arduino?) for sending measurements to an Infl
77
#define INFLUXDB_HOST "192.168.0.32"
88
#define INFLUXDB_PORT "1337"
99
#define INFLUXDB_DATABASE "test"
10+
//if used with authentication
11+
#define INFLUXDB_USER "user"
12+
#define INFLUXDB_PASS "password"
1013

1114
// TODO: connect to WiFi
1215

@@ -16,6 +19,8 @@ Library for NodeMcu / ESP8266 (and Arduino?) for sending measurements to an Infl
1619

1720
// set the target database
1821
influx.setDb(INFLUXDB_DATABASE);
22+
// or
23+
influx.setDbAuth(INFLUXDB_DATABASE, INFLUXDB_USER, INFLUXDB_PASS) // with authentication
1924
```
2025
2126
## Sending a single measurement

0 commit comments

Comments
 (0)