Growatt Inverter Integration Issue

Anyone experiencing issues with Growatt Inverters from yesterday? Mine is not showing up and I get the following in the logs:

2022-06-15 10:21:04 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up growatt_server platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/src/homeassistant/homeassistant/components/growatt_server/sensor.py", line 74, in async_setup_entry
    devices, plant_id = await hass.async_add_executor_job(get_device_list, api, config)
  File "/usr/local/lib/python3.9/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 42, in get_device_list
    login_response = api.login(config[CONF_USERNAME], config[CONF_PASSWORD])
  File "/usr/local/lib/python3.9/site-packages/growattServer/__init__.py", line 119, in login
    data = json.loads(response.content.decode('utf-8'))['back']
  File "/usr/local/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.9/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 am running Home Assistant Core 2022.6.6
Home Assistant Supervisor 2022.05.3

1 Like

i am experiencing the same issue also.

1 Like

After some further searching I found that there was a change on Growatt that is causing the problems. I will try to apply the ā€˜workaroundā€™ mentioned in this thread later:

1 Like

Same problem here, temporary workaround when using docker:

in cli execute:

docker exec -it hass bash

inside docker container execute:

vi /usr/local/lib/python3.9/site-packages/growattServer/__init__.py

and modify line 115:
Change: newLoginAPI.do to newTwoLoginAPI.do then restart home-assistant.

like described here:

4 Likes

any reply from Growatt so far?

Thanks, I tried this and it seems to be working for a temporary fix.

I tried it too and it is working so far.

thanks

Hi all,

I have the same problem with Growatt as described here. But canā€™t test the work around because i cantā€™ find the site-packages folder, only the dist-packages folder.

Any idea when this will be fixed? Im also struggling to get it to work.

2 Likes

if using the Home assistant OS the change in the core.config_entries does not work. the data returned seems to be in a different formatā€¦

1 Like

I try to find the right /usr/local/lib/python3.9/site-packages/growattServer/__init__.py but I only can find these;

image

I did open them all but none of them seems the right one. Where can I find the right init?

My HA is running is a VM on my Synology DS220+

I deleted the integration but now i can even not login - download the integrationā€¦
Any progress on the sollution?

I tried to do that and now Iā€™m having the same problem.
Therefore I restore last backup and did the [bochelork] solution and it worked fine :slight_smile:

1 Like

its disappointing that this has happened again, and each time the actual fix is identified within an hour or 2 but we have to wait for the next release of HA to get the fix which is often days later.

I understand there is reasons why changes take so long to beta-test/confirm before going into the wild. but for something like this where its a cloud based service where the cloud side has changed and the integration will no longer work at all until updated, surely we could provide a way to update that particular integration? same as what we can do in HACS?

in the meantime Im going to pull my wifi dongle off the solar inverter and see whats involved with flashing ESPhome. getting rid of the cloud side of things wouldnā€™t be a bad thing anyway, but im concerned about the remote diagnostics things that growatt has had to do in the past when my inverter stops working.

Suggested fix works for me. For those having trouble implementing it: install Portainer, shell into the homeassistant container and apply the fix.

Yes, I fully agree. It is disappointing. And since we all use the values of these integration to automate our home this is annoying. I went to Node Red and used there the Growatt Integration and it just works. Now I use this detour via NodeRed to get the values of my Growatt Inverter. Then I create in NodeRed nodes that transfer the values to Home Assistant.
Why does it always work with NodeRed and not with Home Assistant? I donā€™t understand.
Sorry, I am a big supporter of Home Assistant.

Can you explain what your are telling me? Yes i have no patient to what to the next release. Butt do not understand what you mean with: ā€œinstall Portainer, shell into the homeassistant container and apply the fix.ā€

Very good man! it worked for me :slight_smile:

I am also having this issue, and VERY, maybe too much, reliant on the Growatt integration to keep my power on during our south african electricity mess. If we loose power the inverter lets home assistant know to switch off all other heavy electricity users, so i can get through my dayā€™s work without loosing connectivity. How do i fix this ? I run HASSIO 8.2 on PI, SSH doesnt show me the usr lib

probably a Very stupid question.
where / how can I open a CLI
I have tried TERMINAL, but when trying the ā€œdocker exec -it hass bassā€ command it says not to recognize ā€œdockerā€

I have tried looking for information on CLI in the documentation, but the documentation seems to be very outdated.

Sorry for the stupid question