Is Tuya Broken?

I don’t use an ad blocker in my environment.

Good luck

Not using pihole?

Nope, haven’t added pihole yet

I have Hassio running in Docker on Ubuntu for weeks it runs stable with Hassio 0,89 version. I upgrade to the o.9XX version and suddenly I get the error that Tuya
Sun May 12 2019 14:00:05 GMT+0200 (CEST)

Error during setup of component tuya
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/urllib3/connection.py”, line 159, 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 600, in urlopen
chunked=chunked)
File “/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py”, line 343, in _make_request
self._validate_conn(conn)
File “/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py”, line 839, in _validate_conn
conn.connect()
File “/usr/local/lib/python3.7/site-packages/urllib3/connection.py”, line 301, in connect
conn = self._new_conn()
File “/usr/local/lib/python3.7/site-packages/urllib3/connection.py”, line 168, in _new_conn
self, “Failed to establish a new connection: %s” % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f226a3bb9b0>: 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 638, 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 0x7f226a3bb9b0>: 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/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/local/lib/python3.7/site-packages/homeassistant/components/tuya/init.py”, line 58, in setup
tuya.init(username, password, country_code, platform)
File “/usr/local/lib/python3.7/site-packages/tuyapy/tuyaapi.py”, line 44, in init
self.get_access_token()
File “/usr/local/lib/python3.7/site-packages/tuyapy/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 0x7f226a3bb9b0>: Failed to establish a new connection: [Errno -3] Try again’))

it look likes Home assistant comes with python 3.6 and platform Tuya wants File “/usr/local/lib/python3.7/site-packages/requests/sessions.py

Do you find any solution? Same issue with new version hassio .95

I have not. still does it every few days and takes a reboot.

I’m also affected by this. I tried debugging it but there’s nothing wrong. The commands work, but the toggle turns off by itself…

EDIT: For people following up on this, or being affected by it, i have created 2 issues (one on the HA’s github and one on the components’): The issues are: #25992 - HA and #3 tuyaha;

Hopefully, this’ll get sorted real soon.

I have the exact same issue, which started about 31 hours ago. I just followed up on both of your issue submissions with my details and testing results.

1 Like

For people reaching this topic via google, please have a look at the filed issue or directly for a switch solution have a look at the solution