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.
Open Bluestacks and install the Roborock app from the play store
Login to the Roborock app and make sure the vacuum is added. (I did this on my phone months ago)
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/
Extract BSTweaker 5 to your PC. Open BlueStacksTweaker5.exe.
In the “Main” tab click on “Force Kill BS”
In the “Root” tab, click “Unlock”
Go back to the “Main” tab and click “Start BS”
Next on the same tab click “Install SuperSU” and then “Update SuperSU” when the first is done.
Start Bluestacks again and check that it is successfully rooted. You can download something like “Root checker Basic” from the play store
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.
On the right hand nagibate to /data/data/com.roborock.smart/files/rr_cache/
Look for a file called starting with “rr_tuya_” and ending in a bunch of numbers. For example. “rr_tuya_145367”
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.
Navigate to the location you copied the file and rename the “rr_tuya_???” to “rr_tuya_???.zip”
Now unzip the file inside and open it.
Inside this file look for “localKey”, this will be your token.
Next look for “devId”, this will be your Device ID.
Inside Home Assistant go to integrations and add Roborock.
Enter the Name, IP, and the newly discovered Token and Device ID.
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!
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
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
Yes I’m currently writing a script on host boot.
This is a workaround of course, I am hoping Roborock will get it’s own addon (I do use hassio)
For reference, the script for installing npm into hassio docker container is docker exec -it $(docker ps -q --filter "name=homeassistant") apk add update nodejs npm
update:
So, the scripts need to be ran only once after HA has started. As a slightly better workaround, I’ve implemented the following Nodered flow based solution:
It uses docker-container-actions and the HomeAssistant nodes, and basically checks if nodejs is installed in the container and, if not, installs it (using Docker Container Execute APK commands) and restarts Home Assistant.
This can be my semi-stable workaround until easier and better support is made
So, having grabbed the API key and device ID thanks to JohanPotgeiter’s guide, I’m now stuck with missing npm and nodejs. As I’m using HassOS, is there currently a way of installing those?
Hi, I followed your instructions to the letter, but when unzipping I’m left with a empty file, only containing two brackets “[ ]” when opened i notepad++
Am i missing something? Does it matter what kind of zip tool I use?
Did you add the Robot to the app on Bluestacks or did you login to find the device there? You have to see the device in bluestacks. If you see the device in the app then I would send the vacuum to do something. The point is that the app needs to write the file. Currently your file is empty.
Sadly having the same issue here with HassIO supervised installed on top of ubuntu server. NPM is there but homeassistant cannot escape the docker container ;).
Yet I wanted to share something I found out. If you go with bluestacks there is no need to do the rooting procedure. There is a su available in: