DeebotUniverse / Deebot-4-Home-Assistant

Home Assistant integration for deebot vacuums
https://deebot.readthedocs.io/integrations/home-assistant/
GNU General Public License v3.0
180 stars 40 forks source link

Parameter error since last update #513

Closed gpongelli closed 7 months ago

gpongelli commented 8 months ago

Checks

The problem

Deebot vacuum no more available on HA because of login error

Diagnostics information

No diagnostic from Deebot T9 due to login unavailable in HA.

using official iOS app works correctly.

Anything in the logs that might be useful for us?

Log:

Logger: deebot_client.authentication
Source: custom_components/deebot/config_flow.py:262
Integration: Deebot 4 Home Assistant (documentation, issues)
First occurred: 16:02:38 (3 occurrences)
Last logged: 16:03:52

call to https://gl-IT-api.ecovacs.com/v1/private/IT/EN/AZQH7VG0/global_e/1.6.3/google_play/1/user/login failed with {'code': '0005', 'msg': 'Parameter error. Please try again later.', 'time': 1706111811653}
call to https://gl-IT-api.ecovacs.com/v1/private/IT/EN/AZQH7VG0/global_e/1.6.3/google_play/1/user/login failed with {'code': '0005', 'msg': 'Parameter error. Please try again later.', 'time': 1706111836246}
call to https://gl-it-api.ecovacs.com/v1/private/it/EN/AZQH7VG0/global_e/1.6.3/google_play/1/user/login failed with {'code': '0005', 'msg': 'Parameter error. Please try again later.', 'time': 1706111885213}

Unexpected exception traceback 

Logger: custom_components.deebot.config_flow
Source: custom_components/deebot/config_flow.py:82
Integration: Deebot 4 Home Assistant (documentation, issues)
First occurred: 16:02:38 (3 occurrences)
Last logged: 16:03:52

Unexpected exception
Traceback (most recent call last):
  File "/config/custom_components/deebot/config_flow.py", line 82, in async_step_user
    self._devices = await _retrieve_devices(self.hass, data)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/deebot/config_flow.py", line 262, in _retrieve_devices
    return await api_client.get_devices()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/deebot_client/api_client.py", line 23, in get_devices
    credentials = await self._authenticator.authenticate()
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/deebot_client/authentication.py", line 329, in authenticate
    self._credentials = await self._auth_client.login()
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/deebot_client/authentication.py", line 69, in login
    login_password_resp = await self.__call_login_api(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/deebot_client/authentication.py", line 138, in __call_login_api
    return await self.__do_auth_response(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/deebot_client/authentication.py", line 119, in __do_auth_response
    raise AuthenticationError(msg)
deebot_client.exceptions.AuthenticationError: failure code 0005 (Parameter error. Please try again later.) for call https://gl-IT-api.ecovacs.com/v1/private/IT/EN/AZQH7VG0/global_e/1.6.3/google_play/1/user/login

Additional information

No response

edenhaus commented 8 months ago

Do you have the ability to intercept the communication between the app and the server and check what has changed? My robot and login are working, so I can't analyze what has changed.

gpongelli commented 8 months ago

Could you tell me how to do that? What you need, which format…?

edenhaus commented 8 months ago

I use https://mitmproxy.org/ to analyze the requests done with the app. Probably something has change and we need to find out what

github-actions[bot] commented 8 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

gpongelli commented 8 months ago

I’ve no idea on how to use mitm-proxy, could you help me?

edenhaus commented 8 months ago

I run it via docker with the command described in https://hub.docker.com/r/mitmproxy/mitmproxy but I'm not sure if you are familiar with it. Afterwards you must setup the proxy on your device as described in their docs

gpongelli commented 7 months ago

After upgrading HA to 2024.1.6 and your integration to 3.2.0 , I’ve created the robot again and it’s there (many sensors are disabled but it’s a different issue). Thanks

github-actions[bot] commented 7 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.