Issue setting up Netatmo component

Hi,

Having trouble setting up my Netatmo weather station at the moment.

Config is as follows:

#Netatmo
  - platform: netatmo
    api_key: <redacted>
    secret_key: <redacted>
    username: <redacted>
    password: <redacted>

Trace from the log is as follows:

tail: home-assistant.log: file truncated
16-12-22 20:30:00 homeassistant.bootstrap: Error during setup of component netatmo
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/homeassistant/bootstrap.py", line 151, in _async_setup_component
    None, component.setup, hass, config)
  File "/usr/lib/python3.5/asyncio/futures.py", line 361, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 296, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 274, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.5/dist-packages/homeassistant/components/netatmo.py", line 53, in setup
    config[DOMAIN][CONF_API_KEY], config[DOMAIN][CONF_SECRET_KEY],
KeyError: 'netatmo'
16-12-22 20:30:00 homeassistant.bootstrap: Component netatmo failed to setup
16-12-22 20:30:00 homeassistant.bootstrap: Unable to prepare setup for platform sensor.netatmo because dependency netatmo could not be initialized

So on the surface it would appear that I have somehow pasted in an incorrect api key or client secret. I have ruled this out as best as a guy can.
I have tried inputting the redacted stuff in both my secrets file and also in the config file itself.

Any help appreciated!
R.

You should set up like this.

Hi,

I have followed those instructions alright. The Netatmo website has changed a little but the data you need to set up is still the same (I think).
Thanks nonetheless.

netatmo:
  api_key: YOUR_API_KEY
  secret_key: YOUR_SECRET_KEY
  username: YOUR_USERNAME
  password: YOUR_PASSWORD

You have used

#Netatmo
  - platform: netatmo
1 Like

Ah yes,

I tried it that way and was getting errors. As it turns out those errors were unrelated.
Thanks.

I’m just curious.
Can you post these errors?

Issue was that I had tried to set up the Netatmo component and all the individual sensors under the one block, instead of setting up the Netatmo component and then having the sensors under the sensor block.

So I was working from the errors that were getting kicked there, which happened to be for the next component under the Netatmo block.

Unfortunately they are mainly gone from the buffer and the ones I have are non specific :frowning:

16-12-22 21:47:29 ERROR (Thread-1) [homeassistant.util.yaml] while parsing a block mapping
  in "/home/knock/.homeassistant/configuration.yaml", line 238, column 3
expected <block end>, but found '<block sequence start>'
  in "/home/knock/.homeassistant/configuration.yaml", line 244, column 7


16-12-22 19:48:04 ERROR (MainThread) [homeassistant.bootstrap] Invalid config for [netatmo]: [modules] is an invalid option for [netatmo]. Check: netatmo->netatmo->modules. (See /home/knock/.homeassistant/configuration.yaml:166). Please check the docs at https://home-assistant.io/components/netatmo/

Once I got a bit closer I ended up on a Github bug report which suggested setting up the Netatmo component in the way I posted above.

Thanks again.

having errors as well

17-02-05 20:07:12 ERROR (Thread-10) [homeassistant.components.netatmo] Unable to connect to Netatmo API
17-02-05 20:07:12 ERROR (MainThread) [homeassistant.bootstrap] component netatmo failed to initialize

@Doug_Smith
Can you post the lines before those 2?

@gieljnssns

17-03-26 02:21:58 INFO (MainThread) [homeassistant.loader] Loaded netatmo from homeassistant.components.netatmo
17-03-26 02:21:59 INFO (MainThread) [homeassistant.setup] Setting up netatmo
17-03-26 02:22:01 ERROR (Thread-1) [homeassistant.components.netatmo] Unable to connect to Netatmo API
17-03-26 02:22:01 ERROR (MainThread) [homeassistant.setup] Setup failed for netatmo: Component failed to initialize.

1 Like

Are those all errors Netatmo related?
And can you post your errors using code blocks?

I have the same error as @Doug_Smith, here’s my logs:

2017-08-10 19:17:42 ERROR (SyncWorker_7) [homeassistant.components.netatmo] Unable to connect to Netatmo API
2017-08-10 19:17:42 ERROR (MainThread) [homeassistant.setup] Setup failed for netatmo: Component failed to initialize.
2017-08-10 19:17:42 ERROR (MainThread) [homeassistant.setup] Unable to setup dependencies of climate.netatmo. Setup failed for dependencies: netatmo
2017-08-10 19:17:42 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform climate.netatmo: Could not setup all dependencies.

Here’s the revelants sections in my config (I only have a thermostat so I don’t mind displaying everything):

netatmo:
  api_key: 598cb10bae476REDACTED
  secret_key: ezNko2LdQGR6JmREDACTED
  username: [email protected]
  password: REDACTED

climate:
  - platform: netatmo

I had the same error as @guillaume86 and @Doug_Smith. It started working after I clicked on the “Activate” button in the “App Status” panel. It’s below the technical parameters where you can also find your client ID and client secret.

I guess Netatmo changed their developer portal and added this functionality. The screenshots in the documentation of the Netatmo component are from the previous version of the developer portal.

2 Likes

@wterpstra did you actually solve this?
Please tell me/us how you did.

1 Like

Well, I actually solved it myself.

This assumes you have had Netatmo upp and running but now it is not working anymore.

  1. Go tho this URL: https://dev.netatmo.com/en-US
  2. Click on the big “Create your app”-button at the right on the screen.
  3. Now, when you se the form, scroll upp to the app you’ve created before in order to make Netatmo work with Hass. You will se that “app” just above the form.
  4. Click on that app.
  5. On this new page, scroll down to the row with “APP STATUS” on the left.
  6. Klick on the big yellow “Activate” button on the same row.
  7. Maybe you have to restart Hass, don’t remember.

That’s how I got it working again without changing anything in my Hass-config.

(Please click on the heart if this was of any help for you).

1 Like

Hi!

I tried you fix, it worked fine. Then I had to restart Home Assistant again, tried the same fix but this time it didn’t work.