Xiaomi Roborock Integrations/Automation Ideas?

Had to download an older version of Mi Home.

Try the 2nd post on this reddit page:


https://www.apkmirror.com/apk/xiaomi-inc/mihome/mihome-5-4-49-release/

2 Likes

So you need to make a few updates to Mi-Connector because it uses ST by default. Get the app URL, access token and app ID from the Hubitat Mi Connector app. Then got to the settings in your Mi-Connector webpage (192.xxx.xxx:30000) and under "Smartthings Settings", paste in the values from the Hubitat app.

For the Roborock vacuums, you also need drivers. There are 2 drivers ("Xiaomi Vacuum" and "Xiaomi Vacuum2"). I don't remember the differences anymore but I know the Roborock S5 Max and S6 need the vacuum2. i think the S5 uses vacuum.

The drivers are here:

Cheers

1 Like

Thank you very much for the help, all the software is in place but I am not sure about the access token, can I use the same as listet in the Maker API App?. I tried that but I am still getting the Error in the Mi Connector App on RPi and there are no devices in the App on Hubitat.
Here are the MiConnector Settings so far:
App URL:
http://192.168.1.2/apps/api/
App ID:
2028
Access Token:
from Maker API
XXdeXX53-XXXX-XXc5-afe2-XX70dec0a053

What's the Maker API?

You need to add the device to Mi Connector running on the rPi. Click "Manage Devices" -> "Device List" -> "Add". Put in the IP address of your Roborock and the vacuum's token.

Is your Hubitat's Mi Connector App also connected to the rPi? That's the instruction I gave in the previous post GitHub - fison67/mi_connector at hubitat

@yototogblo thanks so much for your help. I managed to get the token using the old version of MiHome app, and added my vacuum to Mi Connector.

Does your vacuum still works with Roborock app? Mine seems to show not connected anymore as it is connected to the MiHome app. And if I re-pair the vacuum to Roborock app it generates a new token which breaks connection with the Mi connector.

Is that how it is or am I missing a step somewhere?

That's how it is. You can only use one of the apps.

Ok, Hubitat and rPi are connected, but the drivers do not seem to work, because I am getting the following error messages:

Log Hubitat:
app:20292020-06-10 00:46:35.938 warnFailed >> Non exist DTH!!! Type >> roborock.vacuum.s5e

app:20292020-06-10 00:46:35.934 debugData >> null

app:20292020-06-10 00:46:35.928 debugTry >> ADD Xiaomi Device id=321933331, type=roborock.vacuum.s5e

Log Mi Connector:

Date Type Content
2020-06-09 22:46:38 warn ST Smartpapps does not support roborock.vacuum.s5e DTH!!!
2020-06-09 22:46:38 info Try to register device to ST >> id=321933331, type=roborock.vacuum.s5e [1/1]
2020-06-09 22:46:33 info Initialize WiFi Device >> roborock.vacuum.s5e(321933331)

I have both drivers installed ("Xiaomi Vacuum" and "Xiaomi Vacuum2")
Can I assign the driver manually even if the device is not showing up in the MiConnector App in Hubitat?

Ah, you have the S5 Max. Make sure you're using the latest version of Mi Connector on the rPi. You'd need to update the docker image. Initially, the s5e hadn't been added so I had to add it myself. Eventually, fison67 added it and I'm now back to using his.

1 Like

Ah ok, I have already installed the latest stable arm version. There is no update available. The non-arm version does not work at all.
Do you use the beta version?
Edit: modified the App Driver in Hubitat, now it works. Thank you for your help.

Ah yes... Forgot his Hubitat code only included the s5. I also had to update the app code. Glad it's working for you now.

What edit did you have to make to the app code?

My S5 Max arrives tomorrow!

Search for
else if(params.type == "roborock.vacuum.s5"){
and change it to
else if(params.type == "roborock.vacuum.s5e"){

this assigns the vacuums 2 driver to the Roborock s5Max, I have not tried the vacuums 1 driver yet, the code suggests that the s6 uses that, but [yototogblo] said the vacuums 2 driver is the right one.
Cheers.

1 Like

It's arrived and installed, happy so far,

Though i've now realised that as it's integrated into Alexa I don't actually need it to work with hubitat. All I wanted was that when I trigger my night time routine for security alarm, lights off tv off etc that the robo would come and vacuum, I just built that command into the alexa trigger

Yikes. Vacuum when the house is super quiet and you're trying to fall asleep? They're not the loudest vacuum on the market, but they're loud enough that when it runs and I'm trying to watch tv I have to turn it up a notch to drown it out. I wouldn't want it going while trying to fall asleep, I'd end up throwing it out the window.

When I had my S6 connected to HE through mi-connector, I had a rule that started the vacuum when the house switched to away mode. That way when we leave for work, it comes out and does its thing and we come home to clean floors every day. Just needed to get in the routine of emptying the bin before we walk out the door.

I have a morning reminder in my house morning routine to empty the dust compartment, it goes hoovering downstairs at 22:30 ever night, which is normally as we're heading to bed, it takes about 35 minutes to do the downstairs so it's returning to the dock before we actually go to sleep. however it's not that loud upstairs with it running downstairs. My daughter hasn't noticed it as yet! It runs at that time as I had it running earlier but it was too loud for when we're watching TV etc. When normality resumes it'll probably go and do it whilst we're out but being as we've not left the house since March it's got to go round at some point in the day haha.

1 Like

Also with reference to my above turns out Alexa wouldn't trigger it as part of the night time routine so i'm having to use the roborock scheduler until I get my rPi.

An easy way to integrate it into Alexa is to create a virtual switch and expose that to alexa, and then use rule machine to create a rule that when alexa turns that switch on to start vacuuming.

As far as I can tell that only works if you've got the MiConnect server in place to link it to Hubitat though. I haven't got my rPi yet, waiting for payday as i've already bought the vacuum and a lot of sensors this month so more than spent up my smart home budget this month haha!

LOL I should have finished reading your sentence before I replied. My bad!

1 Like

So i've got an rPi now for this and setup MiConnect server and was in the process of obtaining the token for my S5 Max when I read that doing this integration through the MiHome app means that you lose the ability for "No-Mop Zones" in which case I can't go forward with this as we use the robot alternate days for mopping and it has to avoid the rugs when in mop mode. So, back to the drawing board!