Weback cloud integration: testers and help required

Hello, help me please :cry: :cry:

I would like to try this integration, but actually I did not manage to login.
Iā€™ve tried to login directly using the python library weback-unofficial without luck.

I can successfully relogin in the Android WeBack App using my email adress and password, the region is ā€˜Germanyā€™.
I am now trying to login directly with the following curl command:

curl -H 'Content-Type: application/json' -d '{"App_Version": "android_3.9.3", "User_Account": "[email protected]", "Password": "..."}' https://www.weback-login.com/WeBack/WeBack_Login_Ats_V3

I tried with plain text password as well as hashed using python md5(password.encode('utf-8')).hexdigest().

The response is always:

{"Request_Result": "fail", "Fail_Reason": "account or password is incorrect"}

Any suggestions?

ok, sorry for the above post. Now using component from agustin-e which seems to be working fine so far

1 Like

Hi have a ikohs netbot s15 and does not work

Hi!
We need some more information about whatā€™s wrong if you want help ?
Error message ? Some log ?

Hi,
Thanks for great work. I am rocking with mamibot EXVAC-880
So far it works fine. Had some issues on startup but that was because at the first init/ha-restart weback cloud was rejecting all logins. Next morning all was resolved and after ha restart, my 880 appeared to entities list. Will test out current features, most seem to work so far. Will update progress at some point.

Again, nice work, @agustin-e

Kenno

EDIT: Opened an issue in github for my findings

Hello, @kenno
When you said cloud was rejecting all logins did you said you got 502 error code ?

Hi !
I decide to completly rewrite a component for Weback and Tesvor robot.
Sorry for your repo @agustin-e but i canā€™t made a PR to your code i did a deeply rewrite.

I improve a lot of stuff like :

  • Improve error handling
  • Implement a real HA async update process
  • Add full mop support
  • Add attributes like ā€œClean time, Clean areaā€¦ā€
  • Modulate refresh time : 5sec when robot is working, 120sec when itā€™s idle and charged
  • Improve HTTP api connexion with retry process, and cached credentials to avoid excess call to API.
  • Add full connexion parameters (eg : for user from Tesvor or other robot platform)

https://github.com/Jezza34000/homeassistant_weback_component

For the moment only checked with my Neatsvor X600, but i took manly my code from my Weback plugin for Jeedom who was tested with many brand, and many models.

3 Likes

Interesting upgrade!
Could you share a screenshot of your final card please? Also, are the attributes saved as single entities so that you can call their states in automations?
Thanks :slight_smile:

Hi !
I use the default HA vacuum card
Now you have in attributes more information :

2 Likes

Great work, @Jezza34000! Thank you for your efforts!

Unfortunately I cannot make it run, it says unable to login. Iā€™ve got a Tesvor S6 Turbo and configured it with the Tesvor App. Your readme does not give any hint what I need to set in ā€œapplicationā€ configuration field, also did not find options in code.
Would be very happy to get it working and test it.

Hi @dramsauer
When you said you are unable to login itā€™s with ā€œrequiredā€ only like : username, password, region ?
About other parameter i didnā€™t give more information cause i donā€™t have it. Yugong Machinery (manufacturer) donā€™t give any documentation about their API.
I know itā€™s required from other platform (like Tesvor, in your case) API request have thoses field when login, but i donā€™t know what really expected.

You can try with adding this :

  application: Tesvor

(itā€™s case sensible, take care about first upper)

If not working we will try other solutionā€¦

Edit : I just update readme.md and i improve login function to have more details about whatā€™s wrong. Update your component before test :wink:

Works with my vacuum as well Weback integration: mamibot EXVAC-880
@Jezza34000 Thanks, for effort of making the rewrite and yes, it was at some point 502
Keeping an eye on the integration for a few days and then will give feedback. Login and ping worked, robot located oneself when I pinged the location from HA

EDIT: first quick finding:
Screenshot_20221020-144448_Home Assistant

1 Like

Hi.

Thanks for your work.
I actually get some issues with the integration. I can see the vacuum card but it says that the entity is no longer provided by the integration weback_vacuum.
So my robotts name is ā€œNonoā€ :wink:
Its an Tesvor X500 and i use it normaly via the Weback app.

Screenshot 2022-10-20 134752

when i look at the log files i see 3 Errors.

Logger: homeassistant.components.vacuum
Source: custom_components/homeassistant_weback_component/vacuum.py:211
Integration: Vacuum (documentation, issues)
First occurred: 13:41:31 (2 occurrences)
Last logged: 13:41:31

Error adding entities for domain vacuum with platform weback_vacuum
Error while setting up weback_vacuum platform for vacuum
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 428, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 691, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 777, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 533, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 574, in _async_write_ha_state
    attr.update(self.extra_state_attributes or {})
  File "/config/custom_components/homeassistant_weback_component/vacuum.py", line 211, in extra_state_attributes
    "clean_area": round(self.device.robot_status['clean_area'], 1),
KeyError: 'clean_area'
Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: homeassistant
Source: custom_components/homeassistant_weback_component/vacuum.py:211
Integration: homeassistant_weback_component
First occurred: 13:42:15 (1 occurrences)
Last logged: 13:42:15

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 893, in _async_registry_updated
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 533, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 574, in _async_write_ha_state
    attr.update(self.extra_state_attributes or {})
  File "/config/custom_components/homeassistant_weback_component/vacuum.py", line 211, in extra_state_attributes
    "clean_area": round(self.device.robot_status['clean_area'], 1),
KeyError: 'clean_area'
Logger: homeassistant.helpers.integration_platform
Source: loader.py:739
First occurred: 13:41:30 (7 occurrences)
Last logged: 13:43:09

Unexpected error importing weback_vacuum/system_health.py
Unexpected error importing weback_vacuum/media_source.py
Unexpected error importing weback_vacuum/logbook.py
Unexpected error importing weback_vacuum/cast.py
Unexpected error importing weback_vacuum/hardware.py
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/integration_platform.py", line 40, in _async_process_single_integration_platform_component
    platform = integration.get_platform(platform_name)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 722, in get_platform
    cache[full_name] = self._import_platform(platform_name)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 739, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
  File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'custom_components.homeassistant_weback_component.diagnostics'

What have i done:

  1. Copied the integration into custom_components via WinSCP
  2. Added lines to my configuration.yaml
weback_vacuum:
  username: [email protected]
  password: MyFancyPassword
  region: 49

I hope you can do something with the information.

Update:

I just debugged the lib and found some things

It seems that Tesvor has some other extra attributes:

{
    "connected": "true",
    "upgrade_logic": "1.0",
    "robot_x": None,
    "robot_y": None,
    "point_num": None,
    "clean_time": None,
    "config_app": "WeBack",
    "firmware_version": "6.0.8.0422s",
    "yugong_software_version": "6.0.8",
    "device_2_app_proto_version": "1.1",
    "device_2_app_proto_info": {
        "mapdata_src": "s3",
        "mapdata_info": "es_yw_2.0",
        "direction_ctl": "user_topic"
    },
    "working_status": "PileCharging",
    "final_edge": "on",
    "optical_flow": "on",
    "fan_status": "Pause",
    "water_level": "None",
    "left_water": -1,
    "voice_switch": "on",
    "uv_lamp": "unsupport",
    "cliff_detect": "enable",
    "error_info": "NoError",
    "battery_level": 37,
    "vendor_firmware_version": "6528",
    "chassis_hardware_version": "00",
    "offset_hours": 2,
    "offset_minutes": 0,
    "Voicebox_Source": "null"
}

Also be aware that ā€œclean_timeā€ can have None as value. So there will be an error with the divide function. i replaced it in my vacuum.py line 212 with

"clean_time": 0 if self.device.robot_status['clean_time'] == None else round(self.device.robot_status['clean_time'] / 60, 0),

I commented all keys that are not in my robot_status.
Here is my vacuum.py line 209 to line 215

"robot_mode": mode,
            "error_info": self.device.error_info,
#            "clean_area": round(self.device.robot_status['clean_area'], 1),
            "clean_time": 0 if self.device.robot_status['clean_time'] == None else round(self.device.robot_status['clean_time'] / 60, 0),
#            "volume": self.device.robot_status['volume'],
            "voice": self.device.robot_status['voice_switch'],
#            "undisturb_mode": self.device.robot_status['undisturb_mode'],

So now iā€™m able to control my Tesvor X500, but i just testet start and stop.
I will test more in the future.

Hi @Hiswif , Hi @kenno

  • time.sleep is now fix in last version.
  • ā€œNoneā€ bug fix is pushed to lastest version

Thank you for your help guys !

@Hiswif i love you robotā€™s name :slight_smile:

2 Likes

Hi @Jezza34000 thank you very much for your work.

In the last version I have problems with integration.

Logger: homeassistant.helpers.integration_platform
Source: loader.py:739
First occurred: 11:50:59 (6 occurrences)
Last logged: 11:50:59

Unexpected error importing weback_vacuum/recorder.py
Unexpected error importing weback_vacuum/system_health.py
Unexpected error importing weback_vacuum/logbook.py
Unexpected error importing weback_vacuum/media_source.py
Unexpected error importing weback_vacuum/cast.py
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/integration_platform.py", line 40, in _async_process_single_integration_platform_component
    platform = integration.get_platform(platform_name)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 722, in get_platform
    cache[full_name] = self._import_platform(platform_name)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 739, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
  File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'custom_components.weback-home-assistant-component.diagnostics'
Logger: homeassistant.components.vacuum
Source: custom_components/weback-home-assistant-component/vacuum.py:213
Integration: Odkurzacz (documentation, issues)
First occurred: 11:50:59 (2 occurrences)
Last logged: 11:50:59

Error adding entities for domain vacuum with platform weback_vacuum
Error while setting up weback_vacuum platform for vacuum
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 428, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 691, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 777, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 533, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 574, in _async_write_ha_state
    attr.update(self.extra_state_attributes or {})
  File "/config/custom_components/weback-home-assistant-component/vacuum.py", line 213, in extra_state_attributes
    "volume": self.device.robot_status['volume'],
KeyError: 'volume'

OK looks like you robot donā€™t have soundā€¦ ? Which model is it ?
I push an update to avoid this problem

My robot is neatsvor x500, I have sounds turned on in the weback application.

@Jezza34000 I checked the new patch you posted. The robot started working properly - Thank you!

However, there is one more error in the logs

Logger: homeassistant.helpers.integration_platform
Source: loader.py:739
First occurred: 12:50:25 (7 occurrences)
Last logged: 12:52:01

Unexpected error importing weback_vacuum/system_health.py
Unexpected error importing weback_vacuum/media_source.py
Unexpected error importing weback_vacuum/logbook.py
Unexpected error importing weback_vacuum/cast.py
Unexpected error importing weback_vacuum/hardware.py
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/integration_platform.py", line 40, in _async_process_single_integration_platform_component
    platform = integration.get_platform(platform_name)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 722, in get_platform
    cache[full_name] = self._import_platform(platform_name)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 739, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
  File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'custom_components.weback-home-assistant-component.diagnostics'

About this :

I need to investigateā€¦ I donā€™t have this error and i donā€™t really know what the problemā€¦