Giter Club home page Giter Club logo

ha_ecovacs_bumper's Introduction

Latest version is 1.7.0 that includes updates that SHOULD at least let the component work with newer HASS versions. This version includes async updates so the comoponent won't crap out on setup if it's unable to reach the vacuum. I am unable to tset these changes since I don't have HASS currently setup and I don't have my old Ecovacs vacuum anymore (handed down to younger sis).

If 1.7.0 doesn't work, use version 1.6.0. I just made the bare minimum changes to the component that again SHOULD work, but I'm unable to test it. HASS ditched the VacuumEntity import for the vacuum component at some point and change it to StateVacuumEntity. That's all that's included in this update. Thanks @guillaume042 for making it easy for me by pointing me straight to a an issue with another component using VacuumEntity (though theirs was just leftover code that wasn't actually being used).

Home Assistant Ecovacs Custom Component with Bumper Support

Based off the regular home assistant ecovacs components and bmartin's fork of sucks, https://github.com/bmartin5692/sucks. Replaces built in ecovacs component, with some upgrades and fixes. Allows SSL verification to be set to false to work with a self-hosted bumper server, https://github.com/bmartin5692/bumper, a replacement for Ecovacs servers to truly get local control.

Works with bumper with my N79 and should work with other XMPP based ecovacs. Catches some XMPP messages now that the default HASS one misses (at least with my Ecovacs), including some initial queries and also life span for filters and brushes. Includes MQTT robot support from bmartin's fork that's basically unchanged in this since I don't have one of those robots.

Should work as regular without bumper if verify_ssl is true or omitted in config but haven't tested yet, goal was to get it all local. Maybe mess around and test it in future.

Bumper Setup

Check out bmartin's docs to setup a bumper server, https://bumper.readthedocs.io/.

Home Assistant Install & Config

HACS Install

You can add this repository to your HACS: https://github.com/bittles/ha_ecovacs_bumper

Then download with HACS, HACS -> Integrations -> Explore & Download Repositories -> EcovacsBumper

Restart HASS.

Manually Install

Drop the ecovacs folder into your custom_components folder.

Restart HASS.

Config

Example in configuration.yaml:

ecovacs:
  username: bumper
  password: bumper
  country: us
  continent: na
  verify_ssl: false

If you're not using bumper this SHOULD technically work no different than the Home Assistant ecovacs integration but I haven't tested it.

Paremeter Description Required/Optional
username Ecovacs username, can be anything if using bumper required
password Ecovacs password, can be anything if using bumper required
country Ecovacs country, can be anything if using bumper required
continent Ecovacs continent, can be anything if using bumper required
verify_ssl true/false, defaults to true. Use false if using bumper optional

Country/Continent Values and Pairs

From the HASS ecovacs integration page:

Note: For some countries, you will need to set continent to ww (meaning worldwide.) 
There is unfortunately no way to know the correct settings other than guessing and checking. 
See the py-sucks library protocol documentation for more information about what has been figured out about the Ecovacs servers.

Additional note: There are some issues during the password encoding. 
Using some special characters (e.g., -) in your password does not work.

From the sucks documentation:

country code matching continent code
CH ww or as
TW, MY, JP, SG, TH, HK, IN, KR as
US na
FR, ES, UK, NO, MX, DE, PT, CH, AU, IT, NL, SE, BE, DK eu
Any other country code ww

Logging

If your debug logs are throwing errors and the errno is '' then my small fork of bumper may help https://github.com/bittles/bumper-fork, which also includes ability to disable the XMPP or MQTT servers seperately if you don't own a robot that uses that protocol.

logger:
  logs:
    sleekxmpss: debug
    custom_components.ecovacs.sucksbumper: debug  # or whatever level you want

To-Do:

Make component async, use config_flow, create device and clean up some of the hass integration stuff. Not in that order.

Misc Info From Making This

Commit history is a bit of a mess. master branch shows changes from bmartins fork of sucks to v1.3.0 of this custom component. dev branch shows commits from my attempts at testing and getting this to work.

Added additional catches to sucks because my N79 sends some weird payloads, but attributes all pull in now for brush life spans. Couple initial queries it also sends weird that I'm in process of catching atm. As of version 1.3.0 (in the manifest.json) these initial queries and all attributes are working. Was using an implementation completely mine but saw in the MQTT class there were already catches for child payloads without the main payload having the expected td in its payload. Kept comments in giving credit and adapted them to work with xmpp.

ha_ecovacs_bumper's People

Contributors

bittles avatar bmartin5692 avatar ecpunk avatar eracknaphobia avatar joe248 avatar overloadut avatar torbjornaxelsson avatar wpietri avatar zenconomy avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ha_ecovacs_bumper's Issues

Error on HA startup.

I have bumper running without a certificate. The vacuum is connected and everything is online. Do you know what causes this error? Using HA 2023.1.4

Home Assistant gave an error using your example.yaml content so I changed the values to my real account but it is still not working.

my yaml:

ecovacs:
username: myusername
password: mypassword
country: nl
continent: eu
verify_ssl: false

Logger: homeassistant.setup
Source: custom_components/ecovacs/sucks_mqtt.py:35
Integration: ecovacs (documentation, issues)
First occurred: 17:16:22 (1 occurrences)
Last logged: 17:16:22

Error during setup of component ecovacs
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 253, in _async_setup_component
result = await task
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/ecovacs/init.py", line 72, in setup
vacbot = VacBot(
File "/config/custom_components/ecovacs/sucks.py", line 284, in init
self.iotmq = EcoVacsIOTMQ(user, domain, resource, secret, continent, vacuum, server_address, verify_ssl=verify_ssl)
File "/config/custom_components/ecovacs/sucks_mqtt.py", line 35, in init
self.verify_ssl = str_to_bool_or_cert(verify_ssl)
NameError: name 'str_to_bool_or_cert' is not defined

Feature Request: Delayed boot (or configureable)

Hey,
so I'd like to implement a bumper / nginx / ecovacs stack on Home Assistant. Atm I have implemented bumper / nginx as addons while using ecovacs as custom-component. It works, but only if bumper / nginx starts on system level (which i guess is kinda bad) and the system doesnt lag (so a bit of randomness).
I didnt find something similiar for "startup" or "dependencies" on custom components (in contrast to Addons) in the HA-docs. Maybe there is a way to "restart" the integration process manually, which would be sufficient aswell.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.