home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.54k stars 30.35k forks source link

Netatmo Update for climate.netatmo_XXX fails #23631

Closed vincenzosuraci closed 5 years ago

vincenzosuraci commented 5 years ago

Home Assistant release with the issue: arch: armv7 channel: stable hassos: "2.10" homeassistant: 0.92.1 hostname: hassio logging: info machine: raspberrypi3 supervisor: "162" supported_arch:

Last working Home Assistant release: All of them had this issue

Operating environment: Hassio

Component/platform: thermostat/netatmo

Description of problem:

Problem-relevant configuration.yaml entries:

# NETATMO
netatmo:
  api_key: !secret netatmo_api_key
  secret_key: !secret netatmo_secret_key
  username: !secret netatmo_username
  password: !secret netatmo_password

climate:
  - platform: netatmo

Traceback:


2019-05-01 16:56:22 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.netatmo_disimpegno 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 377, 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 274, 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 369, in update
    self.homestatus = pyatmo.HomeStatus(self.auth, home=self.home)
  File "/usr/local/lib/python3.7/site-packages/smart_home/Thermostat.py", line 130, in __init__
    raise NoDevice("No device found, errors in response")
smart_home.NoDevice: No device found, errors in response
2019-05-01 16:56:22 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.netatmo_disimpegno_2 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 377, 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 274, 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 369, in update
    self.homestatus = pyatmo.HomeStatus(self.auth, home=self.home)
  File "/usr/local/lib/python3.7/site-packages/smart_home/Thermostat.py", line 130, in __init__
    raise NoDevice("No device found, errors in response")
smart_home.NoDevice: No device found, errors in response

[...]

2019-05-01 17:51:50 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.netatmo_disimpegno 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 377, 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 274, 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 369, in update
    self.homestatus = pyatmo.HomeStatus(self.auth, home=self.home)
  File "/usr/local/lib/python3.7/site-packages/smart_home/Thermostat.py", line 123, in __init__
    resp = postRequest(_GETHOMESTATUS_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
2019-05-01 17:51:50 WARNING (MainThread) [homeassistant.components.sensor] Updating sonoff sensor took longer than the scheduled update interval 0:00:10
2019-05-01 17:51:51 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.netatmo_disimpegno_2 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 377, 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 274, 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 369, in update
    self.homestatus = pyatmo.HomeStatus(self.auth, home=self.home)
  File "/usr/local/lib/python3.7/site-packages/smart_home/Thermostat.py", line 130, in __init__
    raise NoDevice("No device found, errors in response")
smart_home.NoDevice: No device found, errors in response

[...]

2019-05-01 21:03:13 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.netatmo_disimpegno_2 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 377, 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 274, 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 369, in update
    self.homestatus = pyatmo.HomeStatus(self.auth, home=self.home)
  File "/usr/local/lib/python3.7/site-packages/smart_home/Thermostat.py", line 123, in __init__
    resp = postRequest(_GETHOMESTATUS_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
2019-05-01 21:03:14 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.netatmo_disimpegno 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 377, 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 274, 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 369, in update
    self.homestatus = pyatmo.HomeStatus(self.auth, home=self.home)
  File "/usr/local/lib/python3.7/site-packages/smart_home/Thermostat.py", line 130, in __init__
    raise NoDevice("No device found, errors in response")
smart_home.NoDevice: No device found, errors in response

[...]

2019-05-01 21:28:38 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.netatmo_disimpegno_2 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 377, 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 274, 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 369, in update
    self.homestatus = pyatmo.HomeStatus(self.auth, home=self.home)
  File "/usr/local/lib/python3.7/site-packages/smart_home/Thermostat.py", line 123, in __init__
    resp = postRequest(_GETHOMESTATUS_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
2019-05-01 21:28:39 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.netatmo_disimpegno 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 377, 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 274, 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 369, in update
    self.homestatus = pyatmo.HomeStatus(self.auth, home=self.home)
  File "/usr/local/lib/python3.7/site-packages/smart_home/Thermostat.py", line 130, in __init__
    raise NoDevice("No device found, errors in response")
smart_home.NoDevice: No device found, errors in response
2019-05-01 21:29:29 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.netatmo_disimpegno 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 377, 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 274, 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 369, in update
    self.homestatus = pyatmo.HomeStatus(self.auth, home=self.home)
  File "/usr/local/lib/python3.7/site-packages/smart_home/Thermostat.py", line 130, in __init__
    raise NoDevice("No device found, errors in response")
smart_home.NoDevice: No device found, errors in response
2019-05-01 21:29:30 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.netatmo_disimpegno_2 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 377, 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 274, 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 369, in update
    self.homestatus = pyatmo.HomeStatus(self.auth, home=self.home)
  File "/usr/local/lib/python3.7/site-packages/smart_home/Thermostat.py", line 130, in __init__
    raise NoDevice("No device found, errors in response")
smart_home.NoDevice: No device found, errors in response
2019-05-01 21:30:31 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.netatmo_disimpegno 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 377, 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 274, 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 369, in update
    self.homestatus = pyatmo.HomeStatus(self.auth, home=self.home)
  File "/usr/local/lib/python3.7/site-packages/smart_home/Thermostat.py", line 130, in __init__
    raise NoDevice("No device found, errors in response")
smart_home.NoDevice: No device found, errors in response
2019-05-01 21:30:31 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.netatmo_disimpegno_2 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 377, 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 274, 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 369, in update
    self.homestatus = pyatmo.HomeStatus(self.auth, home=self.home)
  File "/usr/local/lib/python3.7/site-packages/smart_home/Thermostat.py", line 130, in __init__
    raise NoDevice("No device found, errors in response")
smart_home.NoDevice: No device found, errors in response
2019-05-01 21:31:16 WARNING (MainThread) [meross_init] CommandTimeoutException when executing update_sensor_status
2019-05-01 21:31:31 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.netatmo_disimpegno_2 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 377, 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 274, 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 369, in update
    self.homestatus = pyatmo.HomeStatus(self.auth, home=self.home)
  File "/usr/local/lib/python3.7/site-packages/smart_home/Thermostat.py", line 130, in __init__
    raise NoDevice("No device found, errors in response")
smart_home.NoDevice: No device found, errors in response
2019-05-01 21:31:32 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.netatmo_disimpegno 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 377, 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 274, 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 369, in update
    self.homestatus = pyatmo.HomeStatus(self.auth, home=self.home)
  File "/usr/local/lib/python3.7/site-packages/smart_home/Thermostat.py", line 130, in __init__
    raise NoDevice("No device found, errors in response")
smart_home.NoDevice: No device found, errors in response
2019-05-01 21:46:46 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.netatmo_disimpegno_2 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 377, 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 274, 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 369, in update
    self.homestatus = pyatmo.HomeStatus(self.auth, home=self.home)
  File "/usr/local/lib/python3.7/site-packages/smart_home/Thermostat.py", line 130, in __init__
    raise NoDevice("No device found, errors in response")
smart_home.NoDevice: No device found, errors in response
2019-05-01 21:46:47 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.netatmo_disimpegno 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 377, 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 274, 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 369, in update
    self.homestatus = pyatmo.HomeStatus(self.auth, home=self.home)
  File "/usr/local/lib/python3.7/site-packages/smart_home/Thermostat.py", line 130, in __init__
    raise NoDevice("No device found, errors in response")
smart_home.NoDevice: No device found, errors in response
2019-05-01 21:51:00 WARNING (MainThread) [homeassistant.helpers.entity] Update of climate.netatmo_disimpegno_2 is taking over 10 seconds
2019-05-01 21:51:00 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.netatmo_disimpegno_2 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 377, 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 274, 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 369, in update
    self.homestatus = pyatmo.HomeStatus(self.auth, home=self.home)
  File "/usr/local/lib/python3.7/site-packages/smart_home/Thermostat.py", line 123, in __init__
    resp = postRequest(_GETHOMESTATUS_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

[...]

2019-05-01 21:51:21 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.netatmo_disimpegno 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 377, 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 274, 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 369, in update
    self.homestatus = pyatmo.HomeStatus(self.auth, home=self.home)
  File "/usr/local/lib/python3.7/site-packages/smart_home/Thermostat.py", line 130, in __init__
    raise NoDevice("No device found, errors in response")
smart_home.NoDevice: No device found, errors in response

[...]

2019-05-01 21:51:51 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.netatmo_disimpegno_2 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 377, 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 274, 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 369, in update
    self.homestatus = pyatmo.HomeStatus(self.auth, home=self.home)
  File "/usr/local/lib/python3.7/site-packages/smart_home/Thermostat.py", line 130, in __init__
    raise NoDevice("No device found, errors in response")
smart_home.NoDevice: No device found, errors in response
2019-05-01 21:51:52 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.netatmo_disimpegno 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 377, 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 274, 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 369, in update
    self.homestatus = pyatmo.HomeStatus(self.auth, home=self.home)
  File "/usr/local/lib/python3.7/site-packages/smart_home/Thermostat.py", line 130, in __init__
    raise NoDevice("No device found, errors in response")
smart_home.NoDevice: No device found, errors in response
2019-05-01 21:52:52 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.netatmo_disimpegno_2 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 377, 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 274, 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 369, in update
    self.homestatus = pyatmo.HomeStatus(self.auth, home=self.home)
  File "/usr/local/lib/python3.7/site-packages/smart_home/Thermostat.py", line 130, in __init__
    raise NoDevice("No device found, errors in response")
smart_home.NoDevice: No device found, errors in response
2019-05-01 21:52:53 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.netatmo_disimpegno 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 377, 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 274, 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 369, in update
    self.homestatus = pyatmo.HomeStatus(self.auth, home=self.home)
  File "/usr/local/lib/python3.7/site-packages/smart_home/Thermostat.py", line 130, in __init__
    raise NoDevice("No device found, errors in response")
smart_home.NoDevice: No device found, errors in response
2019-05-01 21:58:58 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.netatmo_disimpegno_2 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 377, 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 274, 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 369, in update
    self.homestatus = pyatmo.HomeStatus(self.auth, home=self.home)
  File "/usr/local/lib/python3.7/site-packages/smart_home/Thermostat.py", line 130, in __init__
    raise NoDevice("No device found, errors in response")
smart_home.NoDevice: No device found, errors in response
2019-05-01 21:58:59 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.netatmo_disimpegno 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 377, 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 274, 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 369, in update
    self.homestatus = pyatmo.HomeStatus(self.auth, home=self.home)
  File "/usr/local/lib/python3.7/site-packages/smart_home/Thermostat.py", line 130, in __init__
    raise NoDevice("No device found, errors in response")
smart_home.NoDevice: No device found, errors in response
cgtobi commented 5 years ago

@vincenzosuraci If you're currently experiencing this can you please check your app page in the dev section over at Netatmo if your app is banned? If so, unban it and try again after after a while. I noticed this error (No device found, errors in response) yesterday evening I unbaned it and when I tried to investigate this morning it worked fine.

vincenzosuraci commented 5 years ago

@cgtobi many thanks for your reply. I followed your suggestion, but I was not banned: image

Thanks again for taking care of it.

VS

cgtobi commented 5 years ago

Well, it was worth a try. This is really difficult as I can't reliably reproduce the issue.

cgtobi commented 5 years ago

I hope to get more debugging code included into the next upstream release of pyatmo. I rarely get any errors myself, therefore it is difficult to debug this issue. @vincenzosuraci which devices do you have associated with your account?

cgtobi commented 5 years ago

@vincenzosuraci please DM me on Discord or HA forum if you want to provide more test data.

bend commented 5 years ago

I think I have the same issue at the moment. When I debug I get the following error: {"error":{"code":13,"message":"Application does not have the good scope rights"}}, I think it's an issue on netatmo side (my app have all the scopes + it was working an hour ago)

I also see that we are using the getthermostatdata/ call which is now deprecated..

cgtobi commented 5 years ago

@bend Where do you see getthermostatdata being used?

bend commented 5 years ago

@cgtobi I think I made a mistake, it was not on getthermostatdata. However I've seen a Forbidden error yesterday in the logs, but I've restarted HA since then, so lost the logs. I will see if the error happens again. Yesterday my netatmo thermostat and valves where not updating and I couldn't modify their temp neither. the error was Forbidden. It works again since I've restarted. I use the latest 0.94

bend commented 5 years ago

@cgtobi I have the error again: home-assistant | 2019-06-07 13:02:47 ERROR (SyncWorker_14) [smart_home] Traceback (most recent call last): home-assistant | File "/usr/local/lib/python3.7/site-packages/smart_home/__init__.py", line 41, in postRequest home-assistant | if params home-assistant | File "/usr/local/lib/python3.7/urllib/request.py", line 222, in urlopen home-assistant | return opener.open(url, data, timeout) home-assistant | File "/usr/local/lib/python3.7/urllib/request.py", line 531, in open home-assistant | response = meth(req, response) home-assistant | File "/usr/local/lib/python3.7/urllib/request.py", line 641, in http_response home-assistant | 'http', request, response, code, msg, hdrs) home-assistant | File "/usr/local/lib/python3.7/urllib/request.py", line 569, in error home-assistant | return self._call_chain(*args) home-assistant | File "/usr/local/lib/python3.7/urllib/request.py", line 503, in _call_chain home-assistant | result = func(*args) home-assistant | File "/usr/local/lib/python3.7/urllib/request.py", line 649, in http_error_default home-assistant | raise HTTPError(req.full_url, code, msg, hdrs, fp) home-assistant | urllib.error.HTTPError: HTTP Error 403: Forbidden The requested URL is https://api.netatmo.com/api/homesdata Params are: {'access_token': 'XXXX'}

So I don't know why we get an access forbidden ?

bend commented 5 years ago

@cgtobi I have the error also with https://api.netatmo.com/api/setroomthermpoint in HA. However when I call directly the pyatmo lib, the call works... Could be a problem of token expired ?

bend commented 5 years ago

so from what I see in the logs: token created at: 09:58:59 with correct scopes token refreshed at 12:29:11 First error at 13:01:38. So the error happens after the token is being refreshed.

cgtobi commented 5 years ago

Good find @bend. I’ll take a look shortly.

bend commented 5 years ago

I discovered that when you turn off the thermostat in the app and you try to call setroomthermpoint you get a forbiden error.

bend commented 5 years ago

Response from netatmo support : Hello,

Thank you for the details of your return.

Please try these two options:

This should solve your situation.

Have a nice day

cgtobi commented 5 years ago

@bend thanks for the investigation.

vincenzosuraci commented 5 years ago

I'm still experiencing issues with the Netatmo component. Right now, I cannot see anymore the Netatmo thermostat in the Lovelace web GU. I get an entity not availbale: climate.netatmo_disimpegno warning (I translated the message from Italian to English).

The LOG is:

2019-06-09 21:14:35 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform netatmo
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
    return fut.result()
  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/netatmo/climate.py", line 97, in setup_platform
    for room_id in room_data.get_room_ids():
  File "/usr/src/homeassistant/homeassistant/components/netatmo/climate.py", line 345, in get_room_ids
    if not self.setup():
  File "/usr/src/homeassistant/homeassistant/components/netatmo/climate.py", line 356, in setup
    self.homestatus = pyatmo.HomeStatus(self.auth, home=self.home)
  File "/usr/local/lib/python3.7/site-packages/smart_home/Thermostat.py", line 160, in __init__
    raise NoDevice("No device found, errors in response")
smart_home.NoDevice: No device found, errors in response
2019-06-09 21:14:37 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform netatmo
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
    return fut.result()
  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/netatmo/climate.py", line 97, in setup_platform
    for room_id in room_data.get_room_ids():
  File "/usr/src/homeassistant/homeassistant/components/netatmo/climate.py", line 345, in get_room_ids
    if not self.setup():
  File "/usr/src/homeassistant/homeassistant/components/netatmo/climate.py", line 356, in setup
    self.homestatus = pyatmo.HomeStatus(self.auth, home=self.home)
  File "/usr/local/lib/python3.7/site-packages/smart_home/Thermostat.py", line 160, in __init__
    raise NoDevice("No device found, errors in response")
smart_home.NoDevice: No device found, errors in response
vincenzosuraci commented 5 years ago

Response from netatmo support : Hello,

Thank you for the details of your return.

Please try these two options:

  • Skip the frequency from 5 to 10 minutes since the data is updated every 10 min only
  • Please refresh the token every 3 hr(10800 sec) sharp

This should solve your situation.

Have a nice day

Very good point.

Sorry for the dummy question but... Where (in which config file) and how (which parameters must be edited) can I change the Netatmo component configuration?

VS

bend commented 5 years ago

@vincent-k It's not a config value, you'll have to change the value in the pyatmo code.

cgtobi commented 5 years ago

@vincenzosuraci I've changed the time between the updates to 5 minutes in https://github.com/home-assistant/home-assistant/pull/24407.

scan_interval: 600 might be what you're looking for.

cgtobi commented 5 years ago

@vincenzosuraci would you mind to test if this is still an issue with 0.96.0b0 (beta)?

cgtobi commented 5 years ago

Since a lot has changed I'll close this. Should this not be fixed please let me know so we can reopen this issue @vincenzosuraci.