-
Notifications
You must be signed in to change notification settings - Fork 34
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
Still getting error 403 with version 1.5.0 #78
Comments
Same issue here, only found this server yesterday |
Same herer, running on termux on android 10. |
I don't know if relevant but I couldn't run setup.py because it couldn't find setuptools |
I've tried https://github.com/PLCHome/growatt and this works fine so will see if I can update they python to work the same |
Now managed to run setup.py but no difference. |
Is it feasible to convert it to Python? Is it likely to take a long time?
|
Its a lot of work but I will see what I can do, Python not my daily language so will be a bit of a learning curve for me first |
you have to change <agent_identifier => value to something real the default in the example is blacklisted |
I also am having problems connecting. If I use one server ( This is with For context, I used the 1.2 version of this package for some time but it quit working a long time ago now. I can access the data via the web or the Android app so I know my username/password are okay. Thank you. Update: the JavaScript code referred to above works just fine. I can use that for what I need but a python script would be better overall. |
Did you change the agent identifier in the pyhton script to a real current chrome or other real agent string ? I had exactly the same until i changed that. Note that the servers in use are bound to global regions os you cannot random change that. Pyhton running flawles here every x minutes after that change. |
Had the same u til i changed the agent. |
https://github.com/indykoning/PyPi_GrowattServer/blob/master/growattServer/__init__.py#L28 |
Or use below when initialise to use a random agentID. Below is copied from Readme |
Thank you. I did try the random ID case (i.e. with True as an argument) but that did not help. I haven't tried actually specifying a string for the agent. The javascript code is working, as I indicated in my update to the post, and that's good enough for me for the moment. |
I have the same problem, I also get a similar error:
please help, Kind regards, |
in the script by default the agent identifier is set to a not existing one : that is not accepted by the growatt server You can change it with an argument as suggested in the readme (see flop9999) Or you can change the line iwhere it is defined into a real agent, but then you have to edit the python package in your sitepackages directory. For all your error lines the cause is the agent identifier thats not accepted. (I hope this gives you a hint how to proceed.) |
@sledgemhammer Thanks for you comments, I can get further with this. |
Hi,
I just updated to 1.5.0; the previous versions last worked for me a few months ago.
I changed the URL with the previous version but had no luck.
After updating, I'm still getting:
HTTPError Traceback (most recent call last)
ipython-input-4-06dc7ac3e99d in module
10
11 api = growattServer.GrowattApi(False, "adgahtwq3241")
---> 12 login_response = api.login(username, user_pass)
13 print("Add random ID to default User-Agent")
14 print("User-Agent: %s\nLogged in User id: %s" % (api.agent_identifier, login_response['userId']))
...
Further down:
HTTPError: 403 Client Error: Forbidden for url: https://openapi.growatt.com/newTwoLoginAPI.do
I have tried with:
api = growattServer.GrowattApi(False, "something")
api = growattServer.GrowattApi(True)
api = growattServer.GrowattApi()
All give the same HTTPError: 403.
Am I doing something wrong? I'm a Python novice.
The text was updated successfully, but these errors were encountered: