I’m running hassio in Docker on Ubuntu on an Intel NUC, and I am having issues with connecting to Nest. I have my client_id and my client_secret in my configuration. But when I go to configure my nest from the integrations page, I get an “Internal error validating code.” This is what appears in the log
Log Details (ERROR)
Sun Dec 09 2018 20:50:29 GMT-0500 (Eastern Standard Time)
Unexpected error resolving code
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 159, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw)
File "/usr/local/lib/python3.6/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.6/socket.py", line 745, 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.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 343, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 839, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 301, in connect
conn = self._new_conn()
File "/usr/local/lib/python3.6/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 0x7f768944a198>: 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.6/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/local/lib/python3.6/site-packages/urllib3/util/retry.py", line 398, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.home.nest.com', port=443): Max retries exceeded with url: /oauth2/access_token (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f768944a198>: 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.6/site-packages/homeassistant/components/nest/config_flow.py", line 105, in async_step_link
tokens = await flow['convert_code'](user_input['code'])
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/nest/local_auth.py", line 39, in resolve_auth_code
await hass.async_add_job(auth.login)
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.6/site-packages/nest/nest.py", line 175, in login
response = post(ACCESS_TOKEN_URL, data=data, headers=headers)
File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 116, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.home.nest.com', port=443): Max retries exceeded with url: /oauth2/access_token (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f768944a198>: Failed to establish a new connection: [Errno -3] Try again',))
I’m also having issues with my MQTT, WUnderground, Telegram, basically anything where Home Assistant has to talk to something that’s not itself. But the Nest is the instance where I can get the clearest log. Is there a way I’m supposed to open ports on Docker or something that I’m missing?