home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
70.54k stars 29.47k forks source link

Growatt integration sensors unavailable #100874

Closed rspring closed 10 months ago

rspring commented 11 months ago

The problem

I noticed that the solar production was null in my energy dashboard while there was still electricity returned to the grid. Then I inspected the Growatt sensors and they were all unavailable. I reloaded the Growatt integration without succes. Neither did 'Quick reload'. After a complete 'Restart Home Assistant' the sensors became available again. But after a few hours the problem returned.

What version of Home Assistant Core has the issue?

core-2023.9.2

What was the last working version of Home Assistant Core?

core-2023.9.2

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Growatt

Link to integration documentation on our website

https://www.home-assistant.io/integrations/growatt_server

Diagnostics information

Growatt integration has no option to download diagnostic data

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.sensor
Source: components/growatt_server/sensor.py:43
Integration: Sensor (documentation, issues)
First occurred: 20:21:39 (1 occurrences)
Last logged: 20:21:39

Error while setting up growatt_server platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 359, 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.11/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.11/site-packages/growattServer/__init__.py", line 132, in login
    data = json.loads(response.content.decode('utf-8'))['back']
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/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)

Additional information

My Growatt account is functioning normally at the following website https://server.growatt.com/index

home-assistant[bot] commented 11 months ago

Hey there @muppet3000, mind taking a look at this issue as it has been labeled with an integration (growatt_server) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `growatt_server` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign growatt_server` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


growatt_server documentation growatt_server source (message by IssueLinks)

IgloNL commented 11 months ago

Here same problem, even it was on core-2023.9.1 not working today. Growatt has some issues. Also ShineApp wasn't working. Now i can login to Shineapp, but Intergratie is not working yet

Swerfer commented 11 months ago

Glad I'm not the only one with this issue. I was checking everything, but no luck. The ShinePhone app is working. API problem? I tried reinstalling, but the API did not accept my credentials...

Stone92 commented 11 months ago

I got the same problem, I think it is a API problem?! If i go to server.growatt.com and i login there is no problem. If i do the same at server-api.growatt.com the request is blocked. I got problems with the ShinePhone app also yesterday. today it is working fine.

Klumpen58 commented 11 months ago

Gleiches Problem schon am 23.! Am Morgen des 24. waren die Entitäten plötzlich wieder aktiv, nachdem ich die Integration neu geladen habe. Heute waren dann wieder alle Entitäten nicht mehr verfügbar. Auch nach Update des Core auf 2023.9.3 - gleiches Ergebnis. Über Shine App ist der Datenlogger und alle Daten verfügbar.

maxim-mityutko commented 11 months ago

Facing the same issue. server.growatt.com works just fine from my browser, however the server-api.growatt.com is being blocked. Connecting from Netherlands. Can we consider adding the option to use server.growatt.com back into the list of SERVER_URLS: https://github.com/home-assistant/core/blob/969d6b852eaa65995d2584dd1c9fac033e96160d/homeassistant/components/growatt_server/const.py#L10

And I understand that you @muppet3000 is planning to steer everyone towards this solutions: https://github.com/muppet3000/homeassistant-grott , however I feel that it is good to have 2 options, one - possibly less stable, but easy to configure, and the second one that requires extensive setup.

Levanterman commented 11 months ago

Similar problem here too, the Growatt Integration has stopped working today , I use https://server-api.growatt.com/

image
ViperSC commented 11 months ago

When logging in via the website, there is a new field that needs to be entered to prove you are not a robot... not sure if this is related?

image

rumunn95 commented 11 months ago

same problem, growatt stop working

Schelin78 commented 11 months ago

Same here, stoped working. App still works

Gordijnstok commented 11 months ago

I'm experiencing exactly the same problems. Shine app works, integration stopped working last night.

J4CE2 commented 11 months ago

Any work arounds?

Spenceralph commented 11 months ago

Same Here stopped working around 10:30 in the UK, web interface to Growatt was also having issues for a couple of hours but came back, but almost 24 hours with it not working, is there a way to check the API's are working from Growatt?

IgloNL commented 11 months ago

I have no experience with developing integrations, but is it not possible to create an integration that reads the inverter locally?

I have made a modbus controller for this myself, which works, but cannot yet be used because my dashboard is not fully completed. This is my choice not to fully use this controller yet. This will happen next month.

Megatron53 commented 11 months ago

Yeah, same problem here. Hope there will be a fix soon. Could be a problem with the API from Growatt that they need to fix?

marti28 commented 11 months ago

Same here. Happy to help testing a fix if needed.

J4CE2 commented 11 months ago

Can anyone test hitting "https://server.growatt.com/" instead? I don't know how to locate the init.py file buried within the HA file system

marti28 commented 11 months ago

Can anyone test hitting "https://server.growatt.com/" instead? I don't know how to locate the init.py file buried within the HA file system

I'll make a DNS rewrite. Maybe that'll do the trick.

MaxiKingXXL commented 11 months ago

I have the same issue since few days. No sensor values available.

marti28 commented 11 months ago

Changing the server throws another error about the certificate and I think I'm blocked because of too many retries.

Logger: homeassistant.components.sensor Source: components/growatt_server/sensor.py:43 Integration: Sensor (documentation, issues) First occurred: 10:05:34 (1 occurrences) Last logged: 10:05:34 Error while setting up growatt_server platform for sensor

Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 714, in urlopen httplib_response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 403, in _make_request self._validate_conn(conn) File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 1053, in _validate_conn conn.connect() File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 472, in connect _match_hostname(cert, self.assert_hostname or server_hostname) File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 545, in _match_hostname match_hostname(cert, asserted_hostname) File "/usr/local/lib/python3.11/site-packages/urllib3/util/ssl_match_hostname.py", line 155, in match_hostname raise CertificateError("hostname %r doesn't match %r" % (hostname, dnsnames[0])) urllib3.util.ssl_match_hostname.CertificateError: hostname 'server-api.growatt.com' doesn't match 'server.growatt.com'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 798, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/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 SSLError(CertificateError("hostname 'server-api.growatt.com' doesn't match 'server.growatt.com'")))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 359, 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.11/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.11/site-packages/growattServer/init.py", line 128, in login response = self.session.post(self.get_url('newTwoLoginAPI.do'), data={ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 637, in post return self.request("POST", url, data=data, json=json, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/requests/adapters.py", line 517, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='server-api.growatt.com', port=443): Max retries exceeded with url: /newTwoLoginAPI.do (Caused by SSLError(CertificateError("hostname 'server-api.growatt.com' doesn't match 'server.growatt.com'")))

J4CE2 commented 11 months ago

Changing the server throws another error about the certificate and I think I'm blocked because of too many retries.

Logger: homeassistant.components.sensor Source: components/growatt_server/sensor.py:43 Integration: Sensor (documentation, issues) First occurred: 10:05:34 (1 occurrences) Last logged: 10:05:34 Error while setting up growatt_server platform for sensor

Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 714, in urlopen httplib_response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 403, in _make_request self._validate_conn(conn) File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 1053, in _validate_conn conn.connect() File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 472, in connect _match_hostname(cert, self.assert_hostname or server_hostname) File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 545, in _match_hostname match_hostname(cert, asserted_hostname) File "/usr/local/lib/python3.11/site-packages/urllib3/util/ssl_match_hostname.py", line 155, in match_hostname raise CertificateError("hostname %r doesn't match %r" % (hostname, dnsnames[0])) urllib3.util.ssl_match_hostname.CertificateError: hostname 'server-api.growatt.com' doesn't match 'server.growatt.com'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 798, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/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 SSLError(CertificateError("hostname 'server-api.growatt.com' doesn't match 'server.growatt.com'")))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 359, 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.11/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.11/site-packages/growattServer/init.py", line 128, in login response = self.session.post(self.get_url('newTwoLoginAPI.do'), data={ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 637, in post return self.request("POST", url, data=data, json=json, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/requests/adapters.py", line 517, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='server-api.growatt.com', port=443): Max retries exceeded with url: /newTwoLoginAPI.do (Caused by SSLError(CertificateError("hostname 'server-api.growatt.com' doesn't match 'server.growatt.com'")))

Ok that's due to the rewrite I'd imagine. As the URLs don't match the certificate.

IgloNL commented 11 months ago

When I connect my Growatt inverter to my Domoticz server (HTTP / HTTPS), I immediately have all the information available and it works.

This integration looks at server.growatt.com.

There are only problems in combination with HA.

bteselle commented 11 months ago

Same problem over here version 9.2

J4CE2 commented 11 months ago

Can anyone test hitting "https://server.growatt.com/" instead? I don't know how to locate the init.py file buried within the HA file system

I use the same GrowattServer package in some other scripts (nonHA) I have and it works fine using server.growatt.com.

charltondurie commented 11 months ago

Same problem here on 2023.9.2

thoompje commented 11 months ago

Same problem here on 2023.9.2

Also on 2023.9.1

maxim-mityutko commented 11 months ago

I have no experience with developing integrations, but is it not possible to create an integration that reads the inverter locally?

I have made a modbus controller for this myself, which works, but cannot yet be used because my dashboard is not fully completed. This is my choice not to fully use this controller yet. This will happen next month.

That's exactly what's done here: https://github.com/muppet3000/homeassistant-grott However it requires extra steps to set up.

ALvandenBerg commented 11 months ago

Same problem over here version 9.3

DieterC1984 commented 11 months ago

Reinstalled the Growatt Integration and even logging in is not possible anymore. Had the same problems as mentioned above.

Perrylicious commented 11 months ago

I'll check in here as well to follow the bug and maybe find a workaround. Same issue, 9.3

tomton68 commented 11 months ago

Yup. Same problem in NL.

kris-22 commented 11 months ago

The same issue persists, but https://server.growatt.com/ works fine. The problem lies with the Growatt integration; it doesn't load data, and the ShinePhone application has the same issue - I cannot log in. However, when I log in via a mobile network, it works without any problems on my mobile phone. I suspect there might be a limitation on the number of login attempts from a specific IP address.

danisrb commented 11 months ago

Same problem integration doesn't load data 9.2 and 9.3

arienclaij commented 11 months ago

I have problems too. I just sent an email to Growatt to find out the reason for the block on https://server-api.growatt.com/.

J4CE2 commented 11 months ago

Can confirm that updating the URL back to "https://server.growatt.com/" makes it function again for me. This is a deprecated URL in the integration though so is not a configurable option choice.

DieterC1984 commented 11 months ago

Can confirm that updating the URL back to "https://server.growatt.com/" makes it function again for me. This is a deprecated URL in the integration though so is not a configurable option choice.

Any steps you can share on how exactly to do this? Problem is that I deleted the integration so I am not able to reinstall it, so also not possible to change parameters anywhere.

J4CE2 commented 11 months ago

Can confirm that updating the URL back to "https://server.growatt.com/" makes it function again for me. This is a deprecated URL in the integration though so is not a configurable option choice.

Any steps you can share on how exactly to do this?

Yep,

1) You need to copy the growatt_server code from: https://github.com/home-assistant/core/tree/dev/homeassistant/components/growatt_server

into your config/custom_components folder as per this suggestion: https://community.home-assistant.io/t/editing-core-files-in-docker-container/593444/2?u=j4ce

2) Then you can edit sensor.py and just force the URL like so: api.server_url = "https://server.growatt.com/"

This is basically just making it become a custom integration. Make sure to restart after making the changes.

parad0xnasha commented 11 months ago

I'm going to leave hacking away at this to those who know what they were doing, but ever since I installed the integration, I've only ever received 2/55 entities.

Sidenote: this whole Growatt app > Shinephone thing created an interesting thing for me such that my installer got Growatt support on the line. I signed up with the Growatt app, and it's just always worked on my phone without interference including the move to ShinePhone. However I noticed my time was strangely out and couldn't see where to edit it.

TLDR I backed out of ShinePhone and using the credentials that were already saved there, failed authentication... Growatt could find no record of my previous username, or my associated email. So we did the obvious, and created a new account, he linked it all up in the back end for me, and shifted my clock the 6-odd hours that it was out by. May or may not be some helpful information contained within.

rspring commented 11 months ago
1. You need to copy the growatt_server code from:
   https://github.com/home-assistant/core/tree/dev/homeassistant/components/growatt_server
2. Then you can edit sensor.py and just force the URL like so:
   `api.server_url = "https://server.growatt.com/"`

This is basically just making it become a custom integration. Make sure to restart after making the changes.

Were these the only changes you made? It didn't work for me. I then added a version tag to manifest.json (https://community.home-assistant.io/t/editing-core-files-in-docker-container/593444/2) but this also did not solve the problem.

J4CE2 commented 11 months ago

I believe that's all I changed.

You may need to add the server back to the const.py and config_flow.py also if you intend to follow the UI setup process again.

Spenceralph commented 11 months ago

Do we know if Growatt are keeping the API address offline, of its down for a few days? as not sure how confident I am hacking the code, if they are will the integration be updated to add back the option for the server address?

kris-22 commented 11 months ago

2. api.server_url = "https://server.growatt.com/"

In my case, this change helped, what I did exactly: in the file - /usr/src/homeassistant/homeassistant/components/growatt_server/sensor.py

api.server_url = "https://server.growatt.com/"
#api.server_url = url

in the file - /usr/src/homeassistant/homeassistant/components/growatt_server/const.py

SERVER_URLS = [
"https://server-api.growatt.com/",
"https://server-us.growatt.com/",
"http://server.smten.com/",
"https://server.growatt.com/",
]

DEPRECATED_URLS = [

]

DEFAULT_URL = SERVER_URLS[0]"

and restart homeassistant, growatt integration

IgloNL commented 11 months ago
  1. api.server_url = "https://server.growatt.com/"

In my case, this change helped, what I did exactly: in the file - /usr/src/homeassistant/homeassistant/components/growatt_server/sensor.py

api.server_url = "https://server.growatt.com/"
#api.server_url = url

in the file - /usr/src/homeassistant/homeassistant/components/growatt_server/const.py

SERVER_URLS = [
"https://server-api.growatt.com/",
"https://server-us.growatt.com/",
"http://server.smten.com/",
"https://server.growatt.com/",
]

DEPRECATED_URLS = [

]

DEFAULT_URL = SERVER_URLS[0]"

and restart homeassistant, growatt integration

Can you indicate what you are running HA on? I put it on a Raspberry 4, imagege from HA directly onto flascard. But I don't have this folder structure. I couldn't change this.

I cannot adjust this in FileEditor.

rumunn95 commented 11 months ago

Use samba share to make changes, this files is hidden

kris-22 commented 11 months ago
  1. api.server_url = "https://server.growatt.com/"

In my case, this change helped, what I did exactly: in the file - /usr/src/homeassistant/homeassistant/components/growatt_server/sensor.py

api.server_url = "https://server.growatt.com/"
#api.server_url = url

in the file - /usr/src/homeassistant/homeassistant/components/growatt_server/const.py

SERVER_URLS = [
"https://server-api.growatt.com/",
"https://server-us.growatt.com/",
"http://server.smten.com/",
"https://server.growatt.com/",
]

DEPRECATED_URLS = [

]

DEFAULT_URL = SERVER_URLS[0]"

and restart homeassistant, growatt integration

Can you indicate what you are running HA on? I put it on a Raspberry 4, imagege from HA directly onto flascard. But I don't have this folder structure. I couldn't change this.

I cannot adjust this in FileEditor.

Raspberry Pi in a Docker container, but remember that if Home Assistant is in a Docker container, you first need to enter that container. Unfortunately, I have no idea what the file structure looks like in Home Assistant Operating System

IgloNL commented 11 months ago

Use samba share to make changes, this files is hidden

If i do it, i only see config or addons or media etc, nothing looks like "growatt_server" :-(

StuffNL commented 11 months ago
  1. api.server_url = "https://server.growatt.com/"

In my case, this change helped, what I did exactly: in the file - /usr/src/homeassistant/homeassistant/components/growatt_server/sensor.py

api.server_url = "https://server.growatt.com/"
#api.server_url = url

in the file - /usr/src/homeassistant/homeassistant/components/growatt_server/const.py

SERVER_URLS = [
"https://server-api.growatt.com/",
"https://server-us.growatt.com/",
"http://server.smten.com/",
"https://server.growatt.com/",
]

DEPRECATED_URLS = [

]

DEFAULT_URL = SERVER_URLS[0]"

and restart homeassistant, growatt integration

Confirmed. Changing the URL seems to work! (The question is for how long?).

IgloNL commented 11 months ago

How can change this in the Intergration for all users?

Levanterman commented 11 months ago

Use samba share to make changes, this files is hidden

If i do it, i only see config or addons or media etc, nothing looks like "growatt_server" :-(

I had the same issue, i also dont run HA on a Pi. Thanks to all the replies above, I combined the two solutions and got it working like this.

1) Used github desktop and cloned the Home Assistant Core using URL 'https://github.com/home-assistant/core.git' 2) Once its cloned locally , copy the 'growatt_server' folder

image

3) connect from a mac/pc to your HA using Samba , copy the growatt_server contents into config -> custom_components ->

image

4) Open const.py in VS Code , add "https://server.growatt.com/", to SERVER_URLS and remove "https://server.growatt.com/" from DEPRECATED_URLS , save the file

image

5) Edit the manifest.json and add a version number e.g.

image

save it.

6) restart HA

7) Now re-add the Growatt Integration, except this time you should see a cloud icon and the local integration icon

image

This shows your local integration has been recognised

8) Now the new URL should be selectable

image

9) Login using your Shine Tool Creds

10) Growatt works again.

Thanks everyone for commenting above to work out this solution.

kris-22 commented 11 months ago

I will only mention why removing 'https://server.growatt.com/' from DEPRECATED_URLS is required. image