dustcloud icon indicating copy to clipboard operation
dustcloud copied to clipboard

Elaborate: Is there any server component needed for rooting S5?

Open LordMike opened this issue 5 years ago • 2 comments

Hi,

I'm very interested in rooting my vacuum cleaner, but I'm really confused as to whether a server component is needed. The docs don't say that there is, but when I see texts like this:

where 192.168.42.42 is the IP of your local instance and the port number on which server.py runs (can technically run on a Raspberry pi).

https://github.com/dgiese/dustcloud/wiki/Preparations-on-the-Vacuum-Robots

Edit server.sh on your dustcloud instance and add the ...

https://github.com/dgiese/dustcloud/wiki/Xiaomi-Vacuum-Maps#live-map

.. also note that the only place "dustcloud instance" appears, is on that one page.

And I see this, which comes up with a little webserver that has a list of devices .. (I dunno yet, if each device allows control or whatnot).

It was my impression that the Valetudo app/webpage was served from the device itself, and not somewhere else..

... so what is this server needed for?

LordMike avatar Mar 11 '20 23:03 LordMike

The Dustcloud server is a implementation example for intercepting data from the vacuum going to Xiaomi and was intended as a template for other developers to work off of and not a final product. The Live map is an old way of decoding the map data on the vacuum.

Valetudo has a newer method of extracting the map and yes mostly runs on the vacuum, however map decoding is done in the web browser. So if you want the live map in anything else, like homeassistant, you need to use ICantBelieveItsNotValetudo

As you wish to use Valetudo it's a good idea to follow the installation instructions on its repository.

How the rooting method works:

  1. You patch a copy of the original firmware to enable ssh (and possibly add Valetudo).
  2. You run a flashing script that:
    • Uses python-miio to handshake and connect to the vacuum
    • Passes a url to the vacuum to download the patched firmware
    • Starts a webserver to serve up said firmware to the vacuum
  3. Once the vacuum has installed the patched firmware it now has ssh (and possibly Valetudo if you added that).
  4. You provision the robot (aka connect it to wifi) either by using python-miio or via ssh
    • ssh in to get the new token (Note: may need a reboot of the vacuum for the token to work)
    • I prefer using python-miio rather than the ssh method

dugite-code avatar Mar 13 '20 05:03 dugite-code

Ah. Great. It was as I hoped - I had read about the live map thingy being remote - that suits me fine.

Great work, thanks :)

LordMike avatar Mar 13 '20 11:03 LordMike