Nest Connection Error

Since moving over to Hass.io I have been having periodic drop outs from my Nest Thermostat.
I would see:
Invalid Config:
The Following components and platforms could not be setup.
Nest.

Since the nest setup was transferred over from my old UnRaid Docker install of Home-Assistant, I thought maybe it was causing an issue (I just copy/pasted the nest entry from the old configuration.yaml to the new one.)

I removed the original entry from my nest account and recreated a new one, and went through the setup process again from scratch.

Now it never setups correctly, even after several reboots. It never asks me to validate as it should.
I have triple checked the yaml files and Im positive its setup as directed here.

Anyone have any suggestions.
Im running Hass.io 0.63.2

I get the following errors in my logs for this.
Log Details (ERROR)
Fri Feb 16 2018 15:38:11 GMT-0500 (Eastern Standard Time)

Error during setup of component nest
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/urllib3/connection.py", line 141, in _new_conn
    (self.host, self.port), self.timeout, **extra_kw)
  File "/usr/lib/python3.6/site-packages/urllib3/util/connection.py", line 60, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/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/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
    chunked=chunked)
  File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 346, in _make_request
    self._validate_conn(conn)
  File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 850, in _validate_conn
    conn.connect()
  File "/usr/lib/python3.6/site-packages/urllib3/connection.py", line 284, in connect
    conn = self._new_conn()
  File "/usr/lib/python3.6/site-packages/urllib3/connection.py", line 150, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x731c66f0>: 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/lib/python3.6/site-packages/requests/adapters.py", line 440, in send
    timeout=timeout
  File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/lib/python3.6/site-packages/urllib3/util/retry.py", line 388, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='developer-api.nest.com', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x731c66f0>: 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/lib/python3.6/site-packages/homeassistant/setup.py", line 148, in _async_setup_component
    component.setup, hass, processed_config)
  File "/usr/lib/python3.6/asyncio/futures.py", line 332, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
    future.result()
  File "/usr/lib/python3.6/asyncio/futures.py", line 245, in result
    raise self._exception
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/nest.py", line 134, in setup
    setup_nest(hass, nest, config)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/nest.py", line 99, in setup_nest
    hass.data[DATA_NEST] = NestDevice(hass, conf, nest)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/nest.py", line 166, in __init__
    self.local_structure = [s.name for s in nest.structures]
  File "/usr/lib/python3.6/site-packages/nest/nest.py", line 1654, in structures
    for stid in self._status[STRUCTURES]]
  File "/usr/lib/python3.6/site-packages/nest/nest.py", line 1604, in _status
    value = self._get("/")
  File "/usr/lib/python3.6/site-packages/nest/nest.py", line 1587, in _get
    return self._request('GET', path)
  File "/usr/lib/python3.6/site-packages/nest/nest.py", line 1565, in _request
    data=data)
  File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 508, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='developer-api.nest.com', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x731c66f0>: Failed to establish a new connection: [Errno -3] Try again',))

I’ve been seeing the same thing. I had been on hassio for a while with Nest working and at some point, maybe around 0.63, I started seeing the same failure behavior. I recently rebuilt from scratch on 0.68.0 and it worked initially but now is back to failing. It seemed like it may be intermittent but it is now pretty much failing completely.

Did you get it resolved?

I believe I narrowed my problem down to being DNS related. Along with my Nest component not working I also was seeing similar “NewConnectionError” in the log for the yr.py sensor. I was also running pi-hole on the same Hassio/RPI3 system. When I updated my router’s DHCP settings to use external DNS servers and reboot my RPI3 everything worked and Nest and yr were successful. I’ve since set up static IP so that I could specify external DNS servers for my Hassio/RPI3 so that I don’t have issues with Hassio trying to hit the local pi-hole before it is ready on reboot which I suspect may be the issue. Hopefully this helps someone else.

This post provided me with hope as I’m suffering similar DNS related issues.

My HASSIO can’t seem to connect to google, neato, nest, DarkSky if not more.

Info:

I have run HA on a Windows 7 Pro system for months, had no issues until recently, then I installed HASSIO on a Pi and this is what I’m running on now.

I was using the Virgin Media provided Wifi and router, but then I bought a cheap router … then I bought an ASUS rt-ac68u and the problems persist.

I don’t have any issues using my main (wired) PC, nor my Daughters PC, Virgin box, Roku box various tablets and phones.

This has been going on for a while now and it’s really making me reconsider the whole HA stuff.

HELP PLEASE :slight_smile: