[HOW TO] Get started with Roborock vacuums in Homey

@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.

  1. 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.
  2. Install the Roborock app on Homey.
  3. In your wifi router, set the Roborock to use a fixed IP.
  4. 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).
  5. 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).

  1. 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)”.

  2. 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.

  3. 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”.

  4. 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.


  5. 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.

  1. 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 :smiley: ).
  2. Create a Flow WHEN> Roborock status changed to… Cleaning, THEN> Logic: Calculate Roborock counter as "{{(Local Tag: Roborock Counter)+1}}.
    Skärmavbild 2024-03-03 kl. 00.11.49
  3. 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.
Skärmavbild 2024-03-03 kl. 00.18.36

3 Likes

Cool, thanx

It can be an idea to add the room numbers, when figured out, to the room names in your mobile app, so you don’t have to create a list or stuff like that. Lists get lost :wink:

3 Likes

I just wanted to come clean and say that I was looking for that list yesterday and couldn’t find it, so I kicked myself for not following your advice Peter :grin:

1 Like

Another possibility @Peter_Kawa and @Johanneso , is to add the information to the Homey mobile app, in the new “notice” field. When i made the cleaning flows, it was smooth to use the PC-advanced flows and note the cleaning areas in the mobile app.

1 Like

Ah true that. But I still use the v6.x app, which lacks the notes field.
I misuse Homeyscript as notepad to save important notes for instance :sweat_smile: