FIXED: Ecovacs Deebot 2019 & OZMO Series - Working Library

EDIT:
The solution marked below is known to work with the following devices:

WORKING
Deebot 500
Deebot 600
Deebot 601
Deebot 605
Ozmo 610
Deebot 900 (Non Ozmo)
Deebot 907
Ozmo 930

NOT WORKING
Deebot 530

Let me know if you get this working with any other model(s).

Originial Post:

I’ve setup the latest version of Hassio on a rPi 3B+ and cannot get the Ecovacs Deebot OZMO 610 to work.

I’ve got the following in my configuration.yaml:

#deebot vacuum
ecovacs:
    username: xxxxxxxxxxxxxxxxxxxxxxxxx
    password: xxxxxxxxxxxxxxxxx
    country: DE
    continent: EU
    
sensor:
  - platform: template
    sensors:
      vacuum_filter:
        friendly_name: "Vacuum Filter Remaining Lifespan"
        unit_of_measurement: '%'
        value_template: "{{ state_attr('vacuum.my_vacuum_id', 'component_filter') }}"

The sensor shows “none” and the Deebot control allows me to fire the location beeps and return the vacuum to the charger but none of the other functions work.

I tried running the following code also, but this appears to have no effect:

shell_command:
  ecovacs_fix: "pip uninstall -y pyasn1 pyasn1-modules sleekxmpp slixmpp && pip install sleekxmpp==1.3.2 dnspython3==1.15.0"

script:
  ecovacs_fix:
    alias: Fix Ecovacs
    sequence:
    - service: shell_command.ecovacs_fix
    - service: persistent_notification.create
      data:
        title: 'Please Restart HA'
        message: 'To fully fix Ecovacs, please restart Home Assistant.'

Any ideas on what I can do to get my Evocas device working?

Thanks.

Same for Ecovacs OZMO/Pro 930

@Alejandro_Contento Its the SUCKS library which is used for the Ecovacs platform. It doesn’t currently support the OZMO range of devices. However, their is a fork which includes the necessary files to make the OZMOs work.

Unfortunately the maintainer of the SUCKS library appears to have gone AWOL and so the codebase can’t be updated. I’m trying to pester him into action. Otherwise, I’m going to try and see if I can get guy who did the fork to publish it to PyPi and then hompe that the Home Assistant devs will migrate to the new fork.

P.M. me if you are interested in how we can try and get the new code base into Home Assistant.

Hi Phill!
I also have a Deebot Ozmo 900 and it’s not working with the latest sucks library.
I’m thinking to temporarily fix the issue in this way:

  1. I forked the sucks py library modified by bmartin5692 into this one:
    https://pypi.org/project/ozmo/

  2. I’ve created a custom component with this lib as requirement and copied the content of this folder (https://github.com/home-assistant/home-assistant/tree/dev/homeassistant/components/ecovacs) into custom_components in /config dir.

  3. Replace “ecovacs” with “deebot” (to change integration name) and any reference to “sucks” with “ozmo” (to use the “renamed” sucks library modified by bmartin5692)

  4. update configuration.yaml with same info required by ecovacs integration: https://www.home-assistant.io/components/ecovacs/ (don’t forget to change integration name with “ozmo” instead of ecovacs)

In this way, you can at least turn on/off the vacuum and get some useful info.
I’ll try to edit the vacuum.py script to use other functions!

4 Likes

@Ligio That sounds like a great solution, thanks for the details. Unfortunately, I’m not really grasping what needs to be done for steps 2 & 3. Could you share some code examples &/or give a bit more info?

Alternatively… could you turn your solution into a repo? We could then load that up into Home Assistant via HACS.

Thanks.

There’s just been some activity on the SUCKS repo and it appears that someone with Pull privileges has stepped forward with the potential to get the forked updates merged into sucks AND publish those changes to PyPi. So… we could see this being integrated into HA fairly soon.

1 Like

Hi @Ligio

thanks for sharing this.

I’ve installed in custom_components all the three files from github and changes all the references to sucks and ecovacs with ozmo and deebot.

How should I install the ozmo library from PyPi ?

Should I change the ecovacs reference in configuration.yaml with deebot or ozmo?

In point 3. you say

Replace “ecovacs” with “deebot” (to change integration name) and any reference to “sucks” with “ozmo”

while in point 4. you say

don’t forget to change integration name with “ozmo” instead of ecovacs

Thanks

@woody4165 Could you clarify what you’ve done so far, as I’m not really sure what is required to get this working either.

Thanks.

I’ve just followed 2. and 3.

I don’t know how to download/install the new py library

updating the configuration.yaml with deebot: gives me error

ERROR:homeassistant.requirements:Not initializing deebot because could not install requirement ozmo==0.9.4

Step 1 doesn’t appear to need any action and step 2 just isn’T clear to me as to what should be copied and where to. Eg: How do you add the dependency? Does it matter what the custom component is called? etc

As for step 3…
I think you might have to install the PyPi Ozmo project via pip.

pip install ozmo

On Step 2 I’ve created a folder under config/custom/components/ called deebot and I placed the files that you find in the link

I’ve now try to do a pip3 install ozmo (pip does not work on Hassio) and I get this long log and an error

http://pasted.co/9f42e9a6

custom components live in subfolders under /custom_components/ not /custom/components/.

So you’d need something like /custom_components/ozmo/

Correct, this is my folder, I just wrote here in the wrong form

Lines 54 onwards are for your Yi cam / Yi-Hack-v4 integration. The first 53 or so are the Ozmo ones.

There doesn’t appear to be any error specific to the Ozmo package. Could you try to isolate the ozmo setup without all the other stuff going on? It looks like there are a whole load of things being installed at once:

Installing collected packages: pycryptodome, pyparsing, packaging, atomicwrites, more-itertools, wcwidth, py, zipp, importlib-metadata, pluggy, pytest, pytest-mock, wheel, pprintpp, repoze.lru, coverage, pytest-cov, pycountry, pycountry-convert, paho-mqtt, stringcase, ozmo

I really don’t know how to do it… :thinking:

What better way than giving back the community something in the first post :smiley:

I did the workaround by myself and at least I can now control the basic things of my D900.
For anyone who want’s to use this too, I’ve published the modified files as gist:

  • Save __init__.py, manifest.json and vacuum.py to config/custom_components/deebot
  • add deebot component to configuration.yaml (example in gist)

@woody4165
as far as I can see -

  • requirement ozmo==0.9.4 should be requirement ozmo==1.0
    but the easiest way is to just use the files from my gist.

1st Edith says:
As this post is now marked as solution, credits should also go to @Ligio for providing the fixed pip library

3 Likes

I’ll try later at home with my deboot 930, do you have any way to obtain correct country and continent?

Thanks @SolTroy
Do I need to install ozmo via pip install?
I will try later, too.

Not now. This code automatically pulls in the new ozmo library via Home Assistant. If I understand correctly, when done like this, anything on PyPi can be imported into HA semi-automatically. EG: if you tell HA what’s needed it can grab it from PyPi.

So, no more error during check, but no deebot device created.

BTW, I have an Ecovacs Ozmo 900

This is my log

2019-08-28 17:34:41 DEBUG (SyncWorker_6) [custom_components.deebot] Ecobot devices: [{'did': 'xxxxxx', 'name': 'E0001206219600470017', 'class': 'y79a7u', 'resource': '4RcC', 'nick': None, 'company': 'eco-ng', 'bindTs': 1566489318735, 'iotmq': True}]
2019-08-28 17:34:41 INFO (SyncWorker_6) [custom_components.deebot] Discovered Ecovacs device on account: xxxxxx with nickname None
2019-08-28 17:34:41 DEBUG (SyncWorker_6) [custom_components.deebot] Starting vacuum components
2019-08-28 17:34:45 DEBUG (SyncWorker_5) [custom_components.deebot.vacuum] Vacuum initialized: 22d8d3a2-5ef7-4637-82ad-43cd78f00408
2019-08-28 17:34:45 DEBUG (SyncWorker_5) [custom_components.deebot.vacuum] Adding Ecovacs Vacuums to Hass: [<Entity 22d8d3a2-5ef7-4637-82ad-43cd78f00408: off>]

It seems all ok, but searching for deebot or ecovacs in the entity name or attributes, nothing is found

This is my configuration.yaml

#ecovacs:
deebot:
  username: !secret ecovacs_username
  password: !secret ecovacs_password
  country: it
  continent: eu