Skip to main content

Deebot client library in python 3

Project description

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!

Project details


Release history Release notifications | RSS feed

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-17.1.0.tar.gz (209.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-17.1.0-cp314-cp314-win_amd64.whl (1.0 MB view details)

Uploaded CPython 3.14Windows x86-64

deebot_client-17.1.0-cp314-cp314-musllinux_1_2_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

deebot_client-17.1.0-cp314-cp314-musllinux_1_2_aarch64.whl (1.3 MB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ ARM64

deebot_client-17.1.0-cp314-cp314-manylinux_2_34_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

deebot_client-17.1.0-cp314-cp314-manylinux_2_34_aarch64.whl (1.1 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ ARM64

deebot_client-17.1.0-cp314-cp314-macosx_11_0_arm64.whl (1.0 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

deebot_client-17.1.0-cp314-cp314-macosx_10_12_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.14macOS 10.12+ x86-64

deebot_client-17.1.0-cp313-cp313-win_amd64.whl (1.0 MB view details)

Uploaded CPython 3.13Windows x86-64

deebot_client-17.1.0-cp313-cp313-musllinux_1_2_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

deebot_client-17.1.0-cp313-cp313-musllinux_1_2_aarch64.whl (1.3 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ ARM64

deebot_client-17.1.0-cp313-cp313-manylinux_2_34_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

deebot_client-17.1.0-cp313-cp313-manylinux_2_34_aarch64.whl (1.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ ARM64

deebot_client-17.1.0-cp313-cp313-macosx_11_0_arm64.whl (1.0 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

deebot_client-17.1.0-cp313-cp313-macosx_10_12_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: deebot_client-17.1.0.tar.gz
  • Upload date:
  • Size: 209.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for deebot_client-17.1.0.tar.gz
Algorithm Hash digest
SHA256 fa8998fc4f2412211ee18a8554000d1661c01e8aa90b829f36706b45a5cb15b5
MD5 3f56fb67830eb84facb342581c8b4698
BLAKE2b-256 639ffda2b40b534f97e5ef6608b610c83771db48e1a27d79dca91da7bfce1549

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for deebot_client-17.1.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 b21a711621a2f10b0e3d7f000929e9210e00d4ca52559fdd30473ba7a425048e
MD5 3b21d2b0f21b256ed2bb19e188a931cd
BLAKE2b-256 2e14a530f04f44cfab32e07db26f3fec65030b9ebc9abe59f08ae66d7cb5a810

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for deebot_client-17.1.0-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 50eaff1518e2b5a5065976a3970bfd155d144cc1d200f3bba289965a7ffd57c5
MD5 ce525cce9aeb4b5657bad962d0b409c1
BLAKE2b-256 4e77aa2c14c0351022f1e617aacacee101040ea84f9784d2e6eb1ffcfae3765e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for deebot_client-17.1.0-cp314-cp314-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 9ab6c48785ece8c3e944a99cb2ecf73f39cd0f9b3b35ed6ffb4c3d838e236c41
MD5 c33c5c07e2e41d91978a6e1f2285720f
BLAKE2b-256 282475f0b384067f53dabf05812daabb9d42899112c94839fd0ca5c162a90d12

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for deebot_client-17.1.0-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 60ddadcef47de4f38b11f43b1e39f89db3429c5e54b6d33e754435624029676d
MD5 bcdfc993b068be32dc4c51784f1a0259
BLAKE2b-256 284765a6d7159459e579e7e9fd5590fb6ce2f66d72007840d5b337e29195b284

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for deebot_client-17.1.0-cp314-cp314-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 bbb0b3cf19ad18d53c9cbdc972ba251916411e495030ec1b85e901e19c9dfc50
MD5 340b04b154b11c5eb30a10678326761a
BLAKE2b-256 7e0a7adf26e04e1ee6bbb3bc785a7f3b2119af8cf7d18399819b522716813675

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for deebot_client-17.1.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c1f94a09591c5346a71f8d2daaad8647f008d61cdbc3595406875da918c1bce0
MD5 d9c3a24d84e598e2a48b9685caa9d9a1
BLAKE2b-256 c6c99da382381e56303e5b70967983742797704638c505b19c5e1636fa8077c5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for deebot_client-17.1.0-cp314-cp314-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 f71540377dd5155de25b828caaff15ea4ce08c955001b8c0fb3a7032e09d12c3
MD5 360c3d876f74ef101b7881bddca66021
BLAKE2b-256 1ce72dc870dcc351751271e6c4a15360b9096a6f8cf6df63e60a4931ff8c4d3d

See more details on using hashes here.

Provenance

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

File details

Details for the file deebot_client-17.1.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for deebot_client-17.1.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 f8ad6f41c1d2bae5a9590629ea36c000b7d7efb896479e178ae0dc89d59fdbcc
MD5 cb2b528e71158cb45c31848b3630786a
BLAKE2b-256 d0031ecc9fda76e346570beb327019618ac50f8d2ee3e1d4ca369db63239036c

See more details on using hashes here.

Provenance

The following attestation bundles were made for deebot_client-17.1.0-cp313-cp313-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-17.1.0-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for deebot_client-17.1.0-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 cd2f13a2f95571f09a018daf08d4bc1b79d0fb05d6d85a6c08eeb3d49a05a1dd
MD5 655f7fc009e358cd0d66bd1fd8f03b9e
BLAKE2b-256 63e9c2851d11f35899372b4495e8cf89eed61a16425ec21767cc8b8f00ce87c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for deebot_client-17.1.0-cp313-cp313-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-17.1.0-cp313-cp313-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for deebot_client-17.1.0-cp313-cp313-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 658151a23e4e0152b307a16c8c6d48b50abb907bd9320ad56f61745a67b36558
MD5 652f273c5466438dbe49712e6a148704
BLAKE2b-256 51e219bffc94265319ef736ce105bf048158d023177bc55ba2af3b0749a27940

See more details on using hashes here.

Provenance

The following attestation bundles were made for deebot_client-17.1.0-cp313-cp313-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-17.1.0-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for deebot_client-17.1.0-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 7fa1d0f1228e6f9b330457ca45702bd38dfa9afd14dead3e621b80ac1437a4b9
MD5 04a0fc650dbea14ccece2b801ef4956f
BLAKE2b-256 f47ceb9af7a8fe600a64902376684eb8ce8f0a4a336da2d0d9ab38080c65c91d

See more details on using hashes here.

Provenance

The following attestation bundles were made for deebot_client-17.1.0-cp313-cp313-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-17.1.0-cp313-cp313-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for deebot_client-17.1.0-cp313-cp313-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 70891700e4074155ee731f7c4f4515b6f5db34adc105290f9073dc92f314eb2b
MD5 9428705b48d719e0d90f9498c703ea21
BLAKE2b-256 d3fcb0052c3c2dc9260ddaf7b293f6560d1ff75765b15c0706f0f0277ec4f4b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for deebot_client-17.1.0-cp313-cp313-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-17.1.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for deebot_client-17.1.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 11b021dd01e6cb24f70629f0668082253d3298e1d3f5001efee4223c9715a662
MD5 3256c27cbf43d6284f6887460d1f8893
BLAKE2b-256 99519038d6b7611f2e466ab63f4ac251e977748f64fe946b0a3650ea04ad1fc8

See more details on using hashes here.

Provenance

The following attestation bundles were made for deebot_client-17.1.0-cp313-cp313-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-17.1.0-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for deebot_client-17.1.0-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7594dbced6ec5d0de184396b190470e36045425d2d156329f599b8808bae7683
MD5 671aba3f616869175c64d876eb45e079
BLAKE2b-256 515e97f66c5825698cf25be9585f1044bb468af54b5a6ed36fdc780e33de7eff

See more details on using hashes here.

Provenance

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

Supported by

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