File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -13,14 +13,21 @@ Library for NodeMcu / ESP8266 (and Arduino?) for sending measurements to an Infl
13
13
14
14
// connect to WiFi
15
15
16
- Influxdb influx (INFLUXDB_HOST); // port defaults to 8086
16
+ Influxdb influx (INFLUXDB_HOST); // port defaults to 8086, use 9999 for v2
17
17
// or to use a custom port
18
18
Influxdb influx(INFLUXDB_HOST, INFLUXDB_PORT);
19
19
20
20
// set the target database
21
21
influx.setDb(INFLUXDB_DATABASE);
22
22
// or use a db with auth
23
23
influx.setDbAuth(INFLUXDB_DATABASE, INFLUXDB_USER, INFLUXDB_PASS) // with authentication
24
+
25
+ // To use the v2.0 InfluxDB
26
+ influx.setVersion(2);
27
+ influx.setOrg("myOrganization");
28
+ influx.setBucket("myBucket");
29
+ influx.setToken("myToken");
30
+ influx.setPort(9999);
24
31
```
25
32
26
33
## Sending a single measurement
You can’t perform that action at this time.
0 commit comments