Anyone experience with connecting a Growatt solar-inverter?

Last friday I got solar pannels with a growatt inverter (GroWatt MIN 5000TL-XE) and offcourse a wifi stick. Added it directly to HA. I only have to general sensors and not the specific inverter sensors. Can someone help me to get the inverter sensors?

I use a custom component, not the official intergration, for exactly that reason. Github: https://github.com/indykoning/home-assistant-growatt-server

If I use that custom component the sensor for the inverter is created, but all values stay at 0.

@indykoning Can you help me to get the values from the inverter with your custom component?

Hi @indykoning
I’m so sorry but i’m very new in that software and applications, so I can’t add growatt storage on my Home assistant.

Could you explain how can I integrate your precious py code to home assistant?
Till now I can take values only from inverter but I miss battery soc and load consumption
Thanks a lot.

Hi @Danros3 and @spock85,
Actually the custom component is outdated when compared to the one in Home Assistant now. The custom component is the version as it is in Home Assistant 0.99.

After this compatibility for seperate storage devices have been added (i dont remember a specific version but 0.110+ should be fine).

I will update the custom component with what i have running locally for me (getting temperatures from the inverters themselves) which i will try merging into home assistant once i have the time.

If you’re getting empty values and know a slight bit of python, try messing with the example in https://github.com/indykoning/PyPi_GrowattServer
You can download a zip and run the whole thing or only download the example and install GrowattServer using pip. See if you can find a way to show the data there.

I have now updated the custom component


If you do not want the updated version, you can always go back in time with the commits:

Hi @spock85, about the built-in integration not working:
Would you be able to pull https://github.com/indykoning/PyPi_GrowattServer/ on your computer (or install the package using pip install growattServer)

Then paste

import growattServer
api = growattServer.GrowattApi()
login_response = api.login('<username>', '<password>')
#Get a list of growatt plants.
plants = api.plant_list(login_response['userId'])
deviceList = api.device_list(plants['data'][0]['plantId'])

print(deviceList)

into the example.py or a new .py file, change the credentials and run it using python example.py
Then send me the output of it (feel free to remove the Sn and deviceAlias)
It should hopefully look something like this

[
    {   
        'datalogSn': '',
        'deviceAilas': '',
        'deviceSn': '',
        'deviceStatus': 2,
        'deviceType': 'inverter',
        'eToday': '8.6',
        'eTodayStr': '8.6kWh',
        'energy': '2277',
        'invType': '0',
        'location': '',
        'lost': False,
        'power': '17.6',
        'powerStr': '0.02kW'
    }
]

My guess is that the “DeviceType” is returning something different than inverter.
The integration currently only supports ‘inverter’ and ‘storage’ but maybe the name is slightly different while it would work perfectly normal if only recognised as an inverter.

I think i had this issue as well with one of my inverters, you have to set the timezone and time correctly in the inverter itself.

Hi, The build-in integration gives me only totals, not the inverter specific sensors.
This is the output, I removed SN.

[{
	'lost': False,
	'location': '',
	'eToday': '37.5',
	'datalogSn': 'XXX0000000',
	'deviceSn': 'YYY1111111',
	'deviceStatus': 1,
	'type': 0,
	'powerStr': '0.05kW',
	'bdc1Soc': 0,
	'eTodayStr': '37.5kWh',
	'deviceAilas': 'YYY1111111',
	'deviceType': 'tlx',
	'bdc2Soc': 0,
	'type2': 1,
	'power': '45.7',
	'energy': '195.8'
}]

That’s interesting, never seen a “tlx” devicetype before.
Seems like it affected an integration for homey as well.

Have you installed the latest version of the custom component yet?
If so could you please try and change “inverter” on this line to “tlx”.

If it works please let me know and i’ll update the check to check if it is “inverter” or “tlx”

Unfortunately it does not work if I change ‘inverter’ to ‘tlx’. Do you know how I can sniff the Growatt app from my Android phone?

i do indeed, i wrote a small blog post about how i discovered the endpoints for future reference.
I only know how to do it with android though.

You’ll only really be interested in the “Getting the data i want” heading.

Then you can try getting the data via the example:

import growattServer
api = growattServer.GrowattApi()
login_response = api.login('<username>', '<password>')
#Get a list of growatt plants.
plants = api.plant_list(login_response['userId'])
deviceList = api.device_list(plants['data'][0]['plantId'])

def inverter_detail(self, inverter_id):
    response = api.session.get(api.get_url('newInverterAPI.do'), params={
        'op': 'getInverterDetailData',
        'inverterId': inverter_id
    })

    data = json.loads(response.content.decode('utf-8'))
    return data


print(inverter_detail(deviceList[0]["deviceSn"]))

And of course change the url, params and function name to fit your discoveries.
If you get an “op” with _two or _one etc. try removing it. I learnt after publishing that you get way more data if you remove those.

If you get the data you could try adding it to https://github.com/indykoning/PyPi_GrowattServer/blob/29c6d370621144c7a889573f7da3d422c04883e3/growattServer/init.py#L95

I’ll try merge and create a new version number.

Lastly for the actual integration you can add the new type to


Those are the mappings between data recieved from Growatt and data shown in Home Assistant

Also add the new list to https://github.com/home-assistant/core/blob/8cf0a01149b568fd3c4cbd1c7cb5b8ffa830cc5a/homeassistant/components/growatt_server/sensor.py#L278

And create a new elif to get the sensors for the new tlx

Then another elif will have to be added here

To actually get the data from the GrowattServer python package.

When all of that is done it will be ready to try and Home Assistant would probably be happy to merge the added functionality :slight_smile:

Hi! I have a growatt inverter but not a dongle wifi on it. How can I catch the data to expose on home assistant? I have to bought the dongle?

The integration that is in home assistant right now does require the dongle since it get the data from server.growatt.com

However there is a library to read from the RS232 port https://pypi.org/project/growattRS232/

So it would be possible for someone to make an integration for it.

2 Likes

The Growatt wifi dongle shows in my DHCP device list as an ESP_xxxxx device, same as all my other ESP2866 devices. I wonder if it would be possible to put ESPHOME on it and get the data out of it directly that way via local wifi.

Yep that fixed it thanks

Hi Indy, upon return from holiday there were some updates on my hass… and since then I have a problem with my integration…

I have only 1 entity left:
sensor.growatt_total_maximum_power

Before e.g. I had:
sensor.growatt_total_output_power
But that is not there anymore after update…

This is my sensor which did not change:

- platform: growatt_server
    username: !secret GROWATT_SERVER_USERNAME
    password: !secret GROWATT_SERVER_PASSWORD
    scan_interval: 60

I’m guessing this might be related to Anyone experience with connecting a Growatt solar-inverter?
Could you try those steps as well and see if your device is shown as different as well?

Sorry, Assume I am not a developer… what should I do :blush:

Edit: hold it… since yesterday evening my shinelink seems to not have sent anything to server.growatt.com. the shinlink however sais “all is ok” but I did not see any data in server.growatt.com. I restarted the shinelink. At first it was disconnected now connected.

And data starting to show again…

However I do still see 1 entity in my entity list :thinking:

Did the other entity ever show correct data?
The first version of the integration assumed everything was an inverter, so it added the sensors for any device it could find in your plant.

Once support for “Storage” devices was added it would look more intelligently at what device type it is.
So far inverter, storage, mix and tlx have been discovered to my knowledge.

If the device type of the other device is mix or tlx it would be ignored.
spock85 seems to be working to get his tlx device working :smiley:

Since i only have inverters that are inverters to Growatt as well i cannot add support for the remaining types myself.

It did always show the server.growatt.com dat yes. Tomorrow I will see if everything is ok again. Then I will look far anything you want me to (with help).