Skip to content
View in the app

A better way to browse. Learn more.

Power Forum - Renewable Energy Discussion

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Raw access to Growatt Inverter Data

Featured Replies

  • Replies 94
  • Views 54.9k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • A couple of weeks on, and I'm reporting on my findings to date.  There appear to be three options 1. query locally via direct cable - reports of the software for this as sketchy at best. 2.

  • Antonio de Sa
    Antonio de Sa

    Herewith dashboard of my two Growatt custom made monitoring system for this month, as @zsde explains there is a slight discrepancy in the measurements maybe due to calibration and small losses, in my

  • Hello from Australia, This thread has been very useful, so I thought I would share something i just discovered.  I have also had the issues with exporting data from the growatt web page, and I

Posted Images

Hurrah - glad to help!

Main issues were therefore around permissions / paths in Linux rather than the script itself.

Do bear in mind that /tmp (as a temporary directory) gets wiped each time the server restarts.

Enjoy

  • Author

Mike - I got another permissions error so I went back and set the Tmp folder permissions with 

sudo chmod -R 777 /tmp/

via terminal.

 

 

When I run the file with or without Sudo it gives the following error 

 

python3 ./processToFiles_light.py

dayToProcess is: 2022-05-04

Traceback (most recent call last):

  File "/home/Growatt/Script/./processToFiles_light.py", line 90, in <module>

    chartData = mix_detail['chartData']

TypeError: 'NoneType' object is not subscriptable

 

 

 

 

 

Edited by L_D

  • Author
On 2022/05/04 at 5:42 PM, Mike_C said:

Hurrah - glad to help!

Main issues were therefore around permissions / paths in Linux rather than the script itself.

Do bear in mind that /tmp (as a temporary directory) gets wiped each time the server restarts.

Enjoy

Hi Mike - I created a AWS Linux AMI and I am MUCH closer.

 

[ec2-user@ip-172-31-20-164 Growatt]$ python3 processToFiles.py

dayToProcess is: 2022-05-08

Traceback (most recent call last):

  File "processToFiles.py", line 38, in <module>

    user_id        = login_response['user']['id']

KeyError: 'user'

 

I checked, the username pwd combo is correct and able to login via web browser, above error seems like it is kicking me out becasue of a bad username?

I get the same error using these example python scripts where you have to enter your username and password.

Browser login URL is: https://server.growatt.com/login

user_name = "ldusername" # add server login here
user_pass = "LDpassword" # add server password here
 

Edited by L_D

I don’t believe running as sudo is actually needed hence worth removing that.  Keen to understand steps that 0xEF did to get working. 
 

I’m unsure from here.  Clearly the username / password combo via the scripts should work as well as per the API.

I have found that the app has been a bit hit and miss today - with timeouts. Perhaps retrying the API at another time??

  • Author
12 hours ago, Mike_C said:

I don’t believe running as sudo is actually needed hence worth removing that.  Keen to understand steps that 0xEF did to get working. 
 

I’m unsure from here.  Clearly the username / password combo via the scripts should work as well as per the API.

I have found that the app has been a bit hit and miss today - with timeouts. Perhaps retrying the API at another time??

You are right Mike, the login is somewhat unstable.
This morning it managed to get past the login and then gave this error:- any ideas as to why?

 

During handling of the above exception, another exception occurred:

 

Traceback (most recent call last):

  File "./GW.py", line 22, in <module>

    login_response = api.login(username, user_pass)

  File "/home/ec2-user/.local/lib/python3.7/site-packages/growattServer/__init__.py", line 59, in login

    'password': password_md5

  File "/home/ec2-user/.local/lib/python3.7/site-packages/requests/sessions.py", line 577, in post

    return self.request('POST', url, data=data, json=json, **kwargs)

  File "/home/ec2-user/.local/lib/python3.7/site-packages/requests/sessions.py", line 529, in request

    resp = self.send(prep, **send_kwargs)

  File "/home/ec2-user/.local/lib/python3.7/site-packages/requests/sessions.py", line 645, in send

    r = adapter.send(request, **kwargs)

  File "/home/ec2-user/.local/lib/python3.7/site-packages/requests/adapters.py", line 517, in send

    raise SSLError(e, request=request)

requests.exceptions.SSLError: HTTPSConnectionPool(host='server.growatt.com', port=443): Max retries exceeded with url: /LoginAPI.do (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)')))

Edited by L_D

  • 1 month later...

Many thanks Mike for sharing your script, it was almost exactly what I was looking for. It was all working fine, as was another script I wrote, until the other day and now it seems to error on the login part. Is anyone else having these issues?

Yes. It’s the same via the app though. Logins (mainly timeouts I feel) are a problem. There are definitely times in the day when it’s more common to have timeouts.

perhaps there is a timeout configuration for the api client (and / or some error handling) that can be added.  I’ve not checked 

46 minutes ago, Mike_C said:

Yes. It’s the same via the app though. Logins (mainly timeouts I feel) are a problem. There are definitely times in the day when it’s more common to have timeouts.

perhaps there is a timeout configuration for the api client (and / or some error handling) that can be added.  I’ve not checked 

OK thanks - I will do some digging too.

On 2022/06/23 at 11:38 AM, Graham_S said:

OK thanks - I will do some digging too.

Just an update on this, it kept happening until I stumbled on another thread advising to update the login in growattServer/init.py to "newTwoLoginApi.do" rather than "newLoginAPI.do". Seems they changed this in the latest update.

  • 2 months later...

hi, i also get this response (as normal user or with sudo):

dayToProcess is: 2022-09-04
Traceback (most recent call last):
  File "processToFiles.py", line 91, in <module>
    ppvToday_dayAPI = mix_detail_day['chartData']['ppv'][DayOfMonth_i]
TypeError: 'NoneType' object is not subscriptable

the /tmp/-folder-solution did not work. any other ideas on how to fix this? there are a few json-files created, but in none of them is the required data (e.g. the content of the file growatt-mix_detail-2022-09-04.json is "null"..?)

  • 4 months later...

Hi,

 

To those who concerned, for the growatt grid tied inverter you can get the access to the data at

"https://server.growatt.com/plant.do"

Login with the credentials.

In the page, click on "Device List" tab then on "MIN/MIC/MOD/NEO", which shows a table of devices connected. Double click on the device you wish to query the data, a pop window appears with history. There is search button and export button.

Export will give the excel tabulated data for the current day. In the search tab you can download the data for any day, I could go upto 4 months of data at max. At a time you can download data for 4 days in a single excel, though the website says maximum 7 days it prints "Too large file" if you select more than 4 or 5 days at a time.

 

Attaching the screenshots for the reference.

 

Regards,

antarya

 

Screenshot from 2023-02-02 21-15-55.png

Screenshot from 2023-02-02 21-42-12.png

Edited by antarya

Hi,

I have just bought Growatt inverter and would like to extract data from growatt server and send it to PVOutput.Org as i have data there for my 2 inverters for 10 years, but one inverter failed  recently, and i got a new Growatt. I would like to transfer data to the PVOutput to be able to compare my invertes ect.  

I have tried to run the script ProcessToFile.py. I have none to little experience with Python and have no experience setting up api calls.  I have installed python 3.11 on windows. I have included the module : growattServer but when i tried to run the script it gave me a login error. 

I cannot figure out if i have miss something in the script setup ?.  plants Id, api key, inverter name or it is a commen error in the login setup.  I have only changed 2 lines in the script :user_name  and user_pass  has i changed to my credentials i use to login on http://server-api.growatt.com/login

Here are the output when i run the script.

 

Python 3.11.2 (tags/v3.11.2:878ead1, Feb  7 2023, 16:38:35) [MSC v.1934 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.

= RESTART: C:\Users\ottos\AppData\Local\Programs\Python\Python311\processToFiles.py
dayToProcess is: 2023-02-11
Traceback (most recent call last):
  File "C:\Users\ottos\AppData\Local\Programs\Python\Python311\processToFiles.py", line 37, in <module>
    login_response = api.login(user_name, user_pass)
  File "C:\Users\ottos\AppData\Local\Programs\Python\Python311\Lib\site-packages\growattServer\__init__.py", line 131, in login
    response = self.session.post(self.get_url('newTwoLoginAPI.do'), data={
  File "C:\Users\ottos\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 635, in post
    return self.request("POST", url, data=data, json=json, **kwargs)
  File "C:\Users\ottos\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\ottos\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 708, in send
    r = dispatch_hook("response", hooks, r, **kwargs)
  File "C:\Users\ottos\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\hooks.py", line 30, in dispatch_hook
    _hook_data = hook(hook_data, **kwargs)
  File "C:\Users\ottos\AppData\Local\Programs\Python\Python311\Lib\site-packages\growattServer\__init__.py", line 41, in <lambda>
    'response': lambda response, *args, **kwargs: response.raise_for_status()
  File "C:\Users\ottos\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://server-api.growatt.com/newTwoLoginAPI.do

 

The result in VS2019 

image.thumb.png.82cee93fbfa5e7719edfdc9b26b547df.png

 

Kind Regards,

Otto Sembach

 

On 2023/02/09 at 11:03 PM, L_D said:

@antarya, once logged in I dont have the "Device List" option.

See screensnip below:

image.thumb.png.d2759ce56ac22f4ccdbf39b3cb2750d9.png

Ah! I see the problem. So the Growatt maintains two types of interfaces both has similar name. I am not sure how it is done but if you go directly to

https://server.growatt.com it takes you to the above interface but instead, goto

 

https://server.growatt.com/login.do   URL has to be https:// not http://

It takes you to the interface I have posted in my previous posts. I suggest clearing cookies or opening in "Private Window" to avoid your

browser from reloading using previously stored cookies.

Let me know if you could get the access.

 

Edited by antarya

On 2023/02/11 at 9:17 PM, OttoS said:

Hi,

I have just bought Growatt inverter and would like to extract data from growatt server and send it to PVOutput.Org as i have data there for my 2 inverters for 10 years, but one inverter failed  recently, and i got a new Growatt. I would like to transfer data to the PVOutput to be able to compare my invertes ect.  

I have tried to run the script ProcessToFile.py. I have none to little experience with Python and have no experience setting up api calls.  I have installed python 3.11 on windows. I have included the module : growattServer but when i tried to run the script it gave me a login error. 

I cannot figure out if i have miss something in the script setup ?.  plants Id, api key, inverter name or it is a commen error in the login setup.  I have only changed 2 lines in the script :user_name  and user_pass  has i changed to my credentials i use to login on http://server-api.growatt.com/login

Here are the output when i run the script.

 

Python 3.11.2 (tags/v3.11.2:878ead1, Feb  7 2023, 16:38:35) [MSC v.1934 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.

= RESTART: C:\Users\ottos\AppData\Local\Programs\Python\Python311\processToFiles.py
dayToProcess is: 2023-02-11
Traceback (most recent call last):
  File "C:\Users\ottos\AppData\Local\Programs\Python\Python311\processToFiles.py", line 37, in <module>
    login_response = api.login(user_name, user_pass)
  File "C:\Users\ottos\AppData\Local\Programs\Python\Python311\Lib\site-packages\growattServer\__init__.py", line 131, in login
    response = self.session.post(self.get_url('newTwoLoginAPI.do'), data={
  File "C:\Users\ottos\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 635, in post
    return self.request("POST", url, data=data, json=json, **kwargs)
  File "C:\Users\ottos\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\ottos\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 708, in send
    r = dispatch_hook("response", hooks, r, **kwargs)
  File "C:\Users\ottos\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\hooks.py", line 30, in dispatch_hook
    _hook_data = hook(hook_data, **kwargs)
  File "C:\Users\ottos\AppData\Local\Programs\Python\Python311\Lib\site-packages\growattServer\__init__.py", line 41, in <lambda>
    'response': lambda response, *args, **kwargs: response.raise_for_status()
  File "C:\Users\ottos\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://server-api.growatt.com/newTwoLoginAPI.do

 

The result in VS2019 

image.thumb.png.82cee93fbfa5e7719edfdc9b26b547df.png

 

Kind Regards,

Otto Sembach

 

Hi,

 

I have not got into the code part yet but generally for the api access you need API key from the vendor.

If there's any other way to get the data using the code I'll try to figure it out and post it.

 

In the meantime, you can download the data from here

https://server.growatt.com/login.do

Check my posts above for more details.

In the web, you can't access data beyond 60-90 days depending on the model so get the data downloaded soon.

 

URL has to be https:// not http://

 

 

 

 

Edited by antarya

On 2022/05/01 at 10:32 PM, Mike_C said:

My overdue update of #3.  I have found it to be stable enough / gives me what I want that I have not explored option #2 at all.

I have found that growattServer 1.2.0 to be the best for my needs.

It can be installed via:

pip install growattServer

Details can be found here: https://pypi.org/project/growattServer

I have no affiliation to this project; I am just one customer / user that has found it to give me what I need.

 

I have this running on an m1 mac and have attached my python3 script.  I can't comment on how easier it is to translate this to windows / linux (if any 'translation' is needed at all).  Either way, before running, complete the set up variables configuration (line 11 to 15).

 

To run (based on today’s date) :

python3 ./processToFiles.py

To run (based on YYYY-MM-DD) provide three separate parameters :

python3 ./processToFiles.py YYYY MM DD

 

The files generated are a combination of direct API call output and some calculated values.

A summary csv is generated detailing (and this is how I think about energy created / used):

  • Solar (PV) to battery (i.e. stored)
  • Solar (PV) to user (i.e. used at time of generation)
  • Solar (PV) to grid (i.e. exported)
  • Battery to user (i.e. used post generation)
  • Grid to battery (should be close to zero but fluctuates)
  • Grid to User (imported energy)

 

I then compare this CSV in Excel to that provided by my energy provider - i.e. exported and imported values.

 

processToFiles.py 11.16 kB · 40 downloads

Mike,

 

What was the API key? Did you get it from the Growatt by writing to them or is it available anywhere in public fourm?

 

Thanks

Edited by antarya

On 2023/02/11 at 9:17 PM, OttoS said:

Hi,

I have just bought Growatt inverter and would like to extract data from growatt server and send it to PVOutput.Org as i have data there for my 2 inverters for 10 years, but one inverter failed  recently, and i got a new Growatt. I would like to transfer data to the PVOutput to be able to compare my invertes ect.  

I have tried to run the script ProcessToFile.py. I have none to little experience with Python and have no experience setting up api calls.  I have installed python 3.11 on windows. I have included the module : growattServer but when i tried to run the script it gave me a login error. 

I cannot figure out if i have miss something in the script setup ?.  plants Id, api key, inverter name or it is a commen error in the login setup.  I have only changed 2 lines in the script :user_name  and user_pass  has i changed to my credentials i use to login on http://server-api.growatt.com/login

Here are the output when i run the script.

 

Python 3.11.2 (tags/v3.11.2:878ead1, Feb  7 2023, 16:38:35) [MSC v.1934 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.

= RESTART: C:\Users\ottos\AppData\Local\Programs\Python\Python311\processToFiles.py
dayToProcess is: 2023-02-11
Traceback (most recent call last):
  File "C:\Users\ottos\AppData\Local\Programs\Python\Python311\processToFiles.py", line 37, in <module>
    login_response = api.login(user_name, user_pass)
  File "C:\Users\ottos\AppData\Local\Programs\Python\Python311\Lib\site-packages\growattServer\__init__.py", line 131, in login
    response = self.session.post(self.get_url('newTwoLoginAPI.do'), data={
  File "C:\Users\ottos\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 635, in post
    return self.request("POST", url, data=data, json=json, **kwargs)
  File "C:\Users\ottos\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\ottos\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 708, in send
    r = dispatch_hook("response", hooks, r, **kwargs)
  File "C:\Users\ottos\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\hooks.py", line 30, in dispatch_hook
    _hook_data = hook(hook_data, **kwargs)
  File "C:\Users\ottos\AppData\Local\Programs\Python\Python311\Lib\site-packages\growattServer\__init__.py", line 41, in <lambda>
    'response': lambda response, *args, **kwargs: response.raise_for_status()
  File "C:\Users\ottos\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://server-api.growatt.com/newTwoLoginAPI.do

 

The result in VS2019 

image.thumb.png.82cee93fbfa5e7719edfdc9b26b547df.png

 

Kind Regards,

Otto Sembach

 

Their API guide says to write to them for API access.

https://growatt.pl/wp-content/uploads/2020/01/Growatt-Server-API-Guide.pdf

I suppose one can try that

1 hour ago, antarya said:

Try this URL instead

Thank you, that did the trick to get to the URL

 

Edited by zsde

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.