Add Map to Xiaomi vacuum cleaner

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?

oh you appear to have forgotten to provide the token :wink:

It’s says “firmware downloaded successfully" then “exiting” within about 5 seconds of my command in the terminal. I see no progress bar.

Could it be the new firmware is blocking the downgrade?

that’s quite possible… but can you confirm you’re tried the command with the token? I don’t believe it’ll work without…
python dustcloud/devices/xiaomi.vacuum/firmwarebuilder/flasher.py -f output/v11_003254.pkg -a 192.168.8.1 -t xyz

The Ubuntu steps on https://github.com/dgiese/dustcloud/wiki/VacuumRobots-manual-update-root-Howto have no instructions on how to retrieve the token.

Is it the same token that I’m currently using to connect the mirobot in my home assistant YAML configuration? Do you know how I can get the token in Ubuntu?

When you do mirobo discover --handshake true it should display the token (or so the doc states), but in any case yes it’s the same token as the one you use in HA.