Xiaomi mi vacuum cleaner (also Roborock)

Hello guys,

I searched the forum and couldn’t find any topics, i really like the xiaomi products and so also the vacuum cleaner.
But i only want things i can integrate with smartthings, so the qeustion: somebody wrote a smartapp or device handler for the vacuum cleaner or is someone willing to make one.
I really would like to buy one and control it in my flows.

Greetz Pedro

5 Likes

Nobody wants to work on this?

This would have more attention if the Xiaomi vacuum was cheap like their other products. For $300+ you might as well get a neto botvac

3 Likes

It’s already started, but I don’t quite know how to create an app for it
https://home-assistant.io/components/switch.xiaomi_vacuum/

This is how you can get some of the information you need… to make it stop and go, but that’s all I know.

1 Like

Too bad im totally no programmer, still hope someone will make it work.

I just got this Xiaomi Mi Robot, I picked it up from Gear Best for under $300 ($280 i think). this thing is my first robot vac, and after having it less than 24 hours and running it 4 times, its going to be a mainstay in my house for as long as it lives. Then I’ll buy another. I am a single dad with 2 kids 10 and under, and 2 dogs… with hair… lots of it and not a whole lot of time on my hands, so anything taken off my plate is HIGHLY appreciated.

I did a lot of research, and landed on this one, partially because I am a risk taker, and also because it really seems like a great purchase in the world of automated cleaning, function, power. (read and watched a lot of reviews)

With that said, the app is good with the mi home app, but I am a big fan of consolidation. I have a Smartthings hub as the center-point of my home automation, with a google home and a hue hub all working together.

I have read where Home Assistant on a rpi has integration with the Xiaomi mi robot. (the link in this thread is dead, but I was able to find another).

Is there anyone that is smarter than I am that sees that this is a premium Vacuum, at a mid-level price, and is willing to potentially boost the popularity of this product by writing a smart app for it?

The ultimate goal is to get it in to Smartthings, and allow google home to run it when i tell it “ok google, unleash the cracken” and the tumble weeds of Labrador fur are methodically erased from my living room floor.

I hope that someone can take this on.

I am thinking of buying this as well. Great price for what seems to be a great product. Hoping for integration with smartthings. Looking to buy two Google home minis as well when visiting the US next time.

Looks like it should be fairly simple to do, obtaining the token which you would need is a bit of a pain by the looks of it, but once you have that the control then looks fairly simple…

If I buy one in the future then I’ll write the app and share, but don’t think I’ll buy one soon unfortunately…

If anyone wants to buy me one however… :slight_smile: haha

Well… I’d really like this to happen… Here’s hoping one day!

They’re only 269 now.

@ASpangrud

£206.31 at the moment for the V1 :slight_smile:

EDIT: Sorry just realised you meant $269 not £

I own one of these things, and I have to say they are truly amazing. Therefore I’d also love to find a way to integrate it into ST, although I’ve only had it for 2 days and am still learning how it all works.

Anyway, someone has achieved it already, but with home-assistant.io in the middle (which runs on a Linux box if I’m not mistaken?)

Video Link

I wonder if there’s a way to make it happen through the cloud?

1 Like

If it has wifi i could prolly make it work by using a android pass through
Though it will not be pretty
Cant wait for someone to create one!

It does have WiFi. Make it happen Eddy :wink:

This vacuum is not only cost effective, but amazing. Can we do a bounty here to get someone to add it?

I picked one up in November and absolutely love it. I have been searching for ST integration and would love to see what could be done so that I could tie it into routines and presence. I know there are some solutions for Home Assistant but really looking for something without the middle dependency.

So I got a simple node.js control server up and got WebCoRE to control the vacuum. Yay. Once I wrap my head a bit more around what I’m doing, I might be able to post a walkthrough.

6 Likes

Nice! That would be nice to show us all!

This would be Great!!! I’m waiting flyize :sunglasses:

Did u get the gen 1 or the gen 2?

Gen 1.

Sorry been dealing with the flu. And trying to figure out how docker works. In the meantime, if you’re technical these are the steps at a high level,

  • Install Python-miio (https://github.com/rytilahti/python-miio)
  • Get your vacuum token (explained in the python-miio docs)
  • Install Node.js and the Express web server
  • Run the ugly code below, using the IP and token of your vacuum
  • Create a simulated switch in the IDE
  • Create a WebCoRE piston that makes a web request to the Express server when the switch is turned on (/start) and off (/home).

It’s all pretty rough and ugly at this point, but it does work. If there are any real ST developers who can make this be awesome, that’s our best case scenario.

// https://github.com/rytilahti/python-miio

const express = require(‘express’)
const app = express()
const port = 3000

var exec = require(‘child_process’).execFile;

app.get(’/’, (request, response) => {
response.send(‘Hello from Express!’)
})

app.get(’/start’, (request, response) => {
response.send(‘Sending start command.’)
console.log(“Sending start command.”);
exec(‘C:\Users\Zac\AppData\Local\Programs\Python\Python36-32\Scripts\MIROBO.exe’, [’–ip’, ‘192.168.1.160’, ‘–token’, ‘your token here’, ‘start’], function(err, data) {
console.log(err)
console.log(data.toString());
});
})

app.get(’/home’, (request, response) => {
response.send(‘Sending home command’)
console.log(“Sending home command”);
exec(‘C:\Users\Zac\AppData\Local\Programs\Python\Python36-32\Scripts\MIROBO.exe’, [’–ip’, ‘192.168.1.160’, ‘–token’, ‘your token here’, ‘home’], function(err, data) {
console.log(err)
console.log(data.toString());
});
})

app.listen(port, (err) => {
if (err) {
return console.log(‘something bad happened’, err)
}

console.log(`server is listening on ${port}`)

})

1 Like