Core: Netatmo Weather doesn't work

Created on 9 Oct 2018  Â·  9Comments  Â·  Source: home-assistant/core

Home Assistant release with the issue: Hassio 0.79.3 and 0.80.0b3

Last working Home Assistant release (if known): Hassio 0.79.1

Operating environment (Hass.io/Docker/Windows/etc.): VM under unRaid

Component/platform: Netatmo
https://www.home-assistant.io/components/netatmo/

Description of problem:

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

netatmo:
  api_key: **************
  secret_key: *********
  username: !secret netatmo_user
  password: !secret netatmo_pass

Traceback (if applicable):

Error while setting up platform netatmo
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  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/homeassistant/components/sensor/netatmo.py", line 87, in setup_platform
    for module_name in data.get_module_names():
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/netatmo.py", line 304, in get_module_names
    self.update()
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/netatmo.py", line 330, in update
    self.data = self.station_data.lastData(exclude=3600)
  File "/usr/local/lib/python3.6/site-packages/smart_home/WeatherStation.py", line 115, in lastData
    if ds['time_utc'] > limit :
KeyError: 'time_utc'

Additional information:

netatmo

All 9 comments

This seems to be a an issue in the netatmo library.
@jabesq Any ideas?

I resolve with the secret.yaml
I put into the file also the api and key.
Now my configuration.yaml is like

netatmo:
api_key: !secret netatmo_api
secret_key: !secret netatmo_key
username: !secret netatmo_user
password: !secret netatmo_pass

Yes, from library point of view, this was looking like a connection as ‘time_utc’ is a data returned by netatmo which is mandatory to retrieve the latest data and Netatmo has not changed the structure of their returned data. But I will improve the library to be more reliable on connection.

I have been having the same issue for a while now. Tried creating new API keys, password etc. Still haven't been able to resolve.

ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform netatmo
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  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/homeassistant/components/sensor/netatmo.py", line 80, in setup_platform
    if module_name not in data.get_module_names():
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/netatmo.py", line 304, in get_module_names
    self.update()
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/netatmo.py", line 330, in update
    self.data = self.station_data.lastData(exclude=3600)
  File "/usr/local/lib/python3.6/site-packages/smart_home/WeatherStation.py", line 115, in lastData
    if ds['time_utc'] > limit :
KeyError: 'time_utc'
netatmo:
  api_key: !secret netatmo_api_key
  secret_key: !secret netatmo_secret_key
  username: !secret netatmo_username
  password: !secret netatmo_password
  discovery: False

I update Hassio to 0.80.3 and I have again a problem with netatmo

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  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/homeassistant/components/camera/netatmo.py", line 40, in setup_platform
    for camera_name in data.get_camera_names():
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/netatmo.py", line 82, in get_camera_names
    self.update()
  File "/usr/local/lib/python3.6/site-packages/homeassistant/util/__init__.py", line 324, in wrapper
    result = method(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/netatmo.py", line 113, in update
    self.camera_data = pyatmo.CameraData(self.auth, size=100)
  File "/usr/local/lib/python3.6/site-packages/smart_home/Camera.py", line 30, in __init__
    self.rawData = resp['body']
TypeError: 'NoneType' object is not subscriptable

Same problem: (https://pastebin.com/KUrqXWHC)

same problem here

I have same issue, I have a newly installed 0.85.1 and netatmo never worked. I didn't use older version of HA, this is my first attempt.

# Netatmo Weather
netatmo:
  api_key: 5c***********************8bd22d
  secret_key: ASZSGp*******************h3gF4Tpo
  username: ********@**********.hu
  password: **********
Sat Jan 19 2019 22:06:57 GMT+0100 (CET)

Error during setup of component netatmo
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/setup.py", line 148, in _async_setup_component
    component.setup, hass, processed_config)  # type: ignore
  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/homeassistant/components/netatmo.py", line 53, in setup
    'read_station read_camera access_camera '
  File "/usr/local/lib/python3.6/site-packages/pyatmo.py", line 74, in __init__
    self._accessToken = resp['access_token']
TypeError: 'NoneType' object is not subscriptable

Update on my issue. It ended up being the wind module was faulty and not updating some weather information. When module was replaced, everything started working again.
Cheers

Was this page helpful?
0 / 5 - 0 ratings