Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netatmo broken in 0.95 #24793

Closed
bigboban opened this issue Jun 27, 2019 · 16 comments · Fixed by #24902

Comments

@bigboban
Copy link

commented Jun 27, 2019

Home Assistant release with the issue: 0.95

Last working Home Assistant release (if known): 0.94.x

Operating environment (Hass.io/Docker/Windows/etc.): Hassio

Component/platform: Netatmo

Description of problem: Netatmo integration broken. Entities not available, error in log (see below)

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

netatmo:
  api_key: !secret netatmo_api_key
  secret_key: !secret netatmo_secret_key
  username: usr
  password: !secret netatmo_password
  discovery: False

Traceback (if applicable):

2019-06-27 13:59:25 ERROR (MainThread) [homeassistant.components.sensor] 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/sensor.py", line 143, in setup_platform
    config.get(CONF_STATION)))
  File "/usr/src/homeassistant/homeassistant/components/netatmo/sensor.py", line 190, in __init__
    self._module_type = self.netatmo_data. \
AttributeError: 'NoneType' object has no attribute 'moduleByName'


Additional information:

@parberge

This comment has been minimized.

Copy link

commented Jun 27, 2019

I have the exact same stack trace

@bigboban

This comment has been minimized.

Copy link
Author

commented Jun 27, 2019

I had to downgrade to 0.94.4 because netatmo is very important for me and i have many automations based on values from netatmo indoor/outdoor. Please fix this as fast as possible.

@onlyoneme

This comment has been minimized.

Copy link

commented Jun 27, 2019

Enabling discovery will fix the issue partially if you have multiple weather stations on the same account or completely if you have just one station.

@bigboban

This comment has been minimized.

Copy link
Author

commented Jun 28, 2019

Enabling discovery will fix the issue partially if you have multiple weather stations on the same account or completely if you have just one station.

I don't understand. I have this in config ...

# Discover some devices automatically
discovery:
  ignore:
    - songpal

and netatmo is broken. What exactly do you mean with that "Enabling discovery will fix.."?

@onlyoneme

This comment has been minimized.

Copy link

commented Jun 28, 2019

Enabling discovery will fix the issue partially if you have multiple weather stations on the same account or completely if you have just one station.

I don't understand. I have this in config ...

# Discover some devices automatically
discovery:
  ignore:
    - songpal

and netatmo is broken. What exactly do you mean with that "Enabling discovery will fix.."?

I've meant discovery: True in the netatmo config section.

@cgtobi

This comment has been minimized.

Copy link
Collaborator

commented Jun 28, 2019

This is fixed in #24788.

What @onlyoneme was talking about is

netatmo:
  api_key: !secret netatmo_api_key
  secret_key: !secret netatmo_secret_key
  username: usr
  password: !secret netatmo_password
  discovery: True

@cgtobi cgtobi closed this Jun 28, 2019

@Pirol62

This comment has been minimized.

Copy link

commented Jun 28, 2019

Hi, I got this error when starting up HA

Fri Jun 28 2019 08:40:12 GMT+0200 (Mitteleuropäische Sommerzeit)
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/sensor.py", line 143, in setup_platform
    config.get(CONF_STATION)))
  File "/usr/src/homeassistant/homeassistant/components/netatmo/sensor.py", line 190, in __init__
    self._module_type = self.netatmo_data. \
AttributeError: 'NoneType' object has no attribute 'moduleByName'

Everything is working exept missing attributes (garden_max_temp and garden_min_temp)
will that be fixed as well?

@cgtobi

This comment has been minimized.

Copy link
Collaborator

commented Jun 28, 2019

The fix is not yet release but should hopefully ship with 0.95.2.

@cgtobi

This comment has been minimized.

Copy link
Collaborator

commented Jun 28, 2019

I just tried min_temp and max_temp and it works fine.

@Pirol62

This comment has been minimized.

Copy link

commented Jun 28, 2019

Hmm.. interesting. Both are not detected during HA startup. I rebooted now several times. Even no entities with a slightly different name. Ok, is not that important

@cgtobi

This comment has been minimized.

Copy link
Collaborator

commented Jun 28, 2019

You have #24788 in your system?

@Pirol62

This comment has been minimized.

Copy link

commented Jun 28, 2019

I'm on 0.95. So most likely not.
But it's OK. Will wait for 0.95.2

@sibbl

This comment has been minimized.

Copy link

commented Jun 29, 2019

Just updated to 0.95.3 and after 3 restarts, I always got the following error and no netatmo devices showed up in HA. I'm really looking forward to getting my Netatmo integration stable again after more than one month now.

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/sensor.py", line 161, in setup_platform
    dev.extend(find_devices(data))
  File "/usr/src/homeassistant/homeassistant/components/netatmo/sensor.py", line 177, in find_devices
    data, module_name, condition.lower(), data.station))
  File "/usr/src/homeassistant/homeassistant/components/netatmo/sensor.py", line 199, in __init__
    self._module_type = module['type']
TypeError: 'NoneType' object is not subscriptable

Yes, I got multiple locations in my Netatmo account but only want to have one specific one tracked by HA:

Component:

netatmo:
    api_key: !secret netatmo_api_key
    secret_key: !secret netatmo_secret_key
    username: !secret netatmo_username
    password: !secret netatmo_password
    discovery: false

and Sensor

- platform: netatmo
  station: Berlin

This config has been working fine since the beginning and I had lots of troubles of the Netatmo component crashing randomly and now it won't get started again. I didn't see any breaking changes in the logs though. What am I doing wrong?

@onlyoneme

This comment has been minimized.

Copy link

commented Jun 29, 2019

It happens when you provide only station name without any modules in your config file.

@sibbl

This comment has been minimized.

Copy link

commented Jun 29, 2019

According to the docs it's not necessary: https://www.home-assistant.io/components/netatmo/#sensor

Also, as I mentioned it's been working fine like with the same config for more than a year
It broke after I updated from 0.95.0 to 0.95.3. I just downgraded again to 0.95.0 and it's working fine.

@onlyoneme

This comment has been minimized.

Copy link

commented Jun 29, 2019

You can be right regarding previous releases and maybe you've faced a side effect of fixes implemented in the current release. I've just suggested a possible workaround.

@cgtobi cgtobi referenced this issue Jul 1, 2019
3 of 9 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.