[RELEASE] Roborock Robot Vacuum

Update 1.1.0 now in HPM and gitHub to support scenes (aka routines). :crossed_fingers:

This is first pass, so might have some bugs. I query for the scene data, and remove anything not associated with current device id. Then build a json map struture for the scene attribute, similar to rooms.
image

Use the scene key (scene id) to start the routine. You can pause, then use appRoomResume to continue.
image

It will update at some point, but you can press refresh after initial code to update immediately.

5 Likes

Like you, I couldn't find anyone that had a solution, so I had to resort to reverse engineering. The app knows about Routines, and I confirmed that it wasn't stored on the phone because I could see them on my wife's phone when sharing device access. So I grabbed a copy of the Android Roborock APK, opened it up, and went spelunking. Discovered the classes2.dex file has a lot of strings that look like URLs, so started experimenting with those.

These are a bunch of the URL strings I found in that file. There may be more.
(In retrospect, you might want to GET on "user/scene/device/{deviceId}" instead.)

user/account/delete
user/account/email/unbind
user/account/mobile/unbind
user/agreement/cancel
user/agreement/sign
user/app/info
user/config/messenger
user/devices/newadd
user/devices/{duid}
user/devices/{duid}/extra
user/devices/{duid}/jobs
user/devices/{duid}/jobs/{jobId}
user/devices/{duid}/lw
user/deviceshare/accept
user/deviceshare/cancel
user/deviceshare/query/receiveddevices
user/deviceshare/query/shareddevices
user/deviceshare/query/{duid}/rooms
user/deviceshare/query/{duid}/users
user/deviceshare/reject
user/deviceshare/remove
user/deviceshare/share
user/homes
user/homes/{homeId}/rooms
user/homes/{homeId}/rooms/order
user/inbox
user/inbox/delete
user/inbox/latest
user/inbox/latest/detail
user/password/change
user/password/check
user/rooms/{roomId}
user/rooms/{roomId}/device/all
user/rooms/{roomId}/name
user/scene
user/scene/device/{deviceId}
user/scene/home/{homeId}
user/scene/list
user/scene/order
user/scene/validity
user/scene/{id}
user/scene/{id}/execute
user/scene/{id}/name
user/scene/{id}/param
user/scene/{id}/triggers
user/scene/{sceneId}/enable
v2/user/homes/{homeId}
v2/user/scene

1 Like

Fantastic.

I have a S7 MaxV and it works fine.
I just don't have a use case for this yet.

1 Like

Thanks. I chose CN and then it showed the base URI as https://euiot.roborock.com

Unfortunately it doesn't log me in, even after choosing EU. I do have my Facebook attached, but not sure if that matters?

It probably does matter since you would need to use an OAuth authorization against FB. HE drivers do not support OAuth redirects and that would require building out a full HE application to support (if even possible). Sorry, but I can't support that type of authorization.

No problem. I did actually remove the Facebook connection, and waited, but it did not help.

Not sure next steps here. Do you have any special characters in your username or password?

No worries, not looking for any next steps per se. Just want to communicate my findings.

My username is my gmail email address, and the only special character is then the @ sign. My password does not contain any special characters either.

The error message is simply that login failed.

Do you think it is possible to get more granular error messages?

Hi,
First, Great work, i've been searching for something like this for a long time! :slight_smile:

If that helps, I am too using my gmail as my username and getting the same login failed error Kulfsson gets.
Wen't to Xiaomi web site and tried logging in with my gmail and password and it worked.

Good luck! :crossed_fingers:

@Lior Can you send me that website? I was only aware you could log in via the mobile applications.

@Kulfsson How did you establish your initial account?

@Bloodtick_Jones Sure! i logged in from here:
https://account.xiaomi.com/
Hope it's the same account and not two different accounts i made with the same password :sweat_smile:

@Lior sent you a private message, but it sounds like you can only link to Roborok or Xiaomi, but not both. This integration expects the device to be on the Roborock solution to authorize.

I don't know this for sure, but sounds like the case here.

Been watching this thread and finally got it installed. Can confirm this works with my Q8 Max+. Thank you for your efforts maintaining this community driver!

1 Like

Blockquote
@Kulfsson How did you establish your initial account?

I did it in the Mi home app, many years ago. I see in a comment by you futher down that you mention a difference between Xiaomi and Roborock. I downloaded the latest version of the driver with the debug and got a message there that might indicate something. I can share in our direct chat.