Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ecovacs - component not loading #24063

Closed
AbDhops opened this issue May 23, 2019 · 5 comments
Closed

Ecovacs - component not loading #24063

AbDhops opened this issue May 23, 2019 · 5 comments

Comments

@AbDhops
Copy link

AbDhops commented May 23, 2019

Home Assistant release with the issue:
0.92.2

Last working Home Assistant release (if known):

Operating environment (Hass.io/Docker/Windows/etc.):
Synology Docker

Component/platform:
https://www.home-assistant.io/components/ecovacs/

Description of problem:
This issue was exist since long. It was claimed to be resolved under #18054. However, issue still exist. So opening new issue.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

ecovacs:
  username: !secret ecovacs_login_ID
  password: !secret ecovacs_login_PW
  country: de
  continent: eu

Traceback (if applicable):

  File "/usr/src/app/homeassistant/setup.py", line 156, 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 "/usr/src/app/homeassistant/components/ecovacs/__init__.py", line 49, in setup
    config[DOMAIN].get(CONF_CONTINENT))
  File "/usr/local/lib/python3.7/site-packages/sucks/__init__.py", line 126, in __init__
    login_response = self.__call_login_by_it_token()
  File "/usr/local/lib/python3.7/site-packages/sucks/__init__.py", line 185, in __call_login_by_it_token
    'token': self.auth_code}
  File "/usr/local/lib/python3.7/site-packages/sucks/__init__.py", line 177, in __call_user_api
    "failure {} ({}) for call {} and parameters {}".format(json['error'], json['errno'], function, params))
RuntimeError: failure set token error. (0) for call loginByItToken and parameters {'todo': 'loginByItToken', 'country': 'DE', 'resource': 'FV6DH5CB', 'realm': 'ecouser.net', 'userId': '11111111111111111111111111111111111', 'token': 'de_111111111111111111111111111111111'}

Additional information:
Sucks library in itself is working. Confirmed from command line.

@ghost
Copy link

ghost commented May 23, 2019

Hey there @OverloadUT, mind taking a look at this issue as its been labeled with a integration (ecovacs) you are listed as a codeowner for? Thanks!

This is a automatic comment generated by codeowners-mention to help ensure issues and pull requests are seen by the right people.

@collse
Copy link

collse commented Jun 13, 2019

I have used sucks to test the actual login and it seems UK/EU does no longer work ... I have changed it to US/NA now and it is working again ...

to test, change into your environment and then perform:

# sucks login
enter email
enter password
enter 2 letter code
enter region

see if it works - I had failures for UK/eu not being valid options - changed to US/NA and its working again ...

KeyError: "Invalid Country Alpha-2 code: 'UK'"

seems like the codes may have changed

$ cat /srv/homeassistant/lib/python3.6/site-packages/pycountry_convert/convert_country_alpha2_to_continent_code.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#  @copyright 2018 TUNE, Inc. (http://www.tune.com)
#  @namespace pycountry-convert
"""
Mapping of Country Alpha-2 to Continent Code, from Wikipedia
"""

COUNTRY_ALPHA2_TO_CONTINENT_CODE = {
    'AB': 'AS',
    'AD': 'EU',
    'AE': 'AS',
    'AF': 'AS',
    'AG': 'NA',
    'AI': 'NA',
    'AL': 'EU',
    'AM': 'AS',
    'AO': 'AF',
    'AR': 'SA',
    'AS': 'OC',
    'AT': 'EU',
    'AU': 'OC',
    'AW': 'NA',
    'AX': 'EU',
    'AZ': 'AS',
    'BA': 'EU',
    'BB': 'NA',
    'BD': 'AS',
    'BE': 'EU',
    'BF': 'AF',
    'BG': 'EU',
    'BH': 'AS',
    'BI': 'AF',
    'BJ': 'AF',
    'BL': 'NA',
    'BM': 'NA',
    'BN': 'AS',
    'BO': 'SA',
    'BQ': 'NA',
    'BR': 'SA',
    'BS': 'NA',
    'BT': 'AS',
    'BV': 'AN',
    'BW': 'AF',
    'BY': 'EU',
    'BZ': 'NA',
    'CA': 'NA',
    'CC': 'AS',
    'CD': 'AF',
    'CF': 'AF',
    'CG': 'AF',
    'CH': 'EU',
    'CI': 'AF',
    'CK': 'OC',
    'CL': 'SA',
    'CM': 'AF',
    'CN': 'AS',
    'CO': 'SA',
    'CR': 'NA',
    'CU': 'NA',
    'CV': 'AF',
    'CW': 'NA',
    'CX': 'AS',
    'CY': 'AS',
    'CZ': 'EU',
    'DE': 'EU',
    'DJ': 'AF',
    'DK': 'EU',
    'DM': 'NA',
    'DO': 'NA',
    'DZ': 'AF',
    'EC': 'SA',
    'EE': 'EU',
    'EG': 'AF',
    'ER': 'AF',
    'ES': 'EU',
    'ET': 'AF',
    'FI': 'EU',
    'FJ': 'OC',
    'FK': 'SA',
    'FM': 'OC',
    'FO': 'EU',
    'FR': 'EU',
    'GA': 'AF',
    'GB': 'EU',
    'GD': 'NA',
    'GE': 'AS',
    'GF': 'SA',
    'GG': 'EU',
    'GH': 'AF',
    'GI': 'EU',
    'GL': 'NA',
    'GM': 'AF',
    'GN': 'AF',
    'GP': 'NA',
    'GQ': 'AF',
    'GR': 'EU',
    'GS': 'SA',
    'GT': 'NA',
    'GU': 'OC',
    'GW': 'AF',
    'GY': 'SA',
    'HK': 'AS',
    'HM': 'AN',
    'HN': 'NA',
    'HR': 'EU',
    'HT': 'NA',
    'HU': 'EU',
    'ID': 'AS',
    'IE': 'EU',
    'IL': 'AS',
    'IM': 'EU',
    'IN': 'AS',
    'IO': 'AS',
    'IQ': 'AS',
    'IR': 'AS',
    'IS': 'EU',
    'IT': 'EU',
    'JE': 'EU',
    'JM': 'NA',
    'JO': 'AS',
    'JP': 'AS',
    'KE': 'AF',
    'KG': 'AS',
    'KH': 'AS',
    'KI': 'OC',
    'KM': 'AF',
    'KN': 'NA',
    'KP': 'AS',
    'KR': 'AS',
    'KW': 'AS',
    'KY': 'NA',
    'KZ': 'AS',
    'LA': 'AS',
    'LB': 'AS',
    'LC': 'NA',
    'LI': 'EU',
    'LK': 'AS',
    'LR': 'AF',
    'LS': 'AF',
    'LT': 'EU',
    'LU': 'EU',
    'LV': 'EU',
    'LY': 'AF',
    'MA': 'AF',
    'MC': 'EU',
    'MD': 'EU',
    'ME': 'EU',
    'MF': 'NA',
    'MG': 'AF',
    'MH': 'OC',
    'MK': 'EU',
    'ML': 'AF',
    'MM': 'AS',
    'MN': 'AS',
    'MO': 'AS',
    'MP': 'OC',
    'MQ': 'NA',
    'MR': 'AF',
    'MS': 'NA',
    'MT': 'EU',
    'MU': 'AF',
    'MV': 'AS',
    'MW': 'AF',
    'MX': 'NA',
    'MY': 'AS',
    'MZ': 'AF',
    'NA': 'AF',
    'NC': 'OC',
    'NE': 'AF',
    'NF': 'OC',
    'NG': 'AF',
    'NI': 'NA',
    'NL': 'EU',
    'NO': 'EU',
    'NP': 'AS',
    'NR': 'OC',
    'NU': 'OC',
    'NZ': 'OC',
    'OM': 'AS',
    'OS': 'AS',
    'PA': 'NA',
    'PE': 'SA',
    'PF': 'OC',
    'PG': 'OC',
    'PH': 'AS',
    'PK': 'AS',
    'PL': 'EU',
    'PM': 'NA',
    'PR': 'NA',
    'PS': 'AS',
    'PT': 'EU',
    'PW': 'OC',
    'PY': 'SA',
    'QA': 'AS',
    'RE': 'AF',
    'RO': 'EU',
    'RS': 'EU',
    'RU': 'EU',
    'RW': 'AF',
    'SA': 'AS',
    'SB': 'OC',
    'SC': 'AF',
    'SD': 'AF',
    'SE': 'EU',
    'SG': 'AS',
    'SH': 'AF',
    'SI': 'EU',
    'SJ': 'EU',
    'SK': 'EU',
    'SL': 'AF',
    'SM': 'EU',
    'SN': 'AF',
    'SO': 'AF',
    'SR': 'SA',
    'SS': 'AF',
    'ST': 'AF',
    'SV': 'NA',
    'SY': 'AS',
    'SZ': 'AF',
    'TC': 'NA',
    'TD': 'AF',
    'TG': 'AF',
    'TH': 'AS',
    'TJ': 'AS',
    'TK': 'OC',
    'TM': 'AS',
    'TN': 'AF',
    'TO': 'OC',
    'TP': 'AS',
    'TR': 'AS',
    'TT': 'NA',
    'TV': 'OC',
    'TW': 'AS',
    'TZ': 'AF',
    'UA': 'EU',
    'UG': 'AF',
    'US': 'NA',
    'UY': 'SA',
    'UZ': 'AS',
    'VC': 'NA',
    'VE': 'SA',
    'VG': 'NA',
    'VI': 'NA',
    'VN': 'AS',
    'VU': 'OC',
    'WF': 'OC',
    'WS': 'OC',
    'XK': 'EU',
    'YE': 'AS',
    'YT': 'AF',
    'ZA': 'AF',
    'ZM': 'AF',
    'ZW': 'AF',
}

while the above codes seem to work correctly over the command line - for me only the combination of US/NA works for my N79 ...

@jumate
Copy link

jumate commented Jun 14, 2019

Confirmed, en HA 0.94.1:

If the code is changed to US / NA it works correctly.

My configuration should be ES / EU, country Spain, continent Europe, but with US / NA it works correctly and with ES / EU no.

@AbDhops
Copy link
Author

AbDhops commented Jun 14, 2019

Could it be because of GDPR... ? Just wondering why only EU is not working...

@stale
Copy link

stale bot commented Sep 12, 2019

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 12, 2019
@stale stale bot closed this as completed Sep 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants