Skip to content

Commit

Permalink
Use new login API
Browse files Browse the repository at this point in the history
  • Loading branch information
Sjord committed Sep 14, 2021
1 parent e72420f commit 69b0a22
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion growatt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,13 @@ def login(self, username, password):
"""
password_md5 = hash_password(password)
response = self.session.post(
self.get_url("LoginAPI.do"),
self.get_url("newLoginAPI.do"),
data={"userName": username, "password": password_md5},
)
try:
result = self._back_success_response(response)
self.logged_in = True
result["userId"] = result["user"]["id"]
return result
except GrowattApiError:
raise LoginError
Expand Down

1 comment on commit 69b0a22

@WynandPrivate
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't login successfully anymore using this change. It worked until a few days ago, but not anymore. I have tried to login using the previous login API (LoginAPI) and this works, but none of my other API calls (new...) work anymore.

Please sign in to comment.