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

Did ewelink change their API? #3

Open
jnavascues opened this issue Jul 7, 2022 · 4 comments
Open

Did ewelink change their API? #3

jnavascues opened this issue Jul 7, 2022 · 4 comments

Comments

@jnavascues
Copy link

Today i found out that my automatizations were off which was very weird, I'm using a few smart reles with ewelink and so far they were working flawlessly.
Debugging a bit I see there is an issue while login to ewelink service.
are you guys seeing the same thing?

File "/eweapi.py", line 77, in process_health
await client.login()
File "/ewelink/client.py", line 53, in login
self.user = ClientUser(data = await self.http.login(), http=self.http)
File "/ewelink/models/user.py", line 32, in init
self.email: str | None = data.get('email', None)
AttributeError: 'NoneType' object has no attribute 'get'
{'error': 403, 'msg': 'Sign:oauthClient enable invalid'}
Unclosed client session

@jnavascues
Copy link
Author

Found the Issue!
you need to update the Appid and Secret from the constants file

appId: 'R8Oq3y0eSZSYdKccHlrQzT1ACCOUT9Gv'
appSecret: '1ve5Qk9GXfUhKAn1svnKwpAlxXkMarru'

@anthonygorecki
Copy link

Hi, I've also been working with this okay for some time and it stopped working a little while ago. I was searching for an answer until I saw your post here. Updating these app details also fixed it for me. Can you briefly explain how you got the updated values? Also is this something that needs to be periodically updated (expires)?

@jnavascues
Copy link
Author

I got it from here.
AlexxIT/SonoffLAN@0953942
Looks like there are a lot of projects using these credentials and 5 days ago ewelink dropped the one we were using.
Not sure how much time this one will last but at least I added some trycatchs so next time at least I will get notified instead of just failing silently.

@emile-o
Copy link

emile-o commented Feb 7, 2023

Thanks @jnavascues ID and Secret change worked.
You can create your own with Ewelink here https://dev.ewelink.cc/

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

3 participants