[Custom Component] Roborock communication

I tried both,
Installed genymotion > Galaxy S8(Android 8) > Genymotion-ARM-Translation_for_8.0 > Open Gapps
No Roborock app available in GPlay, Tried to install from Apk with error.
Can you please post your genymotion setup details?

I am confused… How do you see these? I just get encrypted files from my S6MaxV.

Very interesting, thank you for your work on this. I don’t have a rooted phone, is there a way to run an android virtual machine with root or something to obtain the key?

Try using ApkPure to manually download the APK, and just drag in to genymotion, worked for me

Try using Genymotion or Bluestacks (I used the prior)

What is the best way to get the code for iPhone / Windows user ? where can I find the detailed guide assuming there is one?

Does this HACS integration work on supervised home-assistant (formerly Hassio) ?

p.s.
Please share your feedback on Roborock in general and this custom integration in the following thread so that other people considering this device will benefit from the full picture:

Look in this thread, MaxV not supported

@Graig_Burton, @ghvader reported 13 days ago that he found the token info of a S60 MaxV in rr_rr_xxx file.
Am I missing something? Apart your note about the MaxV not being supported :slight_smile:

The key is elsewhere as it is not communicating with Tuya, thus, not supported by this component.

@Craig_Burton, thank you for the explanation

I found this recently and wanted to share incase it helps anyone with ideas on how to implement w/o API.

For anyone who read this thread and still had no idea what should be done to get the Roborock token when you use the Roborock app. This post is for you. This is what I did and it worked like a charm. I used windows 10.

  1. Download and install Bluestacks 4 https://www.bluestacks.com/
  2. Open Bluestacks and install the Roborock app from the play store
  3. Login to the Roborock app and make sure the vacuum is added. (I did this on my phone months ago)
  4. You now need to “root” Bluestacks to get access to the folder you need. This can be done with BSTweaker 5. You can download it from https://bstweaker.tk/
  5. Extract BSTweaker 5 to your PC. Open BlueStacksTweaker5.exe.
  6. In the “Main” tab click on “Force Kill BS”
  7. In the “Root” tab, click “Unlock”
  8. Go back to the “Main” tab and click “Start BS”
  9. Next on the same tab click “Install SuperSU” and then “Update SuperSU” when the first is done.
  10. Start Bluestacks again and check that it is successfully rooted. You can download something like “Root checker Basic” from the play store
  11. Go back to BSTweaker 5, goto tab “FM”. The right-hand side will be your Bluestacks system and the left hand your local windows system.
  12. On the right hand nagibate to /data/data/com.roborock.smart/files/rr_cache/
  13. Look for a file called starting with “rr_tuya_” and ending in a bunch of numbers. For example. “rr_tuya_145367”
  14. Select this file by clicking on it. Select a location on the left and click “Copy”, above the right hand window on the right top.
  15. Navigate to the location you copied the file and rename the “rr_tuya_???” to “rr_tuya_???.zip”
  16. Now unzip the file inside and open it.
  17. Inside this file look for “localKey”, this will be your token.
  18. Next look for “devId”, this will be your Device ID.
  19. Inside Home Assistant go to integrations and add Roborock.
  20. Enter the Name, IP, and the newly discovered Token and Device ID.

That is it you are done.

3 Likes

And this works with the native Xiaomi Vacuum component? Or does this require the custom component in this thread?

This is simply an alternative way of getting the localKey and devId. The custom component is still needed.

I understand. Thank you for clarifying.

To clarity even more; the custom component is not needed for e.g. the s5 max, because it does have tuya software, right?
I hope to confirm this using your steps later today, @JohanPotgieter
Thanks so far!

It uses the standard Tuya protocol. However, it is the standard Xiamoi Mi commands that are sent, they are just encrypted first and sent over.

This custom component bridges the gap and allows to use the latest Roborock app, alongside home assistant for the vacuum

2 Likes

Yes. I was perfectly able to retrieve the tokens, thank you. Next issue is the missing npm on my HA.
I’m running docker on an ubuntu server with hassio, any tips to get it working @bernhard ? I’m fairly new to this no hassio setup

For reference, I’ve installed the custom component by adding a custom repo and getting the Roborock integration from this repo in HACS

Hi,

you need to create a new docker image.
you take the official HA image as a base and add npm to it like in this post: [Custom Component] Roborock communication

create an empty directory somewhere on your server, add a file called “Dockerfile” and put the content in.

1 Like

Yeah thanks, that’s the info I needed.
For this route, I need to find out how and what services to expose. Which I fine, but I’m thinking about w workaround; issue container command pkg add on the running HA container.

Can confirm my HA now sees my s5 max vacuum, using latest firmware