-
Notifications
You must be signed in to change notification settings - Fork 255
VacuumRobots manual update root Howto
There is an automatic tool for flashing. See flasher.py
in the firmwarebuilder release. Details can be found in PR#47
Do not flash Gen2 firmware to Gen1, and vice versa!
- Install
python-miio
(python3!) - Install
ccrypt
(apt-get install ccrypt
) - Create custom image with
imagebuilder.sh
, copy MD5 sum- You need to create your own ssh keypair and create an authorized key file (for Windows you might use PuttyGen to create the keypair).
- Copy language pack (#LanguageCode#.pkg) and
v11_xxxxxx.pkg
into folder of theimagebuilder.sh
.english.pkg
is obsolete now, all new firmwares contain the new english soundfiles. To enable english by default, you need to convert your vacuum from CCC to CE. - The image builder needs to be run as root (need to mount image).
- If you use Windows: you need to run it in either Docker container or Linux VM, Windows WSL and macOS do not work.
- When using Docker make sure to pass
--privileged
flag, like this:docker run -it --privileged ubuntu
.
- Install a local webserver and place created image (located in
/output
) into htdocs- Do not change filename, it must have the format
v11_xxxxxx.pkg
. - You may use also the integrated Python3-HTTP-Server.
- Do not change filename, it must have the format
- Connect the vacuum robot to the charging station.
- Put vacuum robot in unprovisioned mode (press WiFi button)
- Connect to open WiFi of the robot(rockrobo-XXXX)
- Do not connect to any other network (e.g. LAN)
-
mirobo discover --handshake true
- You'll retrieve the token (copy hash represented by placholder #Token for further use):
- INFO:miio.device: IP 192.168.8.x (ID: $) - token: b'#Token'
-
mirobo --ip=192.168.8.1 --token=#Token_from_above# status -> should return status
-
mirobo --ip=192.168.8.1 --token=#Token_from_above# raw-command miIO.ota '{"mode":"normal", "install":"1", "app_url":"http://#ipaddress-of-your-computer#/v11_#version#.pkg", "file_md5":"#md5#","proc":"dnld install"}'
- replace ipaddress, version and md5 with your data ( md5 = copied md5 sum of section "preparation" step 3)
- Check status with command from 4)
- Wait 10 minutes (you should see an access on your http server, when http-get is done)
- In case you get a warning about battery needs to be at least 20% charged: connect the robot with your charging station and charge it while updating. This warning can appear even if your robot is charged more then 20%.
- If update is complete: try ssh access on 192.168.8.1 with user root
These instructions were tested on Ubuntu 14.04 and 17.10, Debian 9, and Fedora 27. Ubuntu 18.04 verified to work on 7 March 2020.
-
Install the required packages:
## Ubuntu sudo apt-get install ccrypt git wget unzip dos2unix ## Fedora sudo dnf install ccrypt git wget unzip dos2unix
-
Create a working directory:
mkdir dustcloud cd dustcloud
-
Download and unzip the dustcloud firmwarebuilder:
wget https://github.com/dgiese/dustcloud/releases/download/0.3/firmwarebuilder_0.3.zip unzip firmwarebuilder_0.3.zip
-
Download the firmware image and language data:
-
Find the latest
.pkg
link from here: https://github.com/dgiese/dustcloud/wiki/Xiaomi-Vacuum-Firmware -
You need to select the correct model (Gen1/Gen2)!
-
You will need a soundfile. Start with english:
wget https://dustbuilder.xvm.mit.edu/pkg/voice/english.pkg
-
-
Copy your public SSH key to the working directory:
cp ~/.ssh/id_rsa.pub .
If you don't have SSH keys yet, refer to this guide to create them.
-
Run the image builder:
sudo ./dustcloud/devices/xiaomi.vacuum/firmwarebuilder/imagebuilder.sh -f v11_001228.pkg -k id_rsa.pub
-
After the build has succeeded, you are ready to upload the firmware to your vacuum.
This assumes we are still in the working directory from the building step:
-
Install the required packages:
sudo apt-get install python3 python3-pip python3-venv python3-dev
-
Create a virtual env for our python packages:
python3 -m venv .venv
-
Enter the virtual env:
. .venv/bin/activate
-
Install wheel so the other packages can be installed successfully:
pip install wheel
-
Install
python-miio
for communicating with the vacuum:pip install -Iv python-miio==0.4.8
-
Now press the wifi button on your vacuum and join the wifi created by it ('roborock-vacuum-s5_XXXXXXXX' or similar).
-
Use the flasher script to upload the new firmware:
python flasher.py -f output/v11_001228.pkg
-
The update takes several minutes. After the upload is complete, the robot explains that it is now going to install and upgrade and restarts when it is complete. Once the robot has successfully restarted, you can connect to it via SSH.
Navigation
- Home
- Vacuum Robots
- Lumi Aqara Camera (experimental)
- Lumi Aqara Gateway (new Version, without Homekit)
- Documentation
- Dustcloud