Xiaomi Robot Vacuum Binding

For those who would like to try alpha version with cloud connection, download here (7 April: no longer deed to download here. It is available in the regular build). (source code)
Ensure to remove your regular version first before installing.

New functionality:

  • New map channel for the Xiaomi vacuum
  • Get tokens from cloud during discovery

Notes,

  • this version is very verbose wrt the cloud information…
  • The device info is currently only retrieved from the cloud at logon if you add a device or reset it, you need to logon again. The simplest way (without restarting the binding) is to change e.g. the county string.
  • Country in the config is pointing to the various cloud servers. I think the following servers exist: ru,us,tw,sg,cn,de leaving it blank will try all these servers.
  • In your (vacuum) thing you can configure the server related to your vacuum.
  • Don’t attach your full logs as your passwd is currently plain text in the log
  • Files with device tokens and vacuum maps are stored in your userdata/miio folder (+/- 17 map files)
  • nb, use at your own risk… the cloud logon logic is reverse engineered based on valetudo by @Xento many thanks to him for this.

Todo’s: (updated 6 April)

  • More frequent refreshes from the cloud for device files, (e.g. at each manual discovery) including finding out how long one can remain connected / reconnect logic.
  • Improve the map decoding to be able to scale the image bigger, and to also show other map features (e.g. wrt zoned clean)
  • Only refresh the map channel if it is actually linked to an item
  • And once more final… remove the many log messages, code cleanup
  • Fix re-logon issue

Binding is now submitted for review and first review improvements are processed.

Feedback is welcome. . Note I would also appreciate to receive some map files to test decoding for models other than the one I have (so other than the .v1), esp if you have defined special area’s incl virtual walls etc. (they are located in /userdata/miio folder with names *.rrmap note, no private info is stored in these files other than you see in the picture)

To configure the cloud connection

5 Likes