-
Notifications
You must be signed in to change notification settings - Fork 113
Grottserver
Grottserver is emulating the Growatt server so you do not need a connection with the growatt servers (in china) anymore but still can use the features of grott sending data to MQTT(and everything using this like HA, Nodered etc), Inlfuxdb or pvoutput.
Grottserver provides also an API interface to read and write Inverter and Datalogger registers.
The server is listing to 2 ports: 5782 for API commands (and a simple browser interface) and 5781 for emulating the growatt server.
In schematics:
The Grott docker container image only contains the Grott proxy.
The Grottserver docker container image runs both Grott and Grottserver (but as shown in the picture with one communication flow).
pip3 install libscrc
pyhon3 grottserver.py
grottserver will start to listen at the server ip address and port 5781 for data, and at port 5782 for API commands.
[Growatt]
#ip address and port of Growatt server (specify only if IP has changed)
ip = <your.server.ip.address>
port = 5781 <== differs from previous grottserver version!!!!!!
sudo service grott restart
There is a Grottserver docker image available (ledidobe/grottserver). This image contains the Grott proxy and Grottserver and can work as a standalone solution.
For more information see: https://hub.docker.com/repository/docker/ledidobe/grottserver/general
(from browser)
http://<your ip>:5782
get <your ip>:5782/datalogger
get <your ip>:5782/inverter
get <your ip>:5782/datalogger?command=register®ister=<regno>&datalogger=<your datalogger>
- register in decimal
- output json "value" in text
get <your ip>:5782/inverter?command=register®ister=<regno>&inverter=<your inverter>&format=<dec,hex,text>
- register in decimal
- output json "value" in decimal (standard) or hex (format = hex), text (format = text)
put <your ip>:5782/datalogger?command=register®ister=<regno>&datalogger=<your datalogger>&value=<your value>
- register in decimal
- "value" in text
put <your ip>:5782/inverter?command=register®ister=<regno>&inverter=<your inverter>&value=<your value>&format=<dec,hex,text>
- register in decimal
- "value" in decimal (standard) or hex (format = hex), text (format = text)
get <your ip>:5782/datalogger?command=regall&datalogger=<your datalogger>
- shows all datalogger register information being read by the api command or published by datalogger
- initial time information is sent to early (before grottserver sets time command) and not accurate
get <your ip>:5782/inverter?command=regall&inverter=<your inverter>
- shows all inverter register information being read by the api command
- datalogger registers not document by growatt.
- datalogger register 4 => update interval in seconds (e.g 5 or 1 or 0.5)
- datalogger register 31 => time (e.g 2022-05-17 21:01:50)
- datalogger register 17 => growatt server (now grott) ip addres (e.g. 192.168.0.206)
- datalogger register 18 => growatt server (now grott) ip port (e.g. 5279)
- during startup of the inverter grottserver will sent a time command (with server time) to sync time
- inverter registers are documented in the modbus protocol documents from growattat the holding reg paragraf from growatt (see discussion #98).
- there are separate protocol documents for the xxxx-s, SPF and TL-X/TL3-X/MIX/SPA/SPH (1 document).
- inverter register documentation is not always complete (at least for xxxx tl-s inverters.
- inverter register read /write command response are relatively "slow"(seconds) and sometimes not valid (showing "0000" while that is not always the value). A second read is then necessary. Until now I do not have a answer for this problem. Seems to be a communication mismatch between inverter / datalogger.
- Inverter register units to be used are document in the protocol document (e.g 0.1v, 0,1VA, percent, 0.01hz, ASCII). E.g. this means change grid voltage low to 185 , you have to specify 1850. This is different from the Growatt site but unavoidable without a lot of programming and data analyses (for all inverters).
- All get commands can also be sent via the browser, for put you need a tool like postman or curl.