Weback cloud integration: testers and help required

Hello! Recently purchased a robot vacuum cleaner that works through the WeBack cloud. Since I did not find any existing integration, I reverse-engineered the application and wrote mine.


Add custom repository to HACS and install “Weback cloud integration”: https://github.com/opravdin/weback-hass
(will publish it in HACS soon)
Or manually move component to your custom_components folder.

Configuration is simple: (email login is not working for now)

    username: +7-1234567890
    password: <password>

Supported devices

Vacuum robots that mentioned as _CLEAN_ROBOT in Amazon’s API (weback is based on Amazon IoT). I wrote a script to test your device for compatibility, it’s available in the repository.

Help required

I am new in developing hass modules, so I have some (probably dumb) questions:

  • Currently this integration works on polling update method, but it is possible to listen amazon’s mqtt topic for messages. Where can I see examples of integration with this approach?
  • I’m not sure if I implemented the polling mechanism correctly. Right now it looks like this:
    def should_poll(self) -> bool:
        """Return True if entity has to be polled for state."""
        if self.last_fetch is None:
            return True
        if (
            datetime.datetime.now() - self.last_fetch
        ).total_seconds() > self.scan_interval.total_seconds():
            return True
        return False
  • How best to pass battery_level attribute: via device_state_attributes or via @property?
  • Some devices (including mine) support mop mode control when garbage container replaced with water tank. There are 3 levels of water intensity in API so I want to add controls like fan’s ones. How to implement that?

I would be very grateful if someone would test the integration or check the code for errors or bad practices. I tried to follow the checklist, but I still doubt if everything is done correctly. Really want to improve the integration so that it can get into the Home Assistant core :slight_smile:
Thank you

I can test. I have a Neatvor Vacuum driven by the Weback app. Can’t help you with programming though.

That’s beautiful. You can add integration as Custom Repository in the HACS settings section like this

What exactly is your vacuum cleaner model?

I have a NEATSVOR V392

  - username: +7-1234567890
    password: <password>

Should be:

  username: +7-1234567890
  password: <password>

Or it gives an invalid config error.
I added it in HACS, restarting now.

First try

Logboekdetails ( ERROR )
Logger: homeassistant.setup
Source: custom_components/weback/__init__.py:47
First occurred: 19:46:47 (1 occurrences)
Last logged: 19:46:47

Error during setup of component weback
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 175, in _async_setup_component
    component.setup, hass, processed_config  # type: ignore
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/weback/__init__.py", line 47, in setup
    devices = weback_api.device_list()
  File "/usr/local/lib/python3.7/site-packages/weback_unofficial/client.py", line 70, in device_list
    session = self.get_session()
  File "/usr/local/lib/python3.7/site-packages/weback_unofficial/client.py", line 127, in get_session
    region = weback_data['Region_Info']
KeyError: 'Region_Info'

My Region in Netherlands (also in the App)

I had to register a new account, as I originally registered my account using my email address. After registering with my phone number, everything worked as expected.

BTW - I’m using a Tesvor X500.

Oh, I will check this issue soon. Are you loggining in using phone number or via email?

Nice to hear it! Btw, have you tried loggining in via email? It may work but I have not checked that for now

Via E-mail

Cool :slight_smile: I have also robot vacuum cleaner. I can test it. I will re-register with my number.

re-registered with phonenumber. Everything works! E-mail did not work.

Got it. I will fix e-mail login this weekend, stay tuned :slight_smile:

Thank you for testing :slight_smile:
You can wait for my email registration fix if you want to (will do it this weekend)

1 Like

Home Assistant 0.108.3

VMware installation

2020-04-16 14:36:34 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.weback. Make sure all dependencies are installed
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 391, in _load_file
    module = importlib.import_module(path)
  File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/config/custom_components/weback/__init__.py", line 8, in <module>
    from weback_unofficial.client import WebackApi
ModuleNotFoundError: No module named 'weback_unofficial'

It looks like python3 is not capable to install/find the weback_unofficial package.

Reboot home assistant server (via supervisor, see screenshot) did the trick for me

Working now :slight_smile: With my Concept 3000 vacuum cleaner. Great job!

Do you know how this Vacuum.locate works and if it can be used in flat map to locate?

Nice to hear that :slight_smile:
AFAIK Vacuum.locate is a service which should play sound on your vacuum cleaner for you to find it in your house. Since I didn’t find it in WeBack app, this feature is not available for now. Maybe I’ll emulate it in the future by turning the robot on and off right away.

Great solutions. Tested it on my x500 works fine. Now I need to create a nice Lovelace card with all the options and data.

I was looking for the same thing. Just installed: https://github.com/thomasloven/lovelace-more-info-card

@Remco_Timmer @kwaczek @splnut
Could you please capture as many raw states as you can for me? You can check them in the bottom of the vacuum card. I need them to create aliases between Home Assistant states and WeBack ones. For example, turn robot in auto mode and write down raw state. Then put it back on charge, wait for it to finish etc.
Thank you