SSL timeout with Netatmo (& possibly more)

Hi,

My Setup:

  • Home Assistant : 0.91.3 on Hass.io
  • DHCP server addon
  • PiHole server add

For a week I have started to get SSL Timeout with the Netatmo module. This happens roughly after 24h of the computer being rebooted. Every time I reboot the computer the problem is fixed.

I really don’t know how to investigate this issue further.

It doesn’t seem to be a network wide issue, as the rest of my devices can access the API of Netatmo. It looks local to the machine, though I have not been able to confirm that. I have also when Netatmo API is unavailable problems to access other SSL service like Duck DNS or PushBullet.

How can I get access to the root server (the one running docker) to be able to debug connection? I’d like to be able to modify the code being executed on the raspberry pi to find out more.

Update for climate.netatmo_living_room fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 220, in async_update_ha_state
await self.async_device_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 379, in async_device_update
await self.hass.async_add_executor_job(self.update)
  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/netatmo/climate.py", line 273, in update
self._data.update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/util/__init__.py", line 224, in wrapper
result = method(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/netatmo/climate.py", line 368, in update
self.homestatus = pyatmo.HomeStatus(self.auth, home=self.home)
  File "/usr/local/lib/python3.7/site-packages/smart_home/Thermostat.py", line 112, in __init__
self.home_data = HomeData(authData)
  File "/usr/local/lib/python3.7/site-packages/smart_home/Thermostat.py", line 32, in __init__
resp = postRequest(_GETHOMESDATA_REQ, postParams)
  File "/usr/local/lib/python3.7/site-packages/smart_home/__init__.py", line 39, in postRequest
if params
  File "/usr/local/lib/python3.7/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
  File "/usr/local/lib/python3.7/urllib/request.py", line 525, in open
response = self._open(req, data)
  File "/usr/local/lib/python3.7/urllib/request.py", line 543, in _open
'_open', req)
  File "/usr/local/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
  File "/usr/local/lib/python3.7/urllib/request.py", line 1360, in https_open
context=self._context, check_hostname=self._check_hostname)
  File "/usr/local/lib/python3.7/urllib/request.py", line 1320, in do_open
r = h.getresponse()
  File "/usr/local/lib/python3.7/http/client.py", line 1321, in getresponse
response.begin()
  File "/usr/local/lib/python3.7/http/client.py", line 296, in begin
version, status, reason = self._read_status()
  File "/usr/local/lib/python3.7/http/client.py", line 257, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/local/lib/python3.7/socket.py", line 589, in readinto
return self._sock.recv_into(b)
  File "/usr/local/lib/python3.7/ssl.py", line 1052, in recv_into
return self.read(nbytes, buffer)
  File "/usr/local/lib/python3.7/ssl.py", line 911, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
1 Like

Same problem here

I finally fixed the issue. I found that the problem was that on the Raspberry PI are being hosted:

  • Home Assistant
  • DHCP Server
  • PiHole

I read it was not recommended to have the RaspberryPi using itself as a DNS server through PiHole. So I set it on a static IP with static DNS.