Skip to content

Grott Configuration

Johan Meijer edited this page Aug 12, 2022 · 7 revisions

The "behaviour" of Grott can be specified at 3 places:

  1. At startup
  2. Via environmental variables (mostly used as Grott runs in a Docker container)
  3. In the configuration file (standard: grott.ini, example can be found at: https://github.com/johanmeijer/grott/tree/master/examples)

Startup commands parameters overides, environmentals and configuration file settings
Environmentals overides configuration file settings

Minimal settings

With version 2.1.1 automatic protocol detection is introduced and the known inverters are recognized automatically. The .ini settings can be very limited.

Default

The default values (nothing specified) can be used if only MQTT needs to be enabled (without security) and MQTT is running at the same machine as Grott

Minimal configuration for MQTT running at another machine:

Specify MQTT ip.

Minimal configruation for with PVOutput enabled:

nomqtt=True (If no MQTT msg needs to be sent) pvoutput = True
apikey = yourapikey
systemid = yoursystemid

grott.ini

The configuration file is defined in 4 sections. A general section, one for specifing the growatt server details, one for specifing the MQTT broker information and one for the PVOutput.org settings.

Remark1

Since version 2.1.1 Automatic prototcol detection can be used
Specify compat = False (default) specifing other parms like valueoffset or decrypt is not needed anymore (this solves also remark 1)

Remark2

ADD/ Change Growatt server section only as the server has changed (to be announced by Growatt) Not defining the MQTT section will sent messages the local MQTT server implementation.

Remark3

Since March 2020 offset has been changed for some inverters.
Add compat = True, valueoffset = 26 to support this change if automatic protocol detection is not used(see also remark1!!!)

Settings explained in detail:

Start-up Config file (.ini) Environmental Variable Description
[Startup only ]
-h, --help Show help message and exit
-t, --trace Enable trace, use in addition to verbose option (only available in sniff mode)
--version Show program's version number and exit
-c [config file] Sets config file if not specified config file is grott.ini
-o [output file] Set output file, if not specified output is stdout
[Generic ]
-v, --verbose verbose=True/False gverbose=True/False Specify verbose for extended messaging
Default: Verbose = False
minrecl = xxx gminrecl = xxx Debug/Perfomance parameter. Doesnot process record less then specified recl.
Default: minrecl=100. In normal operation no need for change
-m [mode] mode =sniff/proxy gmode =sniff/proxy Set mode (sniff or proxy)
Default: mode=proxy (from version 2.1 and higher)
#ip = 0.0.0.0 ip = x.x.x.x ggrottip = x.x.x.x Specify IP address to listen to (proxy mode only)
Default: ip=0.0.0.0  (server IP address), In normal operation no need for change
#port = 5279   port = yyyy ggrottport = yyyy Specify port to listen to (proxy mode only)
Default port= 5279 , In normal operation no need for change
-b, --blockcmd blockcmd=True/False  gblockcmd=True/False  Blocks commands from outside (to change inverter and shine devices settings)
Default: blockcmd=False
-n, --noipf noipf=True/False gnoipf=True/False Allow Growatt IP address changes from outside (if commands are blocked with blockcmd=True)
Default: noipf=False  (advice only use this for a short testing period)
compat= True/False gompat=True/False Enable / disable automatic protocol processing
Default: compat=False ,In normal operation no need for change
valueoffset=x gvalueoffset=x Set offset of data record, can only be used in combination with compat=True
Default: valueoffset=6 (since 2020, most off data records start at 26)
decrypt=True gdecrypt=True Specify if data record needs to decrypted, can only be used in combination with compat=True
Default: decrypt=True
-i [inverterid] inverterid=ABC1234567 ginverterid=ABC1234567 Specify inverter id, needs to be be used in combination with compat=True
Default: inverterid=automatic
[Growatt]
ip=x.x.x.x ggrowattip=x.x.x.x Ip address of Growatt server (specify only if IP has changed)
Default: ip = 47.91.67.66
port=yyyy ggrowattport=yyyy IP port of Growatt server (specify only if IP has changed)
Default: ip = 5279
[MQTT]
-nm, --nomqtt #nomqtt=True/False gnomqtt=True/False Disable mqtt send (be aware nomqtt = True means no MQTT processing will be done)
Default nomqtt=False
ip=x.x.x.x gmqttip=x.x.x.x IP address of MQTT server
Default ip=local (MQTT server runs at same servef as growatt)
port=yyyy gmqttip=yyyy IP port of MQTT server
Default: ip = 1883
topic=namex/namey gmqtttopic=namex/namey Topic name where MQTT message is published
Default: topic= energy/growatt
auth=True/False gmqttauth=True/False Use MQTT Security
Default: auth=False (no mqtt security used)
user=grott gmqttuser = grott MQTT User (only used if MQTT security is enabled, mqttauth=True)
Default: user=grott
password = growatt2020 gmqttpassword=growatt2020 MQTT password (only used if MQTT security is enabled, mqttauth=True)
Default: user=growatt2020
[PVOutput]
-p, --pvoutput pvoutput=True/False gpvoutput=True/False Enable pvoutput send
Default: pvoutput=False
apikey = yourapikey gpvapikey = yourapikey PVOutput.org apikey (only used if pvoutput=True), use this only if you have 1 inverter
use this if you have 1 inverter
systemid = 12345 gpvsystemid = PVOutput.org systemid (only used if pvoutput=True),
use this if you have 1 inverter
systemidX = gpvsystemidX = PVOutput.org systemid (only used if pvoutput=True)
use this if you have 1 or more inverters (>release 2.2.6), x = number (e.g 1,2,3 etc)
inverteridX = gpinverteridX = Specify inverterid for pvoutput systemidX
use this if you have 1 or more inverters (>release 2.2.6), x = number (e.g 1,2,3 etc)
systemidX+1 = <pv output ssidX+1> gpvsystemidX+1 = <pv output ssidX+1> PVOutput.org systemid (only used if pvoutput=True)
use this if you have 1 or more inverters (>release 2.2.6), x = number (e.g 2,3 etc)
inverteridX+1 = <inverteridX+1> gpinverteridX+1 = <inverteridX+1> Specify inverterid for pvoutput systemidX
use this if you have 1 or more inverters (>release 2.2.6), x = number (e.g 2,3 etc)
[extension]
extension = True gextension = True enable / disable extention
extname = ext_name gextname = ext_name extension name
extvar = {"var1": "value"} gextvar = {"var1": "value"} define variables to be used in the extension