BUG - Growatt Server Connect & Stability Issues

Again offline
Logger: homeassistant.components.sensor
Source: custom_components/growatt_server_api/sensor.py:44
Integration: Sensor (documentation, issues)
First occurred: 17:34:47 (1 occurrences)
Last logged: 17:34:47

Error while setting up growatt_server_api platform for sensor
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn
    conn = connection.create_connection(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/connection.py", line 72, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/local/lib/python3.10/socket.py", line 955, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 386, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1042, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 358, in connect
    self.sock = conn = self._new_conn()
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 186, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7fa019425db0>: Failed to establish a new connection: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='server-api.growatt.com', port=443): Max retries exceeded with url: /newTwoLoginAPI.do (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fa019425db0>: Failed to establish a new connection: [Errno -3] Try again'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 289, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/growatt_server_api/sensor.py", line 88, in async_setup_entry
    devices, plant_id = await hass.async_add_executor_job(get_device_list, api, config)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/growatt_server_api/sensor.py", line 44, in get_device_list
    login_response = api.login(config[CONF_USERNAME], config[CONF_PASSWORD])
  File "/usr/local/lib/python3.10/site-packages/growattServer/__init__.py", line 128, in login
    response = self.session.post(self.get_url('newTwoLoginAPI.do'), data={
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 635, in post
    return self.request("POST", url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 565, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='server-api.growatt.com', port=443): Max retries exceeded with url: /newTwoLoginAPI.do (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fa019425db0>: Failed to establish a new connection: [Errno -3] Try again'))

Is it again problem with UA
And is it possible UA to be "HA_[HA-Ver]_Growatt-client-Version"

I haven't got the same issue and the integration is now written to choose a new user agent string every time Home Assistant starts, can you please try restarting home assistant and see if it fixes it?
Also, I've noticed sometimes that my home IP gets blocked, if you get a dynamic IP address from your ISP, try restarting your router to get a new IP address for your home and see if that fixes the issue.
If you still have an issue after that let me know and I'll try and investigate further.

My IP is Dynamic but is always SAME.
I installed latest Update of HA with restart HA.
Is there a way to see clear message "reason of error"?

The new version of the pypi library has better error handling so I'll try and include that in my next release.
I'll also try and handle the errors better by catching them.
The error you're seeing is weird though, it doesn't seem like the same one you get when the UA gets blocked or when your IP gets banned.
Your dynamic IP doesn't seem very dynamic 😋. Does the mobile phone app still work from the same network? When my IP gets blocked then my phone stops working as well unless I switch it to 4/5G.

if it help, log from in HA integration
Logger: homeassistant.components.sensor
Source: components/growatt_server/sensor.py:43
Integration: Sensor (documentation, issues)
First occurred: 17:34:44 (1 occurrences)
Last logged: 17:34:44

Error while setting up growatt_server platform for sensor
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn
    conn = connection.create_connection(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/connection.py", line 72, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/local/lib/python3.10/socket.py", line 955, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 386, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1042, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 358, in connect
    self.sock = conn = self._new_conn()
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 186, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7fa01a446290>: Failed to establish a new connection: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='server-api.growatt.com', port=443): Max retries exceeded with url: /newTwoLoginAPI.do (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fa01a446290>: Failed to establish a new connection: [Errno -3] Try again'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 289, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/src/homeassistant/homeassistant/components/growatt_server/sensor.py", line 87, in async_setup_entry
    devices, plant_id = await hass.async_add_executor_job(get_device_list, api, config)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/growatt_server/sensor.py", line 43, in get_device_list
    login_response = api.login(config[CONF_USERNAME], config[CONF_PASSWORD])
  File "/usr/local/lib/python3.10/site-packages/growattServer/__init__.py", line 128, in login
    response = self.session.post(self.get_url('newTwoLoginAPI.do'), data={
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 635, in post
    return self.request("POST", url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 565, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='server-api.growatt.com', port=443): Max retries exceeded with url: /newTwoLoginAPI.do (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fa01a446290>: Failed to establish a new connection: [Errno -3] Try again'))

Is this still happening @Saentist ?
I'm not sure if there's anything that I can do to fix it other than improve the logging.
While this issue was happening did the ShinePhone app also stop working if it was on the same network?

App was never stopped, integration after latest reload 30min ago reconnect.
But most strange is somehow bug https://github.com/muppet3000/homeassistant-growatt_server_api/issues/3 reappear in integrated in HA rename plant to alias, but this time without change in cloud.
Guess local CEE CDN is transfer finished ;)

That's really odd, on all fronts.
The fact that nobody else logged a bug makes me thing it's specific to yourself. I just have no idea how to assist!
Unfortunately I was away from my system yesterday otherwise I would have tried spinning up a new HA system using the credentials you gave me and see if it had the same problem.
Very weird. I'll leave this issue open as a reminder to improve the logging!

(Accidentally closed it by accident - I've re-opened though.

Offline here too since 11:00 today

The API endpoints have been bouncing up and down all morning, this isn't the application getting blocked, I've been experiencing the same problem on the Android app over wi-fi and 4g all morning.
I'll continue to monitor throughout the day.
Note: I plan to re-add the "server.growatt.com" URL to the endpoints to give people more options going forward if this continues to happen.
It was only removed in the past because we thought it had been deprecated altogether.

I'm just looking into my issue and saw this update. Sounds the same: for me as of today the integration can't connect but also looks they've been changing things at the server as I seem to be logged out of the growatt web dashboard frequently with a "The Server Has A 500 Error(2023-02-07 12:31:34)" message
I was using the core version, remembered this version would likely be ahead with any more recent fixes so tried to install it and it can't connect "Unknown error occurred".  It was working fine yesterday.

I'm just looking into my issue and saw this update. Sounds the same: for me as of today the integration can't connect but also looks they've been changing things at the server as I seem to be logged out of the growatt web dashboard frequently with a "The Server Has A 500 Error(2023-02-07 12:31:34)" message
I was using the core version, remembered this version would likely be ahead with any more recent fixes so tried to install it and it can't connect "Unknown error occurred".  It was working fine yesterday.

See my previous comment, this is certainly maintenance on the server side of things, once it stabilises things should start working again.
On the odd occasion I've been able to get to the web UI I've noticed big gaps in the data that has been uploaded indicating also that this is a server side problem.

FWIW I locally changed the url to the "deprecated" server.growatt.com and seems to be working again. Obviously I don't know if that's coincidence and they stopped mucking around at the back end, but that url doesn't seem any less functional at any rate...

FWIW I locally changed the url to the "deprecated" server.growatt.com and seems to be working again. Obviously I don't know if that's coincidence and they stopped mucking around at the back end, but that url doesn't seem any less functional at any rate...

Correct, that URL is working (I've tested the same and intend to do a release with it back in tonight when I'm back from work), however I've looked at my data and it hasn't been updated in over an hour, so there's definitely still something happening on the back end.
In the ShinePhone app on my phone I've actually found that I'm now getting an "account locked" message which is new/different so I'll continue to monitor that. I'm also assuming that's related to the random changes they seem to be applying.

I was using the core version, remembered this version would likely be ahead with any more recent fixes so tried to install it and it can't connect "Unknown error occurred". It was working fine yesterday.

Haha, I did exactly the same thing today ... and ended up in the same place :-)

@BobC76 @Geo-Ron @GertJanArts - Can you guys all confirm that this has stabilised for you now?
I haven't had any problems for a few hours.

I had trouble this morning, and then got 'User is blocked' on the phone app from the same network which I've never seen before - although I only started using the HA integration 2-3 days ago so that's not saying much.
Shut down HA for about 6 hours, started it again, all OK since.

I had trouble this morning, and then got 'User is blocked' on the phone app from the same network which I've never seen before - although I only started using the HA integration 2-3 days ago so that's not saying much.
Shut down HA for about 6 hours, started it again, all OK since.

To get around the 'user is blocked' thing on my phone I created some new users via the Growatt website, including a new one explicitly for use by home-assistant. The FAQ on how to create more users is here: https://github.com/muppet3000/homeassistant-growatt_server_api/blob/dev/FAQ.md#how-do-i-share-my-credentials-with-you-for-testingadding-new-features-for-my-system-type
(rather than sending me the credentials, just create more for yourself :P)

Thanks got that set up, felt a bit risky potentially sacrificing my one and only account! (although no such message on the website).

@BobC76 @Geo-Ron @GertJanArts - Can you guys all confirm that this has stabilised for you now?
I haven't had any problems for a few hours.

Yep seems to have stabilised

Stable here since 14:18u
ShinePhone app and Growatt website were stable all day

I had trouble this morning, and then got 'User is blocked' on the phone app from the same network which I've never seen before - although I only started using the HA integration 2-3 days ago so that's not saying much.
Shut down HA for about 6 hours, started it again, all OK since.

My account that was blocked yesterday on my phone is now working again, so maybe try your previous account again. Maybe it was just a 12/24 hour block.

My accounts got blocked again - both on the server-api.growatt.com endpoint and the server.growatt.com endpoint.
I was querying every 1 minute though.
So I've changed that to every 3 minutes and I've created yet another account to test it with.
It may be that they're just rate-limiting.

My accounts isnt blocked, but also all the sensors are not available. At the moment they are available, but they only update every 2 hours. Is it possible to get the information from the datalogger faster? Since a few updates ago, i also have 2 entities. One i think is the growatt and the other one is the datalogger that is connected with usb.

My account isnt blocked, but also all the sensors are not available. At the moment they are available, but they only update every 2 hours. Is it possible to get the information from the datalogger faster? Since a few updates ago, i also have 2 entities. One i think is the growatt and the other one is the datalogger that is connected with usb. ShinePhone is working too, but didnt show the current value.

At present the issues with the server side of things makes this scenario very difficult to debug. Can I suggest that we wait a couple of days for all the server work to have stabilised and then you log a ticket with specifics of the issues your facing (if you're still facing them) and any functionality that you believe to be missing.

At the moment they are available, but they only update every 2 hours.

Their server has definitely been flaky today:
Logger: custom_components.growatt_server_api.sensor
Source: custom_components/growatt_server_api/sensor.py:178
Integration: Growatt Server API (documentation, issues)
First occurred: 10:14:00 (7 occurrences)
Last logged: 12:04:08

Unable to fetch data from Growatt server

On their server dashboard page, I also see gaps of 20-30 mins in the log between those hours.
Another thing to check, and this may be nothing to do with people's issues, but have you eliminated the possibility of local network issues affecting the upload from your datalogger to their server? Is the data on their server normally updated every 5 mins, or whatever your logger update frequency is set to? Is it only the HA sensor that is updating every 2 hours?
My wifi dongle is a long way from the nearest wifi access point, so the datalogger signal reports "poor" and so aside from the integration not able to reach their server, if the dongle can't reach it either there would be gaps with no update.

At the moment they are available, but they only update every 2 hours.

Their server has definitely been flaky today:
Logger: custom_components.growatt_server_api.sensor
Source: custom_components/growatt_server_api/sensor.py:178
Integration: Growatt Server API (documentation, issues)
First occurred: 10:14:00 (7 occurrences)
Last logged: 12:04:08

Unable to fetch data from Growatt server

On their server dashboard page, I also see gaps of 20-30 mins in the log between those hours.
Another thing to check, and this may be nothing to do with people's issues, but have you eliminated the possibility of local network issues affecting the upload from your datalogger to their server? Is the data on their server normally updated every 5 mins, or whatever your logger update frequency is set to? Is it only the HA sensor that is updating every 2 hours?
My wifi dongle is a long way from the nearest wifi access point, so the datalogger signal reports "poor" and so aside from the integration not able to reach their server, if the dongle can't reach it either there would be gaps with no update.

No issues with data being uploaded here. It's all server problems, I'm certain of it (I have a shine-lan box hard-wired to my ethernet 30cm away from my RF Dongle).
It has all just stabilised again now as the evening has set in here in the UK.
I have decreased my polling interval in HA to 3 minutes (I was polling every 1 minute and my account got blocked again). I'll update again tomorrow if this remains stable. We may just have to accept less frequent updates.
Separately I'm going to have a look at some of the more 'local' options e.g. Grott, but while the API calls are still (kind of) working I'm going to keep supporting this integration. At least until I have a really solid, easy-to-use alternative.

@mjooris & @JimGermany
Just tagging you over here as you mentioned the similar issues over in the HA Core Repo: https://github.com/home-assistant/core/issues/87696
If you guys are happy to "hack" things in HA Core, then I'd really recommend just switching over to this version of the integration instead. I'm actively maintaining things over here and I'm able to deploy rapid fixes to critical issues.
The 'dev' build of this repo has the ability to use the growatt.server.com endpoint again and I plan to do a formal release as soon as I've fixed one final bug.
Notably, there's actually nothing I can really do from a code perspective to resolve the issues that we've encountered with the Growatt servers over the last 2 days other than to encourage people not to poll for information any more than every 3 minutes (the default for this Integration is 5).

Hi guys, just to add - starting from 30min ago I have a similar issue with the login in server-us.growatt.com.
I use growattServer api to host a local http server with summary of my solar data. I check it this morning around 08:30 utc time and it was showing the data correctly. Since then I got the login error.
I try as requested created new user - but the error remains the same even with the new user. The Andoid app is working fine and showing statistics.
I guess Growatt changed something within login routines
This is my code.
def get_solar_data():
      api = growattServer.GrowattApi()
      api.server_url = 'https://server-us.growatt.com/'
      #login_response = api.login('XXX', 'XXX')	#app user and pass
      login_response = api.login('XXX', 'XXX')	#new user and pass
      print('Login response is:%s'%login_response)	#Login response is:{'msg': '507', 'success': False}

      #plant_list = api.plant_list(login_response['user']['id'])	 *****#get error   File "c:\Stani\IntranetX\pv_data\server.py", line 87, in get_solar_data plant_list = api.plant_list(login_response['user']['id']) KeyError: 'user' *****

	  plant_list = api.plant_list(api.login('XXX', 'XXX'))*******#get error   File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\growattServer\__init__.py", line 135, in plant_list raise RuntimeError("Request failed: %s", response) RuntimeError: ('Request failed: %s', <Response [302]>)****

Hi guys, just to add - starting from 30min ago I have a similar issue with the login in server-us.growatt.com. I use growattServer api to host a local http server with summary of my solar data. I check it this morning around 06:30 utc time and it was showing the data correctly. Since then I got the login error. I try as requested created new user - but the error remains the same even with the new user. The Andoid app is working fine and showing statistics.
I guess Growatt changed something within login routines This is my code.
def get_solar_data():
      api = growattServer.GrowattApi()
      api.server_url = 'https://server-us.growatt.com/'
      #login_response = api.login('XXX', 'XXX')	#app user and pass
      login_response = api.login('XXX', 'XXX')	#new user and pass
      print('Login response is:%s'%login_response)	#Login response is:{'msg': '507', 'success': False}

      #plant_list = api.plant_list(login_response['user']['id'])	 *****#get error   File "c:\Stani\IntranetX\pv_data\server.py", line 87, in get_solar_data plant_list = api.plant_list(login_response['user']['id']) KeyError: 'user' *****

	  plant_list = api.plant_list(api.login('XXX', 'XXX'))*******#get error   File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\growattServer\__init__.py", line 135, in plant_list raise RuntimeError("Request failed: %s", response) RuntimeError: ('Request failed: %s', <Response [302]>)****

Hi @edibg - Just a note, this chain is specifically focussed around the Home Assistant Integration for Growatt, however, the issue you're experiencing here is the same as what the Growatt Integration is suffering (because they both use the same library under the hood: this one, there is a specific bug against that library here), all that said, you're welcome to join the discussions here too.
I believe the 507 code is the new error code for "account locked", when you use the same account on your phone does it come up as locked?
Your account getting locked could be related to how often you're polling for information, I've noticed that the more often I poll for information the quicker my account gets blocked.
I haven't noticed any changes to the login routines but I could be wrong.

I believe the 507 code is the new error code for "account locked", when you use the same account on your phone does it come up as locked? Your account getting locked could be related to how often you're polling for information, I've noticed that the more often I poll for information the quicker my account gets blocked.

Hi Muppet, until this morning I used same account for my home hosted API instance, work hosted API, my wife and I used same account on our android devices too whitout any issues. Currently our andoid apps keep working with the same credentials.
Now, as it was pointet out in the readme(until this morning I used few months old version of the API) will try to forward all my phone traffic trough my OpenVPN interface on the mikrotik so I can sniff what the app is talking to the server-us.growatt.com ( bay be grab the user id) but will see...I am not so good in those areas.
Noted - I will monitor other topic too.

If you're willing to share a set of credentials with me - see here I'll see what I can do in the short term to unblock your issue with the login, but I can't promise what the long term situation will hold (see my next comment).

I believe the 507 code is the new error code for "account locked", when you use the same account on your phone does it come up as locked? Your account getting locked could be related to how often you're polling for information, I've noticed that the more often I poll for information the quicker my account gets blocked.

Hi Muppet, until this morning I used same account for my home hosted API instance, work hosted API, my wife and I used same account on our android devices too whitout any issues. Currently our andoid apps keep working with the same credentials.
Now, as it was pointet out in the readme(until this morning I used few months old version of the API) will try to forward all my phone traffic trough my OpenVPN interface on the mikrotik so I can sniff what the app is talking to the server-us.growatt.com ( bay be grab the user id) but will see...I am not so good in those areas.
Noted - I will monitor other topic too.

If you're willing to share a set of credentials with me - see here I'll see what I can do in the short term to unblock your issue with the login, but I can't promise what the long term situation will hold (see my next comment).

Hi Everyone,
This is a bit of a long update, but I'm trying to capture everything in one post so that I don't have to keep responding to things separately.
Current Situation

As you've all seen, Growatt have been changing various things on their endpoints resulting in accounts getting blocked - mine included
On my various test systems I have seen polling intervals all the way up to 5 minutes (the default for this integration) get blocked, I have one running every 10 minutes and that seems to be ok (but not very useful for updates)
If your account gets blocked the short term solution is to go to the Growatt Website and create a new account for use with the integration, follow the FAQ here but keep the credentials for yourself instead of sending them to me.
Whenever my account is getting blocked I'm creating a new one for HA and starting again, I'm waiting to find out whether ones that got blocked yesterday have been unblocked again.
I cannot keep responding to every single message on this thread throughout the day, I have a job and constant engagement here is causing my work to suffer
I'm at the point where the constant 'fight' with Growatt is exhausting and just a matter of time before it becomes pointless, I may turn my focus to other options (see more info below)

Debug Steps
Here are some steps for people to debug if they're having issues:
1 - Test the same credentials on the ShinePhone App - if it comes up saying your account has been locked, then it has, it seems to only last about 24 hours, but the short-term fix is to create another set
2 - If your credentials work in the App then try restarting Home Assistant
3 - If Home Assistant is working but the data isn't updating then check the data on the App/Website - the last few days we've seen data only being uploaded intermittently while they've been changing with things - if there's no recent data in the website/app then there won't be recent data in HA - simple as that
Next steps
This is the tricky one, I've always said that I will attempt to maintain this Integration and the underpinning library for as long as it makes sense to. While the underpinning library still has it's uses for occassional data pulling (i.e. every 10 minutes), it is clearly becoming less and less viable for instantaneous usage.
The thing I loved about this Integration when I first came across it (before I became it's sole maintainer) was how simple it was to use/setup in HA, and I want to work to find an equally easy option that relies on local data rather than the Growatt servers. My plan is to fire up an instance of Grott and see what I can get running with HA, I've never tried it before and it'll take me a bit of time to get my head around. If it looks like a viable alternative then I'll work out a way forward to make this integration use local data instead.
All I know is that I'm reluctant to take any further steps in the direction of "api calls" given that Growatt seem intent on blocking frequent access, who knows what they'll try next!
In the meantime, please just be mindful that I'm as much of a victim in this whole situation as everyone else, I don't know all the answers, I'm just muddling through like the rest of you.
Today I'm going to try my best NOT to respond to every comment that comes up about this issue, I've set some time aside tonight after work to catch up on it all and will respond then. Again, I'm sorry that we're all having this problem, but there is nothing I can do to resolve it.

I started looking at grott yesterday, haven't actually got it working yet, but this PR and the linked issues might help with the HA documentation which is quite outdated https://github.com/johanmeijer/grott/pull/280

Hi Everyone,
This is a bit of a long update, but I'm trying to capture everything in one post so that I don't have to keep responding to things separately.
Current Situation

As you've all seen, Growatt have been changing various things on their endpoints resulting in accounts getting blocked - mine included
On my various test systems I have seen polling intervals all the way up to 5 minutes (the default for this integration) get blocked, I have one running every 10 minutes and that seems to be ok (but not very useful for updates)
If your account gets blocked the short term solution is to go to the Growatt Website and create a new account for use with the integration, follow the FAQ here but keep the credentials for yourself instead of sending them to me.
Whenever my account is getting blocked I'm creating a new one for HA and starting again, I'm waiting to find out whether ones that got blocked yesterday have been unblocked again.
I cannot keep responding to every single message on this thread throughout the day, I have a job and constant engagement here is causing my work to suffer
I'm at the point where the constant 'fight' with Growatt is exhausting and just a matter of time before it becomes pointless, I may turn my focus to other options (see more info below)

Debug Steps Here are some steps for people to debug if they're having issues: 1 - Test the same credentials on the ShinePhone App - if it comes up saying your account has been locked, then it has, it seems to only last about 24 hours, but the short-term fix is to create another set 2 - If your credentials work in the App then try restarting Home Assistant 3 - If Home Assistant is working but the data isn't updating then check the data on the App/Website - the last few days we've seen data only being uploaded intermittently while they've been changing with things - if there's no recent data in the website/app then there won't be recent data in HA - simple as that
Next steps This is the tricky one, I've always said that I will attempt to maintain this Integration and the underpinning library for as long as it makes sense to. While the underpinning library still has it's uses for occassional data pulling (i.e. every 10 minutes), it is clearly becoming less and less viable for instantaneous usage. The thing I loved about this Integration when I first came across it (before I became it's sole maintainer) was how simple it was to use/setup in HA, and I want to work to find an equally easy option that relies on local data rather than the Growatt servers. My plan is to fire up an instance of Grott and see what I can get running with HA, I've never tried it before and it'll take me a bit of time to get my head around. If it looks like a viable alternative then I'll work out a way forward to make this integration use local data instead. All I know is that I'm reluctant to take any further steps in the direction of "api calls" given that Growatt seem intent on blocking frequent access, who knows what they'll try next!
In the meantime, please just be mindful that I'm as much of a victim in this whole situation as everyone else, I don't know all the answers, I'm just muddling through like the rest of you.
Today I'm going to try my best NOT to respond to every comment that comes up about this issue, I've set some time aside tonight after work to catch up on it all and will respond then. Again, I'm sorry that we're all having this problem, but there is nothing I can do to resolve it.

Other API variants must have the same issues... I same someone capture the data from the inverter directly but then you have to do some cringy hardware stuff. Soldering wires to pin 3 and 4 of the port etc...  and connect it with an arduino or pi.

Website login also now asks for a verifaction code. Growatt is really making it hard to automatic logins.

I don't claim that this will address everyone's issues but FWIW, I set the URL as server.growatt.com, set up a dedicated HA 'browse' user, and haven't altered the default 5min polling. My HA log data appears to have had no sustained outages in the past 12 hours or so.
Clearly as @muppet3000 has said, not a lot can be done if the server itself is locking out accounts. I've seen it introduce a verification code logging in 'manually' when I tried my password manager auto scripting, so its clear they have some defensive code in place that makes this integration's use of their interface always likely to be be fragile. I see the same with other HA integrations that try to emulate a mobile client. Apart from exploring grott, I think the best thing everyone experiencing issues can do is lobby Growatt to support an API formally for 3rd party integrations.

@BobC76 @Geo-Ron @GertJanArts - Can you guys all confirm that this has stabilised for you now?
I haven't had any problems for a few hours.

I started receiving data again at 16:00 CET at the 7th of februari, everything stable since then :-)

No it is a mess server side. They are really bullying  the API users.

Main and subaccounts work fine on app and website, HA integration do not connect, neither the 'old' core one nor the HACS one.

Hi everyone, here's the findings/summary from today:

My change to 4 minute polling seems to have been ok, but until it's been 24 hours (especially overnight when China comes back online) I'm not holding my breath

The server-us.growatt.com endpoint seems to be blocking in an entirely different way, I will attempt to discover how to work around it but I'm not sure what I can offer. (@vingerha - I've written this as a result of our discussions separately)

I had an outage where no information was uploaded to the Growatt servers for approximately 2 hours this afternoon, I made no changes and it started work again on its own, so I'm blaming that on the server and nothing to do with the integration

I plan to do a release tonight which contains the recent fixes for bugs I've been working on (nothing related to these issues, discussed here, but it's nice to tie up those loose ends)

After this release I'm going to stop work on any more bugs and features until there's some stability or clarity on what's happening. Instead I'm going to focus my attention on seeing how viable 'Grott' is as an "easy to use" alternative. It will take some time for me to do that, I'll remain active here in terms of chat etc. but I'm unlikely to go adding any major new features etc.

To a certain extent I can understand the logic from Growatt, they receive no additional money for the use of their website/app past the point of original installation of our Growatt equipment. It costs them to host these servers for the limited services they do provide, therefore they have no obligation to provide support for all the extra server calls that we're making to gather our data. On the flip side, wouldn't it be nice if they offered an API service! I'd even consider paying for it!!!

Once again, I'm as frustrated as all of you are that this is happening, especially after all the effort I went through in January to pull this Integration out of HA Core and into a custom component to better support it.
Finally like I said above, I'll continue to engage here and I'll certainly keep the Integration going if the 5-minute polling interval seems to stick as an "acceptable" rate. But it does feel like it's only a matter of time before the next thing comes along to upset usage! At a minimum though I'll keep it running until I can put some work together on how best to integrate something like Grott with HA, maybe even with another new Integration :)

Final one from me today. The release is out there: https://github.com/muppet3000/homeassistant-growatt_server_api/releases/tag/v1.0.2
The only real relevance to this thread is that it allows you to choose the growatt.server.com url when configuring the integration.
I'm signing off now, I'm tired and I'm not going to magically fix the growatt servers. Tomorrow (or over the weekend more likely) my experimentation with Grott begins!

Thanks @muppet3000 for looking into it.
Just in case it's useful to others to know. As I said above, I had no issues all day, except occasional outages I think at server side. But then I restarted HA, for different reasons, and got 507 responses from the login steps in server.py and, when I tried reinstalling the integration, the initial setup code.
So I changed user account and magically no problem. I have no idea why the login request would give a 507 response, maybe that will be a clue for someone...
Otherwise @muppet3000 I look forward to hearing how you get on. It certainly looks like nailing jelly to the wall trying to guess how to work around an unsupported interface.
FWIW I see the point about the challenges supporting this from Growatt's perspective, and lack of a return. But I personally think in a (near) future when home energy management systems need to manage demand to local generation capacity, interoperability between devices from different vendors is likely to become a core feature, if not to Growatt maybe their competition.

Thanks @muppet3000 for looking into it.
Just in case it's useful to others to know. As I said above, I had no issues all day, except occasional outages I think at server side. But then I restarted HA, for different reasons, and got 507 responses from the login steps in server.py and, when I tried reinstalling the integration, the initial setup code.
So I changed user account and magically no problem. I have no idea why the login request would give a 507 response, maybe that will be a clue for someone...
Otherwise @muppet3000 I look forward to hearing how you get on. It certainly looks like nailing jelly to the wall trying to guess how to work around an unsupported interface.
FWIW I see the point about the challenges supporting this from Growatt's perspective, and lack of a return. But I personally think in a (near) future when home energy management systems need to manage demand to local generation capacity, interoperability between devices from different vendors is likely to become a core feature, if not to Growatt maybe their competition.

With regards to the issues when restarting I believe I started the same issue (I've just created another use and used that to with around it but that's besides the point).
The reason it breaks when you restart is because it has been blocked at some point earlier but continues to work because the integration doesn't re-authenticate each time it polls for data, it uses a session cookie which doesn't get blocked. When you then try to re-authenticate as part of a restart or an update it can't.
Not a solution to the problem but an explanation at least.

Its weird,
When i wrote my code back at hs4 (homeseer) some time ago, it still works for me retrieving the data.
But its a old python script that retrieves everything i need from growatt.
Never had a issue with it.
So there must be some other issue then.

Just out of curiosity, are people still having issues with data not uploading to the growatt servers? I acknowledge that there are issues with accounts getting locked etc. but I'm still having huge gaps in the data that's getting pushed to Growatt.
Over the last 4 hours I've only had about 5 data points pushed to the graphs.

Nothing missing on the US server.
Maybe they are change something on the backend that causes the missing data/servers offline.
A few months ago(again on the us one) I had every 4 weeks one day without data available, may be the maintenance that they are doing now causes this missing data.

Yeah almost certainly likely, it's just decided to throw another data point up there, so they're clearly doing something. I remember something similar happening in the past for about a week and then it all started working again.
This is one of the other advantages of the Grott approach, everything becomes local and therefore can be more reliable than the servers.
Itching to find the time this weekend to get my hands on Grott!

Uploading to the Growatt server has never be an issue. Never gaps here.

@muppet3000 I got grott installed today, trying this out too .... driven by your view on questionable future of the growatt api service.
It works and provides the data I need but I no longer have data in the growatt app nor the website. The documentation seems to allow a upload to server.growatt if you setup sniffing but that is too much for my not-so-powerful nuc.
Personally, I prefer to have all but main goal is: continuiity in the feed to HA

My primary goal from my investigations will be no interruptions to the data flowing to Growatt. But HA first basically.

I got the errors described above yesterday & today 😢

A bit off topic but also not really in the grand scheme of things:
It works and provides the data I need but I no longer have data in the growatt app nor the website. The documentation seems to allow upload to server.growatt if you setup sniffing but that is too much for my not-so-powerful nuc.
You should be able to get data in both without requiring sniffing, there are currently three ways of setting up  grott and it looks like there might be four soon:

Proxy. This requires configuring the shine wifi dongle to point to the grott server internal IP address, which reads the output and sends it on to growatt (this is what I'm currently using after getting it set up earlier in the week). growatt looks exactly the same but I also have data in HA via mqtt (using the sensors in this MR rather than the integration for now https://github.com/johanmeijer/grott/pull/280)

Sniff. This doesn't require configuring the shinewifi dongle, but it does mean more router/server configuration for sniiffing. Haven't tried, but as you say data will also go to growatt.

grott_server - this introduces a server as an actual endpoint for shinewifi, which enables sending back commands to the inverter via mqtt, but it's literally an endpoint in that there's no data forwarded to growatt - completely cuts it out.

4* grott_server + proxy: on https://github.com/johanmeijer/grott/discussions/98 the maintainer has talked about implementing 1 + 3. Data sent to both growatt API and grott_server. There's then a question of whether only grott_server or also the growatt API is able to send commands back to the inverter. It's likely this will make grott read + write and growatt read only.

sends it on to growatt
I am using Proxy via a docker setup on 'host' but nothing arrives with the server. I cannot find what is wrong

do I need to specifiy a user in the grott.ini?
I have a setup on server-us.growatt.com....so maybe I should changet to hat IP?

I have a setup on server-us.growatt.com....so maybe I should change to that IP?
Yeah you might need to change ggrowattip (docker/environment variables) or ip in .ini, to point to the IP address of server-us.growatt.com
No need to configure a user - I think that's sent as part of the shinewifi data, or regardless it doesn't need to be configured.

Thx.... it is indeed working again...needs a bit of patience to see the result coming in :)

FYI: I had disabled the integration for two days now and just (about 5 hours ago) re-enabled it. I haven't changed anything in the settings. So I keep using https://server-api.growatt.com
It's been working for about 5 hours now and there are no error messages. Let's see how long it works now until there is an error again.
And yes: Grott with Proxy is the much better way, but I haven't tried it yet.. :-)

Hi Everyone,
I hope you're all having a fun weekend.
I just wanted to check in with you all after the chaos of the week and after I've had a few days to ponder things.
Now that I've had time to think things through it's clear that the future of the API based interactions with Growatt isn't sustainable, the exception of course being if Growatt ever decide to open up a proper method of engagement/official support.
I, like many of you rely on the data flowing into Home Assistant for various other home automations and therefore my primary goal is as follows:

No new features in this Integration, only critical bug fixes or API 'workarounds' until there is a viable, stable alternative
On a personal level, I'm going to investigate the use of Grott, it's local, it's maintained and it has a good community behind it. My goal will be to achieve the following:
Data flowing into Home Assistant as identically as possible as it does with this Integration
Data still flowing to the Growatt servers so that the ShinePhone app still works
Investigate (through Grott) the possibility of configuration of the Inverter also (I have previously done this via the API, but clearly that's no longer a long-term option)

I am going to update the main README page of this repo to reflect the above and direct people towards this issue so that they can make an informed decision before using the integration.
I will of course remain engaged here, however my development & integration efforts will be focussed on my personal setup and getting Grott working to the same level as I currently have the HA Integration.
What I'm hoping will happen is that I'll be able to get it working before Growatt make their next "clever" move and I can contribute any fixes/work directly to the Grott repo.
I'm also hoping that I'll identify a use-case for a new 'Grott' integration for Home Assistant that will make adoption of Grott that much easier for people that are not 'super techy' and will also simplify the ability to configure their inverters as well.
Please do not take this message as "goodbye" or me saying "I'm giving up", completely the opposite, I'm determined to find the alternative that works best and contribute to it in a positive manner. It's just that in order to achieve that I have to start again, invest my time and effort into proper investigation and learning of the new option and then support people as the community continues to grow.
Outside of playing with this integration and battling with Growatt I have a job, a family, small kids and things around the house that I need to also make sure I don't neglect, so I don't have the luxury of spending every hour of the day on this and I can't go making promises about timescales and the future of this Integration (or an alternative) until I've spent some time working out what the best route is.
Thanks everyone!!
@vingerha - I haven't forgotten about my promise earlier in the week to work out why server-us.growatt.com behaves differently and provide a work-around, I'm going to take another look at that this week while I'm playing with Grott.

@muppet3000 Thanks for the message and I clearly understand your pov.
The grott setup seems to be working OK and goes to 0 too so if you are also diverting to grott then I fully understand to not spend time on a solution for the server-us api

If grott stop no one will have loosen data.
In place of grott, see firmware hack for mqtt
https://github.com/otti/Growatt_ShineWiFi-S

Today, cannot login ShinePhone (iOS), Growatt integration (HACS) does also NOT login! But login at webinterface server.growatt.com works fine. Stranggggge

I think this is Growatt end. ShinePhone and HA are not working for me, and growatt Web portal hasn't updated for 45 minutes now.
Sent from Outlook for Androidhttps://aka.ms/AAb9ysg

From: GertJanArts @.>
Sent: Monday, February 13, 2023 12:04:40 PM
To: muppet3000/homeassistant-growatt_server_api @.>
Cc: Subscribed @.***>
Subject: Re: [muppet3000/homeassistant-growatt_server_api] BUG - Growatt Server Connect & Stability Issues (Issue #15)
Today, cannot login ShinePhone (iOS), Growatt integration (HACS) does also NOT login! But login at webinterface server.growatt.com works fine. Stranggggge
[cYwd470tPa]https://user-images.githubusercontent.com/20320533/218452772-3b96eee1-0337-4c7d-9f05-06815cb8666e.png
—
Reply to this email directly, view it on GitHubhttps://github.com/muppet3000/homeassistant-growatt_server_api/issues/15#issuecomment-1427828075, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABEFTA7QYP7SFUSOQOTCGOTWXIPNRANCNFSM6AAAAAAUKKPXUM.
You are receiving this because you are subscribed to this thread.Message ID: @.***>

Thanks for your update @muppet3000
I was also about to take a look at Grott. Would it be possible to share your experiences with us here or in a separate thread/page so that we can learn from each other?  Setting up Grott itself looks straight forward. However, the main question for me so far is getting the data from Grott into HASS.
@Saentist The repo from Otti looks very interesting. However, I'm afraid this is above my skill level as it involves piggy backing on an esp if I'm not mistaken, including soldering etc. Hence I would prefer the Grott route, but it's certainly a very interesting alternative (albeit for me being a last resort).

There is a change in industrial inverters part of Growatt cloud infrastructure
Maybe that's why home user are affected with outages.

@Freekers what do you mean on how to get data in HA...it uses mqtt and this is all explained if you dig in the docs (whichvadmittedly lack a bit of structure)

@vingerha The documentation is indeed there, albeit being a bit scattered, but unfortunately it's also a bit out of date (old sensor format, deprecated as of December 2022) because the maintainer himself doesn't use HA, so it's understandable. I will try to improve the docs once I get it working in my instance. Currently I'm struggling with the gross_ha.py extension, see: https://github.com/johanmeijer/grott/issues/286

I have an SPH inverter and I set ginvtype in docker to sph to get extra values in MQTT.
For anyone interested, my mqtt config for grott can be found here from line 377 starting with mqtt: (at the time of writing)

Thanks everyone for the kind responses and understanding of my position. Really please to see that this thread didn't die immediately.
So the short version - since my last post I've done absolutely nothing with Grott, I simply haven't had time with a busy weekend and then feeling really ill since the beginning of this week.
That said, it doesn't mean that I haven't been productive in other areas!
Firstly - @Freekers - I share/shared the same concerns around the HA integration with Grott, in fact, this is where I feel I'll be able to add the most value. Getting Grott up and running seems straight forward enough (although I agree with you and @vingerha that the documentation could do with a lot of improving - something I'll contribute to as part of getting my system up and running).
Now, for the HA integration, there are lots of ways to get HA to consume and elegantly present MQTT data, for me though I want to achieve 2 things:

A seamless transition from Growatt API to Grott i.e. all the stats are named the same thing, the integration looks the same and has all the same values
The ability in the future to extend the Integration to 'push' configuration via Grott/GrottServer to the Inverter so that I can set charging times etc
Now, to that end (and completely unrelated to this chain/topic I have a custom aftermarket In-Home-Display (IHD) for my electricity and gas meter, it supports MQTT output AND some kind/foolish soul has produced a HACS custom component which gobbles up all the data from MQTT and then formats it nicely and gives you exactly the same look and feel as what we currently have for the Growatt API integration.
The best thing is, I installed it all last night and it "just worked", I mean, it couldn't have taken any less time for me to get working. Which means, I have a perfect codebase and example to copy from that already works.

Now, like I said - I'm ill, no idea when I'll be feeling better again (hopefully the weekend), but when I am, my plan of attack is as follows:

Get Grott up and running and publishing data to CSV (yes CSV - the intention is to confirm that all the same values that are available on the API are still available or whether some need to be aggregated e.g. total solar produced today etc)
Get Grott publishing to MQTT - likely a trivial step
This is the tricky bit: understand how Grott formats the topics etc. that are fired into MQTT so that I can parse them in a structured and consistent way - If they're not structured consistently then I may have to make some contributions to the Grott repo to get them more consistent, otherwise this whole plan falls apart.
Write a new Integration that parses the MQTT data and formats it nicely just how we've always been used to in HomeAssistant

After I've done all that I'll work out how to push config back the other way (in the meantime I'll hope that the API doesn't get fully locked down so my config pushing script that I have working manually in the background outside of HA still works).
All of this will take time, but I'll get there, if other people make progress on other things in the meantime great, but this is my plan and once I've got something working I'll happily share it, even if it's in some basic Dev form.
If I wasn't already tucked up in bed tonight I'd be starting to look at it now, but I simply don't have the mental capacity for it tonight.

i have custom plug HACS and now also grott docker running (docker -> MQTT -> HA)
thanks muppet300 and johanmeijer!!
.. after a week i make a decision
I'm also having account lock issues now..hopefully over when I stop using the API

Hello,
I did a bit of work on the HA extension for grott, but it will perhaps need a bit more of love.
I'm open to contributions for mappings the data to HA sensor configuration, some mappings names are not super explicit and would love a bit of help.
A major rewrite of the plugin is underway to make it easier to configure, update, and there''s also tests.

The RC4 also correct bugs related to the MQTT integration corrected in the current add-on. I'm probably going to push a merge request soon to the main branch of grott.
I've published a standalone docker image if you want to experiment without using HA add-ons.

Hello, I did a bit of work on the HA extension for grott, but it will perhaps need a bit more of love. I'm open to contributions for mappings the data to HA sensor configuration, some mappings names are not super explicit and would love a bit of help. A major rewrite of the plugin is underway to make it easier to configure, update, and there''s also tests.

The RC4 also correct bugs related to the MQTT integration corrected in the current add-on. I'm probably going to push a merge request soon to the main branch of grott.
I've published a standalone docker image if you want to experiment without using HA add-ons.

Thanks @egguy  - Do you have a link to that extension? Are you referring to the Integration/Plugin or the add-on (you mention both.
Add-ons are for use with Home Assistant OS or Home Assistant with Supervisor for running things like Grott etc. on the same machine, but not everyone runs HA in that way (including myself).
If there is already an integration though i.e. the think you add from the 'integrations' page I'd happily take a look at it and see how I can contribute.

i use only have use the MQTT sensor file

change HA config file to look to MQTT sensors

make MQTT sensor file  (see file)

is works.. (also monitor of two strings)
sensors_growatt_nl.yaml.txt

@Freekers I have a PR against grott updating the MQTT sensors to the new format, you could try copying from my fork, will need to import the file in configuration.yaml to have them picked up https://github.com/johanmeijer/grott/pull/280
@muppet3000 the extension is here I think: https://github.com/johanmeijer/grott/tree/master/examples/Home Assistent

@catch56 ...
The extension at https://github.com/johanmeijer/grott/tree/master/examples/Home Assistent don`t work any more HA
see https://github.com/johanmeijer/grott/issues/159 (this works with the last verion of HA)

@muppet3000 The HA addon is here: https://github.com/egguy/grott-home-assistant-add-on/
The add-on use the grott_ha plugin + grott + mqtt autoconfiguration from HA.
This uses the MQTT device configuration from HA (creating multiple entries on homeassistant/sensor/grott/$serial_sensor)
The grott_ha extension in the main branch has some bugs resolved in my branch, but is working albeit partialy with 2.7.X.
In the folder there's also example on how to make HA use the mqtt messages sent by groot, but this is a different way to integrate (this use the main mqtt output, but with no discovery).
If you prefer to run it by itself, I've prepared a container version, e.g. for the grott.ini:
[Generic]
# Specify verbose for extended messaging
verbose = True
# Specify the type of the inverter (default/sph/spf/max)
#invtype = default

[extension]
extension=True
extname = gott_ha
extvar = {"ha_mqtt_host": "$mosquitto_host", "ha_mqtt_port": "$mosquitto_port", "ha_mqtt_user": "$username", "ha_mqtt_password": "$passowrd"}

then run: docker run -p 5279:5279 --restart on-failure -v $(pwd)/grott.ini:/app/grott.ini egguy/grott:2.7.8

I appreciate all the efforts put into the new integration based on grott. I am a HA user but have not used the Growatt HA integration so far - and also face daily troubles with the login on the shinephone App side as on the browser side even though never had been using the api or anything.
I am also an SPH owner with the usual diy LFP battery out of EVE cells and a home now mainly heated by heatpumps which will force me to look for hourly tarifs and charge the battery during wintertime in the middle of the night for cheap where I hope the integration will help me and others to charge not based on time but also on prices cause we get the tibber prices for the next 24 hours in the evening.
Thanks to all that help to get it running again and this time under grott.

I have an SPH inverter and I set ginvtype in docker to sph to get extra values in MQTT.
For anyone interested, my mqtt config for grott can be found here from line 377 starting with mqtt: (at the time of writing)

Well, I am also a SPH owner who has to get that running in HA sooner or later cause right now I am installing heatpumps and next week the new solar panels and battery upgrade. Hope that I can contribute from may onwards too.
Will check your configuration and hope it will run with the SPH 4600 I got last november from Growatt.
thanks

Just out of curiosity, has anyone tried getting Grott to work with a 'hybrid' system yet? I have a "sph3600" inverter, which isn't listed on the page as having official support. But it does seem to mostly work.
I've got it outputting to a CSV file for now, but I need to do a bit more investigating to correlate all the values and understand what else is missing.
There are some values that I (personally) rely on for my heads-up displays etc. so I'll need to work out if these are calculated from existing values, or are not yet parsed by Grott.
Either way, it's a promising start. I'm not going to start pushing anything into MQTT or HA until I actually have faith that the values are correct and I can map them onto the existing sensor values in HA.

@muppet3000 have you set the inverter type? I have found doing this gave more and different values in the payload.
I kept the growatt integration so I could compare the values from grott to Growatt integration and growatt's website. I also have a SPH so take a look at my config and if any sensors that are not clear give me shout.

Yes, took me a while to realise I needed to set the sph type, but even after that some of the values still aren't what I'd expect.
I'm still a bit groggy, so not firing on all cylinders yet, I'm sure a few more days and I'll work it out.
I pretty extensively documented all of the values available for Hybrid systems when I implemented it 2 years ago, so I should be able to map things up without too much trouble.

@muppet3000 I have an SPH6000.  I worked around this with a template sensor that adds them together to get going, but happy to try things my end to figure out what's missing/wrong and compare notes.
If you try to get time of use charging etc. working via grottserver (I know that's a secondary/tertiary priority to getting the data in nicely), it's taken me a few hours to get anywhere with that, but I've documented my steps at https://github.com/johanmeijer/grott/issues/162 (and see linked PR which makes it possible to set registers in that range at all).

@muppet3000 @catch56 For me, I have two 3600TL inverters in a single home. The GROTT plugin in HASS was easy to set up and configure both Shinelan boxes. Only thing I was missing 'out of the box' is total energy entities, however these were easy to create using helpers. Until now, a much more stable result than when using the growatt online server..

I've setup Grott together with the 'grott_ha' extension from @egguy and it has been working very well so far. I'm using the Docker Image of egguy instead of the official Grott docker image, as the image from egguy has the grott_ha extension built in. The official Grott image requires you to manually download the extension, which would mean I need to re-download it myself in case there's an update to the extension. The benefit of the grott_ha extension is that it automatically creates all sensors in HASS. There's no need to create a sensors.yaml file yourself. Here's my docker-compose in case anyone is interested:
services:
    grott:
        image: egguy/grott:latest
        container_name: grott
        restart: unless-stopped
        ports:
            - "5279:5279"
        environment:
            gverbose: False
            gnomqtt: True
            gextension: True
            gextname: grott_ha
            gextvar: '{"ha_mqtt_host": "YOUR_MQTT_IP", "ha_mqtt_port": "1883", "ha_mqtt_user": "XXXXXX", "ha_mqtt_password": "XXXXXX"}'

Note: My compose file assumes you already have an MQTT server running.
@catch56 I appreciate your work but since I have two inverters (MIC 1500TL-X and MIN 3600TL-XE), I took the lazy route and used grott_ha to automatically create the sensors for me instead :)

Maybe another thing to think off, try to prevent / filter odd spikes, this is what I got this midnight

@Freekers would it be possible to detail more your setup as am a newbie trying to replicate your setup to get egguy/grott docker image to run properly? Do you have HA running on linux or in docker container? Using HA built in mqtt or mosquitto or any other mqtt should be fine? And would you please detail which ip did u use in proxy mode, that of HA or egguy docker container.
Thanks

@Nickthegr8
I run HA on docker 'host' as are my containers for mqtt and grott
docker run -d --name "grott" --net=host -v /home/arjan/docker/grott/grott.ini:/app/grott.ini --restart on-failure -e TZ=Europe/Paris -e gmqttip="<IP_ADDRESS>" ledidobe/grott

Note that I use a different image
The grott.ini only has two modifications for me, the mqtt details and I had to change the growatt server ip (now I am also seeing data in the growatt app and web)

Thank you, will try your setup

A little side note, you can put a domain name in the ip= field, python will automagically resolve it. It's practical if growatt decide to change their server IP suddenly.
For the container, it's a packaging of the 2.7.8 branch with the grott_ha.py plugin already included (The use of the plugin is fully optional).

@Nickthegr8

I run HA in Docker
I run Mosquitto in Docker as well, with port 1883 exposed
I used the IP of the Mosquitto host, i.e. the server running the mosquitto docker container, as ha_mqtt_host variable for the grott_ha plugin

@vingerha
You can also specify these as environmental variables instead of using an ini file. Doing so you don't need to mount any volumes to the container. Example: https://github.com/johanmeijer/grott/blob/master/docker/docker-compose.yml
@egguy
Thanks again for your image and help, it works perfect so far.

Can someone maybe explain which 'image' to follow? I understand that people fork/tweak things (so do I) but is there a base image to work from that is supported all the time?

For what it's worth, I'm still playing with it.
However, I'm using the stock Grott Docker image with a config file mounted in (I prefer mounting in config files rather than using env-vars) the only thing I've changed in that config file is to tell it that mine is an "sph" inverter.
I haven't got it pushing to MQTT yet, however I have a dedicated stand-alone MQTT server.
As for getting things into HA, I haven't got that far yet because I'm still mapping the values Grott receives onto the ones that Growatt API provides. However, I'm planning on making a new Integration that will auto-generate the same values that the growatt-server-api Integration did direct from MQTT. Then, it will also allow for pushing configuration in the future.
I know people have got all sorts of "forked" images, but I've had no problems with the stock ones.
I appreciate that everyone's on a different stage on this journey, but I'm taking my time and making sure that all the values I want/need are actually available.

@vingerha @Freekers got it up and running usinng egguy/grott i had to put my VM on same ip/subnet of the shineusb, i can receive mqtt msg and publish to growatt server normally however can't get grott_ha to publish sensors to HA (they don't get created). i've looked into grott container log and i see the following error
" Grott MQTT topic used : energy/growatt
- MQTT message message sent
- Grott Send data to PVOutput disabled
- Grott Send data to Influx disabled
- Grott extension processing started :  grott_ha
Grott HA 0.0.7-rc4 - creating xx config in HA, 52 to push
Pushing 53 configurations payload to HA
- Grott extension processing error: TypeError('string indices must be integers')
- Traceback (most recent call last):
my env variables defined as:

gextvar='{"ha_mqtt_host": "<IP_ADDRESS>", "ha_mqtt_port": "1883", "ha_mqtt_user": "nick", "ha_mqtt_password": "nick"}'
attached the full log can you please have a look @egguy
https://pastebin.com/QkUKv3Hn
many thanks to all,

I've tested that now too. :-) At the moment I use my Synology DS720+ for HA.

DS720+ (IP <IP_ADDRESS>)
HA in a VM under DS720+ (IP <IP_ADDRESS>)
HA Mosquitto broker Addon (<IP_ADDRESS>:1883)
Grott with Docker under DS720+ without Portainer

The IP <IP_ADDRESS> is stored in the Shine Data Logger Stick.
Grott.ini
ip = <IP_ADDRESS>
port = 5279
[MQTT]
nomqtt = False
ip = <IP_ADDRESS>
port = 1883
topic= energy/growatt
auth = True
user = MQTT User
password = MQTT Password
Result: Grott runs but no MQTT Data from the Stick to the Mosquitto broker (test with MQTT Explorer).
OK next test:

DS720+ (IP <IP_ADDRESS>)
HA in a VM under DS720+ (IP <IP_ADDRESS>)
Eclipse Mosquitto with Docker without Portainer under DS720+ (<IP_ADDRESS>:1883)
Grott with Docker under DS720+ without Portainer

The IP <IP_ADDRESS> is stored in the Shine Data Logger Stick.
Grott.ini
ip = <IP_ADDRESS>
port = 5279
[MQTT]
nomqtt = False
ip = <IP_ADDRESS>
port = 1883
topic= energy/growatt
auth = True
user = MQTT User
password = MQTT Password
Result: Grott runs and I can see the MQTT Data from the Stick at Eclipse Mosquitto (test with MQTT Explorer).
OK I think there is a problem with the IP if I use the HA Mosquitto broker Addon on HA VM (<IP_ADDRESS>) and Grott in a Docker at <IP_ADDRESS> (Docker IP <IP_ADDRESS>). A Macvlan would probably help so that I could assign the IP for the Grott Docker myself. Maybe someone here has a tip on how I can solve the problem without Portainer, so that I can use the HA Mosquitto broker Addon (<IP_ADDRESS>:1883) for Grott?

@muppet3000 .... for the fun of things... now grott also does not go to 0 anymore before midnight... I could swear that happened earlier but no more

@vingerha The strange thing is; it depends on the inverter (at least for me!). I have 2 different types of inverters:

MIC 1500TL-X: Loses connection with Growatt once the sun goes down, WiFi dongle goes completely off(line). Does NOT reset at midnight. Instead resets to 0 the next day once the sun rises again:

MIN 3600TL-XE: Stays connected with Growatt 24/7. WiFi dongle remains online. Resets at midnight:

PS. Per your previous question; the official Grott base image that is maintained by the creator of Grott can be found here: https://hub.docker.com/r/ledidobe/grott

Odd indeed, I expect it to go 0 when there is 0 and not hang on the last value, could be a HA thing in the end.
On the image, thanks and I am using that, was just wondering about the differences as there is now talk of (at least)  2 images in this chain

@vingerha I explained the difference between the images in my post last week: https://github.com/muppet3000/homeassistant-growatt_server_api/issues/15#issuecomment-1433848963

@Freekers thanks for the info got it up and running. I ended using your suggestion for egguy fork as it automatically creates HA entities.
I have an spf 5000 and i had to change gextvar = {"ha_mqtt_host": "YOUR_MQTT_IP", "ha_mqtt_port": "1883", "ha_mqtt_user": "XXXXXX", "ha_mqtt_password": "XXXXXX"} without initial quotes
@JimGermany i faced same issue, i have custom subnet for docker containers running in ubunutu vm on windows, had to change ubuntu vm network to bridge mode so that it sits under same subnet as shine usb dongle so now it posts to HA successfully.
@vingerha thanks alot as well
Have a nice sunday everyone

@Freekers thank, I did overlook that. would be nice that the number of forks and functionality remains limited to avoid not being sure where to look for maintenance :). I do agree that a container is not (well) an add-on and extensions apply but maybe this can be contained (pun not intended) to a few ?Speaking of my own (limited) experience in getting too many requests that actually should be deal with by the core.

@vinghera The egguy fork is friendly and the updated home assistant integration has been merged back into the johanmeijer repository in the past week or so - so it should be possible to use the home assistant integration in the unforked version next time a release is tagged (or now if you don't use docker).
I put in a pull request for a small change to fix grottserver for SPH inverters and it was merged within a few days.

Hi Everyone, it's been a little while since I've checked in - don't worry I'm still breathing :)
I've had grott up and running now for a couple of weeks and it's dumping to a CSV file and most of the values I seem to agree with - which is good.
Tonight I started playing with putting together a user-friendly integration for Home Assistant, what I mean by this is a new HACS integration that subscribes to MQTT and then nicely creates all the sensors for you based on what's published to MQTT. This will then allow me to extend it in the future to allow people to push configuration settings to grottserver (when I get that far).
My goals are as follows:

Auto detection of the grott data being published to MQTT
Auto creation of all available sensors (with correct energy metric types) in HA
Option to run in "growatt_api compatibility mode" so that it can produce the same sensors as what there used to be for the growatt_server_api integration so that history can be maintained
The future ability to allow configuration options to be sent to the inverter

I think I should have a working prototype for items 1 & 2 relatively soon (hopefully before Growatt break the API altogether).
One thing I have noticed is how difficult the grott repo and codebase is to navigate. I've just about managed to get my head around it all, it's not as friendly as I'd like, hence my desire to make a simple, easy-to-use Integration for HA.
Anyway, just checking in.

@muppet3000 Thanks Chris and I appreciate the suggested improvements, if there is testing required even with my 'simple' converter, just let me know

@Nickthegr8 thanks but it also doesn't work in bridge mode.
@muppet3000 I haven't installed egguy addon yet, so I don't know what it looks like or what's possible with it. Your "new HACS integration that subscribes to MQTT and then nicely creates all the sensors for you based on what's published to MQTT. " should be something like that?
And what about johanmeijer? Is he still working on "please include grott_ha.py into the docker build" Answer: "Yes good idea. I will add it with next docker image generation."
Not that there will be three (or more) different HA Grott integrations any time soon. :-)
@egguy Maybe a short guide (or a few more words) to (about) your addon on your Github side website would not be bad. ;-) If you (I) don't follow the various discussions everywhere, you (I) don't really know what it's all about. That "An addon to allow running the grott software directly on HA." doesn't really say much (to me). :-)
Thank you for your work!

@Nickthegr8 thanks but it also doesn't work in bridge mode.
@muppet3000 I haven't installed egguy addon yet, so I don't know what it looks like or what's possible with it. Your "new HACS integration that subscribes to MQTT and then nicely creates all the sensors for you based on what's published to MQTT. " should be something like that?
And what about johanmeijer? Is he still working on "please include grott_ha.py into the docker build" Answer: "Yes good idea. I will add it with next docker image generation."
Not that there will be three (or more) different HA Grott integrations any time soon. :-)
@egguy Maybe a short guide (or a few more words) to (about) your addon on your Github side website would not be bad. ;-) If you (I) don't follow the various discussions everywhere, you (I) don't really know what it's all about. That "An addon to allow running the grott software directly on HA." doesn't really say much (to me). :-)
Thank you for your work!

@JimGermany let me at least take a moment to explain a few things. I can't talk on behalf of @egguy or JohanMeijer but I can try and clear a few things up.
Firstly, it's important to understand the difference between an 'Integration' and an 'add-on' in terms of HomeAssistant.
An 'integration' is something that integrates with a service or entity outside (or possibly inside) of Home Assistant, take for example the Growatt Server API integration that this repo is for, you go to the integration page in HA, you put in the name of the integration you want, a few configuration items and then voila you have a nice set of sensors appear in HA with all the data for that integration.
An 'add-on' is specific to Home Assistant instances that are running in 'supervisor' mode i.e. when you use Home Assistant OS or some NAS installations. In this instance an 'add-on' allows you (through home assistant) to control other things that are not part of home assistant (typically docker containers) e.g. running grott and an mqtt server. Not everyone runs Home Assistant in this way (myself included) and therefore add-ons are not consumable by everyone who uses HA.
Now, back to the items you've raised:

I will be making an Integration, something that will consume data from the MQTT listener that would be running in HomeAssistant (regardless of how you run grott, the MQTT listener in HA is essential and I'll provide instructions as part of the repo on how to set this up if you don't already have it), there are about 1000 tutorials on how to set up an MQTT server and HA MQTT listener though so that should be straight forward.
The intention would be to extend the integration in the future for people to provide the IP/Hostname of their grottserver instance (optional) so that they can push config changes to it as well

From reading the docs.md file on @egguy 's GitHub I can tell that his implementation is an 'add-on' that will run Grott for you and also configure all of the sensors to appear in HA. I believe I'm correct on this front, but it's not my repo so I can't be certain. As I said before, this isn't applicable to all HA installations but would get the job done for many. NOTE - There's no reason people couldn't use the add-on from @egguy coupled with a different Integration e.g. my one (once it's written) to get the best of both worlds.

Looking at the add-on/integration in the main Grott repo, it looks like it's just a bash script that will set up the sensors for you based on what's in MQTT, pretty low-tech but gets the job done.

Hopefully that clears things up a little. Ultimately the choice is up to everyone, it would be lovely if a consensus is reached over time and I'm sure it will be. For me, I'm keen to write an Integration that works with all types of installations of HA and has the scope to include inverter configuration setting in the future as well.
Once I have an integration that works and is well documented I may turn my attention to the Grott repo itself and see if I can contribute some documentation to it to make everyone's lives easier.
NOTE - I'm heading away for the weekend so unlikely to reply much, just wanted to get this in before I headed away.

@JimGermany it is working here very well, i can post configuration screenshots if u want, i also advise u look at egguy container log maybe gratt_ha.py has some error. Mine was in gextvar.
@muppet3000 many thanks and awaiting your work

@muppet3000 Thanks for your feedback. I know the difference between HA Addon and HA Integration. :-) Yes of course there are different developers and different approaches, but right now it's just a bit difficult for a user to decide what he should or could use because you don't know exactly which direction things are going in.
And JohanMeijer also writes: "Be aware at this moment HA integration seems to change a lot. Read issue/discussions about the latest status and updates." so it looks to me that he's going to do more in the direction of Home Assistant.
The easiest way for a user would be to have an installation that installs Grott under Home Assistant so that the data is sent to the/an Mosquitto broker and can then be read from there. For example with the core mosquito MQTT Integration. But I'm not a developer and therefore I don't know what's possible and how to do something best. :-)
@Nickthegr8 Thanks for the offer, but I've done various tests and the problem is more with the Synology NAS. I'll wait and see how the whole thing develops and which solution I'll ultimately use. JohanMeije, muppet3000, egguy,  ..... :-))
PS: English is not my native language, so sorry for any mistakes. :-)

@JimGermany - Don't worry your English is excellent much better than any other language I can just about talk (normally just enough to ask where the nearest library is).
Short response to this, you could bake it all into one Integration, however it would require a lot of change every time a new update or change was available. While I agree it would be helpful from an end-user perspective it's actually quite painful from a development/implementation perspective. It's much better to have things decoupled and then they can be updated and supported individually. e.g. if there's a bug in Grott then that can be fixed, released and deployed without any changes required to MQTT or the HA integration etc.
I think all of this will mature as time moves on but for now I think there will be quite a bit of uncertainty.

Mr muppet3000 and the other guys, thanks for your work.
Im installing my first Growatt Hybrid Inverter and was suffering, reading a lot and researching of how to read if battery is full and PV generating for doing something with Alexa for using that remaining energy Power before wasting it.
After weeks of reading and researching, now I found this Post, and now Im very happy of waiting your work for using it without limitations over the Grott thing.
(Now I need to know how to use Homeassistant, etc etc., but it will be more easier)
Thanks for your work, sorry for my bad English, greetings from Colombia.

Hello, I acknowledge that my add-on needs a bit of a revamp on the documentation side.
I have started as a way for my friend to run the add-on on his HA (following some earlier growatt API trouble), but because of the difficulty to integrate to HA, I've also created an HA plugin for grott and started to bundle it with this addon.
The add-on has evolved without changing the original description, so yes there's clearly a lack of documentation on my side. I will try to correct this in the next few weeks. (I try to squeeze as much time as I can to work on it, contributions are welcome)
As for the stably, currently it's mostly measures mapping and addressing some problems with error in divider. I'm planning to rewrite the extension to a module (I've made a single file to reduce the installation complexity, but now it's starting to become difficult to make proper changes in a single file)
And @muppet3000 you're right, if you disable the HA extension in the add-on, it's mostly the original grott with all the configuration variables available, so you can combine your extension with the grott add-on to have a simple way ton integrate.

@egguy A few explanatory lines and/or a couple of screenshots for example, would be good. Under the heading "Grott - Home Assisstant native MQTT integration" and the line "An addon to allow running the grott software directly on HA." one can only imagine a little. E.g.: Do you have to set up a Docker image somewhere? Do you have to adapt the grott.ini and if so where is it stored etc.
Do not get me wrong. I love it when someone develops something and helps users with it, but without a bit more information about it, it's reluctant to try something like that.

@JimGermany
i have the same setup.. Synology DS218+ .. and it works perfect!!
HA running in VMM (it has his own IP adress)
create MQTT sensors (see att)
MQTT running as docker (ip of nas:1883)(net brige mode)
GROTT running as docker (ip of nas:5297)(net brige mode)
see post before.. setup is easy en works very stable so far

Thanks for the info. That's how it works for me now too. I was just too impatient because it takes - for whatever reason - about 1 - 2 minutes for the MQTT data to appear under the HA Mosquitto broker Add-on. :-) But with the MQTT Explorer I could see them immediately.

The reason for why the data takes a bit to appear is that the logger first connects, then sends its configuration, then parameters to growatt before sending data.
The data sent can also be buffered, which can a bit problematic. Depending on the integration, it isn't pushed to HA (HA don't seem to like having old data pushed, but I can be wrong, and will be happy to add this functionality)
Then the current data is pushed, this is why there can be a slight delay.

Thanks @muppet3000, @egguy and everyone else who are working on this.
I am also suffering from the stability issues, and am looking for alternatives.
Th grott way seems to be a way forward (already have MQTT setup), but I am not really sure where to start (lots of reading to do still)
That being said, if there is any help I can give on testing out Grott + HA + Integration, please let me know, as I'm definitely willing to help where needed.
Thanks again for all your efforts!

My accounts got blocked again - both on the server-api.growatt.com endpoint and the server.growatt.com endpoint. I was querying every 1 minute though. So I've changed that to every 3 minutes and I've created yet another account to test it with. It may be that they're just rate-limiting.

hello , can you please explain how to change the time intervall from standard to 10 minutes , so i can try if it will work ?
thanks

The code is written so that it queries every 5 minutes, unless you request it more regularly.
Therefore, I'd need to do a new release with a longer timeout, I could do it on a different branch I suppose. However, everyone else that wants to keep the current default would need to make a change to make it query every 5 minutes, it feels like quite a significant and intrusive change.

thanks , so when i create an automation and put all entities from growatt in it then the time i set is the trigger for the data retrievment ?
the normal frequency is then overruled ?

thanks , so when i create an automation and put all entities from growatt in it then the time i set is the trigger for the data retrievment ?
the normal frequency is then overruled ?

No it's not overruled as such, it is "in addition" to what's already there, so it would still query every 5 minutes even if you set it to 15 minutes.
I'll push a change to the Dev branch later to reduce it to 20 minutes and you can have a play with it.

i have created the automation , now i want the enity "my plant total energy today' in the energie dashboard.
the only one i can choose from are the total lifetime energy values .
Can you tell me how to get the plant total today enity over there so i can choose that one ?

The energy dashboard works based on cumulative totals, just use those and it'll work - trust me. It's a bit of a complex thing to explain but the energy dashboard uses the cumulative values to calculate running totals for each hour/month/year etc. it doesn't need to use daily values or current usage wattage etc. because it calculates it all on its own.

thank you,

@annbuw - Dev now has a 15 minute default scan interval. If you want to scan any more often you'd need to use the method I posted above in the FAQ

@muppet3000 - thanks , still one question , where do i find Dev ? i understand that should be development , but i have no idea where it would be.
sorry

again thanks , i see i need the installation of HACS first .
i try tomorrow to figger out how to do that
it says i need the HA OS or the Home Assistant Supervised installatiemethode
thanks

again thanks , i see i need the installation of HACS first . i try tomorrow to figger out how to do that it says i need the HA OS or the Home Assistant Supervised installatiemethode
thanks

The homepage for this integration gives you a step-by-step guide: https://github.com/muppet3000/homeassistant-growatt_server_api#installation

Hi, i did read this whole full issue.
there is 1 thing i don't understand.
I still use the very very old method released some years ago, and let run my script with python every 5 minutes on 5 different accounts and 3x on 3 different servers (test nd backup servers) with my same account, as well using this integration.
I never had a connection issue.
When this integration stopped working because of an issue getting data, my very old script could get data without issues.
i'm running that now almost 2.2 years never got banned or blocked.
So could this be that i have a very very old account?
because some people what i know having auth issue's or instability issue's but i have not that issue.
The script i use is the very first script the dutch guy who created this python script before it got forked into this one.
My update ratio is every 5 minutes, getting YEARLY data MONTH data and DAILY data in one go.
Regards and respect for the much work and energy you guys did put in this project !

Thanks @malosaa - Do you have a link to that script or library at all?
I would hazard a guess that this older library is hitting the website URLs & APIs rather than the ones that are used by the Android/IOS app.
Before anyone jumps on the "why don't we switch to use the website API instead" line of questioning - at this point, I don't want to really have any dependency on the Growatt Servers, they seem to make ad-hoc changes and reverse engineered APIs are difficult to maintain when the other end changes at a moments notice.

Hello muppet3000 , yesterday i managed to get your script working at my HA.
this morning my account at growatt get locked again.
so if you would like to make a script once more i am more than happy , i would like to try an refresh time of 2 hours.
just to see if it is a solution for the lock .or maybe you set a 4 hour interval in the script ! i can always set it a shorter interval with the faq above.
the reason for me is i realy want the total  daily output from the PV for my overvieuw in HA.
thanks for so far.

Hello muppet3000 , yesterday i managed to get your script working at my HA. this morning my account at growatt get locked again. so if you would like to make a script once more i am more than happy , i would like to try an refresh time of 2 hours. just to see if it is a solution for the lock .or maybe you set a 4 hour interval in the script ! i can always set it a shorter interval with the faq above. the reason for me is i realy want the total daily output from the PV for my overvieuw in HA.
thanks for so far.

Rather than increasing the time between automated polling further, have you tried following the method outlined on the FAQ here: https://github.com/muppet3000/homeassistant-growatt_server_api/blob/dev/FAQ.md#how-do-i-share-my-credentials-with-you-for-testingadding-new-features-for-my-system-type to create another user and just switch between them when they get blocked?
I went through a period of about 3 weeks where they kept blocking me regardless of how infrequently I polled, I just kept toggling between the different accounts I set up.
All you have to do is follow the steps listed on that page, but instead of sending me the credentials, keep them for yourself.

One question: Is this still about the "normal" HA Growatt integration https://www.home-assistant.io/integrations/growatt_server/ or is it a completely different (new) script? Because my account at Growatt has never been blocked (for hours or days). My update ratio is every 5 minutes.
Only the "well-known" error messages with Home Assistant appear from time to time:

Updating growatt_server sensor took longer than the scheduled update interval 0:05:00
Update of sensor.growattos_total_total_money_today is taking over 10 seconds
...

But I can still log into the Growatt server (App, WebGUI).

One question: Is this still about the "normal" HA Growatt integration https://www.home-assistant.io/integrations/growatt_server/ or is it a completely different (new) script? Because my account at Growatt has never been blocked (for hours or days). My update ratio is every 5 minutes.
Only the "well-known" error messages with Home Assistant appear from time to time:

Updating growatt_server sensor took longer than the scheduled update interval 0:05:00
Update of sensor.growattos_total_total_money_today is taking over 10 seconds
...

But I can still log into the Growatt server (App, WebGUI).

Yes, it is.
The one that this repo is is the one called "Growatt Server API" when you search for it in the integrations page in your HA installation. You can only get "Growatt Server API" via HACs.

OK, understood. Thanks. :-)

Thanks @malosaa - Do you have a link to that script or library at all? I would hazard a guess that this older library is hitting the website URLs & APIs rather than the ones that are used by the Android/IOS app.
Before anyone jumps on the "why don't we switch to use the website API instead" line of questioning - at this point, I don't want to really have any dependency on the Growatt Servers, they seem to make ad-hoc changes and reverse engineered APIs are difficult to maintain when the other end changes at a moments notice.

Hi muppet3000,
Here is the repo (5 years old), you probably know this one, i know there are many many people having opened an issue past year, but 3 years ago i altered his files and they still work as expected, updating every 5 minutes never had an issue.
The repo
So it does create 4 json files with the data i need (yearly totals of all years, day use,month data, and hourly data)
It does use the reversed engineered api of the growatt website..
Like today the integration of growatt stopped working again and failed to login, while this python script i have still works.
Regards

@muppet3000 hello , goodmorning, this morning i am blocked again on the new made account. i used the 15 minutes script .
I really want to try a new account with a 2 hour delay , it is good enough for me and maybee that is the solution.
if not i would try the malosaa script / repo but i have no idea how to use that
i asume that it not works like the hacs as with your script !
thanks

@muppet3000 hello , goodmorning, this morning i am blocked again on the new made account. i used the 15 minutes script . I really want to try a new account with a 2 hour delay , it is good enough for me and maybee that is the solution. if not i would try the malosaa script / repo but i have no idea how to use that i asume that it not works like the hacs as with your script !
thanks

I've pushed a change to 120 minutes (2 hours) to Dev for you.

thanks @muppet3000
i have downloaded the dev just again and installed it with a new made account at growatt. let you know how it goes !

@muppet3000 hello , i have downloaded the dev version again but now it gets data every 5 minutes , this is to fast.
will you please look at it ?
thanks

@muppet3000 hello , i have downloaded the dev version again but now it gets data every 5 minutes , this is to fast.
will you please look at it ?
thanks

No, I definitely made the change to 2 hours: https://github.com/muppet3000/homeassistant-growatt_server_api/commit/c2c7d55a93104e864e06f7f58e4674d3f240844a
Did you remember to choose Dev and you haven't accidentally taken the latest release instead?

@muppet3000 i have downloaded again and restart HA , let me try again how it goes

@muppet3000 hello , i have downloaded the dev version again but now it gets data every 5 minutes , this is to fast.
will you please look at it ?
thanks

No, I definitely made the change to 2 hours: c2c7d55
Did you remember to choose Dev and you haven't accidentally taken the latest release instead?

Isn't on next line, THROTTLE value, also need to be increased?

@muppet3000 hello , it looks better now , wait another hour to see if it connects again .
thanks

@muppet3000 is it possible to read only the "my plant total"data once every 2 hours ? I have 6 inverters in my home plant so it reads a lot of data each time when it is connecting , maybee that is also an isue for locking the account !
it reads 120 entities each time from wich i use only the total today and lifetime total enteties.
just thinking ahead !

so that I can th

Not really no. That would require some significant changes.

Unfortunately I don't understand what you mean? :-)
Depending on what the USB stick is flashed with, either you can use MQTT or ESPHome with HA.

@muppet3000 only to notify you , the 2 hours is working fine. we wil see how long it takes before they lock me again.

Unfortunately I don't understand what you mean? :-)
Depending on what the USB stick is flashed with, either you can use MQTT or ESPHome with HA and I still have the old USB stick in reserve for "emergencies". ;-)

I was responding to @annbuw  not you :) Your stuff looks really cool and I'm interested to look at that myself maybe in the future!

OK but you quoted me. ;-)
Different users have different approaches. Here's another approach to ESPHome: https://github.com/pvprodk/GrowattESPHome
More info: https://community.home-assistant.io/t/esphome-modbus-growatt-shinewifi-s/369171 or in a German PV forum: https://www.photovoltaikforum.com/thread/176609-growatt-modstick-shine-x-custom-firmware/?pageNo=1 (but it's in German) :-))

OK but you quoted me. ;-)
Different users have different approaches. Here's another approach to ESPHome: https://github.com/pvprodk/GrowattESPHome
More info: https://community.home-assistant.io/t/esphome-modbus-growatt-shinewifi-s/369171 or in a German PV forum: https://www.photovoltaikforum.com/thread/176609-growatt-modstick-shine-x-custom-firmware/?pageNo=1 (but it's in German) :-))

Oh yeah, how did I manage that!!!! Sorry, I must have clicked the wrong button!!

Also can be used direct usb to Modbus reader
https://github.com/nygma2004/growatt2mqtt
no need to hack ShineWifi module, and all data can be used in parallel simultaneously.

Thanks - I had already read this guide, but you need an extra Wemos D1 mini and RS485 to TTL converter. I find it easier to just plug in a USB stick. My inverter is also hanging outside on the terrace and then I would have to build a "box" for it that would then have to be attached there as well.

I then flashed the USB stick with ESPHome. --> Bye bye Growatt Cloud. :-))
ESPHome YAML Code example:

`substitutions:
  devicename: "esphome-growatt-01"
  upper_devicename: "ESPHome Growatt 01"

esphome:
  name: $devicename
  platform: ESP8266
  board: esp07s

# Enable logging
logger:
  baud_rate: 0

# Enable Home Assistant API
api:

ota:
  password: !secret ota_passwd

wifi:
  ssid: !secret iot_ssid
  password: !secret iot_passwd
  fast_connect: on

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Growatt 01 Fallback Hotspot"
    password: "xxxxxxxxx"

  # Enable Web server
web_server:
  port: 80

captive_portal:

time:
  - platform: homeassistant
    id: homeassistant_time

output:
# Blue Led
  - id: light_bl
    platform: gpio
    pin: 16
# Green Led
  - id: light_gr
    platform: gpio
    pin: 0
# Red Led
  - id: light_rd
    platform: gpio
    pin: 2

uart:
  id: mod_bus
  tx_pin: 1
  rx_pin: 3
  baud_rate: 115200

modbus:
  id: modbus1
  uart_id: mod_bus

modbus_controller:
  - id: growatt
    ## the Modbus device addr
    address: 0x1
    modbus_id: modbus1
    setup_priority: -10

text_sensor:
  - platform: modbus_controller
    name: "${devicename} Firmware Version"
    address: 9
    register_count: 3
    register_type: holding
    #internal: true
    entity_category: diagnostic

  - platform: template
    name: "${devicename} Status"
    icon: mdi:eye
    entity_category: diagnostic
    lambda: |-
      if (id(status).state == 1) {
        return {"Normal"};
      } else if (id(status).state == 0)  {
        return {"Waiting"};
      } else {
        return {"Fault!"};
      }

switch:
  - platform: modbus_controller
    name: "${devicename} OnOff"
    address: 0
    register_type: holding

number:
  - platform: modbus_controller
    name: "${devicename} Max Output Power"
    address: 3
    value_type: U_WORD
    min_value: 0
    max_value: 100
    entity_category: config

select:
  - platform: modbus_controller
    id: powermode
    name: "${devicename} Power Mode"
    address: 121
    value_type: U_WORD
    optionsmap:
      "600": 6
      "750": 7
      "1000": 10
    entity_category: config

sensor:
  - platform: modbus_controller
    address: 0
    register_type: "read"
    internal: true
    id: status

  - platform: modbus_controller
    name: "${devicename} DcPower"
    address: 3005 #5
    register_type: "read"
    unit_of_measurement: W
    device_class: power
    icon: mdi:flash
    value_type: U_DWORD
    accuracy_decimals: 1
    filters:
    - multiply: 0.1

  - platform: modbus_controller
    name: "${devicename} DcVoltage"
    address: 3003 #3
    register_type: "read"
    unit_of_measurement: V
    device_class: voltage
    icon: mdi:flash
    value_type: U_WORD
    accuracy_decimals: 1
    filters:
    - multiply: 0.1

  - platform: modbus_controller
    name: "${devicename} DcInputCurrent"
    address: 3004 #4
    register_type: "read"
    unit_of_measurement: A
    device_class: current
    icon: mdi:flash
    value_type: U_WORD
    accuracy_decimals: 1
    filters:
    - multiply: 0.1

  - platform: modbus_controller
    name: "${devicename} AcPower"
    address: 3023 #40
    register_type: "read"
    unit_of_measurement: W
    device_class: power
    icon: mdi:flash
    value_type: U_DWORD
    accuracy_decimals: 1
    filters:
    - multiply: 0.1

  - platform: modbus_controller
    name: "${devicename} AcFrequency"
    address: 3025 #37
    register_type: "read"
    unit_of_measurement: Hz
    icon: mdi:flash
    value_type: U_WORD
    accuracy_decimals: 1
    filters:
    - multiply: 0.01

  - platform: modbus_controller
    name: "${devicename} AcVoltage"
    address: 3026 #38
    register_type: "read"
    unit_of_measurement: V
    device_class: voltage
    icon: mdi:flash
    value_type: U_WORD
    accuracy_decimals: 1
    filters:
    - multiply: 0.1

  - platform: modbus_controller
    name: "${devicename} AcOutputCurrent"
    address: 3027 #39
    register_type: "read"
    unit_of_measurement: A
    device_class: current
    icon: mdi:flash
    value_type: U_WORD
    accuracy_decimals: 1
    filters:
    - multiply: 0.1

  - platform: modbus_controller
    name: "${devicename} AcPowerVA"
    address: 3028 #40
    register_type: "read"
    unit_of_measurement: VA
    icon: mdi:flash
    value_type: U_DWORD
    accuracy_decimals: 1
    filters:
    - multiply: 0.1

  - platform: modbus_controller
    name: "${devicename} EnergyToday"
    address: 3049 #53
    register_type: "read"
    unit_of_measurement: kWh
    device_class: energy
    icon: mdi:flash
    value_type: U_DWORD
    accuracy_decimals: 1
    filters:
    - multiply: 0.1

  - platform: modbus_controller
    name: "${devicename} EnergyTotal"
    address: 3051 #55
    register_type: "read"
    unit_of_measurement: kWh
    state_class: total_increasing
    device_class: energy
    icon: mdi:flash
    value_type: U_DWORD
    accuracy_decimals: 1
    filters:
    - multiply: 0.1

  - platform: modbus_controller
    name: "${devicename} Temperature"
    address: 3093
    register_type: "read"
    unit_of_measurement: C
    device_class: temperature
    icon: mdi:thermometer
    value_type: U_WORD
    accuracy_decimals: 1
    filters:
    - multiply: 0.1`

I've done the same (flashing with esphome). It's rather easy and you do not need any additional equipment (just install esphome addon in home assistant and flash)...and it just works without having to run behind these guys who intentionally try to make our lifes more challenging.
I very much appreciate the efforts muppet3000 has been using for this integration and I would had wanted to stay with the "native integration", but I got tired of growatt constantly being unreliable and untrusted. Plus I have trust issues against companies who do act in this way.

I never have issue's when retrieving the data.. wonder if that has to do with new accounts. as i still retrieve the data every 10 minutes on 3 servers.
But anyway @JimGermany SO does this work with the Shine S version?
And i did see some tutorials, but does there exist an video of it ?
I really don't want to mess up my Wifi device, i'm not scared to buy a new one ofcourse but don't want data loss when waiting for a new one ^^
Regards

Yes Shine-S Stick is also possible. Unfortunately I don't know any video about it.
Some links:
https://github.com/otti/Growatt_ShineWiFi-S
https://github.com/WilbertVerhoeff/Growatt
https://community.home-assistant.io/t/esphome-modbus-growatt-shinewifi-s/369171
Regards

Hi, I have the same issue as described by others. I get "network time out", and it seems like it happens in the middle of the night, exactly at 00:00. If I use 4g on the phone it works and even to login to growatt page (on the same wifi) works. I have found a guide to increase the number of reading/collecting data but not how to decrease it. Is that possible and could that be the solution?
Many many thanx

@annbuw - Dev now has a 15 minute default scan interval. If you want to scan any more often you'd need to use the method I posted above in the FAQ

This fixed ALL the connectivity and account lockouts for me! Running stable since this post

Only usable solution not to be ban is HARD SCHEDULER when to pull data
no mater restart reload or reboot

Only usable solution not to be ban is HARD SCHEDULER when to pull data no mater restart reload or reboot

Sorry for a newbie question. What is a "Hard scheduler"? I get "network time out" and it happens every night at 00:00.
I would be to happy to recieve any other good ideas :)

Hi Everyone,
Just a note to let you all know that I'm still alive and working on the Grott HA integration. I'm not far off going live with it, I just need to produce the documentation for it.
Once I go live with it and people that are willing to test have worked out the kinks I'm going to publish a tutorial on how to setup grott (well at least the basics) and how to get it working with the new Integration. At that point I'll start putting this integration on ice and focus all of my efforts on the other one.

Thanx for your answer. I have no idea how to get that version...that's the level of newbie :) Nevertheless I suppos swiching of the "automatic polling" under settings and then use the method in FAQ will result in the same. Once again, thank you.

Thanx for your answer. I have no idea how to get that version...that's the level of newbie :) Nevertheless I suppos swiching of the "automatic polling" under settings and then use the method in FAQ will result in the same. Once again, thank you.

I didn't know there was a way to switch off automatic polling in settings, that doesn't sound great if it's global.
To pull the latest Dev version you can do this in HACS:

then:

Don't forget you need to restart HA afterwards.

Thanx for your answer. I have no idea how to get that version...that's the level of newbie :) Nevertheless I suppos swiching of the "automatic polling" under settings and then use the method in FAQ will result in the same. Once again, thank you.

I didn't know there was a way to switch off automatic polling in settings, that doesn't sound great if it's global. To pull the latest Dev version you can do this in HACS:  then:
Don't forget you need to restart HA afterwards.

Ohh...many many thanx. Maybe I'm missreading it but I tought this would switch off the polling (sorry in swedish)

Thanx for your answer. I have no idea how to get that version...that's the level of newbie :) Nevertheless I suppos swiching of the "automatic polling" under settings and then use the method in FAQ will result in the same. Once again, thank you.

I didn't know there was a way to switch off automatic polling in settings, that doesn't sound great if it's global. To pull the latest Dev version you can do this in HACS:  then:
Don't forget you need to restart HA afterwards.

Ohh...many many thanx. Maybe I'm missreading it but I tought this would switch off the polling (sorry in swedish)

I didn't even know that was an option (looked at it on mine and it does seem to do what you suggest), maybe try that and I can then revert the change on the Dev branch, I only ever did it reluctantly anyway! Let me know how that method works out.

Thanx for your answer. I have no idea how to get that version...that's the level of newbie :) Nevertheless I suppos swiching of the "automatic polling" under settings and then use the method in FAQ will result in the same. Once again, thank you.

I didn't know there was a way to switch off automatic polling in settings, that doesn't sound great if it's global. To pull the latest Dev version you can do this in HACS:  then:
Don't forget you need to restart HA afterwards.

Ohh...many many thanx. Maybe I'm missreading it but I tought this would switch off the polling (sorry in swedish)

I didn't even know that was an option (looked at it on mine and it does seem to do what you suggest), maybe try that and I can then revert the change on the Dev branch, I only ever did it reluctantly anyway! Let me know how that method works out.

Will do

Thanx for your answer. I have no idea how to get that version...that's the level of newbie :) Nevertheless I suppos swiching of the "automatic polling" under settings and then use the method in FAQ will result in the same. Once again, thank you.

I didn't know there was a way to switch off automatic polling in settings, that doesn't sound great if it's global. To pull the latest Dev version you can do this in HACS:  then:
Don't forget you need to restart HA afterwards.

Ohh...many many thanx. Maybe I'm missreading it but I tought this would switch off the polling (sorry in swedish)

I didn't even know that was an option (looked at it on mine and it does seem to do what you suggest), maybe try that and I can then revert the change on the Dev branch, I only ever did it reluctantly anyway! Let me know how that method works out.

Will do

Have tried it since yesterday evening (set to 1 hour) and it seems to work. Had one missed reading in the middle of the day but seems to be some kind of issue with my internal wifi.

Hi Everyone, Just a note to let you all know that I'm still alive and working on the Grott HA integration. I'm not far off going live with it, I just need to produce the documentation for it.
Once I go live with it and people that are willing to test have worked out the kinks I'm going to publish a tutorial on how to setup grott (well at least the basics) and how to get it working with the new Integration. At that point I'll start putting this integration on ice and focus all of my efforts on the other one.

Hi Everyone, Just a note to let you all know that I'm still alive and working on the Grott HA integration. I'm not far off going live with it, I just need to produce the documentation for it.
Once I go live with it and people that are willing to test have worked out the kinks I'm going to publish a tutorial on how to setup grott (well at least the basics) and how to get it working with the new Integration. At that point I'll start putting this integration on ice and focus all of my efforts on the other one.

Hi @Snux - was this intended to be a message of some kind?
Currently it's just a requote of my message from the other day....

Oops :)
What I wanted to ask - do you think Grott and HA can run on the same Pi4?  That would probably be ideal if possible as it'll save yet another Pi and make it nicely self contained.
I bit the bullet and have started playing around with HA - I never knew so many things in my house would show up!  My HP printer shows up and shows me how full the toner cartridges are!
I've pulled 1.0.2 from your custom repository and it seems to be working just fine.  I'm happy to test out grott in the mix (using it as a proxy ideally so the Shinephone app will still work) if you need another tester and I can run it on the same Pi as HA.  Bear in mind I'm an HA noob though :)

In case it matters, I'm running a SPH6000 hybrid inverter with a 6kwh Growatt battery attached

is anyone have experience with https://www.ginverter.com/products/shinelink-x ?
Guess no data get limits. Also internal data for 1 month for 8 devices sounds good.

@muppet3000
Oops :)
What I wanted to ask - do you think Grott and HA can run on the same Pi4?  That would probably be ideal if possible as it'll save yet another Pi and make it nicely self contained.
I bit the bullet and have started playing around with HA - I never knew so many things in my house would show up!  My HP printer shows up and shows me how full the toner cartridges are!
I've pulled 1.0.2 from your custom repository and it seems to be working just fine.  I'm happy to test out grott in the mix (using it as a proxy ideally so the Shinephone app will still work) if you need another tester and I can run it on the same Pi as HA.  Bear in mind I'm an HA noob though :)

Sorry for the delayed response I had visitors over the weekend and didn't get the chance to respond to anything until now.
As soon as I've got the grott implementation properly working (I hit a problem with configuration settings when I was testing last week) I'll make sure it's announced nice and loudly in here for everyone to help with testing!

In case it matters, I'm running a SPH6000 hybrid inverter with a 6kwh Growatt battery attached and happy to give you access via a new user on the account.

This is exactly the same system I have, but I have 3 x 3.3kwh batteries.
The grott system is all local so no external access can be used for testing.

I guess the downside with using grott is that we'll lose the historical data that the API supplies, like "Generation this month" and "Total Generation"??

Nope, the Inverter has all the historic values locally as well which is really handy.

With me, I receive the total values, so assume they come from the converter. Question is...is there a chance that the converter data 'crashes' ?

Not that I've seen so far from my testing it all seems pretty stable.

is anyone have experience with https://www.ginverter.com/products/shinelink-x ?
Guess no local data get limits. Also internal data for 1 month for 8 devices sounds good.

I've never even heard of this, it doesn't really tell you anything about whether you can actually access that local data.
I bet it's more for local storage in case you lose internet access or the Growatt servers go down (again) and then it can backdate the data and upload it so nothing is missing.

is anyone have experience with https://www.ginverter.com/products/shinelink-x ?
Guess no local data get limits. Also internal data for 1 month for 8 devices sounds good.

I've never even heard of this, it doesn't really tell you anything about whether you can actually access that local data. I bet it's more for local storage in case you lose internet access or the Growatt servers go down (again) and then it can backdate the data and upload it so nothing is missing.

I have this. From user perspective this is the same as the wifi stick. The gui is the same.
This is the inside:

is anyone have experience with https://www.ginverter.com/products/shinelink-x ?
Guess no local data get limits. Also internal data for 1 month for 8 devices sounds good.

I've never even heard of this, it doesn't really tell you anything about whether you can actually access that local data. I bet it's more for local storage in case you lose internet access or the Growatt servers go down (again) and then it can backdate the data and upload it so nothing is missing.

I have this. From user perspective this is the same as the wifi stick. The gui is the same.
This is the inside:

Is CN1 have connection to other parts?
Looks as TF (Micro SD) card slot

Is CN1 have connection to other parts?

Nothing is connected or soldered to CN1.

Is CN1 have connection to other parts?

Nothing is connected or soldered to CN1.
This is visually clear, but limes go to bottom of board.
Make picture of bottom side of board.

@muppet3000 in my case i'm searching the way to get local data from my growatt min-6000tl-xh to raspberri pi 3 model b by rs485-usb converter, have you gotten install grot and ha in the same pi? Grott works reading local data with real time? Sorry about my questions, i'm starting...
Thanks a lot!

The idea of Grott appears to be that it acts as a proxy between the connectivity module (the thing that sends data from the inverter) and the Growatt servers online. That is, it doesn’t read any data per se but rather captures it along the way. So the data interval will be the same as before. Big benefit is that we don’t need to login to those servers to get the data any more.

@muppet3000 in my case i'm searching the way to get local data from my growatt min-6000tl-xh to raspberri pi 3 model b by rs485-usb converter, have you gotten install grot and ha in the same pi? Grott works reading local data with real time? Sorry about my questions, i'm starting...
Thanks a lot!

The idea of Grott appears to be that it acts as a proxy between the connectivity module (the thing that sends data from the inverter) and the Growatt servers online. That is, it doesn’t read any data per se but rather captures it along the way. So the data interval will be the same as before. Big benefit is that we don’t need to login to those servers to get the data any more.

Grott work as proxy,
If proxy stop to work all data go to /dev/null.

Even if you might loose short amount of data if HA is offline (like during updates/restarts etc.) You still benefit because you don't depend on Growatt servers which lock your account, do throttling and don't really support using their API in a sane and open approach.

@pmp02 check this https://github.com/muppet3000/homeassistant-growatt_server_api/issues/31

Thanks @Saentist , I've seen it, but as long as Growatt doesn't have a clear policy and documentation about their API and how to properly integrate, you'll always be prone to possible ban as (I've read at least) they frequently change their API requests rules internally.
So, having the possibility to choose / switch between the two modes (cloud poll vs proxy), I think it will increase a lot the flexibility.

#31 will help also, ofc, but you will always have to be "alert" about what Growatt is doing :)

Ban is applied when get data more then once in allowed time frame.

Exactly, but the allowed time frame it's at their disposal and they change it whenever they want without notifying anybody... So you can just react when that happens: wait for account unlock, change the interval, hope for the best:)

If time frame variable is configurable i don't see problem.

Let's just remember that regardless of the timeframe limits (which are completely arbitrary and undefined), we're also working against an API that is 100% reverse engineered and could be turned off or completely changed at any moment without any warning.
The grott method works by intercepting the packets, parsing them and then forwarding on the packets (for those of you questioning anything being sent back to the inverter from the growatt servers - that comes through a different route I believe, hence why everything continues to work).
The only way the grott method would stop working is if there was a firmware update to the inverter/shine link dongle that would cause it to use an entirely different method of communication, given how costly firmware is to develop, the liklihood of that happening is incredibly small.
I'm so close to publishing the new Grott integration, I've just got to make a start on the documentation now. It won't be perfect straight from the off, but it will have enough detail to get people started and then we can all work together to get it working as smoothly as possible for everyone!

I have been back and forth on using your integration and this grott integration: https://github.com/egguy/grott-home-assistant-add-on/tree/main/grott-current Honestly I like your integration with the complete Energy panel integration, but it has the potential for instability. The grott integration is rock solid, even allowing me to update features in my dongle without issue. but due to it using the mqtt server in HA, if for some reason HA is down so is the data passing back to growatt ( only happened 1 time due to vm hang) but there are a couple of battery issues in the Energy panel that I'm waiting for a resolution. now that I've had time with both I just wanted to pass on my experience.

Thanks for the feedback. The one I'm developing will work with MQTT also, but just for reading data for now, the pushing of config will come next.
The biggest different between the one you've been using and the one I'm developing is that mine is an 'integration' not an 'add-on', add-ons don't work with all installations of Home Assistant, only those using 'supervisor' mode.
The expectation with the one that I'm developing is that you run Grott & MQTT separately (there will be FAQs/setup guides on how to do this as it's a 5 second job) and then my integration gives you the full list of all metrics etc. It's essentially a glorified layer on top of MQTT but has all the growth possibilities.
It'll make more sense when I've published it.

@muppet3000en mi caso estoy buscando la forma de obtener datos locales de mi growatt min-6000tl-xh a raspberri pi 3 modelo b por convertidor rs485-usb, ¿ha conseguido instalar grot y ha en el mismo pi? ¿Grott trabaja leyendo datos locales en tiempo real? Perdón por mis preguntas, estoy empezando...
¡Muchas gracias!

La idea de Grott parece ser que actúa como un proxy entre el módulo de conectividad (lo que envía datos desde el inversor) y los servidores Growatt en línea. Es decir, no lee ningún dato per se, sino que lo captura en el camino. Entonces el intervalo de datos será el mismo que antes. El gran beneficio es que ya no necesitamos iniciar sesión en esos servidores para obtener los datos.

It's interesting as proxy but i think with HA is useful to read data from inversor in real time if you have conditions configured HA work reading your inverter and every 5min in my case is a problem!
Thanks for your reply!!!

He estado yendo y viniendo sobre el uso de su integración y esta integración de grott: https://github.com/egguy/grott-home-assistant-add-on/tree/main/grott-current Honestamente, me gusta su integración con el completo Integración del panel de energía, pero tiene el potencial de inestabilidad. La integración de grott es sólida como una roca, incluso me permite actualizar funciones en mi dongle sin problemas. pero debido a que usa el servidor mqtt en HA, si por alguna razón HA está inactivo, los datos vuelven a growatt (solo sucedió 1 vez debido a un bloqueo de vm) pero hay un par de problemas de batería en el panel de Energía que yo estoy esperando una resolucion. Ahora que he tenido tiempo con ambos, solo quería transmitir mi experiencia.

Gracias por la respuesta. El que estoy desarrollando también funcionará con MQTT, pero solo para leer datos por ahora, la configuración vendrá a continuación. La mayor diferencia entre el que ha estado usando y el que estoy desarrollando es que el mío es una 'integración', no un 'complemento', los complementos no funcionan con todas las instalaciones de Home Assistant, solo usando el modo 'supervisor' . La expectativa con el que estoy desarrollando es que ejecuta Grott y MQTT por separado (habrá preguntas frecuentes/guías de configuración sobre cómo hacer esto, ya que es un trabajo de 5 segundos) y luego mi integración le brinda la lista completa de todas las métricas etc. Es suficiente una capa glorificada encima de MQTT pero tiene todas las posibilidades de crecimiento. Tendrá más sentido cuando lo haya publicado.

But then you need data with real time, grott as proxy only read every 5min, not?, i'm very interesting, let me know when you finish it. Thanks a lot

@Solpowersun the data from grott can only be read when the logger pushes the data. If I'm not mistaken, by default, the datalogger is configured with a 5-min reporting interval, you can go down to 1 min. (I've also seen some way to go lower, but I don't think growatt servers will appreciate).
@Saentist The datalogger stores the values when there's a problem. When the connection is re established (growatt server  up again or grott restarted), it will start to send the missing data to growatt server. (had to manage this problem with grott sending old data to HA)

Thanks for all the effort to realize the registration of Growatt solar power energy.
Nevertheless I made the choice to buy a Shelly 3EM energy meter. I now have a perfect and super stable registration of the power supplied by my solar panels every few seconds.

I have a Shelly 3EM as well, but it's still useful/nice to integrate separately Growatt. From Shelly you don't really know how much solar the house used, for example, just how much you pushed to the grid and how much you consumed. Btw, nice Shelly integration, Growatt could learn something from there :).

I can track everything I need :)
Have a nice day !

Except the battery 😅

@bordeo @GertJanArts How do you track the solar energy using Shelly 3EM? I can only track was was returned in the grid, but not the total solar energy produced.

@Saentist The datalogger stores the values when there's a problem. When the connection is re established (growatt server up again or grott restarted), it will start to send the missing data to growatt server. (had to manage this problem with grott sending old data to HA)

This is really interesting - I've never seen this happen before - I'll need to try and remember this and test for it by taking grott offline. Does the datalogger just fire all of the information at grott when it's back online? Just curious - how did you handle this? Did you check the date of the entries being sent to grott and then only use them if they were within the last X minutes?

@bordeo @GertJanArts How do you track the solar energy using Shelly 3EM? I can only track was was returned in the grid, but not the total solar energy produced.

I'm sorry but I'm not using Shelly 3EM. I'm using the awesome growatt_server_api

shinelink-x do this, data loggers not sure

https://github.com/otti/Growatt_ShineWiFi-S/issues/1
on attached images there is no NAND chip just EPROM with will destroy itself if have many rewrites