Request Roborock App Binding

Hello all,

I have a Roborock S7 maxV Ultra and I want to integrate it into Openhab. I know it ist possible to do it with the miio Binding, but I don’t want to use the Xiaomi App. The Xiaomi App will not have the full functionalities as the Roborock App. I found out in the IO forum that it is possible to connect to the Roborock API. I tried out some scripts and it worked to get connection and some data. My experience in programming is not really good, so hopefully someone can generate a Binding for the Roborock API.

I think this would be very useful, because I have seen there are a lot of people who asked about it.

Thanks !

Mike

3 Likes

I’m also interested in that. Can anyone program?

You might consider to open a feature request on github and put a bounty on it. This might attract some developers to spent their free time for you.

I am also interested in this.

I have roborock s7.
I think that Xiaomi app should be needed only to extract the token.
There are several ways to extract the token… I try setting up home assistant and activating the debug log… to see the token. But doesnt’ work…
In openhab I get Error:comm i suppose because i have wrong device id… i’m not sure where i have to get. device id…

Hi,
I am working on an mqtt bridge service that provides the essentials that you can see via the Roborock app via mqtt.
I’m not creating an openhab binding because a) i don’t know how and b) it’s hard enough to debug the protocol without thinking about openhab integration.
But, since the protocol is essentially known I don’t see a reason why it won’t be possible to create a binding.
I own a S8 and things I can basically do are:

  • List homes and devices via mqtt (including some basic stats)
  • start a schema (that’s the roborock term for the routines you see on the home screen of the app
  • poll the current status (not sure that is even worth the effort, not really interested in seeing the battery drain)
  • get the map and position of things (which is still mirrored for some reason I have to investigate)
  • send the robot home (to the dock)

Using the roborock apis you don’t really need a device token. You can simply query the roborock api for the device key, which will then be used to communicate with the robot via the roborock mqtt server. Some operations, like starting a routine/schema don’t even require that, but are simple POST requests to one of the roborock apis (well, as simple as the obfuscation of the roborock api is).

Much of the reverse engineering was done and provided by rovo89 in a gist. Reading the payload of map responses is the same as for the Xiaomi app and was done by PiotrMachowski.

I’m not sure if my service will ever see the light of day, whether it will work with any other robot than the S8, or whether the whole application is way to bloated to run on my openhabian raspberry pi :person_shrugging:. I’m mostly doing it to learn Spring Boot and Kotlin (not my favorites), also for lulz and obviously automation. I’ll post again if I ever make my repository public. If there are willing Kotlin Developers who want to take a look at the source or help out, just ping me and I’ll give you access to the repo.

cheers :beers:

2 Likes

Screenshot 2023-12-04 210904

I’m running out of excuses not to publish my service. Sure it’s buggy and needs lots of improvements, but it works.
If you want to check it out, here you go

I’m aware that the instructions on how to setup and use it are … uhm … missing. It’s on the agenda. At the moment you’ll likely have to download the source code and adjust the application.yaml file and then start the whole thing with ./gradlew start (Java 17 required). I actually haven’t tried this, since I only start the application through IntelliJ at the moment.
There is a little react app in src/test/resources/map-poc for demonstration purposes (shows map, can send robot back to dock, can start cleanup routine).

Edit (1.1.2024): Instructions on how to configure and run are now in the readme, some scenarios might need more explanation.
Edit (3.1.2024): Added github actions to create releases, so you can simply download the service releases on github

In unrelated news: I read that it is possible to root the robots without disassembly see robotinfo.dev. It is definitely not recommended at the moment and there is no full valetudo support. But it looks like it might be possible “soon”.

1 Like

Do you have any updates on this and how you achieved the communication?

At the moment i’m using this:

But the Konqi solution is VERY VERY interesting:

unfortunately i have no time to migrate to this!