-
Notifications
You must be signed in to change notification settings - Fork 51
feat: add v4 for code login #486
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
Conversation
@Lash-L The new Code run agains
|
I think it doesn't know think your account exists and it is trying to make it. Make sure your email is right in the Roborock app. Then check that your region is US and not a different country. |
Yeah it makes no sense given the flow should be either password or code. It retrieves the code just fine, indicating the email does in fact exist. I can log in with either mode in the app. Are you reverse engineering the API endpoint or do you have a route description for the login w code for v4? Alternatively, do you know of any data passed back from the API or a route to get an accounts version number? I assume I'm working w a v4 account as code retrieval works but who knows |
And yes, I'm using a working email that allows both code and password login via the app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comment, can be fixed in a follow up if you want to merge this to avoid another approval step.
else: | ||
raise RoborockException(f"{code_response.get('msg')} - response code: {code_response.get('code')}") | ||
|
||
async def sign_key_v3(self, s: str) -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be _sign_key_v3
to keep it private?
All my work is reverse engineering. The only reason I could think of is when you make a new account - it will ask for a code then ask you to set a password. It uses the same flow. I could potentially reverse engineering password login and we can see if that works better for you |
Roborock is keeping me on my toes...
All new accounts have to login via the v4 endpoint (existing accounts can login with it as well) as accounts are now per country. i.e. you can make a new account in Cambodia with the exact same email.
Fixes #485
We will need to figure out how to get the user to specify their country code and country abbreviation, open to any ideas via a follow up or in HA itself.