Xiaomi Roborock Integrations/Automation Ideas?

Another good suggestion. I was thinking, though, that there wouldn't be any difference between undocked and docked but fully charged. Wouldn't hurt to experiment.

What I might be able to determine from power monitoring is when it starts charging which would happen when returning to dock after a full clean.

Thinking out loud here, if you monitor power of the docking station, in theory there should be more draw when charging the unit. But after the unit is charged the draw will decrease. And when it leaves the docking station I don't think there would be a change in the power draw since it's already charged.

The MiConnector solution is likely your best bet

Exactly. Power drop either means left the dock or finished charging .. I can't tell which. SImilarly, a power increase means it is now charging, but that doesn't necessarily mean it just returned to the dock (could just mean it has been sitting for days and needs a little top-up).

There's no doubt that would be the way to get the most control and feedback, but I've not yet get up hope there is genius way to use a sensor to do it natively in hubitat.

This is where building a rule to enable/disable your motion sensors becomes a real challenge. You run the risk of them being disabled because of the power drop when it simply finishes charging.

Your other option is to sweet talk a dev into writing an add-on to integrate the vacuum into HE without the need for MiConnector. Home assistant has such an integration without the need of any 3rd party programs running, so it is possible. There's another one just launched over there that pulls the live map from the vacuum without needing root access. I believe it does this through the web api, which could open another avenue for a dev to get this info but it wouldn't be a local add-on at that point.

Well, when IFTTT changed their model, I lit a candle and wished for a developer to create Blink integration for Hubitat .. and he appeared! I'll do the same for this .. maybe using two candles.

Is there a documented API for Xiaomi/Roborock? If there was, that gives me some new possibilities.

I would like to be able to vacuum when no one is home, but disabling motion detectors permanently is too much. I have a fear we will come home to find all our valuables are gone, but the floor is spotless.

You could mount a simple lever switch to the dock that it closes when it returns, make the arm as long as necessary, minimal force so it won't notice and stop etc. Then modify an open close door switch (like the samsung multipurpose) and use the physical switch to close/open the contacts instead of the magnet.

1 Like

from this thread Did you order? - #6

might well be the answer

2 Likes

That could well be the perfect answer! It could be mounted off-center on top of the vacuum out of the line of site of the lasers. The vacuum spins around all the time. Thanks for that suggestion!

1 Like

Or stick a door/ window contact sensor, sensor part on the dock and the magnet on the vacuum. :+1:t3:

That's the first thing I thought of, but ...

Also, there wouldn't be a good place to mount it. The face of the dock emits signals to assist the vac in docking, so it wouldn't be good to place it there. The part of the vac that faces the dock is its bumper which quite frequently hits and rotates against obstacles. Putting on the top of the vac might occlude the lasers. Not enough clearance on the bottom.

ive just integrated it using MI connector but how do you get it just to hoover some of the rooms in hubitat. its not looking all that great of an integration at first glance

Sorry to bump an older thread; but is there any update on this? I've got the S5 linked with a MiConnector docker and connected to the Hubitat.

however I'm looking for a way to clean a specific room and make a command I can send with voice on alexa. On the app I have my Living room, Kitchen and Hallway all separated. Anyway to specify to clean those highlighted zones? I dont see any settings in the Miconnector app. I cant think of another way to go. I'd in effect like to be able to say Alexa, vacuum the living room twice or vacuum the kitchen 3 times. I can do it from the app but to do it from voice would be easier :slight_smile:

1 Like

I don't have a xiaomi vacuum cleaner although I have Mi connector set up for another device.

Maybe this might point you in the right direction, if it can be done in HA I would imagine it's possible on HE. I'd be interested to know, if we ever get a robot cleaner!

Hello ,
I need a help - i got my pi with docker,db,mi connector installed. I have roborock s6 max and getting following error in the mi connector ;( vaccum not supported

Any clu what to do?

You will need to edit the driver or the docker file to include the s6max, if you look through this thread the info is there for the s5max

Hello,
I added following to mi connector app on hubitat side to include my version of roborock:

else if(params.type == "roborock.vacuum.v1" || params.type == "roborock.vacuum.c1" || params.type == "roborock.vacuum.m1s" || params.type == "roborock.vacuum.a10" || params.type == "viomi.vacuum.v7"){
dth = "Xiaomi Vacuums";
name = "Xiaomi Vacuums";
}else if(params.type == "roborock.vacuum.a10"){
dth = "Xiaomi Vacuums2";
name = "Xiaomi Vacuums2";

Removed application, installed again, restarted mi connector on rasoberry pi and the same issue :frowning:

Where and what should i change on docker?

Thanks!

Finally have it working:

  1. Reinstalled my pi from scratch
  2. Installed docker
  3. Installed mi connector fison67/mi-connector:latest
  4. Installed Db
  5. Configured mi connector a per fison67 instructon
  6. Updated mi connector application as follows:
    else if(params.type == "rockrobo.vacuum.v1" || params.type == "roborock.vacuum.c1" || params.type == "roborock.vacuum.m1s" || params.type == "viomi.vacuum.v7"){
    dth = "Xiaomi Vacuums";
    name = "Xiaomi Vacuums";
    }else if(params.type == "roborock.vacuum.s5" || params.type == "roborock.vacuum.s6" || params.type == "roborock.vacuum.a10"){
    dth = "Xiaomi Vacuums2";
    name = "Xiaomi Vacuums2";
  7. Restarted mi connector container
  8. Manually added vacuum (IP + Token)
  9. Now it was successfully registered without any issues.
  10. Next, I tried to add device from mi connector (both side) but on hubitat nothing was found in the application and on raspberry pi I could not select vaccount to be added
  11. In the end, the vaccum device appears automatically on hubitat side :slight_smile:

Hello, I am curious, what did you configure at point 5 from your list in the docker mi connector files / where did you find the instructions from fison67?
I have tried a s4 and s4max, but the both show the same "vaccum not supported" error, now I am hopeful that they can be used with the same trick as the s6 max.
Thank you very much

Hi,
As far as I remeber it was that part:

  1. Open Mi Connector web settings page (http://X.X.X.X:30000/settings)
  2. Fill in the DB settings:
    DB URL (e.g. "localhost")
    DB Port (e.g. "3306", "33006")
    DB Password (e.g. "password1234", "password")
  3. Restart Mi Connector Docker container

> If you don't add/update the DB values, they must be [ localhost, 33006, password1234 ].