Howto: Xiaomi vacuum zoned cleaning

Has anyone tried the custom firmware from https://github.com/dgiese/dustcloud/

Would that work with HA? There seems to be a way to extract the map with the custom firmware

I’ve rooted my gen 1

It’s not custom firmware per-say. Xiaomi just had a weak encryption password for the firmware files. All you’re really doing with dustcloud is adding an ssh key onto the vacuum so you can connect to the ubuntu install running on it. otherwise it’s identical to the Xiaomi firmware.

It was relatively easy to do, I even did it over my android phone with termux. I havn’t gotten the actual dustcloud server to “catch” my map files though. I have had success pulling the files with scp so I was looking into hammering a component together using the python scp library, but I’m still not hugely familiar with how home-assistant works yet.

1 Like

Thanks. I assume the only way to interact with the vac after rooting is to use python-miio or HA? I just want to get raid of Xiaomi cloud once and for all

As long as you don’t block the Xiaomi addresses as outlined, the Xiaomi app will continue to work and even after pointing the vacuum’s reports to the dustcloud server you have an option to forward the data onto Xiaomi to continue using the app.

I should say the dustcloud server isn’t extremely well documented. I’m still a little lost on a couple of points.

I personally never let my vacuum connect to Xiaomi from day one and control it exclusivly through HASS and prior to that python-miio, dustcloud will prevent the vacuum locking up the miio protocol receiver while it attempts to phone home so that’s worth having up and running.

I still don’t quite understand what dustcloud does after reading through the wiki.
So the firmware simply enable root on the vac and then configurate the vac to report to dustcloud which then does nothing?

Sort of, it’s technically got a web interface where you can send commands to the vacuum, it is really a reference server for other projects.

  • It takes the encryption key and simulates the Xiaomi server. It captures all data squawked by the Vacuum.

  • The Vacuums attempt to phone home regularly and if blocked improperly lag when accepting commands.

  • Has a command server (python-miio backend) for issuing commands to the vacuum from the web page.

The only real advantage of having the dustcloud server is to prevent the vacuum locking up. I’m still not clear on witch setup negates the need for this as there have been some conflicting experiences on the python-miio project. I have found I need dustcloud to have stable control.

Here is a screen shot:

As you can see it’s more of a dev platform than anything else

1 Like

Thanks! I will try blocking the vac using method 2 in https://github.com/home-assistant/home-assistant/issues/11048#issuecomment-375930041

If it doesn’t work then I will go for the dustcloud route

1 Like

I can see there are option forward to cloud and full forward to cloud. What are the difference? Does that allows you to use the Xiaomi cloud and app? Thanks

Sorry, I’m not sure what the difference really is. I just have them turned off.

Hi everyone,

regarding the topic “map and coordinates”:
There is an alternative app for Android, developed by a german guy nicknamed “Flole” (https://xiaomi.flole.de/). The app is generally german, but it can be switched to english via “Einstellungen->Use English as Language”.

Once you are connected to your vacuum you can select “Map”, “Zoned cleanup” and draw your desired zone like in the original Xiaomi app.

If you then long press on “Cleanup” it will copy the respective parameters (for example [[21459,23801,25009,24301,2]]) to your clipboard.

Maybe this helps somebody :slight_smile:

22 Likes

Will definitely look into that, I guess that helps a lot for finding the coordinates :smiley:

Sorry for going off topic. I have used ‘reject’ rule on my firewall. Let’s see how long til it starts to cripple the vac.

Just tried the flole app. It does a good job controlling the vac on LAN but the maps are retrieved from Xiaomi server. So the vac will still still need to talk to Xiaomi cloud to get the map. As a replacement for the Mi Home app, it has most if not all the functionalities of the Mi Home app.

It would be interesting to see how flole retrieve the maps from Xiaomi server. That could be used on HA frontend or to build zone definitions on them

1 Like

Thank you very much for this @Venom

I believe it uses the get_map_v1 command. There is also the get_fresh_map_v1 command, I believe that does something similar.

I can’t test them out as my vacuum isn’t hooked up to Xiaomi

Thanks for this @ciB!
I have managed to set mine up a bit differently using just the input select and an automation to call the scripts.

I have also added something which i think is a cool little feature… using Floor Plan to allow me to click / touch a room to begin a cleaning cycle! I am planning to add some type of signal of whether and where the vacuum is running.

If anyone is interested in the setup, my config files are linked below.
Vacuum Config: https://github.com/stanvx/Home-Assistant-Configuration/blob/master/packages/xiaomi_robot_vacuum.yaml
Floorplan Config: https://github.com/stanvx/Home-Assistant-Configuration/blob/master/floorplan_vacuum.yaml

17 Likes

You sir, deserve a medal

1 Like

Hi, once I set the region to mainland china, if I go to add a device I have available only “Add camera”, “Add bluetooth” and “add device group”. I’m on iOS, any solution?

Nevermind, restarted few times and it worked.

Do I have to keep China as region after the update? Yes

Is it just me or the map updates are way slower since I moved to China Mainland and ran the update? It takes ages to update.

many thankss Venom that is great

1 Like

Awesome, thanks a lot for this development. I’ll implement it as soon as i come home

@Venom first time I used the app it worked perfectly 2nd time it says error retrieving information from vacuum. Does any one else experience the same issue? I have logged in using my credentials and server is set to mainland China just like in the Mihome app.