Skip to content

InfluxDB Support

Johan Meijer edited this page Dec 31, 2020 · 4 revisions

Grott 2.3.x supports direct output influxDB

If writing to influxdb is enable next to optional writing to MQTT and PVOUTPUT a record will be written to a influxdb (default: grottdb). For each inverter a separate measurement will be created with inverterid as name.

Grott 2.3.1 also support Influxdb v2. Below the differences in enabling influxdb V1 or V2 support are described:

For influxdb V1 grott will create the database if it is not defined yet. Be aware the user needs to be authorized (admin rights) to create a databas.

be aware you have to install influxdb in python first:

for influxdb V1:

sudo pip3 install influxdb 

for influxdb V2:

sudo pip3 install influxdb-client

parameters to enable output to influxdb (.ini)

for influxdb V1:

[influx]
influx = true
dbname = grottdb
ip = localhost
port = 8086
user = grott
password = growatt2020

for influxdb V2:

[influx]
influx = true
influx2 = true
ip = localhost
port = 8086
token  = influx_token
org  = your_org
bucket = your_bucket 

docker environmental variables:

for influxdb V1:

ginflux = true
gifdbname = grottdb
gifip = localhost
gifport = 8086
gifuser = grott
gigpassword = growatt2020

for influxdb V2:

ginflux = true
ginflux2 = true
gifip = localhost
gifport = 8086
giftoken  = influx_token
giforg  = your_org
gifbucket = your_bucket 

date-time

influxdb is a time series database. Grott will set the record time to the GMT time of the record created. This means that in case athe grott server or invert (depends which time is used) is using a local time the time will be changed to the GMT (UTC) time.

date-time advanced

By default the offset of the server from GMT is used to correct the influx time. In some cases this might not be accurate enough (e.g. having a lot of buffered data created bufore a Daylight Saving Change).
If you think that is a problem you can specify in the [generic] part of .ini:

  timezone = <your timezone> (eg timezone = europe/amsterdam)

or for docker:

  gtimezone = <your timezone> 

The timezone will then be used to calculate the GMT date-time. In this case DST changes are taken into account.