Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't access API #114

Open
Prana66 opened this issue Sep 17, 2024 · 14 comments
Open

Can't access API #114

Prana66 opened this issue Sep 17, 2024 · 14 comments

Comments

@Prana66
Copy link

Prana66 commented Sep 17, 2024

I'm trying to log in, but I get an authentication error, the username and password are correct because I log in to the website with them.
The Power Station ID, I have followed your instructions by putting the number after https://www.semsportal.com/PowerStation/PowerStatusSnMin/
But I can't connect.

@Prana66
Copy link
Author

Prana66 commented Sep 17, 2024

Now I have been able to enter but with the old password (not the same as the current one) which is kept for the integration, but without devices or entities.
borrar

@TimSoethout
Copy link
Owner

Really odd. Do the debug logs say anything? (See readme)
Maybe you created a separate user that is not allowed to see the inverter?

@Prana66
Copy link
Author

Prana66 commented Sep 18, 2024

Hello, thank you for answering, I can't send you anything because there is no device or integration, I don't know what I could send you, as you can see in the screenshot there is nothing.
In the debug log:
2024-09-17 13:57:49.698 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'sems' calls async_forward_entry_setup for integration, sems with title: 95000______8 and entry_id: 01J7R___________________S9R1ZQ, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead at custom_components/sems/init.py, line 37: hass.async_create_task(, please create a bug report at https://github.com/TimSoethout/goodwe-sems-home-assistant/issues

@TimSoethout
Copy link
Owner

Above WARNING line should be solved in the latest release. But is probably not related to your issue.

See here for enabling debug logging: https://github.com/TimSoethout/goodwe-sems-home-assistant?tab=readme-ov-file#debug-info

@Prana66
Copy link
Author

Prana66 commented Sep 19, 2024

These are the three records that appear, I still think that the problem is that it does not update, it asks me for the password from a year ago.

Este error se originó a partir de una integración personalizada.

Registrador: custom_components.sems.sems_api
Fuente: custom_components/sems/sems_api.py:130
integración: GoodWe SEMS API (documentación, problemas)
Ocurrió por primera vez: 00:43:39 (8 ocurrencias)
Última vez registrado: 10:13:02

Unable to fetch data from SEMS.

registrador: homeassistant.components.goodwe.coordinatorFuente: helpers/update_coordinator.py:386integraci%C3%B3n: GoodWe Inverter (documentaci%C3%B3n, problemas)Ocurri%C3%B3 por primera vez: 02:26:01 (1 ocurrencias)%C3%9Altima vez registrado: 02:26:01Error fetching GoodWe data: ('No valid response received even after 10 retries', 3)

Registrador: homeassistant.helpers.frame
Fuente: helpers/frame.py:184
Ocurrió por primera vez: 00:43:37 (1 ocurrencias)
Última vez registrado: 00:43:37

Detected that custom integration 'sems' calls async_forward_entry_setup for integration, sems with title: 95000EH27W0028 and entry_id: 01J7RTMP5JNW_____-8S9R1ZQ, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead at custom_components/sems/init.py, line 37: hass.async_create_task(, please create a bug report at https://github.com/TimSoethout/goodwe-sems-home-assistant/issues

@DannyMake
Copy link

I got the same problem.

@BenBarat
Copy link

BenBarat commented Dec 7, 2024

First: 'Terms of Use' tickbox on the website needs to be checked before login can occur, hence authentication will consistently fail if just the UserName and Password are supplied when screen scraping.

Second: I note the URL (that determines the ID) now changes each time the website is accessed. This makes the premise the ID can be stored locally on HomeAssistant configuration files a false one. Going back even further in the docs, it raises the question of exactly where does the login and password information get stored if you use a file editor to hard code the credentials if the password changes, etc? What file name is changed, and how?

These are GoodWe changes that have cropped up since this code was deployed, possibly as a result of exploring alternate API objectives, or tweaking their website on the behest of their legal team.

Their 'Solar Academy' website also has a lot of information about APIs in an August 2024 paper, listing their intentions, but is actually quite light on implementation and sample code. It mentions licensing agreements, etc. It is about this time I suspect the authentication problem arose, and some users that have cached credentials are currently living on borrowed time till the cache is overwritten.

Maybe there are now alternate URL's or portals to the data? A JSON portal? HTTPS protocols and KAFKA? OpenAPI? Real-time Data Monitoring API? Is contacting GoodWe on behalf of the community going to get a specific agreement to make this mod work again?

Hint: A view of the web page source before and after logged in (start from the bottom is suggested) may proved quite enlightening. My web browser is set to reject all cookies.

As a comment, having a screen pop up in the initial load of the integration that asks for the User Name, Password, and then ??? may be looking at this wrong. Shouldn't you login in, ascertain the URL, and then update the configuration file (or store that value in a temporary variable) with the correct ID that has now been offered up by the GoodWe website?

This screen scraper mod is firmly broken till that authentication issue is remedied.

@Ascariota
Copy link

Same issue for me

@Prana66
Copy link
Author

Prana66 commented Feb 24, 2025 via email

@Ascariota
Copy link

@Prana66 :
how I don't see the solution

Thanks

@Prana66
Copy link
Author

Prana66 commented Feb 24, 2025 via email

@Ascariota
Copy link

I have always this message : Échec de la configuration, nouvel essai: ('No valid response received even after 10 retries', 1)

Same issue with a old backup (december 2024).

@TimSoethout
Copy link
Owner

TimSoethout commented Feb 24, 2025

Not an update. Sometimes the SEMS API is unstable and just starts working again after a while. It might also have to do with checking on both web/app/HA all at the same time using the same credentials, so maybe sometimes people get soft banned for a while I guess.

I'm not sure about @BenBarat's story. This component uses the API, and it not screen scraping or anything. For me the inverter ID, which is copied from the URL, seems stable .
(I seems his Github account was created for posting above message only? No other activity on that account.)

@Ascariota
Copy link

I don't know if it's help.

But I delete the fold older Sems integration on Custom_component, and I reset the passwors SEMS portal with exactly the same password.

And after a reboot it's works !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants