Netatmo problem integration

Hello,
I have a problem with the Netatmo connection in Home Assistant 0.116.0.
I cannot see the weather station in the integration, but I can see the camera welcome.
I get an error:

Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 193, in _async_setup_platform
await asyncio.shield(task)
File “/usr/src/homeassistant/homeassistant/components/netatmo/sensor.py”, line 159, in async_setup_entry
async_add_entities(await find_entities(data_class_name), True)
File “/usr/src/homeassistant/homeassistant/components/netatmo/sensor.py”, line 120, in find_entities
for module_id in data_class.get_modules(station_id):
File “/usr/local/lib/python3.8/site-packages/pyatmo/weather_station.py”, line 88, in get_modules
“station_name”: station[“station_name”],
KeyError: ‘station_name’

I did integration via the cloud and configuration.yamal (client_id,client_secret) and i have the same error.
When will I add in sensor.yamal

 - platform: netatmo
   station: Sypialnia
   modules:
   module_name1:
  - temperature

I have an error:

“The netatmo platform for the sensor integration does not support platform setup. Please remove it from your config.”

netatmo

There are only cameras in integration

Please help me fix the error :slight_smile:
Thx

Uuuu there are still some problems with Netatmo servers ?? :slight_smile:

As the error says, please remove the platform configuration.

Also please wait for 0.116.2 as that ships with a fix for the error.

1 Like

Hi, does this mean no Netatmo weather stations will work until 0.116.2?

I am getting the exact same error, with only

netatmo:
  client_id: XXXX
  client_secret: xxxx

I got my Netatmo weather station yesterday, started on0.112, read in the forums that I needed to upgrade so I did. This means, I have not set anything up for Netatmo sensors.

Would it work better in 0.112? I can restore that backup. Is the setup the same for that version?

Made an app with Netatmo, two of them actually to re-test. I don’t have a Nebucasa paid account, chose configuration.yaml in the setup dialog.

Weather stations are broken in 0.116.1 due to a bug. If you don’t have cameras you can use the HA Cloud Link and I’d actually recommend doing that.

0.112 is not recommended. 0.115 or even 0.116.0 should work just fine and 0.116.2 will be released shortly.

Thank you.
In that case, i’m waiting patiently :slight_smile:

I have same issue: nice to know it is looked at! :slight_smile:

I set up cloud link, paid for a Nebu Casa subscription. Tried all combinations of removing all Netatmo config and keeping them, recreating the integration each time, restarting HA each time. Integration says it’s connected, authenticated from Netatmo popup. Still nothing, and same error in logs. Netatmo integration card shows blank for devices and entities. What am I doing wrong?

What’s the exact error message?

Thank you for your speedy replies, this is the only error I find when searching for Netatmo (there used to be more regarding webhooks, but now that I’m connected to the Home Assistant Cloud those are gone)

2020-10-09 12:04:49 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up netatmo platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 193, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/src/homeassistant/homeassistant/components/netatmo/sensor.py", line 159, in async_setup_entry
    async_add_entities(await find_entities(data_class_name), True)
  File "/usr/src/homeassistant/homeassistant/components/netatmo/sensor.py", line 150, in find_entities
    NetatmoSensor(data_handler, data_class_name, module, condition)
  File "/usr/src/homeassistant/homeassistant/components/netatmo/sensor.py", line 247, in __init__
    self._device_name = module_info["station_name"]
KeyError: 'station_name'

Please wait for 0.116.2 and try again.

Just a heads up, 0.116.2 is out.

1 Like

Sorry to board this thread. I am not sure if my problem deservses its own.
I am all new to home assistant and have just setup hass.io on a raspberry pi this week. I have not started with any fancy stuff and wanted in a first step to add all my devices into home assistant. One of them being the Netatmo Presence Outdoor Camera. For this I have now done the following:
To enable remote control:

  • Creating a DuckDNS account
  • Installing the DuckDNS Add-On via the HA UI
  • Installing the NGINX Add-On via the HA UI
  • Entered my DuckDNS URL in the general configuration via the HA UI
  • Forwarded the external port 443 to the internal port 443 of my home assistant on the router
  • Forwarded also port 80, but as far as I am aware NGINX will reroute this to 443 internally.
    The Port Forwarding seems to be working as I can access the home assistant via the DuckDNS URL.

To setup Netamo:

  • I created a Development App on the Netatmo webpage.
  • Added the credentials to the configuration.yaml manually using the file editor.
netatmo:
  client_id: !secret NETATMO_CLIENT_ID
  client_secret: !secret NETATMO_CLIENT_SECRET
  • rebooted the system
  • added the Netatmo Integration via the HA UI using configuration.yaml as settings.

The setup found my camera and I have access to the video feed. However I don’t seem to get the netatmo_movements events. They are not even listed in the Developer Tools Event list.
How can I check where the integration may hang? I have already turned on debug logging for the Netatmo component. It seems to find the webhook, but is having some issue to setup light.netatmo, which I assume is necessary to control the light on the Presence camera.

2020-10-10 07:54:35 INFO (MainThread) [homeassistant.components.light] Setting up light.netatmo
2020-10-10 07:54:35 WARNING (MainThread) [homeassistant.components.light] Platform netatmo not ready yet. Retrying in 30 seconds.

I would like to use the detections of the camera within home assistant.
Any help is much appreciated. And sorry for any inconvinience as I am still unexpierienced with home assistant, yaml and python.

File “/usr/src/homeassistant/homeassistant/components/netatmo/sensor.py”, line 120, in find_entities
for module_id in data_class.get_modules(station_id):
File “/usr/local/lib/python3.8/site-packages/pyatmo/weather_station.py”, line 88, in get_modules
“station_name”: station[“station_name”],
KeyError: ‘station_name’

In version 0.116.2
Same error :frowning:

1 Like

It looks similar, but is different though. I’ll take a look ASAP.

I assume you’re webhook is not setup correctly. Please check the dev portal if it is banned. Also check if your internal and external URLs are set correctly.

@cgtobi thank you for your reply and the support you are giving. It is much appreciated. You are right, when I set it up it was not yet visible, but in the meantime the webhook got banned. Now I need to figure out what led to the banning. I have now unbanned the connection.
On the Home Assistant side, I tried to unregister the webhook, cleared my log file, restarted the Home Assistant and registered the webhook using the developer tools.
The following was logged:

2020-10-11 08:28:17 INFO (MainThread) [homeassistant.components.netatmo] Register Netatmo webhook: https://www.myaddress.duckdns.org/api/webhook/SomeLongHexValue
2020-10-11 08:28:17 INFO (MainThread) [homeassistant.components.light] Setting up light.netatmo
2020-10-11 08:28:17 WARNING (MainThread) [homeassistant.components.light] Platform netatmo not ready yet. Retrying in 30 seconds.
2020-10-11 08:28:28 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.2947961904] Handler is already defined!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 138, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1335, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1370, in _execute_service
    await handler.func(service_call)
  File "/usr/src/homeassistant/homeassistant/components/netatmo/__init__.py", line 148, in register_webhook
    webhook_register(
  File "/usr/src/homeassistant/homeassistant/components/webhook/__init__.py", line 36, in async_register
    raise ValueError("Handler is already defined!")
ValueError: Handler is already defined!

I have masked my duckdns address, which in reality matches the ones in the system settings and the long string after /webhook/ assuming this will lead to my netatmo account.

URL_Setup
This is my URL setup. Next to the .org I have not identified an additional port.

I’m getting the same type of error using 0.116.2, I am using the :
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 193, in _async_setup_platform
await asyncio.shield(task)
File “/usr/src/homeassistant/homeassistant/components/netatmo/sensor.py”, line 160, in async_setup_entry
async_add_entities(await find_entities(data_class_name), True)
File “/usr/src/homeassistant/homeassistant/components/netatmo/sensor.py”, line 151, in find_entities
NetatmoSensor(data_handler, data_class_name, module, condition)
File “/usr/src/homeassistant/homeassistant/components/netatmo/sensor.py”, line 248, in init
self._device_name = module_info[“station_name”]
KeyError: ‘station_name’

Same error here! Netatmo Integration not working anymore since update to 0.116

I’m on it. I’ll keep you posted.

2 Likes

just checking in to see how this is doing and if you needed someone to test.