Skip to main content

Client Library for Deebot devices (Vacuums)

PyPI - Downloads Buy Me A Coffee

IMPORTANT: Contribution only

This project is maintained in our spare time. Please be patient and respectful.

It's not related to Ecovacs or Deebot and we don't get any support from them.

As all is reverse engineered it might take some time to add new features and we can't guarantee that all features will be added.

Unfortunately some people think we are paid to do this and get angry if things don't work as they expect. As result of this, we decided that this project is in a contribution only mode.

This means, if you want something to be supported/added, you have to provide a fix yourself, wait for someone else to fix it or pay someone to do it. Members will still review and help on pull requests.

Installation

If you have a recent version of Python 3, you should be able to do pip install deebot-client to get the most recently released version of this.

Usage

To get started, you'll need to have already set up an EcoVacs account using your smartphone.

You are welcome to try using this as a python library for other efforts. A simple usage might go something like this:

import aiohttp
import asyncio
import logging
import time

from deebot_client.api_client import ApiClient
from deebot_client.authentication import Authenticator, create_rest_config
from deebot_client.commands.json.clean import Clean, CleanAction
from deebot_client.events import BatteryEvent
from deebot_client.mqtt_client import MqttClient, create_mqtt_config
from deebot_client.util import md5
from deebot_client.device import Device

device_id = md5(str(time.time()))
account_id = "your email or phonenumber (cn)"
password_hash = md5("yourPassword")
country = "DE"


async def main():
  async with aiohttp.ClientSession() as session:
    logging.basicConfig(level=logging.DEBUG)
    rest_config = create_rest_config(session, device_id=device_id, alpha_2_country=country)

    authenticator = Authenticator(rest_config, account_id, password_hash)
    api_client = ApiClient(authenticator)

    devices_ = await api_client.get_devices()

    bot = Device(devices_.mqtt[0], authenticator)

    mqtt_config = create_mqtt_config(device_id=device_id, country=country)
    mqtt = MqttClient(mqtt_config, authenticator)
    await bot.initialize(mqtt)

    async def on_battery(event: BatteryEvent):
      # Do stuff on battery event
      if event.value == 100:
        # Battery full
        pass

    # Subscribe for events (more events available)
    bot.events.subscribe(BatteryEvent, on_battery)

    # Execute commands
    await bot.execute_command(Clean(CleanAction.START))
    await asyncio.sleep(900)  # Wait for...
    await bot.execute_command(Charge())


if __name__ == '__main__':
  loop = asyncio.get_event_loop()
  loop.create_task(main())
  loop.run_forever()

A more advanced example can be found here.

Note for Windows users

This library cannot be used out of the box with Windows due a limitation in the requirement aiomqtt. More information and a workaround can be found here

Thanks

My heartfelt thanks to:

  • deebotozmo, After all, this is a debotozmo fork :)
  • sucks, deebotozmo was forked from it :)
  • xmpppeek, a great library for examining XMPP traffic flows ( yes, your vacuum speaks Jabber!),
  • mitmproxy, a fantastic tool for analyzing HTTPS,
  • click, a wonderfully complete and thoughtful library for making Python command-line interfaces,
  • requests, a polished Python library for HTTP requests,
  • Decompilers online, which was very helpful in figuring out what the Android app was up to,
  • Albert Louw, who was kind enough to post code from his own experiments with his device, and
  • All the users who have given useful feedback and contributed code!

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deebot_client-18.5.1.tar.gz (256.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

deebot_client-18.5.1-cp314-cp314-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.14Windows x86-64

deebot_client-18.5.1-cp314-cp314-musllinux_1_2_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

deebot_client-18.5.1-cp314-cp314-musllinux_1_2_aarch64.whl (1.4 MB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ ARM64

deebot_client-18.5.1-cp314-cp314-manylinux_2_34_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

deebot_client-18.5.1-cp314-cp314-manylinux_2_34_aarch64.whl (1.2 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ ARM64

deebot_client-18.5.1-cp314-cp314-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

deebot_client-18.5.1-cp314-cp314-macosx_10_12_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.14macOS 10.12+ x86-64

File details

Details for the file deebot_client-18.5.1.tar.gz.

File metadata

  • Download URL: deebot_client-18.5.1.tar.gz
  • Upload date:
  • Size: 256.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for deebot_client-18.5.1.tar.gz
Algorithm Hash digest
SHA256 64cbc07e10c2e08cf02b8f65ebc9e35190b0fdf098e48e05785ae26a6734673f
MD5 5fcc0633a54d7be399d64dbb02372ef4
BLAKE2b-256 83d8d53c87ea94d5a1e193dcd3731f565aad1b85639d04bc3de4e38aa9e0a24a

See more details on using hashes here.

Provenance

The following attestation bundles were made for deebot_client-18.5.1.tar.gz:

Publisher: ci.yml on DeebotUniverse/client.py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file deebot_client-18.5.1-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for deebot_client-18.5.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 94fdbe44ec5d72297451442aaeb5d124f1a6a3e20efe4b8bdc6bba79cd44b25c
MD5 290489153dd57f2d94a54dc8277f129b
BLAKE2b-256 645e1526edaebc82bf6b3477b613875a83216111b9ee3652e96088cc06fbf253

See more details on using hashes here.

Provenance

The following attestation bundles were made for deebot_client-18.5.1-cp314-cp314-win_amd64.whl:

Publisher: ci.yml on DeebotUniverse/client.py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file deebot_client-18.5.1-cp314-cp314-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for deebot_client-18.5.1-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 6e67de14c959fb0c168bbd755bc52be9ea5182ea89e383a397a1f7707438acec
MD5 fbe8e41747fdb1755e3db1611ba4ed46
BLAKE2b-256 f7bab0caa822370dd1374a4374aeda2ef58c4f83cd3f5bb7b223bbad1fc57eda

See more details on using hashes here.

Provenance

The following attestation bundles were made for deebot_client-18.5.1-cp314-cp314-musllinux_1_2_x86_64.whl:

Publisher: ci.yml on DeebotUniverse/client.py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file deebot_client-18.5.1-cp314-cp314-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for deebot_client-18.5.1-cp314-cp314-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 4cff478afd1214ea6208778fead842502058c02d66afa10ecf5036fe6aed364f
MD5 a31c996ed61aca100eb378b1578d33a9
BLAKE2b-256 281f41bdbd5c10d419d871453c04ba415ce2429b13b61f6ac8eaa1210d1665ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for deebot_client-18.5.1-cp314-cp314-musllinux_1_2_aarch64.whl:

Publisher: ci.yml on DeebotUniverse/client.py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file deebot_client-18.5.1-cp314-cp314-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for deebot_client-18.5.1-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 d04353494e8e18da7fbf36343815d6b722d7d24b288d87adf01bbf22ba2eb6aa
MD5 fe6f3da80b981d8a13b1749c690cc3f7
BLAKE2b-256 857daf978dfd8a8f381698a54403e93d93683e764c0b36216543f7497aa568dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for deebot_client-18.5.1-cp314-cp314-manylinux_2_34_x86_64.whl:

Publisher: ci.yml on DeebotUniverse/client.py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file deebot_client-18.5.1-cp314-cp314-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for deebot_client-18.5.1-cp314-cp314-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 a4aced3399c70faabfb4a78aa9e984a0832b03afcefa1155bc0f48e34d70e2af
MD5 1166ba95dc97ffd4dc3fb4677c561379
BLAKE2b-256 d01547dfbd75b4dff88191163253092aa1514228b6dd09250ab8f77c332c2389

See more details on using hashes here.

Provenance

The following attestation bundles were made for deebot_client-18.5.1-cp314-cp314-manylinux_2_34_aarch64.whl:

Publisher: ci.yml on DeebotUniverse/client.py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file deebot_client-18.5.1-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for deebot_client-18.5.1-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9210668c5e64c68e5a8f9271b2cf9bc0dca8e55600dc700e2626145a7c52342f
MD5 c367c944ef60bb3eb3e9d8abbfbe5e32
BLAKE2b-256 e6790eeafa50653bd92ab5a3fc49050fd53bdd360599c1637d79c5751fbe1314

See more details on using hashes here.

Provenance

The following attestation bundles were made for deebot_client-18.5.1-cp314-cp314-macosx_11_0_arm64.whl:

Publisher: ci.yml on DeebotUniverse/client.py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file deebot_client-18.5.1-cp314-cp314-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for deebot_client-18.5.1-cp314-cp314-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 78af70af49511c92c0c9298b24d81bd63dfca50196e202d8f12e2d627564eeaf
MD5 f7488b10c440e1ec0f130b3a2ce3a7b9
BLAKE2b-256 17bdbb0cf25ecec66215f620167e292983d8afbba6fc5abe7c2f53f14c1e6005

See more details on using hashes here.

Provenance

The following attestation bundles were made for deebot_client-18.5.1-cp314-cp314-macosx_10_12_x86_64.whl:

Publisher: ci.yml on DeebotUniverse/client.py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page