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.0.tar.gz (255.7 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.0-cp314-cp314-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.14Windows x86-64

deebot_client-18.5.0-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.0-cp314-cp314-musllinux_1_2_aarch64.whl (1.4 MB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ ARM64

deebot_client-18.5.0-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.0-cp314-cp314-manylinux_2_34_aarch64.whl (1.2 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ ARM64

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

Uploaded CPython 3.14macOS 11.0+ ARM64

deebot_client-18.5.0-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.0.tar.gz.

File metadata

  • Download URL: deebot_client-18.5.0.tar.gz
  • Upload date:
  • Size: 255.7 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.0.tar.gz
Algorithm Hash digest
SHA256 65dc9ae895223050782a2d27cbf6613352f24850dc4bcc50f85595e2b0233c8d
MD5 608e1365b3e991f6812b5075e95ede38
BLAKE2b-256 b35c8bf447240940d238cd8e0f767dd4ae4ca1e5a3877ad70d51e164b6e32b23

See more details on using hashes here.

Provenance

The following attestation bundles were made for deebot_client-18.5.0.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.0-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for deebot_client-18.5.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 748fc46c90f2e394d5470cf24db3bba7e799052732d62572b96d21abe6b0c4ab
MD5 9febf21879733af16919c9e1735e3416
BLAKE2b-256 d57c788e05bac0101636d4e43ffe52b17bbf5ca358d7ecf3132bcf3149d90b0b

See more details on using hashes here.

Provenance

The following attestation bundles were made for deebot_client-18.5.0-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.0-cp314-cp314-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for deebot_client-18.5.0-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b3f79a2841eeea03745a9bcc5319055efb786b2afbd0e0be957581bf39724f15
MD5 7e2ecfc920cb0dfad9a7a556fe609eb6
BLAKE2b-256 cf6198aca1a130da65ef010a10db63aa730ac8401f9e4273470a37ed911964e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for deebot_client-18.5.0-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.0-cp314-cp314-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for deebot_client-18.5.0-cp314-cp314-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 3caa7698db78a46ad3acdb515982adcfce73d1ffc544fb7452dbdec09fadac72
MD5 96c88d48e45914d21d2f25d635b8cb4f
BLAKE2b-256 3cf165031ebaf33ada5db570b4bd146e5d46a7394b0d09c223141373ab6b20fe

See more details on using hashes here.

Provenance

The following attestation bundles were made for deebot_client-18.5.0-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.0-cp314-cp314-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for deebot_client-18.5.0-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ffc7689de5076d976834f1485ac7f1720fe076b60fba8fd9a36cf4c7a8d9c78c
MD5 2a903ef1f8bc27695107acfc9735e647
BLAKE2b-256 dbed38133d0a5ad82fa09d77b2894f7220acba121404f79034d76363770b3dd1

See more details on using hashes here.

Provenance

The following attestation bundles were made for deebot_client-18.5.0-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.0-cp314-cp314-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for deebot_client-18.5.0-cp314-cp314-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 547969e368281d0535f40201e622ac62f5ed606ed3defd44cf63af2bce158af5
MD5 a370d73585d2e60557c1cc6cd73b27c7
BLAKE2b-256 7831c074c236dae655cf97bc642caefb59ef2b4c1832353a14d951d84c688927

See more details on using hashes here.

Provenance

The following attestation bundles were made for deebot_client-18.5.0-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.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for deebot_client-18.5.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d1d638323cbbb3cc3dff4c765f3cf6ed44afb0c9d1ecd7bbbf6de1cabb5145c3
MD5 3545695c543b45ff580a81c99c84e614
BLAKE2b-256 a214945fbdebbb7b83ded21b8ab6c2f390503c617c2e9b3bc36fc07262c9c72f

See more details on using hashes here.

Provenance

The following attestation bundles were made for deebot_client-18.5.0-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.0-cp314-cp314-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for deebot_client-18.5.0-cp314-cp314-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7c435c9a502507fb55852529939185ed5a9d18123822314185f3550a54ce9498
MD5 db4e00dce29450e131a8a0dd2c3a708f
BLAKE2b-256 33fc42fa0fcf8ba57ef2a8c6e145c3b3ec0b06f411bf8e13ff25a73380d01873

See more details on using hashes here.

Provenance

The following attestation bundles were made for deebot_client-18.5.0-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