@Justin has made the fantastic Roborock Vacuum Cleaners app with an extensive list user guide. I just wanted to write down step by step what I did to get it working, for posterity and possibly someone else’s benefit.
- Make sure your Homey and Roborock Vacuum cleaner is on the same Wifi, that the Roborock is set up, a map is created and that you’re using the Xiaomi Home app on your phone to control the vacuum - NOT the Roborock app.
- Install the Roborock app on Homey.
- In your wifi router, set the Roborock to use a fixed IP.
- Find out the “token” of your Roborock with this app: Get_MiHome_Devices_Token. Install on Mac or Windows and run it.
Use your app login credentials and… try the find out token function many times. It can take 20 tries before it suddenly works. Copy the token and IP address somewhere you can access on your phone (I used an Apple Notes note so it showed up automatically on my phone). - In the Homey app, add a new Device, choose Roborock app, choose your model, press “Let’s connect your Roborock” and input the IP address and access token. Press Start connecting device.
The Roborock should now be useable.
HOW TO GET ROOM IDs
Homey can tell the vacuum to go clean specific rooms. However, you need to find out which room ID is connected to which room. The map already needs to be mapped for this (just let the vacuum run in either cleaning or mapping mode, use the app to name and save the map).
-
Create a new Flow, and choose WHEN> Roborock, Rooms have changed, THEN> Send a Push notification to a user, “Rooms have changed for Roborock: (local tag: Rooms)”.
-
In the Xiaomi Home app, go to the menu in the upper right corner of the Xiaomi Home app, Edit the map, Edit room, split them and then NAME your rooms. Only rooms with names will get IDs.
-
When you change the rooms, you will get a push notification from the flow with a list that looks like this: “16, 17, 19, 20, 21, 22, 23”.
-
Now for the boring part; finding out which room is which. Make a Homey flow like this: WHEN> This flow is started, THEN> Roborock, Clean your room 16. Start the flow and open your Xiaomi Home app and check on the map which room is being targeted. It will be highlighted in a few seconds.
-
Write it down, alter the flow to test the next number you got from the push notification in step 3, and repeat until you know all rooms.
I’ve made flows for every room and some that I want to clean together, just do a comma between the room numbers in the flow.
HOW TO GO TO A SPECIFIC POINT
One great function is to be able to send the Roborock to a specific point. The Dock is always coordinates 25500, 25500. 26500, 26500 is one meter to the right, one meter further up on the map. I trial-and-error:ed it until I found out where my waste basket was located:
COUNTING THE CLEANING RUNS AND AUTOMATED “EMPTYING”
Now I wanted to make sure that it wouldn’t go days on end with a full waste bin.
- In the Homey app, create a new Number variable called “Roborock counter” (in my case it’s Herbert counter, because the Vacuum was named Herbert by my daughter ).
- Create a Flow WHEN> Roborock status changed to… Cleaning, THEN> Logic: Calculate Roborock counter as "{{(Local Tag: Roborock Counter)+1}}.
- Create another Flow: WHEN> Roborock Status changed to… Docked AND> Logic: Roborock counter is more than 2, THEN> Start Flow: Roborock to Wastebin, Send notification to Johannes “Time to empty the Roborock”, Logic: Set Roborock counter to “0”.
HOW TO AUTOMATIC CLEAN WHEN AWAY
This one is very popular and can be done different ways. The easiest is "WHEN> The last person leaves the house, THEN> Roborock: Start cleaning.
You can also do WHEN> The first person arrives home, AND Roborock: status is Cleaning, THEN Roborock Go to dock.