Growatt Solar Inverter Binding [4.0.0;4.2.0)

logo

This binding supports the integration of Growatt solar inverters.

It depends on the independent Grott proxy server application. This intercepts the logging data that the Growatt inverter data logger normally sends directly to the Growatt cloud server. It sends the original (encoded) data onwards to the cloud server (so the cloud server will not notice anything different), and it also sends a (decoded) copy to OpenHAB.

Latest News

  • The binding has now been adopted into openHAB main distribution. So it will be part of OH v4.2 MILESTONE and SNAPSHOT builds from now on.
  • The JAR on the link below will NOT be regularly updated. For latest versions use the one in the openHAB main distribution.

Changelog

Version 1.0

  • Initial release
  • Added rule actions to setup battery charging programs

Resources

4 Likes

In Readme.md the following configuration in grott.ini is suggested:

[extension] // enable the ‘grottext’ extension
extension = True
extname = grottext
extvar = {“url”: "http://127.0.0.1:8080/growatt"} // or ip address of openHAB (if remote)

This does NOT work for me.

I had to use:

extvar = {“ip”: “127.0.0.1”, “port” : “8080”}

AND changed in grottext.py:

url = “http://” + conf.extvar[“ip”] + “:” + str(conf.extvar[“port”] + “/growatt”)

I had a PR merged into Grott that should have fixed your issue. But maybe you are using an earlier version of Grott that did not yet have that fix in it?

Thank you! I cross-checked…

I downloaded Master Branch Version 2.8.3 … and your code change is in PR 2.7.8.
So, it seems the changes did not find their way into the master branch.
Both solutions work and require - so far - changes in the Master-Branch grottext.py file.
Anyway … I have all my PV data in OpenHab :slight_smile:

1 Like

Hello,

I am a newbie and using growatt binding (thanks for the very good work). Everything works perfectly, but there is no battery-SOC between the channels of the inverter.
The inverter type is SPF5000ES.
Grott works fine - I can see all data including battery-SOC.
My OH installation is on a win10 pc.

I hope I am asking this question in the right place.

Thank you and best regards

That is an “advanced” channel; so perhaps you did not check the “show advanced” check box at the top right of the channel list in Main UI?

I have advanced channels selected and among the others, battery-voltage is the only one there as far as the battery is concerned

Perhaps try deleting and recreating the inverter thing. And if that does not work, then please turn on log trace on the binding and post the results.

openhab.log (14.6 KB)

inverter channels




That was an easy one! The current binding is looking for a property with the name batterySOC whereas your inverter is producing one with the name batterySoc. (This is a little bit typical of Growatt Chinese engineers who don’t understand nuances of the Roman alphabet). I will create a new version that supports both capitalizations.


EDIT: I will also check your log in case there are other odd capitalizations on other properties…

@Atinjo55 I was comparing the property fields from the ‘handleGrottContent() json’ entries in your log file above against the OH binding field names (below) and I can see some possible discrepancies. In particular I can see there are some fields in your log which are mapped to the same OH binding field names … but which have different values so I think there are some wrong mappings in the OH binding. And to resolve those wrong mappings I would appreciate your help about the actual meaning of those fields in your inverter…

  • op_va / AC_InVA
  • OP_Curr / Inv_Curr
  • ebatDischarToday / eacDischarToday
  • ebatDischarTotal / eacDischarTotal

I think the mapping is mostly fine.
AC_InVA (AC input apparent power) = 0 → because I am not connected to the grid during the day.
But I see that the value in op_va is not correct.
There is also a difference in grott between “- Grott values ​​retrieved:” and “- MQTT jsonmsg:” (see attachment 1)
Most values ​​need to be multiplied by .01
Some usage descriptions are also on the growatt server (attachment 2)


  • op_va - output apparent power
  • AC_InVA - AC input apparent power
  • OP_Curr - output current
  • Inv_Curr - inv current
  • ebatDischarToday - Bat discharge Energy today
  • eacDischarToday - AC discharge Energy today
  • ebatDischarTotal - Bat discharge Energy total
  • eacDischarTotal - AC discharge Energy total

according to “Growatt OffGrid SPF5000 Modbus RS485 RTU Protocol” these field names have the descriptions above and probably the channels should be like that too.

I don’t really understand the mapping in the above code; what does this part of the code do:
public @Nullable @SerializedName(value = “op_va”, alternate = { “AC_InVA” }) Integer inverter_va;

Yeah. It is clear what the former means. But what do you think the latter one means? The AC supply is not a battery, so it cannot ‘discharge’… Does the app tell you anything more?

@Atinjo55 based on your log, I shall make some changes to the channel mappings, and also add some new channels. I will post you a link to the new Jar file, and I hope you can test it and confirm that it shows the correct data for your inverter type.

sorry I was away for a while.
spf5000es is not an inverter at all but a storage inverter

in the upper left corner under “photovoltaic device-power-rated power=20Kw” it is not the power of my solar power plant but the power of my four inverters (4X5Kw)

I am sending three pictures here for cross reference between the grott and the app.
They are all taken at approximately the same time when the devices are connected to the grid and the batteries are charging.
I will do the same later in the day when the devices are disconnected from the grid and the solar power plant is operating.
My installation does not transmit electricity to the grid.



For reference can you please tell me the model number of those inverters, plus send me the OH log for one of them?