-
Notifications
You must be signed in to change notification settings - Fork 28
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
HTTP 403 on login due to auth change ? #38
Comments
error codes adressing to different server url : Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): |
Looking at the SSL it looks like 2 new parameters are required on login. |
Any suggestion how to fix that? |
I'm a beginner in python and have looked at code and tried to change, but no success. Really needs the original author or other expert to investigate. |
for me, 'NewLogin':1 parameter was enough to get the newTwoLoginAPI.do running, and from there other methods too. it looks like they change response format but at least it returns all values (i managed to get LoginAPI.do working, but it only returned plant status and 'data': {}) |
Hi Any chance you could send your bit of code (of course hiding user/password!) |
sure, login that works for me:
call:
|
When replaceing the code in original code in init_py with your code i get : `Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): did you change anything else ? ( i am using the growatt 0.0.4 package on windows ) Any help to get it working again is very much appriciated.... |
I've also struggled. First just getting the indentation correct! I now get the response as <b'error'>. (my brackets). Then Which is odd as json was in the original and worked. I'm using the latest example code from github on termux On Android phone. I only started this after growatt updated Shinephone. |
I've gone back to original code but added New login 1. I still get same 403 with newTwoLoginAPI And newTwoLoginAPIV2. } |
its true that im connecting to 'https://server-api.growatt.com/', 'https://server.growatt.com/' gives me 403 too. i probably could make an merge request if i will fing some spare time... |
if i change def login and url from laqroix and i print the response then i get a new error 405 @laqroix : when editing the growatt 0.0.4 package i noticed that the use in your code for " and ' is different. So I suppose you use a different code or have changed more than only the suggested parts. Is that correct ? I hope the original coder sjord will join to help us solve it ( with all the info laqroix is sharing , tnx!) |
yes a was modifying that code for some time, trying different urls, method versions, code snippets from different scripts etc. it was a pain to get it working... |
That makes sense, |
I've tried using the Automate app on Android phone to call the http post (and I'll probably use it to develop my functionality if it works) |
Did you get this working? |
Seems like Growatt implemented/updated something in the loginflow.
Since a couple of days a html 403 response with working credentials on the webpage
Traceback (most recent call last):
File "C:\Program Files (x86)\Python37-32\lib\site-packages\growatt_init_.py", line 49, in login
return self.back_success_response(response)
File "C:\Program Files (x86)\Python37-32\lib\site-packages\growatt_init.py", line 82, in _back_success_response
raise GrowattApiError("Request failed: %s" % response)
growatt.GrowattApiError: Request failed: <Response [403]>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files (x86)\Python37-32\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "C:\Program Files (x86)\Python37-32\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Program Files (x86)\Python37-32\lib\site-packages\growatt_main.py", line 9, in
api.login(username, password)
File "C:\Program Files (x86)\Python37-32\lib\site-packages\growatt_init.py", line 51, in login
raise LoginError
growatt.LoginError
The text was updated successfully, but these errors were encountered: