homeassistant-growatt_server_api icon indicating copy to clipboard operation
homeassistant-growatt_server_api copied to clipboard

BUG - [Work one day yes, one day no...]

Open sagara939 opened this issue 1 year ago • 12 comments

Describe the bug Hi. The application work fine, but work one day yes, one day no. I need to recharge the integration via home assistant and, sometimes, it restart. it does not have continuity of operation. Also, when it works fine on home assistant, I get blocked on the "shinephone" smartphone application

To Reproduce

Growatt Device Type

Device(s):

Home Assistant information

  • Home Assistant version: 2024.6.3
  • Growatt Server API Integration version: 1.0.4

Additional context

N/A

sagara939 avatar Jun 19 '24 16:06 sagara939

I recommend reading the "IMPORTANT NOTICE" on the home page: https://github.com/muppet3000/homeassistant-growatt_server_api?tab=readme-ov-file#important-notice

muppet3000 avatar Jun 19 '24 17:06 muppet3000

@muppet3000

I use multiple visitor accounts which are set up inside and work fine with the pvplusanz (Jinko) portal. I assume this would also work with the Growatt portals. The HA integration easily accepts any of the visitor logins which I alternate to the next one each time the data stops flowing (I delete the entry and add a new one with the next credential in the list).

Each visitor login can use the identical email address (see the image), so no need to have multiple email addresses, just portal logins as visitors. eg user 1, user 2, user 3, user 4 etc. HA login just uses the visitor user name (eg user1) and the password you've setup


Now if within the integration setup process we could specify a number/group of credentials and then auto rotate those credentials daily (eg at midnight or at a specified time), then I think all the issues would be solved for everyone.

image

Currently I delete and then re-add here with the new visitor login every day or so, sometimes it lasts longer between changes.

image

caitotheonlypotato avatar Jul 03 '24 05:07 caitotheonlypotato

Setup is easy in the portal, just set user, can be anything. Set passwords can be anything, but I keep mine the same Add name and nickname if you like.

image

caitotheonlypotato avatar Jul 03 '24 05:07 caitotheonlypotato

As I've announced on the landing page of this repo I have decided to stop adding features to this repo due to the various issues with the API integration.

I have switched my focus to the Grott implementation and actively support and maintain that instead.

However, if people wish to submit PRs to this repo I will happily review and release them.

As I am no longer a user of the integration I have no way of testing it.

muppet3000 avatar Jul 03 '24 05:07 muppet3000

For those interested I've updated the Growatt HA component with a bunch of features for controlling TLX inverters. It uses an updated version(v 1.6.0) of the https://github.com/indykoning/PyPi_GrowattServer package, see the README.md file.

Most notably I might have been able to solve the issue with being constantly thrown out of from the app, and getting the account locked. This version only calls api.login() at startup and if/when the session expires, not before every api call. I have been running this for a week now, and haven't been locked out once: https://github.com/johanzander/core/tree/growatt_component_update/homeassistant/components/growatt_server If someone wants to try it out, just copy the content of /components/growatt_server to the /custom_components/growatt_server and add a version to the manifest file (required for custom_components).

Will do a pull request to the official https://github.com/home-assistant/core after some more testing.

johanzander avatar Dec 05 '24 22:12 johanzander

Seems great to me, I've had 2 weeks now without a disconnect, whereas previously 2-3 days was the max

image

caitotheonlypotato avatar Jan 01 '25 01:01 caitotheonlypotato

For those interested I've updated the Growatt HA component with a bunch of features for controlling TLX inverters. It uses an updated version(v 1.6.0) of the https://github.com/indykoning/PyPi_GrowattServer package, see the README.md file.

Most notably I might have been able to solve the issue with being constantly thrown out of from the app, and getting the account locked. This version only calls api.login() at startup and if/when the session expires, not before every api call. I have been running this for a week now, and haven't been locked out once: https://github.com/johanzander/core/tree/growatt_component_update/homeassistant/components/growatt_server If someone wants to try it out, just copy the content of /components/growatt_server to the /custom_components/growatt_server and add a version to the manifest file (required for custom_components).

Will do a pull request to the official https://github.com/home-assistant/core after some more testing.

Hi,

Any update to this? Sound very promising!

superture avatar Mar 31 '25 13:03 superture

What has happened since is that Growatt has released an official API for their inverters. I'm working on getting support for this in the PyPi_GrowattServer package: https://github.com/indykoning/PyPi_GrowattServer/pull/100#discussion_r2045158409

I also have an updated custom_component that uses the official API: https://github.com/johanzander/core/tree/growatt_component_tlx_update/homeassistant/components/growatt_server

Once the PyPi package is updated I'll start working on getting the official Growatt component updated with this.

johanzander avatar Apr 16 '25 19:04 johanzander

What has happened since is that Growatt has released an official API for their inverters. I'm working on getting support for this in the PyPi_GrowattServer package: indykoning/PyPi_GrowattServer#100 (comment)

I also have an updated custom_component that uses the official API: https://github.com/johanzander/core/tree/growatt_component_tlx_update/homeassistant/components/growatt_server

Once the PyPi package is updated I'll start working on getting the official Growatt component updated with this.

That's great news. Looking forward to the implementation.

Harry-1976 avatar May 15 '25 14:05 Harry-1976

Hello, Is there anything new in this area yet? I've had a look at https://github.com/johanzander/core/tree/growatt_component_tlx_update/homeassistant/components/growatt_server but I have to admit that I don't understand it (especially point 4) Has anyone managed to do this yet and can perhaps give me a few tips? If this is off-topic, please feel free to PM me. Many thanks

MaPaSoTo avatar Jun 24 '25 06:06 MaPaSoTo

I am still waiting for the maintainers to accept my PR... Step 4 is just FYI, nothing you have to do. You can download the folder and place it in a custom_component directory- this is standard way of installing custom components in Home Assistant - you can google it and find instructions. Only trick you need to do is to add the version to the growatt_server.json file so it looks like this:

{ "domain": "growatt_server", "name": "Growatt", "codeowners": [], "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/growatt_server", "iot_class": "cloud_polling", "version": "1.7.0", "loggers": ["growattServer2"] }

Then Home Assistant should find the custom component upon restart...

johanzander avatar Jul 04 '25 18:07 johanzander

@johanzander got it. It is now working again. However, API key does not seem to be assigned to any plant. I only get the info ‘no_plants’ after entering it. I tried it with the login / password combination and it works now. Thank you very much.

MaPaSoTo avatar Jul 08 '25 05:07 MaPaSoTo