Add Map to Xiaomi vacuum cleaner

Thanks for that. I had totally missed out on this info!
I have access to a Win 10 machine. Can set up a Pi, but that sounds like a pain. I’ll try on a PC first by running a docker Linux image! My Home Assistant server is hosted via Docker on a Synology.

I’m using your solution, with a few changes to accommodate to my system.
Since I’m running Hass.io I had troubles installing what I needed to get the script to run. Instead I run it in a Docker-container on a server which has the script modified to copy the resulting image to the RPi running Hass.io via samba, which in turn presents it as a camera-image.
It’s a bit of a messy solution, but it certainly gets the job done!

Have you thought about making this into a Hass.io-addon?

Thanks for your work on this!

If I’m not totally wrong …but I think custom firmware is not needed to get this map thing working right ?

The vacuum has to be rooted in order to extract the map, at least for this solution to work.

I’m a bit scared to root this device …are there any issues to root it ?

I had no issues using the instructions from post 39.

Did it from a virtual Ubuntu machine.

Hi. What di u change?

#!/bin/bash

RHOST="###IPADDR####"

RPORT=“22”

You shouldn’t touch anything below

RUSER=“homeassistant”

RDIR="/home/homeassistant/.homeassistant/vacuum/"

SSHCTL="/root/.ssh/ctl-ha-rockrobo"

I have to change it inot

#!/bin/bash

RHOST="###IPADDR####"

RPORT=“22”

You shouldn’t touch anything below

RUSER=“hass”

RDIR="/home/hass/.homeassistant/vacuum/"

SSHCTL="/root/.ssh/ctl-ha-rockrobo" <----- What’s this? as it is not on my robot nor on my hass

I don’T get any map… nothing is created… COuld you make a short write up. I followed the guid from asphalter and also found mistakes like: choan iso chmos… but that’s not that bad… But i think there’s more to change especially the SSHCTL path. But i dunno how :frowning: and what it means. HELP appreciated :slight_smile:

1 Like

I got it working but had to start the script on the robot manually

Is there a way to do this if homeassistant is running in docker?

Thanks in advance

1 Like

Everything is possible with docker …there’s no difference .just follow the instructions…that’s all
But strangely I had to start the script in the robot manually… dunno why it didn’t start …I might have restarted the robot …I dunno.maybe the dev could give a hint here ?

Did you check ou the thread of @wills106 ?

If your vacuum is rooted, its really simple to set up Valetudo and import the map in HA.

I am in the telegram dev channel yes i read about this but was wondering how to set ip up in hass :slight_smile: my robot is already rooted. Will check this immediately.

I’ve already got the token and from integration with HA - where do I start the rooting process with that?

Thats not the roken … thats another key. If you want take mentioned russain version of mihome and u can sniff the token directly from the robot, Well… then u have to root it with this wiki:

I’m finding that the firmware version on the instructions are quite old compared to what’s currently installed on my MiRobot Gen 1. Any risks of pushing an older modified firmware?

Nope. Downgrading is always better than upgrading in those cases.xiaomi tried to block their firmware in further updates.its highly recommended not to upgrade the Robo one the robot is rooted u will loose the root by upgrading the robot with the mihome app.

I can’t root my MiRobot v1, any help here would be appreciated.

Key points:

  • My MiRobot V1 has the latest firmware 3.3.9_003416
  • I’m following the Ubuntu steps on the guide here: https://github.com/dgiese/dustcloud/wiki/VacuumRobots-manual-update-root-Howto
  • I’m using Ubuntu 16.04 LTS using VirtualBox on a Windows 10 Machine. I tried it with Ubuntu 14.04 per the instructions but there were too many issues with Python and VENV versions being too old.
  • The newest firmware available according to the links on the instructions is v11_003254
  • All the steps work fine except for the final steps to upload the firmware

When I enter this into the terminal the result is:
python dustcloud/devices/xiaomi.vacuum/firmwarebuilder/flasher.py -f output/v11_003254.pkg

Flasher for Xiaomi Vacuum
Address is not set. Trying to discover.
Connecting to device 10.0.2.2...
Sending handshake to get token
Unable to discover a device at address 10.0.2.2
Traceback (most recent call last):
File "dustcloud/devices/xiaomi.vacuum/firmwarebuilder/flasher.py", line 206, in &lt;module&gt;
main()
File "dustcloud/devices/xiaomi.vacuum/firmwarebuilder/flasher.py", line 148, in main
m = vacuum.do_discover()
File "/home/sebastian/dc/.venv/lib/python3.5/site-packages/miio/device.py", line 162, in do_discover
raise DeviceException("Unable to discover the device %s" % self.ip)
miio.exceptions.DeviceException: Unable to discover the device 10.0.2.2

So I added the IP address of the MiRobot (when it’s in WIFI connecting mode) and get the below result:
python dustcloud/devices/xiaomi.vacuum/firmwarebuilder/flasher.py -f output/v11_003254.pkg -a 192.168.8.1

Flasher for Xiaomi Vacuum
Connecting to device 192.168.8.1...
Sending handshake to get token
Starting local http server...
Serving http server at 10.0.2.15:38069
Sending ota command with parameters: {"mode": "normal", "file_md5": "a37aa29d89780201fae295f4f42b6f2b", "app_url": "http://10.0.2.15:38069/output/v11_003254.pkg", "proc": "dnld install", "install": "1"}
Ota started!

Firmware downloaded successfully.
Exiting.

It gets to “firmware download successfully” very quickly. I’d expect the MiRobot to tell me it will update and do it’s thing but it does nothing at this point. To get my MiRobot working again i have to use the MiHome app and get it connected back to my wifi router.

Any advice? Do you think it’s new Xiaomi firmware blocking my downgrade?

it takes a while to update. When it starts, you’ll see the LED flash on the vacuum. Once finished it’ll restart and will tell you it’s updated the firmware

The led only flashes to indicate that its in wifi mode. I waited 10 minutes but nothing happens…

can you see the firmware upload progress bar in your terminal?