Growatt Inverter - What to do now?

I tried to follow the instructions for a docker setup but something is going wrong.

I use a Pi3 B with the most recent PiOS from december 2023 which I installed yesterday and also did all the updates.

Then installed docker and portainer which are working out of the box.

Finally I have pulled the grott container , but not the grottrpi cause it had been anounced that it will no longer be maintained and that from 2.8.2 beta or so there would be a general version for all which I should be able to pull with
docker pull ledidobe/grott

but somewhere there things must have gone wrong cause I get a platform error

**_docker run -d -p 5279:5279 --restart on-failure -e gmqttip="192.168.178.26" ledidobe/grott
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
e3d974e2351012c8ae6e37d7b12a2f5fe9a6fece9dc52245df77fd73a7055924_**

I assume it might have to do with the latest official release or stable which should be 2.8.3 but maybe I am only getting the older 2.7.8 version cause 2.8.2 and 2.8.3 were or stilll are .

There is nothing mentioned how to get the specific docker version needed.
I followed first the grottrpi and then went on to this docker container due to the general container for all platforms.

https://hub.docker.com/r/ledidobe/grott

Maybe you have an idea what went wrong cause I have just a pi 3b+ laying around for testing?

thanks a lot

UPDATE:

after a full reboot the situation changed a bit cause now I get a different error

docker run -d -p 5279:5279 --restart on-failure -e gmqttip="192.168.178.26" ledidobe/grott
docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/create": dial unix /var/run/docker.sock: connect: permission denied.
See 'docker run --help'.

What ip adress is needed in this command:
the local of the Pi3 running the docker grott syste or that of the HomeAssistant Pi4 ?
I have tried but got the same error

And how can I check which container version I had pulled, that 2.8.3 beta or so or the last stable 2.7.8

Thanks !

In the documentation it refers to another image for rpi

Docker support · johanmeijer/grott Wiki (github.com)

And the ip is where to find the MQTT …for me this is on the same machine as where I run grott.
An alternative is to run it on ‘host’ … I apparently did this in the past but forgot why, posisbly to avoid some network connectivity issues
that would then look like

docker run -d --name "grott" --net=host -v /..YOUR-path-to-persistent-grott-volume.../grott/grott.ini:/app/grott.ini --restart on-failure -e TZ=Europe/Paris -e gmqttip="192.168.1.20" ledidobe/grottrpi

EDIT: do not forget the volume-mapping to be able to easy-edit your ini file

1 Like

Yes, but that is not the end cause if you follow there the docker support you end up here on the grottrpi docker container

https://hub.docker.com/r/ledidobe/grottrpi

And here you find the anounced end off support
2023-07-26: From version 2.8.2 the grottrpi image will not be supported anymore
The new 2.8.2 grott image (ledidobe/grott:2.8.2) is build for multiple architectures and will support ARM V6/V7, ARM64 and AMD64).
You can find the grott images here: Docker

and this lead to ‘Docker’ where I got the command for pulling that container

docker pull ledidobe/grott

Which I did. And then I followed the grott instructions from here

using the docker command

docker run -d -p 5279:5279 --restart on-failure -e gmqttip=“192.168.0.206” ledidobe/grott

where I had replaced the ip “192.168.0.206” with that of my Pi 3 where docker is running.

I still get the error

I have not tried what you also mentioned cause I did not really understand what you meant with mapping and the ini files. I simply had tried to set it up as Johann had written but somehow it did not work out.

Any ideas what I could have gotten wrong, a wrong docker container like the older 2.7.8 and not the 2.8.3.beta ?

thansk

I have no clue why not accepted…did you install docker as root?
Maybe execute it via sudo?

sudo docker ...
1 Like

So i tried sudo but still got an error, but now a different one.

it sounds like I did not get the general docker image mentioned which would require 2.8.3 or so as mentioned here

2.8.3 is called beta but how do I pull the 2.8.3 beta cause I assume I got the stable version 2.7.8 which has no multiple architecture support.

try to use the exact version … ledidobe/grott:2.8.3

EDIT: and again…use a -v to map to a grott.ini…else you need to start the comntainer and then enter to container to edit the grott.ini…plus (worse) when you upgrade the container, grott.ini will be overwritten

1 Like

Yes, now it told me that it could not find it locally and started the download which is still running.

I had read this but sorry, I have no clue what that means and I also had not found that in the documentation provided by growatt.
I had simply try to follow his instructions assuming that this must work, but it did not so far.

Right now the system is rebooting and I hope to see a progress.

UPDATE:
I do not know how it looks if it is running but it looks like a progress cause the errors have gone as you can see here:

pi@PiOS64bit:~ $
sudo docker run -d -p 5279:5279 --restart on-failure -e gmqttip="192.168.178.26" ledidobe/grott:2.8.3
7e1354ddbc4de6f63312406a679339cb4ca2dce6a4672e246ee4da832136d1fa
pi@PiOS64bit:~ $

I will check it out later cause I still have to work on the roof and I am jumping from the roof to the laptop back and force. I will continue according to the wiki provided and try to get through to write it all down that newbies will have a better chance.

Final question: mqtt has 2 sides, the server and receiver. grott is receiving the modbus messages from the inverter and forwarding those to growatt server and to the options mentioned in grott like grafana, influx, pv out and mqtt.

But what ip adress do I have to use in that line which has started the docker grott?
the grott ip or my homeasistant ip cause the data should go into HA .
AGAIN: thanks a lot

Sorry to be possibly too detailed but a container is a OS in itself with all the elements required to run the intended program, in tis case grott
However, grott needs configuration to know where to find a.o. mqtt with user/pwd etc. your growaat server (internet) and other settings
This is stored grott.ini which comes deafult with the container but is WITHIN the container. If you update that file and later re-create the container, all gets overwritten, also grott.ini.
That is why you store data in a persistent folder/file via -v(olume)
So if you link a folder/file outside of the container to a folder/file within the container, the one outside remains and if you re-create the container, you will again map to the outside folder/file and continue to use that, nothing lost. This also means that the only thing you have to backup is the external folder/file and not the whole container.

Now, you probably have a home folder on your Pi
In that home you can create a folder ‘docker’ and within that ‘grott’
The the added param is :

-v /home/yourhome/docker/grott/grott.ini:/app/grott.ini

you need to make sure that the external grott.ini is properly populated, then you restart the container and it should work…or you continue to tweak

1 Like

That is all in grott.ini (with me) …check the docs

Yes,
now I understand what you mean and that it is so usefull cause I also have a sonoff server called ihost which had been released last year. And when i tried to use it for HA it worked fine till the day I got the new release message and pressed update every few month - and lost everything , but of cause it was just my sandbox to play around.

But I got it that the mounted path is a connection from inside the container to the outside world where it is hosted.
This way I can update the container easily without loosing the grott.ini file.

I have to try that out this weekend cause right now I am trying to get it running and it looks promising even though I have not gotten access or a mqtt connection right now, but what I can tell you is at least a big success cause I was able to connect the first WiFi Stick / inverter to my grott proxyserver which right now is the basic installation he had described (without container).

And I can tell you cause I have seen traffic coming in the terminal and package too short till at some point every minute or so (I have set my sticks to 1 min update intervall) a much longer package seems to arrive.

Beyond that I also recogniced that the growatt app and website still gets the data from that particular inverter which means the proxy is working and at least forwarding the data.

My next step would be to setup the mqtt connection but I have no clue at all except the default values of the grott.ini in that section.

Again: I am talking about the manual Pi OS installation without docker right now (for the beginning cause once I have gotten that right I will do it with my docker installation and that -v parameter for the grott.ini)

I have copied a naked grott.ini from the grott/examples folder into grott folder and there I found this mqtt section

[MQTT]
# Mqtt parameters definitions
# Be aware nomqtt = True means no MQTT processing will be done!!!!!!

#nomqtt = False
#ip = localhost
#port = 1883
#topic= energy/growatt
#auth = False
#user = grott
#password = growatt2020

I have not changed anything just to keep it running.

But how do I establish the mqtt connection ?
Right now I think that the ip mentioned here is the local IP of my pi 3 running the grott installation.

But what do I have to do on the other side, like HomeAssistand, where I have installed the mqtt explorer from the addon store cause I had heard about as the go to tool for anything regarding mqtt inside HA.

Sorry, I have not clue about that and had hoped to follow the grott instructions step by step to get through but that is unfortunatelly not the case and mqtt is not really covered by grott or I have missed the points. I know that the growatt inverter will stop reporting data soon after the sun is gone therefore I tried to solve and understand as much as I can before sunset.

At least it feels like a huge progress understanding the docker grott implementation and how to run grott in the basic version, watching the data passing by and being forwarded cause my graphs of the smallest inverter are quite nice.

Quite happy compared to this morning and noon when nothing seemed to be working.

In my case I changed localhost to the ipadress where my mqtt server is found

From HA you can create mqtt sensors that refer to the topics in MQTT.
But first things first… make sure you get the data into MQTT before even setting up HA to extract the.
You can verify MQTT topcis visually using MQTT explorer

1 Like

just to give you - and those who are reading this topic later - an update about the progress in the past view days and my journey struggling with documentation and what not.

I had to prepare and set up mqtt in home assistant with these steps (and I hope that I will not have missed one cause it was a trial and error mess over days) after I had watched a few videos about the topic in general , but most of those were specific to achieve a goal like measuring water consumption (which I can remember). At least I was able to understand how to set the mqqt thing up properly in HA and learned how it should work and how to play around using the mqtt explorer. Good to get familiar with the whole topic in general first cause grott is again a different beast and the documentation not always helpfull or right or questionable. If you find the topic for multiple growatt inverter support then you will find a grott ini parameter described as

#1
for safety reasons the HA mqtt addon will need a user and a passwort so I had to add the new HA user via settings - person - then the tab user - add new user
name: mymqtt
pw: mymqtt

#2
I installed the mosquitto broker from the ha addon store found in settings and used the configuration tab to set it up seen as seen in this yaml:

logins:
  - username: mymqtt
    password: mymqtt
require_certificate: false
certfile: fullchain.pem
keyfile: privkey.pem
customize:
  active: false
  folder: mosquitto

#3
Then I opened the configurations and set up the mqqt integration by pressing “configure” . I ended up in a page with the headline setting where the first point is a blue “mqqt new configuration” option I pressed.
I did not change anything except adding the user mymqtt and his pw

I pressed continue and changed nothing on the following page. I pressed SEND at the bottom

#4
At that point I pressed on the bottom of the mqtt setting page the blue button listen which after that switched to “cancel listening”

I also added in the listen to the later needed topic “energy/growatt”.

Once that was done I copied the topic from there to the top where it offers a "release packet " and pasted the same “energy/growatt” in the topic and wrote a message aka Payload called “hurz” which after pressing the blue realease button below would reappeat in the listening section with a time stamp and counter:

#5
At this point I went ahead and also installed mqtt explorer which will be later helpfull to get behind the messages or the flood of those at least if you have many devices.
You can establish a connection and then do the same: send message to certain topics and listen to them. Of cause this is not needed nor mandatory I guess.

#6
Now it was time to continue the growatt journey at the point mentioned in my previous message, which was the constant flow of errors
then I installed the mqtt explorer to play around and listen and publish my own topic and how this explorer interacted with the mqtt integration.

my core question and issue was how to establish the whole mqqt connection.

Simple as described above and then the things required for the grott.ini

Assuming HA is running on ip whatsoever.2 and grott is running on a different device on ip whatsoever.26 you only have to change the settings here by removing the #
I have added my lines instead to make my changes more clear

[MQTT]
nomqtt = False
#ip = localhost
ip = whatsoever.2

port = 1883
topic= energy/growatt

#auth = False
auth = False

#user = grott
user = mymqtt

#password = growatt2020
password = mymqtt

So all the 5 steps before were a simple preparation needed to get it running, but remember my question “how to establish a connection successfully” ?

I had asked cause it did not work at all. I got rejections, server disconnected and what not believe is so tiny.

I had removed all those not needed # when I thought I would need such parameter, but was not thinking so much about, what it meant.

auth = False

This line had stopped my installation from working 24 or 36 hours cause it simply means that even though user and password are in that setup defined grott would not send these to the HA mqtt broker and therefore the HA mqtt broker did not get messages. Grott says that the authentification did not work.

After changing that line to auth = True
boy the messages came in cause in the meantime I had added more inverters / sticks to grott from the smallest to the biggest.

#7
To achieve that you will need to enable a feature called Multi Inverter Support as described here

If you have only 1 type basic inverter (TL-S, TL-X). Grott will work out of the box.

* For MQTT the device (PVSerial) is defined as "key" in the JSON Message
* if you want separate topics for each inverter you can add to the [MQTT] section of the grott.ini:

`mqttinverterintopic="True"`
or for docker
`-e gmqttinverterintopic="True"`

The inverterid will be added to the topic (e.g: `energy/growatt/<your pvserial>`)

But after so much trouble I was not sure if that can be true, cause why should the option in the grott.ini now beng set in " ", while in the grott.ini lines above it was a simple

auth = False 
and not 
auth = "False"

#8
And that is where I am right now: getting a flood of messages from about 4 or 5 inverters every few seconds cause my stick is set up to send messages every minute to the growatt server.

#9
And now I will have to find a way to get these growatt data in HA by hand or switch to the HA integration Muppet3000 has provided. But I guess I will try to implement the first inverter by hand to see how it works before I move ahead.

How did you set the sensors delivered by grott in HA up ?

And for those who are also struggling as I was struggling here a picture of how it would look like once it is working right

Main issue was the line MQTT message - message sent were I had gotten authentification errors. If you wanna use the developers ini with the user grott and pw growatt2020 make sure that you create such user in HA first , then configure that in the mqtt broker and finally reboot.

This is a screenshot from grott running on a pi 3 installed and started manually as described here and in the grott description after getting the grott.ini right

Finally: do not try this without the proper awareness that you really have a daylight aka that the inverter is running. After sunset or when the inverter had turned to idle grott will start but show no progress or messages on the screen, not before the sun is providing so much daylight that the growatt inverter will wake up again and start sending data to the cloud cause then you will also see the messages being sent as shown here.

1 Like

Short summary of the past week FOR THOSE RUNNING HA OS and wanna run also Grott on the same device, in this case here a Pi 4 with ssd and soon the Pi -5 .

But back to where I had started and where users can avoid useless efforts !

#1
Do not follow my path I went through cause I had to digg deep into grott and other stuff which was - looking back - lost time.

I had setup a dedicated Pi-3 for running grott and finally ended up running grott with a manual installation, no docker or what not. Plain grott.
From there I went on to configure grott, then mqtt add on and mqtt integration and then finally used @muppet3000 ha integration.
And when the integration was running I started to migrate 1 after the other inverter, finally 8 and 3 different kind of models from mic over min to sph - thanks to the great support by Chris aka @muppet3000

And then I had to finally try to setup the integrated solution which meant to replace the running pi 3 grott installation (2.8.3 beta) which I achieved today when I finally replaced that pi with the @egguy and his GROTT ADDON.

BUT DO NOT GO THIS ROUTE IF YOU WANNA SAVE A LOT OF TIME AND HEADACHE

#2
This is a kind of shortcut that had worked out far easier and even better than #1 so be aware that there is a more efficient way.

But before that an overview first from the noobs , a birdseye view.

I.
usual apps and installation on a HA OS system do not run the same way like on a pi with HA installed. Therefore the usual grott installation provided by Johann can usually not been installed.

II.
Therefore @egguy has developed an HA ADDON which is not an integration cause a ADDON can run an additional program under HA OS which means he is delivering the GROTT app you would need, nothing more.
His GROTT 2.8.3 beta addon is based on grott but adapted to run on its own under HA OS. No docker, no manual installation needed.
This has been maintained by @egguy also very repsonsive and helpfull like Chris which I mention in the order cause I had gone the reverse way by implementing the integration first to work with grott till I learned and understood how egguys grott addon fits into the picture.

As a HA OS owner and also beyond HAOS you simply will need the grott addon and the grott integration and that is it, you have no more to deal with grott itself cause both - integration and addon - take away to deal with grott.ini and what not on file level, but you can if you want still deal and play with grott.ini and any feature basic grott provides.

III.
once you have setup his grott ha addon the proper way you will have to do the same stuff required for a usual grott installation on a dedicated or virtual machine: install all the mqtt addon and mqtt integration which later will build the bridge between the grott ha addon which is receiving the message from the inverter and sending it out to growatt and also to the mqtt server. Add a mqtt user and his password.

IV.
This means you will want the next piece of software which will be the grott ha integration which basically is the technichician to create from mqtt message new sensors and establish the connection between mqtt message and the growatt ha sensors.
This integration is maintained by @muppet3000 is also working as advertised and very well documented once you have understoot the architecture and path that grott add on will provide anything you need (do not follow the side path of installing a dedicated pi grott server as i had done with all the docker and what not adventures)

TO SUM IT UP
the grott addon is needed to run grott as app under HA OS

the grott integration will do all the work that usually is done by yaml files and so on creating the sensors you need.

Do you really want to maintain, rename or add 34 growatt inverter sensors manually or rather deal with an integration and an easy ui which does not need many entries ?

I have 8 growatt inverters and the only configuration of the grott addon you have to do can be seen here
first I had to maintain the serial of my inverter and the general type of inverter (be aware grott supports min and sph, but “mic” inverter do work if you use “min” instead)
Here my shortened example of 3 inverters { {“BMK12345”: “MIN”, “BMK56789”: “MIN”, “NPCS98765”: “SPH”)


and then you need to enable grott mqtt - all other options are not required, just a choice.

And the grott integration is even easier cause here you can see what I had to do:

I checked the option to calculate additional values and then I pressed SEND

Everything else will happen automatically once you have edited the growatt inverter stick or datalogger settings here to the IP of your homeassistant server using the growatt password of today and pressed yes

This is a far faster way than the dedicated grott server setup which had taken me about 1 week to get it running.
@egguy and @muppet3000 were both very helpfull and responsive when I ran into issues due to misunderstanding or a special way I needed for my Pi.

If you own Growatt inverters and run HA on PI OS under HAOS this is the easiest way to go so far, regardless if you own 1 or 8 inverters. Imagine you will later want to rename one of the inverters cause the position might have changed ?
Do you wanna edit 34 sensors or rather press rename device / inverter and check an option that you also want to rename the sensors too?

I will write a step by step guide later once I have finished my work cause I still have a lot to do like surplus charging the car and then surplus energy used for heating or and hot water. But then I will hopefully find the time to put a guide together for this particular task: running grott on Pi OS hardware and under HA OS the easy way

Do not get me wrong: both, grott addon and grott ha integration, provide a good and intensive documentation with an awfull lot of details which means for ALL USE CASES
Both work perfectly together cause you need to install grott addon and turn on grott ha support.

The only missing piece is the step by step guide across both in 1 guide I hope to get together during the summer cause that would have saved me 1 week or 2 in total cause it was long and bumpy ride to get to this point and knowledge.

Hope it will help someone to avoid the detour with a dedicated grott setup and choose the integrated route fully inside HA (at least with a PI and HA OS)

1 Like

Did you manage to make the step by step guide?
My mttq stopped recieving data halfway this year and I never managed to revive it…

it is the usual issue: growatt had reset the server adresses in your wifi stick aka data logger.
Your wifi stick is no longr talking to your Home Assistant I guess and therefore you might have no most recent data in HA anymore. but step by step.

Therefore mqqt did not retrieve anything cause the data send no longer send
to your HA, but directly to server.growatt.com and that is it ( most likely, cause the stick or USB port could also be broken too due to humidity, wet environment, or might have been hit with what soever, cause I have seen that 2 or 3 times already when the USB A Sti).

Just try to check the millions of documentations what to do if you might strand cause I am leaving tomorrow.

At the end I do not want to make another round of screenshots where i have to hide all my personal serials and what not, which is alot of time and effort…
Sorry.

If you are using grott add on by egguy read his description, He mentions everything.
But I guess it is just one single entry you have to change.

I assume you have growatt installed on HA and it has been running before.

follow the instructions precisels , do not skip cause you think you know it better.
If i tell you to press ctrl + f then do it and search on the page for such term I provide.
If you think you can type in datalogger instead of copying data logger as I told you you will be screwed cause both exist on the same page and usually people do not care and therefore I also do not care if I had helped once.

Cause why do you need help ?
You have not written down every single step when you had installed the system and this will happen over and over again as long as you do not write things down into your cookbook.
You had achieved it once, OK, then you must have a cookbook and if you follow each step from that cookbook then it will work and you will find the spot which growatt must have changed for all of us. It took me a few hours to get behind, cause I have 8 of these - ahuge fleet and all are differnt, from min over sph to spc.

#1 check via browser if you can login to server.growatt.com
#2 if so login and check if you see most recent data from the past days and weeks
#3 if you see data there than jump into the JULY 2024 view an chose the daily overview. Nowy you should see the date + time when the mess had happened or the night maybe cause before you will have a break I bet.
#4 you are logged into your growatt account, you choose your inverter
#5 you go to your main dashboard and click on the icon here in the upper left corner
image

#6 now you press ctrf and fill in “My Photovoltaic Devices”
you should jump to the lower left edge.
#7 if you have found the title look straight to the right where you can see an arrow heading rightwards
#8 before that arrow you can see “all devices” and you click on these words
#9 press control + f and paste “datalogger” without a space cause others have made the mistake over and over, find a different spot which is wrong and will not work out. Now click on the settings there

#10 you will get this

In the first line you can set an IP adress an should be cautions.
That is your spot to start. I assume of cause HA is running fine, mqtt too and you did all the updates usefull.

Now type in this field on the right the ip adress.
Simple as that.
but many can not read and do what the are told.
ip means 123.123.123.123 and not http:// or anything else.
Here you need to paste your Home assistant server ip adress.

Seconds later the data and sensors should be populate.

And this is the very last time I write about these basics which everyone must have understood back when he had installed growatt

if you do not write proper notes. then you will be screwed again but most likely at a different point.

Good luck, I will be away the next few weeks so do not expect any reply. It was just the luck you had that i checked HA again and saw the message.

All the best