Connecting Vorwerk Kobold VR200 to openHAB2

Hi @Pavion
My account won’t come online - checked login an password twice.

grafik

after putting in the login the plugin shows connection error

grafik

:frowning:

btw: I’m using new account (Vorwerk switched app)

I can confirm your issue now. I’ve reapplied the vendor fork to the current Neato master and discovery seems to work again. I couldn’t test everything yet, but you’re welcome to see a changelog and try the latest release yourself:


BR Pav

@Pavion: Do you use the “MyKobold App”?
I’m still not able to login…

grafik

I don’t really know as it’s actually not my own device/account. I’m having an username (email) and password, and both are still working. Could you please check whether your binding is installed properly in Karaf:

277 x Active x  80 x 2.5.11.202011221656     x openHAB Add-ons :: Bundles :: Neato Binding

There should be just this one entry set to active.
If your issue persists, please enable DEBUG for this binding:

log:set DEBUG org.openhab.binding.neato

and PM me a corresponding log excerpt (please don’t forget to set it to ERROR again).

Up and running

I switched from the old Vorwerk-App to the new MyKobold-App. I hardly remember there were some changes in communitacion with the server - other address maybe??

event.log

2020-11-24 20:54:47.749 [hingStatusInfoChangedEvent] - 'neato:neatoaccount:bf15bc3d' changed from UNINITIALIZED to INITIALIZING
2020-11-24 20:54:47.800 [hingStatusInfoChangedEvent] - 'neato:neatoaccount:bf15bc3d' changed from INITIALIZING to ONLINE
2020-11-24 20:55:25.859 [hingStatusInfoChangedEvent] - 'neato:neatoaccount:bf15bc3d' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Error when sending Authentication request to Neato.

setting log to debug doesn’t give any entry into openhab.log

grafik

edit:

found something

20:55:25.264 [DEBUG] [.internal.handler.NeatoAccountHandler] - Attempting to find robots tied to account
20:55:25.822 [DEBUG] [.internal.handler.NeatoAccountHandler] - Error when sending Authentication request to Neato.
java.io.IOException: Server returned HTTP response code: **403** for URL: https://vorwerk-beehive-production.herokuapp.com/sessions
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1903) ~[?:1.8.0_272]
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1501) ~[?:1.8.0_272]
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268) ~[?:1.8.0_272]
    at org.openhab.binding.neato.internal.VendorVorwerk.executeRequest(VendorVorwerk.java:66) ~[?:?]
    at org.openhab.binding.neato.internal.handler.NeatoAccountHandler.sendAuthRequestToVorwerk(NeatoAccountHandler.java:153) ~[?:?]
    at org.openhab.binding.neato.internal.handler.NeatoAccountHandler.authenticate(NeatoAccountHandler.java:118) ~[?:?]
    at org.openhab.binding.neato.internal.handler.NeatoAccountHandler.getRobotsFromNeato(NeatoAccountHandler.java:100) ~[?:?]
    at org.openhab.binding.neato.internal.discovery.NeatoAccountDiscoveryService.findRobots(NeatoAccountDiscoveryService.java:57) ~[?:?]
    at org.openhab.binding.neato.internal.discovery.NeatoAccountDiscoveryService.lambda$0(NeatoAccountDiscoveryService.java:74) ~[?:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_272]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_272]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_272]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_272]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_272]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_272]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_272]
20:55:25.857 [WARN ] [ommon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.NullPointerException: null
    at org.openhab.binding.neato.internal.handler.NeatoAccountHandler.authenticate(NeatoAccountHandler.java:129) ~[?:?]
    at org.openhab.binding.neato.internal.handler.NeatoAccountHandler.getRobotsFromNeato(NeatoAccountHandler.java:100) ~[?:?]
    at org.openhab.binding.neato.internal.discovery.NeatoAccountDiscoveryService.findRobots(NeatoAccountDiscoveryService.java:57) ~[?:?]
    at org.openhab.binding.neato.internal.discovery.NeatoAccountDiscoveryService.lambda$0(NeatoAccountDiscoveryService.java:74) ~[?:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_272]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_272]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[?:1.8.0_272]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[?:1.8.0_272]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_272]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_272]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_272]
20:55:25.859 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'neato:neatoaccount:bf15bc3d' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Error when sending Authentication request to Neato.

Well… that’s weird. I’m using Postman to test my API calls.
The authentication is made per POST:

https://vorwerk-beehive-production.herokuapp.com/sessions?email=myemail@mail.com&password=secret

No other parameters are required, no special headers (beside Host) are needed.
For my credentials I’m getting a valid response with access_token and current_time.
I’ve tried several different variants and the only case I’d get a 403 is when I was using wrong credentials (wrong email or password).
Could you please recheck your credentials? If you’re an advanced user, would you please check Postman or any other tool for yourself?

P.S. As a byproduct I can confirm this Beehive is still not quite OK:

net::ERR_CERT_COMMON_NAME_INVALID

which is why this fork was needed at first place.
However, it’s possible that your vacuum became an update and a new beehive to address.

Update: it looks like Vorwerk now uses an additional OAuth layer (according to fhem)

https://github.com/fhem/BOTVAC/blob/dev/FHEM/70_BOTVAC.pm

I admit I’m not sure I could reproduce this approach, not that late today in any case :confused:

Update #2: similar approach is used here:

https://github.com/nicoh88/node-kobold

It really looks like using Kobold App forces usage of OAuth :frowning:
Can anyone confirm it? Any thoughts on this?

1 Like

sorry I’m afraid I can’t help with this!

Hi together! For all of you stuck with new Kobold App and willing to participate :sunglasses:

I’ve now installed the new App, updated my account and am also using OAuth with email confirmation.
Fun fact: my fork was still working :face_with_raised_eyebrow:

It looks like having both serial and secret_key is enough for a vacuum handling so no further authentication is required. Thus a new vacuum can be defined in a .things file as following (yes, with dummy credentials!)

Bridge neato:neatoaccount:be553d21 "Neato Account" @ "Flur" [ email="dummy@dummy.com", password="dummy", vendor="vorwerk" ] {
    Thing vacuumcleaner 4ABCDEFG-123HIJKLMNOP "Vorwerk Kobold" @ "Flur" [ serial="4ABCDEFG-123HIJKLMNOP", robot_serial="4ABCDEFG-123HIJKLMNOP", secret="12345678901234567890123456789012", name="Kobold", vendor="vorwerk"]
}

Obtaining this secret_key however is a bit tricky and requires using new OAuth. If you don’t know yours, you can follow this guide (curl required):


It it worked, you’d get a VERY long id_token
With this token you can execute a third command:
curl --location --request GET 'https://beehive.ksecosys.com/dashboard' \
--header 'Authorization: Auth0Bearer VERY_LONG_ID_TOKEN'

You should now receive a list of all your vacuums with their serial and secret_key.

A confirmation of this behavior would be nice.
If confirmed, I don’t think I’ll implement OAuth in a fork. It would still require email confirmation and too much code change besides and would only affect autodiscovery. Rather I’d write a small guide or a simpler script and keep my fork lightweight to better keep up with the master.

1 Like

this totally crashed my config.
I say thank you for the support in the past years!
for me this plugin is dead :frowning:

Hi together!

I’ve upgraded to OH3.0 and am glad to present a new fork release:

Some information to clarify the latest discussion:

Due to changes to both Neato and Vorwerk authentication you can’t authenticate with email and password anymore. If you already have your serial and secret, you don’t even need a Bridge and can create a Thing directly.
If you don’t have them, you will have to execute some curl requests.
See release notes / readme for both.

I’ve tried the whole workflow several times, it runs on my master system and I’m not aware of any crash possibility while or after obtaining those but it’s as always up to you to try it or to pass.

Feedback appreciated!

5 Likes

Thanks you still update this binding - I hope you merge it with the neato binding one day (I read the other topic here) and this becomes a part of openHAB-stable.
Are you working on autodetect as well?

Well, now I’m really considering to merge my fork into the official binding.

If you’ve read the other topic or my latest release notes you might have noticed that my autodetection is already working with oAuth token supplied. The issue is in obtaining this token.

For Vorwerk you can use the routine from node-kobold above. I’ve tested it myself and it should suffice for most users (yes, it’s an advanced step but you’re using openHAB here :slight_smile:)

For Neato is no such solution known yet but it seems possible / similar.

So the case is:

  • There is no password/email support anymore
  • Neato master is struggling with same issues
  • Due to openHAB architecture it’s not easy to implement a two-step-authentication
  • You don’t really need it or Bridge at all if you’re already having your secret

This said, I assume no better solution will be available for a long while… and why bother!?

So I must ask you and everyone here: would you please test the latest release and the whole routine? What crash potential are you seeing or have encountered already? What could be better documented? What additional support you’d wish?

1 Like

Thank you for your support for such a long time.
i have upgraded these days to OH3 and have my serial + secret keys.
I have no bridge as you mentioned in your post but i get following error:

COMMUNICATION_ERROR
Error attempting to communicate with Neato

What should i do?

From here your serial & secret are looking too short.

12 digits: secret
8 digits: serial

Serial:
XXXXXXXX-XXXXXXXXXXXX (8 " hyphen" 12)
Secret:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX (32)

same here (randomized):

Thing neato:vacuumcleaner:be221211 "Vorwerk Kobold" @ "Home" [ serial="4XPITR1G-2CA207161C25", secret="61AC07FFACC223D10612BACCC6414122", vendor="vorwerk"]

Just discovered Windows 10 now having built-in curl (yes, it’s really ugly).
If you’re on Windows you can try following in your cmd
please don’t change any quote or space, it’s high tech stuff xD

  • Enter your email below and execute:
C:\Windows\SysWOW64\curl.exe -X "POST" "https://mykobold.eu.auth0.com/passwordless/start" -H "Content-Type: application/json" -d {\"send\":\"code\",\"email\":\"ENTER_YOUR_EMAIL_HERE\",\"client_id\":\"KY4YbVAvtgB7lp8vIbWQ7zLk3hssZlhR\",\"connection\":\"email\"}
  • Wait for a mail from Vorwerk, then quick enter again your mail and your received 6 digit token below and execute:
C:\Windows\SysWOW64\curl.exe -X "POST" "https://mykobold.eu.auth0.com/oauth/token" -H "Content-Type: application/json" -d "{\"otp\":\"TOKEN0\",\"username\":\"ENTER_YOUR_EMAIL_HERE\",\"prompt\":\"login\",\"grant_type\":\"http://auth0.com/oauth/grant-type/passwordless/otp\",\"scope\":\"openid email profile read:current_user\",\"locale\":\"en\",\"source\":\"vorwerk_auth0\",\"platform\":\"ios\",\"audience\":\"https://mykobold.eu.auth0.com/userinfo\",\"client_id\":\"KY4YbVAvtgB7lp8vIbWQ7zLk3hssZlhR\",\"realm\":\"email\",\"country_code\":\"DE\"}"
  • Grab your very long token ID, insert it below and execute (or use autodetection instead):
C:\Windows\SysWOW64\curl.exe --request GET "https://beehive.ksecosys.com/dashboard" --header "Authorization: Auth0Bearer MY_VERY_LONG_TOKEN_ID"
  • You should see your robots.

All credit for this solution goes to nicoh88/node-kobold
Confirmation pending.

1 Like

thank you!

This curl commands are little bit bulky but it works again :metal: .

I am going to monitor if there are some abnormalities and report back but i have a good feeling that it is as stable as it was at OH2

Thanks for reporting back, I’m glad I could help!
I’ll consider to push both cmd and bash scripts to my repo and link them in the readme.