Valetudo - Xiaomi Vacuum Dustcloud alternative, Live Maps

You could probably build the image from scratch to start on another port. Unless there is an option in Linux to divert the port?
I don’t know Linux to well.

Regarding updating. It’s not something I have tired, so I can’t answer that I am afraid. Might be best asking on Dustcloud or Valetudo GitHub’s

1 Like

Finally got it to work, Valetudo also works nice.

Has someone given thought to modify Valetudo to make use of MQTT ? This might make integration into HA much easier, as there is already an MQTT vacuum component.

Lars

How to issue a zone clean up from HA?

I found this thread recently and 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 <module>
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?

Maybe it’s not working as you are trying to downgrade the firmware.

There seems to be a bit of info here and links to a newer firmware you could try building?

https://github.com/dgiese/dustcloud/issues/140

Thanks I managed to fix the issue. The steps I took are found here Add Map to Xiaomi vacuum cleaner

For the benefit of anyone reading this thread (and not great with linux commands), here are the steps I took to install Valetudo onto the MiRobot after I rooted it to gain SSH access.

Install and Start Valetudo on your Rooted MiRobot

  1. Open up Terminal run the below commands
  2. mkdir valetudo && cd valetudo
  3. wget https://raw.githubusercontent.com/Hypfer/Valetudo/master/deployment/valetudo.conf
  4. wget https://github.com/Hypfer/Valetudo/releases/download/0.0.7/valetudo (change the url if a new version is released)
  5. scp valetudo [email protected]:/usr/local/bin/ (use the IP of the MiRobot & the password you set as your SSH key when building your firmware)
  6. scp valetudo.conf [email protected]:/etc/init/
  7. ssh [email protected]
  8. chmod +x /usr/local/bin/valetudo
  9. service valetudo start

After this you can follow the instructions in Post #1 to setup live maps in Home Assistant.

3 Likes

Just a quick offtopic question regarding the firmware. Is it possible to update the firmware with the Mi Home app or will I loose root access after that?

I have never connected Rosie to the cloud nor used the App so I don’t know sorry.

Ok, so how do you update your vacuum? The latest version seems to be interesting because it can save old maps

Upgrading the robot will remove root and risk having a blocked robot

I’ve tried the new firmware v3416 and v3514 and when i compile them with the command

sudo ./dustcloud/devices/xiaomi.vacuum/firmwarebuilder/imagebuilder.sh -f sebgen1firmwarev3416.pkg -k id_rsa.pub

It throws an error that “…/dc/image” doesn’t exist midway through the process. This doesn’t happen when i do it for firmware v3254. Despite this I still try to flash it to my Mi Robot however it doesn’t work. MiRobot rejects it.

Is anyone else here using a rooted firmware on their Gen 1 Mi Robot that higher than v3254?

you need to download latest pkg and do the whole rooting process again either from here:


or by doing this: https://github.com/dgiese/dustcloud/wiki/VacuumRobots-disableUpdates and then start the firmware update from your app, then copy firmware from temp folder (look it up in google) and rooting that one, reenabling the crypto and start the firmware upgrade with mirobo.
1 Like

All links are broken. Trying to look for a way on rooting the device

Which links?

The original two I posted on the first post both work ok for me.

I receive this

Forbidden

You don’t have permission to access /public/xiaomi.vacuum.gen1/original/encrypted/ on this server.

I guess you are trying to download the firmware?

Have a look at this in the Wiki

This is turning out a bit mpre difficult then expected :smiley:

I am following this for rooting

but I don’t know how to do this …
Create custom image with imagebuilder.sh

I succesfully made the vacuum work with HASS (not the map), I also was succesful in using the FLOLEVAC android app.

But I can make it work one (HASS) OR the other (app) not both. My goal is to make both work, hope that rooting serves this purpose

It tells you what to type in further down under “Instructions on Linux”

sudo ./dustcloud/devices/xiaomi.vacuum/firmwarebuilder/imagebuilder.sh -f v11_001228.pkg -k id_rsa.pub

If you are using Windows either use a Virtual Machine or a Raspberry PI

1 Like