Zoned vacuum cleanup

I “needed” to setup a automation so every time my cat uses the litter box the vacuum came and did a quick zoom around.

So I created a little xiaomi home bridge plugin to interface with HomeKit and provided the sensor in the litter box goes off it will turn on a cleanup in that room. The extra benefit to this is you can say vacuum the living room and zoom zoom here he comes and just does the living room.

GitHub: https://github.com/Smileydude/homebridge-xiaomi-roborock-vacuum
npm: https://www.npmjs.com/package/homebridge-xiaomi-roborock-vacuum-zones

1 Like

Just out of curiousity. What kind of sensor? Motion? Contact? Beacon? Water sensor?

Its an inclosed litter box, he likes to make quite the mess. So I just stuck philips motion sensor to the top and set it up inside the home app on the iPhone to turn on the vacuum. Could use any sensor that works with HomeKit, I want to setup a door sensor to go whenever someone comes into the house and vacuum up there shoe mess. Going to try and get the Xiaomi motion sensor working so I can put the Philips motion sensor back to where it was before.

You could even put a switch on the wall and when you click it have it turn on that rooms zone

Hi Tom,
The script looks great to define zone cleaning. Unfortunatly when I want to start a zone cleaning the vacuum starts all the zones and make a full cleaning of the flat. Do you have any idea about how to fix that?
I am using Homebridge and the pugin you refer to in you link above.
I hope you could fix that, it would be great!

It’s a matter of how you define the zones. If you upload your zone configuration I can take a look.

Hi Tom,

Thanks for your answer.
I upload an example for a first room. I have defined in total 6 rooms but as I mentionned before impossible to target the vacuum cleaner only on one room. It is cleaning all the flat each time I try to start a single room via homekit. Thanks for your help.

{
“accessory”: “XiaomiRoborockVacuum”,
“name”: “hall damnsugare”,
“ip”: “192.168.1.120”,
“token”: “my token”,
“pause”: true,
“dock”: false,
“zones”: [
[
23044,
25102,
24666,
31733
],
[
24666,
25102,
27376,
29269
]
]
},

Okay I need to update my home bridge to the latest and see if it still works. Maybe something has changed.
Each accessory should show up individually in HomeKit, so each room is its own accessory.

is this compatible with the HomeKit component?
if not would it be possible to convert your project to be compatible?
If I’ve assumed something wrong, I’m sorry, I’m new to the whole HA scene!

Hi Tom,

Thanks for your reply.
I see each room as a separate accesorry in Homekit but when I want to start
for example accessory “vacuum kitchen”, the vacum will start all the accesorries and start then a full clean up of my home. It seems as the “zone cleaned up” is not recognized. Any ideas?

It will show them all as running, as the check for if a zone is running is just a check to see if the vacuum is running(regardless of where its cleaning). It should just clean the zone specified though. I’ve just updated my vacuum to have the firmware with no go lines, so just trying to get it all connected back up. Not much time currently to fiddle with it (work and christmas). The only thing I can think of is the zone api has changed on the vacuum.

Click on a zone and let it complete see if it only does the one zone.

Tom,

As I mentioned earlier I tried to start different zones but the vacum is starting all the time to clean the same way, all the flat and not taking care of the zone I have activated.

I understand that before christmas is not the best time to fix the plugin…
I thought it was so nice to get a plugin on homebridge judt for the xiaomi roborock which is such a nice product.
I hope you may have some time in 2019 for that (-:

I update the app with the new dependencies, added the package-lock to prevent any changes in the future.
Its working again for me, https://www.youtube.com/watch?v=NTiA0LtaER4
With home bridge 0.4.43 (my original pi crashes with the newest version), and Xiaomi firmware 3.3.9_001702.
The Xiaomi update is sweet it saves maps!!!

Hello
I have a problem with your plugin. I have install on my Raspberry

0.4.0
homebridge-xiaomi-roborock-vacuum

0.3.6
homebridge-xiaomi-roborock-vacuum-zones

And my Config is

{
“accessory”: “XiaomiRoborockVacuum”,
“name”: “Vacuum”,
“ip”: “192.168.1.55”,
“token”: “token”,
“pause”: false,
“dock”: true
},
{
“accessory”: “XiaomiRoborockVacuum”,
“name”: “Zone1”,
“ip”: “192.168.1.55”,
“token”: “token”,
“dock”: false,
“pause”: false,
“zones”: [
[
24500,
24500,
27500,
30500
]
]
}

But i can’t start my homebridge, this is in my Log.

[2019-1-2 15:57:05] Loaded plugin: homebridge-xiaomi-roborock-vacuum
[2019-1-2 15:57:05] Registering accessory ‘homebridge-xiaomi-roborock-vacuum.XiaomiRoborockVacuum’
[2019-1-2 15:57:05] —
[2019-1-2 15:57:08] Loaded plugin: homebridge-xiaomi-roborock-vacuum-zones

Is it possible that i don’t use both plugin?

My idea was, i will use the normally plugin for cleaning the full house and with your plugin i can create special zones in the house and can start the vacuum for cleaning this zone with your plugin.

I hope you can help me?

regards
Stefan

You currently can’t use both at the same time. I just set up a bunch of zones for each room, and set the name as “House Vacuum” it actually does a better job vacuuming this way, as it doesn’t have to guess at where the rooms are. Welcome to set a feature request/make a PR :slight_smile:

you were probably running into the same problem as this guy (https://github.com/Smileydude/homebridge-xiaomi-roborock-vacuum/issues/1)
just update the plugin and you should be good to go

Thanks. I will try. Great thanks for updating the plugin.

Just to update you on something that will solve your problem of having to install both plugins.

Its coming along, and should be released in the coming months

Hi Tom,
I am trying again to install homebridge and I do not manage to install your plugin. Which version of node are you using? I have the v.8.

Best

This the message I get when I try to instal the plugin:

pi@raspberrypi:~ $ sudo su -
root@raspberrypi:~# npm install -g homebridge-xiaomi-roborock-vacuum@latest --unsafe-perm

  • [email protected]
    added 97 packages from 42 contributors in 13.835s
    root@raspberrypi:~# npm install [email protected]
    npm WARN saveError ENOENT: no such file or directory, open ‘/root/package.json’
    npm WARN enoent ENOENT: no such file or directory, open ‘/root/package.json’
    npm WARN root No description
    npm WARN root No repository field.
    npm WARN root No README data
    npm WARN root No license field.

  • [email protected]
    updated 1 package and audited 648 packages in 7.122s
    found 0 vulnerabilities