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

Integration not showing up after installation #176

Closed LonelyNoah closed 2 years ago

LonelyNoah commented 2 years ago

Checks

The problem

I have installed the integration from HACS, I then restarted Home Assistant. I then went into Configuration -> Devices & Services and then I added it from there. I put my email, username, country, continent in and then this comes up: image It does not show up in the integrations after this, and I can't find any device that looks like my vacuum. My Model Is Supported: Deebot X1 Omni, I have tried the official integration aswell. The account has the vacuum shared via my main account(So the account I'm trying to connect to home assistant has the vacuum shared, I don't know if that has anything to do with it.) If I put the wrong password in, it says wrong password, so there's not a problem with the credentials.

On which deebot vacuum you have the issue?

Deebot X1 Omni

Which version of the Deebot component are you using?

1.3.1

Which version of Home Assistant are you using?

Core = 2022.5.1, Supervisor = 2022.05.1

What type of installation are you running?

Home Assistant Supervised

Country

se

Continent

eu

Instance type

Cloud

Anything in the logs that might be useful for us?

I can't find anything in the logs.

Additional information

No response

mrbungle64 commented 2 years ago

@LonelyNoah

Please take a look again at the Model support page. The Deebot X1 Omni has no status and is listed as "No status or info available. Feedback is welcome" (see legend section).

Please make sure that you have enabled debug level and check again if you can find something useful in the logs.

LonelyNoah commented 2 years ago

Ah, I missed that it didn't have a status. Anyways, I enabled debug level and I downloaded the full logs, but I can't seem to find anything with deebot in the logs when I search for it except that it has not been tested by Home Assistant.

edenhaus commented 2 years ago

Please check again that you have enabled the debug logs like it says in the above link. There must be some logs during the authentication process…

LonelyNoah commented 2 years ago

Alright, I have managed to find some logs. [homeassistant.util.json] JSON file not found: /config/custom_components/deebot/translations/sv.json [custom_components.hacs] <Integration DeebotUniverse/Deebot-4-Home-Assistant> Getting repository information [custom_components.hacs] <Integration DeebotUniverse/Deebot-4-Home-Assistant> Running checks against 1.3.1 That's everything that I am able to find It looks like the language is not supported, and I don't know if this is what's causing it

edenhaus commented 2 years ago

The language file is not a problem, as it will fallback automatically to English, but there must be logs with debug level if you have enabled them like in the docs is written.

You will get some similar logs as:

2022-05-17 10:26:31 DEBUG (MainThread) [deebot_client.authentication] No cached credentials, performing login
2022-05-17 10:26:31 DEBUG (MainThread) [deebot_client.authentication] Start login to EcovacsAPI
2022-05-17 10:26:31 DEBUG (MainThread) [deebot_client.authentication] calling login api
2022-05-17 10:26:34 DEBUG (MainThread) [deebot_client.authentication] got {'code': '0000', 'data': {'ucUid': '[REMOVED]', 'loginName': '[REMOVED]', 'mobile': '[REMOVED]', 'accessToken': '[REMOVED]', 'uid': '[REMOVED]', 'username': '[REMOVED]', 'country': 'it', 'email': '[REMOVED]'}, 'msg': '操作成功', 'time': 1652768793981}
2022-05-17 10:26:34 DEBUG (MainThread) [deebot_client.authentication] calling auth api
2022-05-17 10:26:34 DEBUG (MainThread) [deebot_client.authentication] got {'code': '0000', 'data': {'authCode': '[REMOVED]', 'ecovacsUid': '[REMOVED]'}, 'msg': '操作成功', 'success': True, 'time': 1652768794827}
2022-05-17 10:26:34 DEBUG (MainThread) [deebot_client._api_client] calling api users/user.do with {'edition': 'ECOGLOBLE', 'userId': '[REMOVED]', 'token': '[REMOVED]', 'realm': 'ecouser.net', 'resource': 'Deebot-4-HA_2b71', 'org': 'ECOWW', 'last': '', 'country': 'IT', 'todo': 'loginByItToken'}
2022-05-17 10:26:35 DEBUG (MainThread) [deebot_client._api_client] got {'resource': 'Deebot-4-HA_2b71', 'result': 'ok', 'todo': 'result', 'token': '[REMOVED]', 'userId': '[REMOVED]'}
2022-05-17 10:26:35 DEBUG (MainThread) [deebot_client.authentication] Login to EcovacsAPI successfully
2022-05-17 10:26:35 DEBUG (MainThread) [deebot_client._api_client] calling api appsvr/app.do with {'userid': '[REMOVED]', 'todo': 'GetGlobalDeviceList'}
2022-05-17 10:26:35 DEBUG (MainThread) [deebot_client._api_client] got {'code': 0, 'devices': [{'class': 'yna5xi', 'company': 'eco-ng', 'did': '[REMOVED]', 'name': 'xxx', 'nick': 'Susi', 'resource': 'XZKQ', 'mqtt_connection': True, 'xmpp_connection': False, 'UILogicId': 'DX_9G', 'ota': True, 'icon': 'https://portal-ww.ecouser.net/api/pim/file/get/xxx', 'model': 'DX9G', 'pip': 'xxx', 'deviceName': 'DEEBOT OZMO 950 Series', 'materialNo': '110-1820-0101', 'product_category': 'DEEBOT', 'status': 1}], 'ret': 'ok', 'todo': 'result'}
2022-05-17 10:26:35 DEBUG (MainThread) [custom_components.deebot.hub] New vacbot found: xxx
2022-05-17 10:26:35 DEBUG (MainThread) [custom_components.deebot.hub] Hub setup complete
LonelyNoah commented 2 years ago

I used SSH instead of file editor to see the logs and I'm now able to find some logs with the authentication.

DEBUG (MainThread) [deebot_client.authentication] No cached credentials, performing login
DEBUG (MainThread) [deebot_client.authentication] Start login to EcovacsAPI
DEBUG (MainThread) [deebot_client.authentication] calling login api
DEBUG (MainThread) [deebot_client.authentication] got {'code': '0000', 'data': {'ucUid': '[REMOVED]', 'accessToken': '[REMOVED]', 'loginName': '[REMOVED]', 'mobile': '[REMOVED]', 'uid': '[REMOVED]', 'username': '[REMOVED]', 'email': '[REMOVED]', 'success': True}, 'msg': '操作成功', 'time': 1652776398748}
DEBUG (MainThread) [deebot_client.authentication] calling auth api
DEBUG (MainThread) [deebot_client.authentication] got {'code': '0000', 'data': {'authCode': '[REMOVED]', 'ecovacsUid': '[REMOVED]'}, 'msg': '操作成功', 'success': True, 'time': 1652776398748}
DEBUG [deebot_client._api_client] calling api users/user.do with {'edition': 'ECOGLOBLE', 'userId': '[REMOVED]', 'token': '[REMOVED]', 'realm': 'ecouser.net', 'resource': '1SIG917E', 'org': 'ECOWW', 'last': '', 'country': 'SE', 'todo': 'loginByItToken'}
DEBUG (MainThread) [deebot_client.authentication] got {'resource': '1SIG917E', 'result': 'ok', 'todo': 'result', 'token': '[REMOVED]', 'userId': '[REMOVED]', 'last': 604800000}
DEBUG [deebot_client._api_client] Switching to shorter UID
DEBUG [deebot_client._api_client] Login to EcovacsAPI successfully
DEBUG (MainThread) [deebot_client._api_client] calling api appsvr/app.do with {'userid': '[REMOVED]', 'todo': 'GetGlobalDeviceList'}
DEBUG (MainThread) [deebot_client._api_client] got {'code': 0, 'todo': 'result', 'ret': 'ok', 'devices': []}

The last line shows that the devices are empty/none.

edenhaus commented 2 years ago

There is a bug, that you don't get a error message, that no devices are found. I will look into this.

But you need to investigate, why you don't get a device back. Probably ecovacs has changed something on their api. Do you have the technical skills to intercept the traffic of the app and compare which requests are different?

LonelyNoah commented 2 years ago

I'm not sure. I've worked with api's in Python, but I don't know how different it's in home assistant. I'm going to install the client into python and see if what I can do

jchurchward commented 2 years ago

I have a Deebot (OZMO) T8 series robot and it's coming up with unavailable / unknown. It logs in fine and adds the intergration though. I tried changing country and continent sometimes works sometimes doesn't so definitely their API has changed.

edenhaus commented 2 years ago

Probably the have changed the api for newer bots.

The best would be to analyse the traffic of the app.

mrbungle64 commented 2 years ago

I have a Deebot (OZMO) T8 series robot and it's coming up with unavailable / unknown. It logs in fine and adds the intergration though. I tried changing country and continent sometimes works sometimes doesn't so definitely their API has changed.

@jchurchward Can you please explain why you think this is "definitely" the case?

My Deebot OZMO T8 AIVI is still working properly with this integration (and also with my own integrations). There is no indication (in my opinion) that the API has been changed.

LonelyNoah commented 2 years ago

Personally, I don't see anything pointing towards that their API has changed. It returns everything it should back in the response, but in my case, it gives me an empty list.

edenhaus commented 2 years ago

@LonelyNoah Can you please intercept the traffic of the app and check what is different Probably the app make the request for the devices differently.

LonelyNoah commented 2 years ago

@edenhaus I have contacted you on discord

tismondo commented 2 years ago

Hi all, thanks for your attention to this issue. I've gotten the same behavior from the integration (blank screen after adding credentials, no error message) but my vacuum is an N79S. The supported models page confirms the N79 series is supported.

I followed instructions to output debug logs and received the following showing my device was recognized as DN622 instead of N79S. It is decidedly the latter!

Edit: On closer inspection it looks like DN622 is a model name and N79S is the product name? I don't know why they make that distinction, but anyway - I see now that this may not be the same issue at all. But the bottom line is the logs are reporting my N79S is not supported, whereas the supported model page says that it should be. Happy to make a new issue for this if required?


2022-05-24 14:20:05 DEBUG (MainThread) [deebot_client.authentication] Start login to EcovacsAPI
2022-05-24 14:20:05 DEBUG (MainThread) [deebot_client.authentication] calling login api
2022-05-24 14:20:06 DEBUG (MainThread) [deebot_client.authentication] got {'code': '0000', 'msg': '操作成功', 'time': 1653369606433, 'data': {'uid': '[REMOVED]', 'accessToken': '[REMOVED]', 'userName': '[REMOVED]', 'email': '[REMOVED]', 'mobile': '[REMOVED]', 'isNew': None, 'loginName': '[REMOVED]', 'ucUid': '[REMOVED]'}, 'success': True}
2022-05-24 14:20:06 DEBUG (MainThread) [deebot_client.authentication] calling auth api
2022-05-24 14:20:07 DEBUG (MainThread) [deebot_client.authentication] got {'code': '0000', 'msg': '操作成功', 'time': 1653369607159, 'data': {'authCode': '[REMOVED]', 'ecovacsUid': '[REMOVED]'}, 'success': True}
2022-05-24 14:20:07 DEBUG (MainThread) [deebot_client._api_client] calling api users/user.do with {'edition': 'ECOGLOBLE', 'userId': '[REMOVED]', 'token': '[REMOVED]', 'realm': 'ecouser.net', 'resource': 'W9315Y9C', 'org': 'ECOWW', 'last': '', 'country': 'US', 'todo': 'loginByItToken'}
2022-05-24 14:20:07 DEBUG (MainThread) [deebot_client._api_client] got {'todo': 'result', 'result': 'ok', 'userId': '[REMOVED]', 'resource': 'W9315Y9C', 'token': '[REMOVED]', 'last': 604800000}
2022-05-24 14:20:07 DEBUG (MainThread) [deebot_client.authentication] Switching to shorter UID
2022-05-24 14:20:07 DEBUG (MainThread) [deebot_client.authentication] Login to EcovacsAPI successfully
2022-05-24 14:20:07 DEBUG (MainThread) [deebot_client._api_client] calling api appsvr/app.do with {'userid': '[REMOVED]', 'todo': 'GetGlobalDeviceList'}
2022-05-24 14:20:08 DEBUG (MainThread) [deebot_client._api_client] got {'code': 0, 'todo': 'result', 'ret': 'ok', 'devices': [{'did': '[REMOVED]', 'name': 'E000P8U2318604421160', 'class': '155', 'resource': 'atom', 'nick': 'rowb', 'company': 'eco-legacy', 'homeSort': 9999, 'deviceName': 'DEEBOT N79S/SE', 'icon': 'https://portal-ww.ecouser.net/api/pim/file/get/5cd4ca505b032200015a455d', 'ota': False, 'UILogicId': 'ECO_INTL_155', 'materialNo': '702-0000-0164', 'pid': '5cce893813afb7000195d6af', 'product_category': 'DEEBOT', 'model': 'DN622', 'updateInfo': {'needUpdate': False, 'changeLog': ''}, 'status': 2}]}
2022-05-24 14:20:08 DEBUG (MainThread) [deebot_client.api_client] Skipping device as it is not supported: {'did': '[REMOVED]', 'name': 'E000P8U2318604421160', 'class': '155', 'resource': 'atom', 'nick': 'rowb', 'company': 'eco-legacy', 'homeSort': 9999, 'deviceName': 'DEEBOT N79S/SE', 'icon': 'https://portal-ww.ecouser.net/api/pim/file/get/5cd4ca505b032200015a455d', 'ota': False, 'UILogicId': 'ECO_INTL_155', 'materialNo': '702-0000-0164', 'pid': '5cce893813afb7000195d6af', 'product_category': 'DEEBOT', 'model': 'DN622', 'updateInfo': {'needUpdate': False, 'changeLog': ''}, 'status': 2}```
LonelyNoah commented 2 years ago

Part of your issue seems to be like mine, except I can't seem to get my device in the logs like you are able to, so I am not getting any unsupported message.

mrbungle64 commented 2 years ago

@tismondo

The supported models page confirms the N79 series is supported.

Please take a look again at the Model support page again. The N79S is not supported by the deebot-client used by the Deebot-4 Home Assistant.

The official HA integration should work for this model.

edenhaus commented 2 years ago

@LonelyNoah as I have written you already on Discord. You need to analyse the traffic of the app and verify what's is different

LonelyNoah commented 2 years ago

I'm doing my best to intercept the traffic, but I'm having problems with certificate pinning.

github-actions[bot] commented 2 years 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.

SergioRius commented 2 years ago

I have a Deebot Ozmo 930 and I'm having the same problem while installing the integration. The configuration is ok but it ends with an empty dialog and when closed, there is nothing installed.

imagen

The logs debug shows:

2022-06-02 12:29:36 DEBUG (MainThread) [deebot_client.authentication] No cached credentials, performing login
2022-06-02 12:29:36 DEBUG (MainThread) [deebot_client.authentication] Start login to EcovacsAPI
2022-06-02 12:29:36 DEBUG (MainThread) [deebot_client.authentication] calling login api
2022-06-02 12:29:37 DEBUG (MainThread) [deebot_client.authentication] got {'code': '0000', 'msg': '操作成功', 'time': 1654165777314, 'data': {'uid': '[REMOVED]', 'accessToken': '[REMOVED]', 'userName': '[REMOVED]', 'email': '[REMOVED]', 'mobile': '[REMOVED]', 'isNew': None, 'loginName': '[REMOVED]', 'ucUid': '[REMOVED]'}, 'success': True}
2022-06-02 12:29:37 DEBUG (MainThread) [deebot_client.authentication] calling auth api
2022-06-02 12:29:38 DEBUG (MainThread) [deebot_client.authentication] got {'code': '0000', 'msg': '操作成功', 'time': 1654165778336, 'data': {'authCode': '[REMOVED]', 'ecovacsUid': '[REMOVED]'}, 'success': True}
2022-06-02 12:29:38 DEBUG (MainThread) [deebot_client._api_client] calling api users/user.do with {'edition': 'ECOGLOBLE', 'userId': '[REMOVED]', 'token': '[REMOVED]', 'realm': 'ecouser.net', 'resource': '94NHDUC8', 'org': 'ECOWW', 'last': '', 'country': 'ES', 'todo': 'loginByItToken'}
2022-06-02 12:29:39 DEBUG (MainThread) [deebot_client._api_client] got {'todo': 'result', 'result': 'ok', 'userId': '[REMOVED]', 'resource': '94NHDUC8', 'token': '[REMOVED]', 'last': 604800000}
2022-06-02 12:29:39 DEBUG (MainThread) [deebot_client.authentication] Switching to shorter UID
2022-06-02 12:29:39 DEBUG (MainThread) [deebot_client.authentication] Login to EcovacsAPI successfully
2022-06-02 12:29:39 DEBUG (MainThread) [deebot_client._api_client] calling api appsvr/app.do with {'userid': '[REMOVED]', 'todo': 'GetGlobalDeviceList'}
2022-06-02 12:29:39 DEBUG (MainThread) [deebot_client._api_client] got {'code': 0, 'todo': 'result', 'ret': 'ok', 'devices': [{'did': '[REMOVED]', 'name': '[REMOVED]', 'class': '115', 'resource': 'atom', 'company': 'eco-legacy', 'homeId': '[REMOVED]', 'homeSort': 9999, 'deviceName': 'DEEBOT OZMO/PRO 930 Series', 'icon': 'https://portal-ww.ecouser.net/api/pim/file/get/[REMOVED]', 'ota': True, 'UILogicId': 'DR_930G', 'materialNo': '110-1602-0101', 'pid': '[REMOVED]', 'product_category': 'DEEBOT', 'model': 'DR930', 'updateInfo': {'needUpdate': False, 'changeLog': ''}, 'status': 2}]}
2022-06-02 12:29:39 DEBUG (MainThread) [deebot_client.api_client] Skipping device as it is not supported: {'did': '[REMOVED]', 'name': '[REMOVED]', 'class': '115', 'resource': 'atom', 'company': 'eco-legacy', 'homeId': '[REMOVED]', 'homeSort': 9999, 'deviceName': 'DEEBOT OZMO/PRO 930 Series', 'icon': 'https://portal-ww.ecouser.net/api/pim/file/get/[REMOVED]', 'ota': True, 'UILogicId': 'DR_930G', 'materialNo': '110-1602-0101', 'pid': '[REMOVED]', 'product_category': 'DEEBOT', 'model': 'DR930', 'updateInfo': {'needUpdate': False, 'changeLog': ''}, 'status': 2}

And that's it.

Although the portal shows the 930 as "Confirmed to work flawlessly and at least one of the main developers owns such a device" imagen

edenhaus commented 2 years ago

@SergioRius As written in your logs, the 930 is not supported.

Although the portal shows the 930 as "Confirmed to work flawlessly and at least one of the main developers owns such a device"

You have looked under the wrong table. The docs is used for multiple projects and you need to check the correct table. I will improve docs soon, so it is not possible anymore to check the wrong table :)

github-actions[bot] commented 2 years 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.