-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
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
Neato/Vorwerk Integration fails with "Invalid Credentials" #39378
Comments
neato documentation |
If they added 2fa then we need the parent library fixed and that goes beyond my understanding. Do you get a text message with the code or something after logging in? |
Can you try to interact with the parent library as outlined here https://github.com/stianaske/pybotvac then open a issue there with your results. |
Hi, yes via email a code is sent |
This I would assume only be related to Vorwerk and would not be a Neato issue? |
Try to use token-based authentication. I know that neato supports oauth, which is token based |
I have the same issue that I moved to the new App and can now not use my Vorwerk anymore with Hass. |
Im also very happy to help in any way possible, as i moved mine to the new app, before checking HA compatibility. |
I have done some research. Neato supports an OAuth flow, which means we can work around this problem. Currently pybotvac only supports stateful authentication. This requires the application to log into the account using the user's credentials. Obviously this does not work with 2-factor authentication. OAuth is not really stateless, but works token-based. As a result, the user has to enable the application once via 2FA so that the application can request access tokens. These tokens can be used, for example by hass, to authenticate requests against the Neato API. Unfortunately as far as I know, pybotvac does not yet support token-based authentication. Please correct me if I am wrong. The best and maybe only solution to achieve this would be for HA to manage the OAuth flow. This is necessary because HA must redirect the user to Neatos login page and HA is able to store all access and refresh tokens. Pybotvac has to accept valid access tokens for each request. Therefore every public function must accept an optional parameter Additionally, we have to adapt neatos Any opinions? I am not an expert, so please correct me if I said something wrong. Documentation: |
@Santobert dropping support of yaml sounds good to achieve this. I think also using the built-in HA methods are the right way to go since that is why they are there. If you need to make changes to pybotvac then I would be hesitant since I have not seen activity there in some time. I submitted a PR earlier to allow us to clear the current alert but have not heard back yet. |
Tbh, I'm not sure I have time for this. Any help is welcome! Furthermore, I don't have any Vorwerk bots here, so I can't verify if OAuth can solve this problem. We definitely need to make changes to pybotvac. Unfortunately, I have another unmerged PR since October 2019. @dshokouhi do you mind writing an E-Mail to @stianaske ? Our next steps should be:
|
@Santobert Sorry about the unmerged PR. I'll look into that one right away. I would also be happy to accept a PR where we change to using OAuth if you guys need that to support additional robots. |
Can someone with a Kobold please test if this branch works? You just have to install pybotvac and run The corresponding changes to HA are prepared here: |
Any updates? The changes can be tested as follows
|
Hey, Thanks |
Thanks for your answer. You can find me on Discord as Santobert#6222. Don't edit your existing setup. This is not necessary. |
Sent a friend request on discord. |
Thanks alot for your work Santobert. I was just trying to log into https://developers.neatorobotics.com/ but cant. In the new kobold app you dont actually get to set a user password, you put in your email and then you are send a code that you use to log in. I tried loggin out and then asking for a new code to log in, but that code didnt work on there either. |
The current situation is as follows:
Tbh, I do not know how to proceed here without further knowledge or documentation. |
I have been playing around with fiddler to see how the app authenticates and get the credentials. The app makes a POST call to https://mykobold.eu.auth0.com/passwordless/start with a body that contains This will make the server send the user a code to the email used. When that code is entered the app makes another POST to https://mykobold.eu.auth0.com/oauth/token with body This will return a token that is used for. https://beehive.ksecosys.com/ |
@9kon Thank you. It is good to know what is happening there. The described procedure is more or less an OAuth flow. In fact it seems to be an OpenID Connect flow that extends OAuth2. Even though I don't recognize the passwordless thing. OAuth: https://darutk.medium.com/the-simplest-guide-to-oauth-2-0-8c71bd9a15bb
Unfortunately, we still need a |
@9kon could you read the client is clear text when the app sends the data? |
https://github.com/nicoh88/node-kobold The issue seems to be solved for the js library. I'll take a look at their solution soon. @9kon have you captured the same client_id, that is mentioned there? Can you please find differences and similarities between the flow you captured and the one described in the repository? |
It's kind of hard for me to work on it because I don't have a Vorwerk bot. If someone else wants to help, don't hesitate. Things to know:
Things to do:
|
Update: The current implementation of pybotvac works so far for Neato and Vorwerk. Furthermore the old authentication via username and password is still possible next to modern OAuth2 (neato) and Passwordless Auth (vorwerk) mechanics. All these features will be available within on of the next releases of pybotvac. I can't keep working on this issue because I don't know enough about the Auth-Flows of HA and I don't have a Vorwerk robot to do tests. But I offer every possible help for someone who wants to jump in. Since pybotvac works so far with both vendors, it's only the HA integration that is missing. I've talked to Balloob on Discord. We came to the conclusion that it would be easier to separate Neato and Vorwerk in the future. As a result, Vorwerk would get its own integration to support its own |
Can't we just make a copy of neato component and have it work with Vorwerk? Are so many differences in order to make to component? |
In fact, that's the plan. Besides the different auth mechanisms there are no differences. Therefore the config flow and parts of the initialisation are different. The platforms itself (vacuum, sensor, switch, ...) are the same. |
I have a Vorwerk vacuum! Unfortunately don’t know how to code! It’s sad to loose the integration since I have several automations running on it...😤 |
So anyone can help vorwerk users or are we just be left without being to use the vacum in home assistant? |
Hope it is okay to link this here but I think a lot of people might find this here: https://community.home-assistant.io/t/creation-of-vorwerk-kobold-component/253166 Upvote this for new Vorwerk Integration. |
Let's close this issue since #44031 is merged |
The old Vorwerk app is being phased for a new 2FA based app (MyKobold) from Vorwerk. The Neato/Vorwerk integration is failing with "Invalid Credentials", I assume because of this new requirement.
Environment
Problem-relevant
configuration.yaml
Traceback/Error logs
2020-08-29 14:30:43 ERROR (SyncWorker_19) [homeassistant.components.neato] Invalid credentials
Additional information
The text was updated successfully, but these errors were encountered: