home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.98k stars 29.06k forks source link

New Ecovac DEEBOT NEO 2.0 PLUS does not work with ecovac integration #120557

Open lukas1906 opened 3 weeks ago

lukas1906 commented 3 weeks ago

The problem

I have successfully added a new Ecovac DEEBOT NEO 2.0 PLUS to homeassistant (2024.6.4). However once added all sensors and controls are unavailable and I get the following Warnings in the log:

Logger: deebot_client.message Source: /usr/local/lib/python3.12/site-packages/deebot_client/message.py:196 First occurred: 20:54:34 (2 occurrences) Last logged: 21:01:51

Could not parse getMapTrace: {'data': {'pointCount': 200, 'traceStart': 0}} Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/deebot_client/message.py", line 190, in __handle_body_data response = cls._handle_body_data(event_bus, data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/deebot_client/message.py", line 233, in _handle_body_data return cls._handle_body_data_dict(event_bus, data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/deebot_client/commands/json/map.py", line 359, in _handle_body_data_dict total = int(data["totalCount"])


KeyError: 'totalCount'

Logger: deebot_client.message
Source: /usr/local/lib/python3.12/site-packages/deebot_client/message.py:196
First occurred: 20:54:23 (33 occurrences)
Last logged: 21:06:45

Could not parse getSpeed: None
Could not parse getChargeState: None
Could not parse getCleanInfo: None
Could not parse getMajorMap: None
Could not parse getBattery: None
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/deebot_client/message.py", line 191, in __handle_body_data
    if response.state == HandlingState.ANALYSE:
       ^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'state'

Logger: deebot_client.command
Source: runner.py:190
First occurred: 20:54:24 (47 occurrences)
Last logged: 21:14:53

Could not parse getBattery: {'ret': 'ok', 'resp': {'body': {'code': 0, 'data': None, 'msg': 'ok'}, 'header': {'fwVer': '9.7.4', 'm': 'response', 'ts': 1719400246, 'tzm': 600, 'ver': '0.0.9'}}, 'id': '0rSK', 'payloadType': 'j'}
Could not parse getBattery: {'ret': 'ok', 'resp': {'body': {'code': 0, 'data': None, 'msg': 'ok'}, 'header': {'fwVer': '9.7.4', 'm': 'response', 'ts': 1719400307, 'tzm': 600, 'ver': '0.0.9'}}, 'id': 'N2xW', 'payloadType': 'j'}
Could not parse getBattery: {'ret': 'ok', 'resp': {'body': {'code': 0, 'data': None, 'msg': 'ok'}, 'header': {'fwVer': '9.7.4', 'm': 'response', 'ts': 1719400368, 'tzm': 600, 'ver': '0.0.9'}}, 'id': '2kAz', 'payloadType': 'j'}
Could not parse getBattery: {'ret': 'ok', 'resp': {'body': {'code': 0, 'data': None, 'msg': 'ok'}, 'header': {'fwVer': '9.7.4', 'm': 'response', 'ts': 1719400429, 'tzm': 600, 'ver': '0.0.9'}}, 'id': 'Vgdn', 'payloadType': 'j'}
Could not parse getBattery: {'ret': 'ok', 'resp': {'body': {'code': 0, 'data': None, 'msg': 'ok'}, 'header': {'fwVer': '9.7.4', 'm': 'response', 'ts': 1719400490, 'tzm': 600, 'ver': '0.0.9'}}, 'id': 'qqQu', 'payloadType': 'j'}

### What version of Home Assistant Core has the issue?

2024.6.4

### What was the last working version of Home Assistant Core?

_No response_

### What type of installation are you running?

Home Assistant OS

### Integration causing the issue

ecovacs

### Link to integration documentation on our website

https://www.home-assistant.io/integrations/ecovacs/

### Diagnostics information

[config_entry-ecovacs-4a8b2a5374670de962409530d24f07ed.json](https://github.com/user-attachments/files/15987297/config_entry-ecovacs-4a8b2a5374670de962409530d24f07ed.json)

### Example YAML snippet

_No response_

### Anything in the logs that might be useful for us?

```txt
Logger: deebot_client.message
Source: /usr/local/lib/python3.12/site-packages/deebot_client/message.py:196
First occurred: 20:54:34 (2 occurrences)
Last logged: 21:01:51

Could not parse getMapTrace: {'data': {'pointCount': 200, 'traceStart': 0}}
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/deebot_client/message.py", line 190, in __handle_body_data
    response = cls._handle_body_data(event_bus, data)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/deebot_client/message.py", line 233, in _handle_body_data
    return cls._handle_body_data_dict(event_bus, data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/deebot_client/commands/json/map.py", line 359, in _handle_body_data_dict
    total = int(data["totalCount"])
                ~~~~^^^^^^^^^^^^^^
KeyError: 'totalCount'

Logger: deebot_client.message
Source: /usr/local/lib/python3.12/site-packages/deebot_client/message.py:196
First occurred: 20:54:23 (33 occurrences)
Last logged: 21:06:45

Could not parse getSpeed: None
Could not parse getChargeState: None
Could not parse getCleanInfo: None
Could not parse getMajorMap: None
Could not parse getBattery: None
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/deebot_client/message.py", line 191, in __handle_body_data
    if response.state == HandlingState.ANALYSE:
       ^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'state'

Logger: deebot_client.command
Source: runner.py:190
First occurred: 20:54:24 (47 occurrences)
Last logged: 21:14:53

Could not parse getBattery: {'ret': 'ok', 'resp': {'body': {'code': 0, 'data': None, 'msg': 'ok'}, 'header': {'fwVer': '9.7.4', 'm': 'response', 'ts': 1719400246, 'tzm': 600, 'ver': '0.0.9'}}, 'id': '0rSK', 'payloadType': 'j'}
Could not parse getBattery: {'ret': 'ok', 'resp': {'body': {'code': 0, 'data': None, 'msg': 'ok'}, 'header': {'fwVer': '9.7.4', 'm': 'response', 'ts': 1719400307, 'tzm': 600, 'ver': '0.0.9'}}, 'id': 'N2xW', 'payloadType': 'j'}
Could not parse getBattery: {'ret': 'ok', 'resp': {'body': {'code': 0, 'data': None, 'msg': 'ok'}, 'header': {'fwVer': '9.7.4', 'm': 'response', 'ts': 1719400368, 'tzm': 600, 'ver': '0.0.9'}}, 'id': '2kAz', 'payloadType': 'j'}
Could not parse getBattery: {'ret': 'ok', 'resp': {'body': {'code': 0, 'data': None, 'msg': 'ok'}, 'header': {'fwVer': '9.7.4', 'm': 'response', 'ts': 1719400429, 'tzm': 600, 'ver': '0.0.9'}}, 'id': 'Vgdn', 'payloadType': 'j'}
Could not parse getBattery: {'ret': 'ok', 'resp': {'body': {'code': 0, 'data': None, 'msg': 'ok'}, 'header': {'fwVer': '9.7.4', 'm': 'response', 'ts': 1719400490, 'tzm': 600, 'ver': '0.0.9'}}, 'id': 'qqQu', 'payloadType': 'j'}
```

### Additional information

I also have an older model  Ecovacs Neo that works without problems.

Thank you for any assistance.
home-assistant[bot] commented 3 weeks ago

Hey there @overloadut, @mib1185, @edenhaus, @augar, mind taking a look at this issue as it has been labeled with an integration (ecovacs) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `ecovacs` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign ecovacs` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


ecovacs documentation ecovacs source (message by IssueLinks)

edenhaus commented 2 weeks ago

Your bot is not returning any data ('data': None,), so we cannot handle the response. As Ecovacs doesn't publish any API documentation, you can only analyze the app traffic and find out what the app does differently. You could also ask Ecovacs to provide API documentation for your bot, as they recently wrote a blog post about it (https://www.ecovacs.com/us/blog/do-robot-vacuums-work-with-home-assistant)

lukas1906 commented 2 weeks ago

Thank you for your reply. I have contacted Ecovacs. Lets see if anything comes about.

Whytey commented 1 week ago

Just adding that I am seeing the same thing. Picked the bot up at AU Aldi to complement the original Neo I have from a few years ago. Frustratingly, the OG neo works fine with the integration. 🤦