muppet3000 / homeassistant-growatt_server_api

Home Assistant Integration for Growatt - Upstream repo for the growatt_server integration that is part of the Core Home Assistant repository
MIT License
53 stars 6 forks source link

ENCHANCEMENT - Multiple inverters in same account #35

Open Saentist opened 1 year ago

Saentist commented 1 year ago

I have 2 inverters in one account. Is there will be a option to see second one, without to create new account.

muppet3000 commented 1 year ago

Hi @Saentist - I'm pretty sure this was already supported, I can't test it myself as I only have 1 inverter. I could take a look at it, I think you shared your creds with me at some point. However, I'm spending the majority of my time on the Grott integration and I'm trying to wind this one down as the API is always getting blocked from my house so I regularly can't test it.

Saentist commented 1 year ago

It is not supported that's want it as feature.

For Realtime data getting RS485 from pin 3 & 4 of COM port of inverter. https://esphome.io/components/sensor/growatt_solar.html

muppet3000 commented 1 year ago

Ok, well I may get around to it at some point, however I'm putting the majority of my focus into the Grott integration

Saentist commented 1 year ago

@muppet3000 https://www.showdoc.com.cn/262556420217021/6118532122241417 maby you read it but... last edit 2023-02-17

Tillersens commented 1 year ago

Hello, I'm brand new to HA (a week now) , so hello to all who read this.

Don't know whether or not this is still an open topic, but I can confirm multiple inverters work. Got one Hybrid, one Min and one 'Inverter'. Integration shows 4 devices with plant.

cheers Till

Saentist commented 1 year ago

Confirm it's possible, but still need to have multiple instances for any inverter, instead of one with include all of them. This will reduce API-BAN chances.

Tillersens commented 1 year ago

Confirm it's possible, but still need to have multiple instances for any inverter, instead of one with include all of them. This will reduce API-BAN chances.

A bit off topic here, but do You have any suggestions how to reduce these bans? Currently suffering API-BAN each day :-(

Saentist commented 1 year ago

A bit off topic here, but do You have any suggestions how to reduce these bans? Currently suffering API-BAN each day :-(

Use different user per device, do not restart integration/ha rarly.

Tillersens commented 1 year ago

Use different user per device, do not restart integration/ha rarly.

By creating a dedicated plant for each device at Growatt? Or can this be done somewhere in HA config? A short hint is very much appreciated.

Thank You!

Nevermind... Moved to Grott.

typxxi commented 6 months ago

Well, I finally got my setup right - at least I guess so. I have 8 Growatt inverters, and 3 have been switched this morning to report to GROTT and from there to the mqqt homeassistant. Now in the noon another 2 have been switched over.

And this is how it looks like after a few minutes when the HA grott integration has found them (even though I had not changed the grott.ini)

This is the result of the integration of my smallest 3 MiC inverters from 0,6 kW up to 3 kW, which I started with due to the fact that they are not so important. And then the next 2 were MiN 4600

Now in March 2024 this features seems to be there and therefore this one might be closed.

image

typxxi commented 6 months ago

Hi @Saentist - I'm pretty sure this was already supported, I can't test it myself as I only have 1 inverter. I could take a look at it, I think you shared your creds with me at some point. However, I'm spending the majority of my time on the Grott integration and I'm trying to wind this one down as the API is always getting blocked from my house so I regularly can't test it.

I guess you might close this cause I have 8 inverters in my growatt account and was able to move 5 to Homeassistant thanks to your great integration which has worked like a charme - compared to the grott setup I had to do first, which was a nightmare due to the documentation. But when I had done all the things you had said to do first in GROTT then it was an easy step to get those into HA. thanks a lot

Yes, I have used 4 different growatt models: 3 different mic inverter models from 600 W to 3000 W and then Min 4600 And you can check that in my comment before with the screenshot showing 5 Growatt !

muppet3000 commented 6 months ago

Thanks @typxxi for the feedback, so it looks at this point as though you've managed to get this working exactly as it's supposed to. I'm really please to see how this works in home assistant without any further work on my part. Could you do me a huge favour and show me what it looks like in the 'Integrations' page? (Screen grabs below). I've never seen someone with so many inverters so I'd love to know that the Integration handles it how I'd expected.

If there's any additional feedback, please just let me know. The GROTT documentation itself is really difficult to parse, so I'm glad mine was more helpful! image

image

typxxi commented 6 months ago

Thanks @typxxi for the feedback, so it looks at this point as though you've managed to get this working exactly as it's supposed to.

If you really want a screenshot then here you can have one, but first maybe the explanation how it worked for me.

I started to setup grott on a pi3 to the point when I had achieved all what you called requirements. At that point I had seen mqtt messages coming, investigated what they were telling and what not I thought I could understand.

I had worked in batches of 2, so I had first move 2 inverters via changing the wifi sticks IP to the Pi 3 running Grott. I then followed grott and added those required data in a yaml file, if I remember right 3 bits were required like type of inverter in text like Min 4600 and type of datalogger and maybe a serial.

From there I went to follow your instructions point by point, got grott in my integration pane and from there I tried first a to detect all I guess. You know as IT nerds we have no time, and even though a successfull message appeared, nothing seemed to happen, so I decided the dedicated way doing the same but this time with an IP adress. And then the page might have refreshed and a device was there but no entities. So I checked it out and then I realized that something weird had happened cause this was the other device, not that IP I had entered which meant or I guess thatt with the command and successfull there was a task running in the background while I already tried to add that one with the IP manually.

At the end it worked out, but will need a second or minute to work out - where I have to emphasize that I am not the mqtt master , rather a total newbie happy to get along somehow with a lot of luck. And I have to say that all my sticks are updating every minute so that this might determine how long you might have to wait till the entity is there. Maybe I am wrong, but it might be a difference of 1 minute in my case or just every 5 minute that the stick is communicating and causing the mqtt messages to appear.

Long story short: I have described above that according to grott multi inverter mode there are yaml files you have to maintain and keep up to date like type of inverter, serial and type of logger.

I arrived back then at the homeassistant grott integration due to issues with grott which meant I checked the grott integration documentation if I might have all the requirements already and could continue with grott ha integration and would not have to work anymore on grott where I had been struggling at that point.

That becomes important cause when I added my number 3 and 4 I had completely forgotten to maintain the yaml file on the grott site for multi inverter operations. Guess what, when I recogniced that after a few moments or a minute in my grott integration the next inverter appeared I could not believe that cause in that second I remembered i had not updated the multi inverter yaml file.

Anyhow: forget about the multi inverter grott documentation you do not seem to need that at least right now, maybe later in case of sending commands back to my hybrid inverter for example to charge tonight the battery from 2 to 5 am when tibber has a good price. But I do not know if and how that might work, but I will need that for sure soon.

That being said: do not makr the mistake and press "add entry" or "Eintrag hinzufügen" on the bottom cause that would create a second instance or GROTT Element. I had to delete the second one which had gotten the same name, but I am no expert. I try to follow instructions to stay on the road and reach the destination. You have to press configure in case the new inverters do not appear.

image

Again: the short way is you install grott and install the HA grott integration and configure the first inverter by doing the "any" * search.

That is it. In case you have multiple inverters it feels to me that you only have to reconfigure the IP adress of the stick and then the 2nd and 3rd and so on will appear moments or minutes later. For whatever reason - I might be wrong - I can also tell you that this happened even the next day without pressing the configure button and doing a search for * or a specific IP

I had moved my inverters on 3 days , cause I was unsure how long and if that would work and what I could break into pieces. But after the inverter messages reappeared the next morning I moved the next batch and then another and the following morning the last batch of 2 inverters to my grott Pi 3 and these 2 appeared in Grott integration as devices with their serial number before I renamed them and their sensors all in 1.

So worked like a charme and I guess I have to write it down for all those who are going to start from scratch with no clue about mqtt and so on to get it running on a second Pi running grott . This is what I wanna to change first, trying to get rid off the Pi3 or replacing that with a pi zero and LAN connector cause there is not much going on and a Pi3 a big machine for just that small task i guess. If that does not work I would try to run that grott docker container on my HA OS Pi4 somehow or have to do a manual installation, not sure how it works. But once that is achieved I will come back here and work for a documentation track step by step to get it right.

Therefore I will need some time cause I also have now to deal with 7 inverters x 50 sensors or so. I have to build aggregations cause those 7 are working in 2 different systems, so a group of 4 and a group of 3 acting as 2 power plants in total, which means I have to create sensors for all the sums, like total of a and then total of b and then overall total of a + b which means 3 sensors. And if you have a lot of sensors to deal with, you end up in the sensor mess I guess, cause right now I am struggling to get the right boards and views of the right data and what is really needed or not.

And now another screenshot you had been asking for image

There is only a SPH 4600 missing cause that is not commissioned yet cause the battery is not ready yet, so that will come later and 2 smaller inverters might leave.

I also can confirm that all the 7 inverters had been handled the 7, which means that 7x 34 entities had been created and also renamed which was my first stop to get that right cause the right naming sheme becomes important if you have to deal each time with 34 entities especially in those dashboard where you wanna compare things.

Background info: most people would not got that way of so many inverters and 2 will leave so in general it should end up in a 5x 4600 W inverter set up which means we will run 22 kWp or more on 5 inverters and with 10 strings. We needed 2 systems, so therefore a 3 and 2 setup at the end and we needed these inverters cause the setup of 3 can not be replaced with a 3 phase inverter for cheap cause we a diy lfp battery which is only supported by growatt with the SPH series or here the sph 4600. Therefore I needed 2 and 1 sph . We also wanted many mppt due to shadow from trees and chimney. And during the pandemic those inverters were rather expensive but I got a good deal for 5 in total for 2500€ instead of over 3300 € back then. Also in case of a fault only 1/5 will break down and we can maintain and repair them more easy instead of dealing with just 2 different inverters. And at the end the 3 x 4600 were not more than a bigger MOD 12000 or so.

Might also be changing due to new regulations that allow more so that the 2 x 4600 could be replaced not by 3x 4600 but a bigger MOD 12000 with just 3 mppt when we can expand the system with 5 or 6 kW more. Therefore the fleet of inverters, also different ones, cause I had a small 600 already, later got in 2021 a MIC 3000 when no SPH was available for a resonable price and also got 10 of the MIC 600 (which was another deal for 1500€ in total incl. 10 wifi sticks or 150€ per unit, which is a great device cause it can handle 500 or 600 Wp panels and their voltages and current which the SPH 4600 can not , there is a 500 Wp limit) . I have also improved those MiC 600 to run as MIC 2000 which is a great inverter for just 150€ or 4 of them with 8 kW and 4 mppt for 600€. And you and your multi inverter support reduced the major part of the work cause imagine how long it would take to add 10 times 34 sensors without bugs and typos and what not? I have enough to deal with those in the dashboards already.

If you have anything I can do for your work or support let me know I will try to help out as soon as I can. Right now I am bit busy to keep my fleet of inverters in order and running, comparing the results coming in, I mean the strings and how the cheap DC optimizer are working with chimneys cause they were just 45 € and prevent my string to stall or at least to stall 1,5 hours later cause in the afternoon around 4 pm the chimney starts impacting the first module next to it. But the DC Optimizer kicks in and trades in Voltage for a gain in current till that panel reaches the actual current in the string. THat works amazing but you need to keep track of a lot of sensors for comparison which I was not able to do so before with the growatt app and so on.

Therefore I needed a lot of the sensors to analyze the strings and optimizer, if and how they operate or what I can see.

Thanks a lot !

typxxi commented 6 months ago

Thanks @typxxi for the feedback, so it looks at this point as though you've managed to get this working exactly as it's supposed to. I'm really please to see how this works in home assistant without any further work on my part. Could you do me a huge favour and show me what it looks like in the 'Integrations' page? (Screen grabs below). I've never seen someone with so many inverters so I'd love to know that the Integration handles it how I'd expected.

If there's any additional feedback, please just let me know. The GROTT documentation itself is really difficult to parse, so I'm glad mine was more helpful! image

image

And here is the screenshot I had missed to grab before about an inverter and its 34 sensors Yes, i have checked every single inverter if he has 34 and no one is missing or might be different cause they had appeared out of nowhere once I had moved the IP on the stick to the grott Pi-3 and I do not wanna trust a system where I have to deal with 7 x 34 sensors, therefore I tried to check things first before I move ahead and run into trouble.

The only point I am not sure about is visible in the screenshot.

We have the 12 th of march and you can see it is 18:30 or 6:30 pm while the mqtt is showing me data arriving from the morning at 10:50 or so but the inverter or the stick are running / showing the right time which is 18:30. But not all of the inverters are showing this, most of them are quite accurate - maybe a minute gap between the real time and what they are reporting. Not sure what is going on but the data are right and corresponding to what I found in the app, cause I have already checked sums and lifetime sums. image

image

Saentist commented 6 months ago

Grott not work in my case Growatt Modbus image image

solax integration over modbus can control and limiter's for import/export etc.

typxxi commented 6 months ago

Grott not work in my case Growatt Modbus image image

solax integration over modbus can control and limiter's for import/export etc.

I am not sure, but this looks like a single inverter not a multiple inverter installation and this topic is not about modbus at all. I had just described that the multi inverter in 1 growatt account setup should work flawlessly cause I have started this whole growatt ha integration just a few days ago and it worked out of the box. And yes, I have had a mic 600 in this setup, also working, which means the inverter is talking to my pi3 grott installation and from there providing the data to the growatt server where they arrive cause my growatt app and web are up to date and providing the data to my HA account.

It all has been working with a dedicated Pi 3b+ running Pi OS from december 2023 which I had installed last thursday. And then I have installed grott afterwards, then activate mqtt and the broker before i finally switched all my wifi sticks from the growatt server ip to my pi 3b+ grott installation.

I had done it step by step and it had worked out, the growatt grott integration. The grott installation and configuration was not so straight forward, the documentation felt outdated a bit.

Saentist commented 6 months ago

grott not work with my dataloggers so https://github.com/hsmade/growatt-sniffer my router can do that for me ;) but Grott not accept this type of sniffing.

Modbus have more options for reading and change settings.

typxxi commented 6 months ago

But I guess you are talking about grott and hot the HA grott integration if you write "grott not accept this type of sniffing".

But I guess you might open a new topic cause who would expect this topic here deep down among multiple inverter setup.

Yes , I am aware of modbus being more powerfull cause I will need that power soon for a different topic to launch my battery charging from the grid during night at daily changing different hours. That is something an EMS has to do for me and therefore somehow via grott I guess from HA to the sph4600 inverter cause otherwise I would have to use the browser to set the nightly charging moment day by day manually.

Saentist commented 6 months ago

But I guess you are talking about grott and hot the HA grott integration if you write "grott not accept this type of sniffing".

But I guess you might open a new topic cause who would expect this topic here deep down among multiple inverter setup.

Yes , I am aware of modbus being more powerfull cause I will need that power soon for a different topic to launch my battery charging from the grid during night at daily changing different hours. That is something an EMS has to do for me and therefore somehow via grott I guess from HA to the sph4600 inverter cause otherwise I would have to use the browser to set the nightly charging moment day by day manually.

https://github.com/muppet3000/homeassistant-grott/issues/75

I'm using HAOS so no external software possible.