Anyone experience with connecting a Growatt solar-inverter?

But my issue is related? I mean this is the invertor and the values for the invertor works fine. The issue is with the smart meter.

After adding Growatt in my HA I do have two devices detected:
image

For Growatt meter I don’t have any value populated:

For the invertor everything works fine:

Already subscribed to the notifications, thank you :slight_smile:

Yes, it’s 100% the same issue, I remember investigating it the first time it happened. The reason it returns zeros for all the values is because the integration incorrectly things it’s a different type of system and then returns all the wrong value for which it doesn’t get any updates.

1 Like

Cool, thank you for your help! I’ll check the thread with the updates :slight_smile:

No problem, I can’t promise it’ll get resolved this side of Christmas, I’ve got a lot of commitments etc over the festive period. But keep an eye on this post: Growatt Integration - Prioritised List of Features for Implementation/Fixing as I updated it as/when I’m working on things, so you’ll know when I’m picking the work up again.

1 Like

Thank you! Let me know if you need credentials from my install to help with the dev/testing :slight_smile:

Hello fellow growatters,
I know this integration occasionally has issues as growatt servers go offline every now and then.
This time my integration is broken for over weeks and a half now, with no data whatsoever.

I am able to log into both from web browser
https://server.growatt.com/
https://server-api.growatt.com/

My homeassistant instance
Home Assistant 2022.12.8
Supervisor 2022.12.1
Operating System 9.4


ERROR LOG

Logger: homeassistant.components.sensor
Source: components/growatt_server/sensor.py:43
Integration: Sensor (documentation, issues)
First occurred: 10:52:33 AM (1 occurrences)
Last logged: 10:52:33 AM

Error while setting up growatt_server platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/src/homeassistant/homeassistant/components/growatt_server/sensor.py", line 91, 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 132, in login
    data = json.loads(response.content.decode('utf-8'))['back']
  File "/usr/local/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.10/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I have tried deleting it, but when I try to add integration at the screen where I have to enter credentials it just says ‘Error’ …yes the username and password are correct, I even created a separate user/pass for integration, still no joy.

Any pointers on what is wrong specifically with my setup/.

Hi, there’s currently an issue with the integration, you can find the updates here: Error while setting up growatt_server platform for sensor · Issue #84600 · home-assistant/core · GitHub

I had the same problem, so my Xmas project has been to build a Raspberry Pi Zero W based interface between my SPH3000 and Home Assistant using MQTT and a cheap RS485 serial to USB dongle from Amazon.

I now have this code in testing and am enjoying 60 second updates flawlessly from my PV and battery.

My project doesn’t interfere with the Growatt WiFi dongle, and can be adapted to other inverters that use Modbus RTU (definitely other Growatts).

I’ll publish the code when I’ve written a readme doc if anyone’s interested.

David

3 Likes

looking forward to this alternate solution

Awesome! I have been searching for a way to avoid the Growatt API solution, as the data is available just a few meters away. Looking forward to see your solution.

Ok, here goes: I’ve published what I have built. I’ve used a Raspberry Pi Zero W with an RS485-USB adapter connected to the RS485 spare port on the bottom of my Growatt SPH3000. On the Raspberry Pi I run Raspberry Pi OS, Node.js and code that I have written. The code polls the Growatt inverter and publishes via MQTT all the values I want. These values are used in Home Assistant to populate a Lovelace dashboard and to trigger automations. In the future, I will update the code to allow Home Assistant to publish commands via MQTT to my code and to control the inverter (e.g. to change battery charging time etc.).

The code and instructions can be found at: GitHub - 666djb/solarpi: Solar inverter to MQTT bridge for inverter values

This works for me with a Growatt SPH3000, Raspberry Pi Zero W and an RS485-USB adapter bought from Amazon. It should work with other SPH inverter models and can be adapted for others still. The code is not a Home Assistant Add-on or Integration, it runs separately on another Pi.

David

2 Likes

Hi David, this looks fantastic. Thank you so much. I will be giving this a go in the coming weeks.

Curious if you know whether this should work “out the box” for the Growatt SPH6000 as well?

Also, did you encounter any performance bottlenecks preventing a faster refresh rate than 60 seconds? I was thinking for example 10 seconds.

Hi,

From my reading of the Growatt protocol doc, it should just work the same with any SPH inverter - they use the same registers. What I don’t know is whether any SPH inverters support more than two strings of solar panels, I only read strings 1 and 2.

Also, I have only tried updates at 60 and 20 seconds. I reckon 10 should be just fine too. I just didn’t want too much history being stored in Home Assistant as I have that running on a Pi3 until maybe later today when I move HA to a Proxmox VM :slight_smile:

Hi Everyone, for those of you still using the Growatt Home Assistant integration (or interested in making use of it in the future):

As discussed in more detail here I have started the process of moving the Growatt Server integration out of Home Assistant Core and into a custom integration. This will allow for much faster responses when there are issues with authenticating against the Growatt Servers as we’ve seen in recent months.

Over the next few weeks I will be removing the Growatt integration from the Core repository of Home Assistant, however, to give people time to switch over to the new integration I have already published it here (new repo) with a comprehensive guide on how to install it (it’s quite straight forward).

Once you have it installed, delete the previous integration and then switch to using the new one, step-by-step with pictures here

IMPORTANT: The new integration is the only place that new fixes & features will be released

Next steps:

  • The documentation here (growatt_server) will be updated to recommend using the new integration instead
  • The existing bugs against the Growatt integration in Home Assistant will be migrated/copied to the new repository
  • New features & fixes will be worked on

I apologise for the inconvenience that this causes, however it’s in the interest of the stability of Home Assistant Core as well as the ability to provide swift responses to issues in the plugin that I’m making this change.

Any questions related to this, please add them as issues on the new repo here (issues) and I’ll respond as fast as I can.

3 Likes

Hi, ive been trying to get my sph3600 into HA for a while now, I got HA installed just after they pulled he plug on the API,.

Ive got Solarpi up and running on a pi zero and its sedind mqtt topic, but no values. When monitor it via ssh with the journal cmd it says Port Not Open Error and connection refused. Ive changed the RS485 to VPP from battery and its saved ok. Reading through the manual it mentions RS485 being displayed on the panel as a sysmbol but mine dosnt show that. Ive tried pins 4&5 and also 1&5 but same error msg. Am I correct to assume the connection is sound as its trying to connect and being refused?
Any pointers what to try next.
Thnaks!

I’ll go out and take some photos of the menu in my SPH3000 to see if that helps.

  1. Normal display.
  2. When the RS485 port is being access (yes, it says RS232 on the screen!) - this only flashed up briefly (using SolarPi with a 60 second update period, it shows for about 2 seconds every minute).
  3. The RS485 setting menu
  4. Within the RS485 setting menu, the Port setting (VPP)

mine dosnt have the rs232 symbol coming up, only wifi. will watch it for a minuite and check ive just not missed it

thank you so much for the photos, i have checked and rechecked mine and its all connected and configured correctly but still dosnt work. ive tried adding a ground but that didnt help. have done 1&5 and 4&5 but error is always the same.
Ive ordered a new usb to rs485 converter in case mine is faulty, if not it looks like its disabled somehow in the SPH3600.
Below shows my menu, i watched the screen for a few minuites and the rs232/485 never shows, only wifi.

resolved now. Found the service did not have permission to access the USB port. Corrected and now receiving data!