Skip to content

Commit d84fb01

Browse files
committed
updated Readme for v2 support
1 parent f96e77e commit d84fb01

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,21 @@ Library for NodeMcu / ESP8266 (and Arduino?) for sending measurements to an Infl
1313

1414
// connect to WiFi
1515

16-
Influxdb influx(INFLUXDB_HOST); // port defaults to 8086
16+
Influxdb influx(INFLUXDB_HOST); // port defaults to 8086, use 9999 for v2
1717
// or to use a custom port
1818
Influxdb influx(INFLUXDB_HOST, INFLUXDB_PORT);
1919

2020
// set the target database
2121
influx.setDb(INFLUXDB_DATABASE);
2222
// or use a db with auth
2323
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);
2431
```
2532
2633
## Sending a single measurement

0 commit comments

Comments
 (0)