core: Problem with adding Smart Life application account in Home Assistant

Home Assistant release with the issue:

Last working Home Assistant release (if known):

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

Component/platform:

Description of problem:

My Smart Life account is not recognised

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


tuya:
  username: myaccount@gmail.com
  password: my_pwd
  country_code: 40
  platform: smart_life


Traceback (if applicable):

 ERROR (MainThread) [homeassistant.setup] Error during setup of component tuya
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 160, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw)
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 57, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/local/lib/python3.7/socket.py", line 748, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 603, in urlopen
    chunked=chunked)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 344, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 843, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 316, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 169, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x72ce8a50>: Failed to establish a new connection: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 641, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 399, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='px1.tuyaus.com', port=443): Max retries exceeded with url: /homeassistant/auth.do (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x72ce8a50>: Failed to establish a new connection: [Errno -3] Try again'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 172, 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/homeassistant/homeassistant/components/tuya/__init__.py", line 62, in setup
    tuya.init(username, password, country_code, platform)
  File "/usr/local/lib/python3.7/site-packages/tuyaha/tuyaapi.py", line 44, in init
    self.get_access_token()
  File "/usr/local/lib/python3.7/site-packages/tuyaha/tuyaapi.py", line 59, in get_access_token
    'from': 'tuya'
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 116, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='px1.tuyaus.com', port=443): Max retries exceeded with url: /homeassistant/auth.do (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x72ce8a50>: Failed to establish a new connection: [Errno -3] Try again'))

Additional information:

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 20 (2 by maintainers)

Most upvoted comments

Reopening this issue since it has not been solved yet.

Ok so it took me quite some time to figure this out, here’s what solved it for me.

In Sweden where I am the app Nedis SmartLife (by NEDIS) is promoted as the app to use. By coincidence I found that there is another app called Smart Life (by Tuya Inc.) which is the app you have to register and use for the integration in Home Assistant to work.

image

Steps I did to resolve my issue

  1. Downloaded Smart Life by Tuya Inc. from Google Play Store
  2. Registered new account using my email (gmail in my case) (I did not login with my google account SSO)
  3. Reset my light and connected it to the app
  4. Added the Tuya integration through the HA GUI, entered my email as username and password I set. (including special characters). Set my country code (46) and chose “Smart Life” as platform.

Worked right away.

So my theory is that “Nedis SmartLife” is not the same as “Smart Life” referred to in the Home Assistant Tuya integration setup.

I hope this can help others like myself who searched and searched for a solution. If others can confirm this is correct then the documentation should be updated to help new users.

Same problem, not working SmartLife platform

Can confirm what @marioingemann says: do not use Nedis SmartLife, use the Smart Life - Smart Living app instead (on IOS or Android)